{"version":3,"file":"navigation.906f31df.js","sources":["../../../../../../node_modules/@sveltejs/kit/src/runtime/app/navigation.js"],"sourcesContent":["import { client_method } from '../client/singletons.js';\n\n/**\n * If called when the page is being updated following a navigation (in `onMount` or `afterNavigate` or an action, for example), this disables SvelteKit's built-in scroll handling.\n * This is generally discouraged, since it breaks user expectations.\n * @returns {void}\n */\nexport const disableScrollHandling = /* @__PURE__ */ client_method('disable_scroll_handling');\n\n/**\n * Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`.\n * For external URLs, use `window.location = url` instead of calling `goto(url)`.\n *\n * @type {(url: string | URL, opts?: {\n * replaceState?: boolean;\n * noScroll?: boolean;\n * keepFocus?: boolean;\n * invalidateAll?: boolean;\n * state?: any\n * }) => Promise}\n * @param {string | URL} url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://kit.svelte.dev/docs/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app.\n * @param {Object} [opts] Options related to the navigation\n * @param {boolean} [opts.replaceState] If `true`, will replace the current `history` entry rather than creating a new one with `pushState`\n * @param {boolean} [opts.noScroll] If `true`, the browser will maintain its scroll position rather than scrolling to the top of the page after navigation\n * @param {boolean} [opts.keepFocus] If `true`, the currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body\n * @param {boolean} [invalidateAll] If `true`, all `load` functions of the page will be rerun. See https://kit.svelte.dev/docs/load#rerunning-load-functions for more info on invalidation.\n * @param {any} [opts.state] The state of the new/updated history entry\n * @returns {Promise}\n */\nexport const goto = /* @__PURE__ */ client_method('goto');\n\n/**\n * Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated.\n *\n * If the argument is given as a `string` or `URL`, it must resolve to the same URL that was passed to `fetch` or `depends` (including query parameters).\n * To create a custom identifier, use a string beginning with `[a-z]+:` (e.g. `custom:state`) — this is a valid URL.\n *\n * The `function` argument can be used define a custom predicate. It receives the full `URL` and causes `load` to rerun if `true` is returned.\n * This can be useful if you want to invalidate based on a pattern instead of a exact match.\n *\n * ```ts\n * // Example: Match '/path' regardless of the query parameters\n * import { invalidate } from '$app/navigation';\n *\n * invalidate((url) => url.pathname === '/path');\n * ```\n * @type {(url: string | URL | ((url: URL) => boolean)) => Promise}\n * @param {string | URL | ((url: URL) => boolean)} url The invalidated URL\n * @returns {Promise}\n */\nexport const invalidate = /* @__PURE__ */ client_method('invalidate');\n\n/**\n * Causes all `load` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated.\n * @type {() => Promise}\n * @returns {Promise}\n */\nexport const invalidateAll = /* @__PURE__ */ client_method('invalidate_all');\n\n/**\n * Programmatically preloads the given page, which means\n * 1. ensuring that the code for the page is loaded, and\n * 2. calling the page's load function with the appropriate options.\n *\n * This is the same behaviour that SvelteKit triggers when the user taps or mouses over an `` element with `data-sveltekit-preload-data`.\n * If the next navigation is to `href`, the values returned from load will be used, making navigation instantaneous.\n * Returns a Promise that resolves when the preload is complete.\n *\n * @type {(href: string) => Promise}\n * @param {string} href Page to preload\n * @returns {Promise}\n */\nexport const preloadData = /* @__PURE__ */ client_method('preload_data');\n\n/**\n * Programmatically imports the code for routes that haven't yet been fetched.\n * Typically, you might call this to speed up subsequent navigation.\n *\n * You can specify routes by any matching pathname such as `/about` (to match `src/routes/about/+page.svelte`) or `/blog/*` (to match `src/routes/blog/[slug]/+page.svelte`).\n *\n * Unlike `preloadData`, this won't call `load` functions.\n * Returns a Promise that resolves when the modules have been imported.\n *\n * @type {(...urls: string[]) => Promise}\n * @param {...string[]} urls\n * @returns {Promise}\n */\nexport const preloadCode = /* @__PURE__ */ client_method('preload_code');\n\n/**\n * A navigation interceptor that triggers before we navigate to a new URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.\n *\n * Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response.\n *\n * When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`.\n *\n * If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`.\n *\n * `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n * @type {(callback: (navigation: import('@sveltejs/kit').BeforeNavigate) => void) => void}\n * @param {(navigation: import('@sveltejs/kit').BeforeNavigate) => void} callback\n * @returns {void}\n */\nexport const beforeNavigate = /* @__PURE__ */ client_method('before_navigate');\n\n/**\n * A lifecycle function that runs the supplied `callback` immediately before we navigate to a new URL except during full-page navigations.\n *\n * If you return a `Promise`, SvelteKit will wait for it to resolve before completing the navigation. This allows you to — for example — use `document.startViewTransition`. Avoid promises that are slow to resolve, since navigation will appear stalled to the user.\n *\n * If a function (or a `Promise` that resolves to a function) is returned from the callback, it will be called once the DOM has updated.\n *\n * `onNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n * @type {(callback: (navigation: import('@sveltejs/kit').OnNavigate) => import('../../types/internal.js').MaybePromise<(() => void) | void>) => void}\n * @param {(navigation: import('@sveltejs/kit').OnNavigate) => void} callback\n * @returns {void}\n */\nexport const onNavigate = /* @__PURE__ */ client_method('on_navigate');\n\n/**\n * A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a new URL.\n *\n * `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n * @type {(callback: (navigation: import('@sveltejs/kit').AfterNavigate) => void) => void}\n * @param {(navigation: import('@sveltejs/kit').AfterNavigate) => void} callback\n * @returns {void}\n */\nexport const afterNavigate = /* @__PURE__ */ client_method('after_navigate');\n"],"names":["goto","client_method"],"mappings":"6CA6BY,MAACA,EAAuBC,EAAc,MAAM","x_google_ignoreList":[0]}