{"version":3,"file":"start.2831c7e3.js","sources":["../../../../../../node_modules/@sveltejs/kit/src/utils/url.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/session-storage.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/hash.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/fetcher.js","../../../../../../node_modules/@sveltejs/kit/src/utils/routing.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/parse.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/control.js","../../../../../../node_modules/@sveltejs/kit/src/utils/promises.js","../../../../../../node_modules/devalue/src/constants.js","../../../../../../node_modules/devalue/src/parse.js","../../../../../../node_modules/@sveltejs/kit/src/utils/exports.js","../../../../../../node_modules/@sveltejs/kit/src/utils/array.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/shared.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/client.js","../../../../../../node_modules/@sveltejs/kit/src/runtime/client/start.js"],"sourcesContent":["import { BROWSER } from 'esm-env';\n\nconst absolute = /^([a-z]+:)?\\/?\\//;\nconst scheme = /^[a-z]+:/;\n\n/**\n * @param {string} base\n * @param {string} path\n */\nexport function resolve(base, path) {\n\tif (scheme.test(path)) return path;\n\tif (path[0] === '#') return base + path;\n\n\tconst base_match = absolute.exec(base);\n\tconst path_match = absolute.exec(path);\n\n\tif (!base_match) {\n\t\tthrow new Error(`bad base path: \"${base}\"`);\n\t}\n\n\tconst baseparts = path_match ? [] : base.slice(base_match[0].length).split('/');\n\tconst pathparts = path_match ? path.slice(path_match[0].length).split('/') : path.split('/');\n\n\tbaseparts.pop();\n\n\tfor (let i = 0; i < pathparts.length; i += 1) {\n\t\tconst part = pathparts[i];\n\t\tif (part === '.') continue;\n\t\telse if (part === '..') baseparts.pop();\n\t\telse baseparts.push(part);\n\t}\n\n\tconst prefix = (path_match && path_match[0]) || (base_match && base_match[0]) || '';\n\n\treturn `${prefix}${baseparts.join('/')}`;\n}\n\n/** @param {string} path */\nexport function is_root_relative(path) {\n\treturn path[0] === '/' && path[1] !== '/';\n}\n\n/**\n * @param {string} path\n * @param {import('types').TrailingSlash} trailing_slash\n */\nexport function normalize_path(path, trailing_slash) {\n\tif (path === '/' || trailing_slash === 'ignore') return path;\n\n\tif (trailing_slash === 'never') {\n\t\treturn path.endsWith('/') ? path.slice(0, -1) : path;\n\t} else if (trailing_slash === 'always' && !path.endsWith('/')) {\n\t\treturn path + '/';\n\t}\n\n\treturn path;\n}\n\n/**\n * Decode pathname excluding %25 to prevent further double decoding of params\n * @param {string} pathname\n */\nexport function decode_pathname(pathname) {\n\treturn pathname.split('%25').map(decodeURI).join('%25');\n}\n\n/** @param {Record} params */\nexport function decode_params(params) {\n\tfor (const key in params) {\n\t\t// input has already been decoded by decodeURI\n\t\t// now handle the rest\n\t\tparams[key] = decodeURIComponent(params[key]);\n\t}\n\n\treturn params;\n}\n\n/**\n * The error when a URL is malformed is not very helpful, so we augment it with the URI\n * @param {string} uri\n */\nexport function decode_uri(uri) {\n\ttry {\n\t\treturn decodeURI(uri);\n\t} catch (e) {\n\t\tif (e instanceof Error) {\n\t\t\te.message = `Failed to decode URI: ${uri}\\n` + e.message;\n\t\t}\n\t\tthrow e;\n\t}\n}\n\n/**\n * URL properties that could change during the lifetime of the page,\n * which excludes things like `origin`\n */\nconst tracked_url_properties = /** @type {const} */ ([\n\t'href',\n\t'pathname',\n\t'search',\n\t'searchParams',\n\t'toString',\n\t'toJSON'\n]);\n\n/**\n * @param {URL} url\n * @param {() => void} callback\n */\nexport function make_trackable(url, callback) {\n\tconst tracked = new URL(url);\n\n\tfor (const property of tracked_url_properties) {\n\t\tObject.defineProperty(tracked, property, {\n\t\t\tget() {\n\t\t\t\tcallback();\n\t\t\t\treturn url[property];\n\t\t\t},\n\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t}\n\n\tif (!BROWSER) {\n\t\t// @ts-ignore\n\t\ttracked[Symbol.for('nodejs.util.inspect.custom')] = (depth, opts, inspect) => {\n\t\t\treturn inspect(url, opts);\n\t\t};\n\t}\n\n\tdisable_hash(tracked);\n\n\treturn tracked;\n}\n\n/**\n * Disallow access to `url.hash` on the server and in `load`\n * @param {URL} url\n */\nexport function disable_hash(url) {\n\tObject.defineProperty(url, 'hash', {\n\t\tget() {\n\t\t\tthrow new Error(\n\t\t\t\t'Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead'\n\t\t\t);\n\t\t}\n\t});\n}\n\n/**\n * Disallow access to `url.search` and `url.searchParams` during prerendering\n * @param {URL} url\n */\nexport function disable_search(url) {\n\tfor (const property of ['search', 'searchParams']) {\n\t\tObject.defineProperty(url, property, {\n\t\t\tget() {\n\t\t\t\tthrow new Error(`Cannot access url.${property} on a page with prerendering enabled`);\n\t\t\t}\n\t\t});\n\t}\n}\n\nconst DATA_SUFFIX = '/__data.json';\n\n/** @param {string} pathname */\nexport function has_data_suffix(pathname) {\n\treturn pathname.endsWith(DATA_SUFFIX);\n}\n\n/** @param {string} pathname */\nexport function add_data_suffix(pathname) {\n\treturn pathname.replace(/\\/$/, '') + DATA_SUFFIX;\n}\n\n/** @param {string} pathname */\nexport function strip_data_suffix(pathname) {\n\treturn pathname.slice(0, -DATA_SUFFIX.length);\n}\n","/**\n * Read a value from `sessionStorage`\n * @param {string} key\n */\nexport function get(key) {\n\ttry {\n\t\treturn JSON.parse(sessionStorage[key]);\n\t} catch {\n\t\t// do nothing\n\t}\n}\n\n/**\n * Write a value to `sessionStorage`\n * @param {string} key\n * @param {any} value\n */\nexport function set(key, value) {\n\tconst json = JSON.stringify(value);\n\ttry {\n\t\tsessionStorage[key] = json;\n\t} catch {\n\t\t// do nothing\n\t}\n}\n","/**\n * Hash using djb2\n * @param {import('types').StrictBody[]} values\n */\nexport function hash(...values) {\n\tlet hash = 5381;\n\n\tfor (const value of values) {\n\t\tif (typeof value === 'string') {\n\t\t\tlet i = value.length;\n\t\t\twhile (i) hash = (hash * 33) ^ value.charCodeAt(--i);\n\t\t} else if (ArrayBuffer.isView(value)) {\n\t\t\tconst buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\n\t\t\tlet i = buffer.length;\n\t\t\twhile (i) hash = (hash * 33) ^ buffer[--i];\n\t\t} else {\n\t\t\tthrow new TypeError('value must be a string or TypedArray');\n\t\t}\n\t}\n\n\treturn (hash >>> 0).toString(36);\n}\n","import { DEV } from 'esm-env';\nimport { hash } from '../hash.js';\n\nlet loading = 0;\n\nexport const native_fetch = window.fetch;\n\nexport function lock_fetch() {\n\tloading += 1;\n}\n\nexport function unlock_fetch() {\n\tloading -= 1;\n}\n\nif (DEV) {\n\tlet can_inspect_stack_trace = false;\n\n\tconst check_stack_trace = async () => {\n\t\tconst stack = /** @type {string} */ (new Error().stack);\n\t\tcan_inspect_stack_trace = stack.includes('check_stack_trace');\n\t};\n\n\tcheck_stack_trace();\n\n\twindow.fetch = (input, init) => {\n\t\t// Check if fetch was called via load_node. the lock method only checks if it was called at the\n\t\t// same time, but not necessarily if it was called from `load`.\n\t\t// We use just the filename as the method name sometimes does not appear on the CI.\n\t\tconst url = input instanceof Request ? input.url : input.toString();\n\t\tconst stack_array = /** @type {string} */ (new Error().stack).split('\\n');\n\t\t// We need to do a cutoff because Safari and Firefox maintain the stack\n\t\t// across events and for example traces a `fetch` call triggered from a button\n\t\t// back to the creation of the event listener and the element creation itself,\n\t\t// where at some point client.js will show up, leading to false positives.\n\t\tconst cutoff = stack_array.findIndex((a) => a.includes('load@') || a.includes('at load'));\n\t\tconst stack = stack_array.slice(0, cutoff + 2).join('\\n');\n\n\t\tconst heuristic = can_inspect_stack_trace\n\t\t\t? stack.includes('src/runtime/client/client.js')\n\t\t\t: loading;\n\t\tif (heuristic) {\n\t\t\tconsole.warn(\n\t\t\t\t`Loading ${url} using \\`window.fetch\\`. For best results, use the \\`fetch\\` that is passed to your \\`load\\` function: https://kit.svelte.dev/docs/load#making-fetch-requests`\n\t\t\t);\n\t\t}\n\n\t\tconst method = input instanceof Request ? input.method : init?.method || 'GET';\n\n\t\tif (method !== 'GET') {\n\t\t\tcache.delete(build_selector(input));\n\t\t}\n\n\t\treturn native_fetch(input, init);\n\t};\n} else {\n\twindow.fetch = (input, init) => {\n\t\tconst method = input instanceof Request ? input.method : init?.method || 'GET';\n\n\t\tif (method !== 'GET') {\n\t\t\tcache.delete(build_selector(input));\n\t\t}\n\n\t\treturn native_fetch(input, init);\n\t};\n}\n\nconst cache = new Map();\n\n/**\n * Should be called on the initial run of load functions that hydrate the page.\n * Saves any requests with cache-control max-age to the cache.\n * @param {URL | string} resource\n * @param {RequestInit} [opts]\n */\nexport function initial_fetch(resource, opts) {\n\tconst selector = build_selector(resource, opts);\n\n\tconst script = document.querySelector(selector);\n\tif (script?.textContent) {\n\t\tconst { body, ...init } = JSON.parse(script.textContent);\n\n\t\tconst ttl = script.getAttribute('data-ttl');\n\t\tif (ttl) cache.set(selector, { body, init, ttl: 1000 * Number(ttl) });\n\n\t\treturn Promise.resolve(new Response(body, init));\n\t}\n\n\treturn native_fetch(resource, opts);\n}\n\n/**\n * Tries to get the response from the cache, if max-age allows it, else does a fetch.\n * @param {URL | string} resource\n * @param {string} resolved\n * @param {RequestInit} [opts]\n */\nexport function subsequent_fetch(resource, resolved, opts) {\n\tif (cache.size > 0) {\n\t\tconst selector = build_selector(resource, opts);\n\t\tconst cached = cache.get(selector);\n\t\tif (cached) {\n\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/Request/cache#value\n\t\t\tif (\n\t\t\t\tperformance.now() < cached.ttl &&\n\t\t\t\t['default', 'force-cache', 'only-if-cached', undefined].includes(opts?.cache)\n\t\t\t) {\n\t\t\t\treturn new Response(cached.body, cached.init);\n\t\t\t}\n\n\t\t\tcache.delete(selector);\n\t\t}\n\t}\n\n\treturn native_fetch(resolved, opts);\n}\n\n/**\n * Build the cache key for a given request\n * @param {URL | RequestInfo} resource\n * @param {RequestInit} [opts]\n */\nfunction build_selector(resource, opts) {\n\tconst url = JSON.stringify(resource instanceof Request ? resource.url : resource);\n\n\tlet selector = `script[data-sveltekit-fetched][data-url=${url}]`;\n\n\tif (opts?.headers || opts?.body) {\n\t\t/** @type {import('types').StrictBody[]} */\n\t\tconst values = [];\n\n\t\tif (opts.headers) {\n\t\t\tvalues.push([...new Headers(opts.headers)].join(','));\n\t\t}\n\n\t\tif (opts.body && (typeof opts.body === 'string' || ArrayBuffer.isView(opts.body))) {\n\t\t\tvalues.push(opts.body);\n\t\t}\n\n\t\tselector += `[data-hash=\"${hash(...values)}\"]`;\n\t}\n\n\treturn selector;\n}\n","const param_pattern = /^(\\[)?(\\.\\.\\.)?(\\w+)(?:=(\\w+))?(\\])?$/;\n\n/**\n * Creates the regex pattern, extracts parameter names, and generates types for a route\n * @param {string} id\n */\nexport function parse_route_id(id) {\n\t/** @type {import('types').RouteParam[]} */\n\tconst params = [];\n\n\tconst pattern =\n\t\tid === '/'\n\t\t\t? /^\\/$/\n\t\t\t: new RegExp(\n\t\t\t\t\t`^${get_route_segments(id)\n\t\t\t\t\t\t.map((segment) => {\n\t\t\t\t\t\t\t// special case — /[...rest]/ could contain zero segments\n\t\t\t\t\t\t\tconst rest_match = /^\\[\\.\\.\\.(\\w+)(?:=(\\w+))?\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (rest_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: rest_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: rest_match[2],\n\t\t\t\t\t\t\t\t\toptional: false,\n\t\t\t\t\t\t\t\t\trest: true,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/(.*))?';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// special case — /[[optional]]/ could contain zero segments\n\t\t\t\t\t\t\tconst optional_match = /^\\[\\[(\\w+)(?:=(\\w+))?\\]\\]$/.exec(segment);\n\t\t\t\t\t\t\tif (optional_match) {\n\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\tname: optional_match[1],\n\t\t\t\t\t\t\t\t\tmatcher: optional_match[2],\n\t\t\t\t\t\t\t\t\toptional: true,\n\t\t\t\t\t\t\t\t\trest: false,\n\t\t\t\t\t\t\t\t\tchained: true\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn '(?:/([^/]+))?';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!segment) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst parts = segment.split(/\\[(.+?)\\](?!\\])/);\n\t\t\t\t\t\t\tconst result = parts\n\t\t\t\t\t\t\t\t.map((content, i) => {\n\t\t\t\t\t\t\t\t\tif (i % 2) {\n\t\t\t\t\t\t\t\t\t\tif (content.startsWith('x+')) {\n\t\t\t\t\t\t\t\t\t\t\treturn escape(String.fromCharCode(parseInt(content.slice(2), 16)));\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (content.startsWith('u+')) {\n\t\t\t\t\t\t\t\t\t\t\treturn escape(\n\t\t\t\t\t\t\t\t\t\t\t\tString.fromCharCode(\n\t\t\t\t\t\t\t\t\t\t\t\t\t...content\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.slice(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.split('-')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.map((code) => parseInt(code, 16))\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconst match = param_pattern.exec(content);\n\t\t\t\t\t\t\t\t\t\tif (!match) {\n\t\t\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t\t\t`Invalid param: ${content}. Params and matcher names can only have underscores and alphanumeric characters.`\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tconst [, is_optional, is_rest, name, matcher] = match;\n\t\t\t\t\t\t\t\t\t\t// It's assumed that the following invalid route id cases are already checked\n\t\t\t\t\t\t\t\t\t\t// - unbalanced brackets\n\t\t\t\t\t\t\t\t\t\t// - optional param following rest param\n\n\t\t\t\t\t\t\t\t\t\tparams.push({\n\t\t\t\t\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\t\t\t\tmatcher,\n\t\t\t\t\t\t\t\t\t\t\toptional: !!is_optional,\n\t\t\t\t\t\t\t\t\t\t\trest: !!is_rest,\n\t\t\t\t\t\t\t\t\t\t\tchained: is_rest ? i === 1 && parts[0] === '' : false\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\treturn is_rest ? '(.*?)' : is_optional ? '([^/]*)?' : '([^/]+?)';\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn escape(content);\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t.join('');\n\n\t\t\t\t\t\t\treturn '/' + result;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.join('')}/?$`\n\t\t\t );\n\n\treturn { pattern, params };\n}\n\nconst optional_param_regex = /\\/\\[\\[\\w+?(?:=\\w+)?\\]\\]/;\n\n/**\n * Removes optional params from a route ID.\n * @param {string} id\n * @returns The route id with optional params removed\n */\nexport function remove_optional_params(id) {\n\treturn id.replace(optional_param_regex, '');\n}\n\n/**\n * Returns `false` for `(group)` segments\n * @param {string} segment\n */\nfunction affects_path(segment) {\n\treturn !/^\\([^)]+\\)$/.test(segment);\n}\n\n/**\n * Splits a route id into its segments, removing segments that\n * don't affect the path (i.e. groups). The root route is represented by `/`\n * and will be returned as `['']`.\n * @param {string} route\n * @returns string[]\n */\nexport function get_route_segments(route) {\n\treturn route.slice(1).split('/').filter(affects_path);\n}\n\n/**\n * @param {RegExpMatchArray} match\n * @param {import('types').RouteParam[]} params\n * @param {Record} matchers\n */\nexport function exec(match, params, matchers) {\n\t/** @type {Record} */\n\tconst result = {};\n\n\tconst values = match.slice(1);\n\n\tlet buffered = 0;\n\n\tfor (let i = 0; i < params.length; i += 1) {\n\t\tconst param = params[i];\n\t\tconst value = values[i - buffered];\n\n\t\t// in the `[[a=b]]/.../[...rest]` case, if one or more optional parameters\n\t\t// weren't matched, roll the skipped values into the rest\n\t\tif (param.chained && param.rest && buffered) {\n\t\t\tresult[param.name] = values\n\t\t\t\t.slice(i - buffered, i + 1)\n\t\t\t\t.filter((s) => s)\n\t\t\t\t.join('/');\n\n\t\t\tbuffered = 0;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// if `value` is undefined, it means this is an optional or rest parameter\n\t\tif (value === undefined) {\n\t\t\tif (param.rest) result[param.name] = '';\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!param.matcher || matchers[param.matcher](value)) {\n\t\t\tresult[param.name] = value;\n\n\t\t\t// Now that the params match, reset the buffer if the next param isn't the [...rest]\n\t\t\t// and the next value is defined, otherwise the buffer will cause us to skip values\n\t\t\tconst next_param = params[i + 1];\n\t\t\tconst next_value = values[i + 1];\n\t\t\tif (next_param && !next_param.rest && next_param.optional && next_value && param.chained) {\n\t\t\t\tbuffered = 0;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\t// in the `/[[a=b]]/...` case, if the value didn't satisfy the matcher,\n\t\t// keep track of the number of skipped optional parameters and continue\n\t\tif (param.optional && param.chained) {\n\t\t\tbuffered++;\n\t\t\tcontinue;\n\t\t}\n\n\t\t// otherwise, if the matcher returns `false`, the route did not match\n\t\treturn;\n\t}\n\n\tif (buffered) return;\n\treturn result;\n}\n\n/** @param {string} str */\nfunction escape(str) {\n\treturn (\n\t\tstr\n\t\t\t.normalize()\n\t\t\t// escape [ and ] before escaping other characters, since they are used in the replacements\n\t\t\t.replace(/[[\\]]/g, '\\\\$&')\n\t\t\t// replace %, /, ? and # with their encoded versions because decode_pathname leaves them untouched\n\t\t\t.replace(/%/g, '%25')\n\t\t\t.replace(/\\//g, '%2[Ff]')\n\t\t\t.replace(/\\?/g, '%3[Ff]')\n\t\t\t.replace(/#/g, '%23')\n\t\t\t// escape characters that have special meaning in regex\n\t\t\t.replace(/[.*+?^${}()|\\\\]/g, '\\\\$&')\n\t);\n}\n","import { exec, parse_route_id } from '../../utils/routing.js';\n\n/**\n * @param {import('./types').SvelteKitApp} app\n * @returns {import('types').CSRRoute[]}\n */\nexport function parse({ nodes, server_loads, dictionary, matchers }) {\n\tconst layouts_with_server_load = new Set(server_loads);\n\n\treturn Object.entries(dictionary).map(([id, [leaf, layouts, errors]]) => {\n\t\tconst { pattern, params } = parse_route_id(id);\n\n\t\tconst route = {\n\t\t\tid,\n\t\t\t/** @param {string} path */\n\t\t\texec: (path) => {\n\t\t\t\tconst match = pattern.exec(path);\n\t\t\t\tif (match) return exec(match, params, matchers);\n\t\t\t},\n\t\t\terrors: [1, ...(errors || [])].map((n) => nodes[n]),\n\t\t\tlayouts: [0, ...(layouts || [])].map(create_layout_loader),\n\t\t\tleaf: create_leaf_loader(leaf)\n\t\t};\n\n\t\t// bit of a hack, but ensures that layout/error node lists are the same\n\t\t// length, without which the wrong data will be applied if the route\n\t\t// manifest looks like `[[a, b], [c,], d]`\n\t\troute.errors.length = route.layouts.length = Math.max(\n\t\t\troute.errors.length,\n\t\t\troute.layouts.length\n\t\t);\n\n\t\treturn route;\n\t});\n\n\t/**\n\t * @param {number} id\n\t * @returns {[boolean, import('types').CSRPageNodeLoader]}\n\t */\n\tfunction create_leaf_loader(id) {\n\t\t// whether or not the route uses the server data is\n\t\t// encoded using the ones' complement, to save space\n\t\tconst uses_server_data = id < 0;\n\t\tif (uses_server_data) id = ~id;\n\t\treturn [uses_server_data, nodes[id]];\n\t}\n\n\t/**\n\t * @param {number | undefined} id\n\t * @returns {[boolean, import('types').CSRPageNodeLoader] | undefined}\n\t */\n\tfunction create_layout_loader(id) {\n\t\t// whether or not the layout uses the server data is\n\t\t// encoded in the layouts array, to save space\n\t\treturn id === undefined ? id : [layouts_with_server_load.has(id), nodes[id]];\n\t}\n}\n","export class HttpError {\n\t/**\n\t * @param {number} status\n\t * @param {{message: string} extends App.Error ? (App.Error | string | undefined) : App.Error} body\n\t */\n\tconstructor(status, body) {\n\t\tthis.status = status;\n\t\tif (typeof body === 'string') {\n\t\t\tthis.body = { message: body };\n\t\t} else if (body) {\n\t\t\tthis.body = body;\n\t\t} else {\n\t\t\tthis.body = { message: `Error: ${status}` };\n\t\t}\n\t}\n\n\ttoString() {\n\t\treturn JSON.stringify(this.body);\n\t}\n}\n\nexport class Redirect {\n\t/**\n\t * @param {300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308} status\n\t * @param {string} location\n\t */\n\tconstructor(status, location) {\n\t\tthis.status = status;\n\t\tthis.location = location;\n\t}\n}\n\n/**\n * @template {Record | undefined} [T=undefined]\n */\nexport class ActionFailure {\n\t/**\n\t * @param {number} status\n\t * @param {T} [data]\n\t */\n\tconstructor(status, data) {\n\t\tthis.status = status;\n\t\tthis.data = data;\n\t}\n}\n\n/**\n * This is a grotesque hack that, in dev, allows us to replace the implementations\n * of these classes that you'd get by importing them from `@sveltejs/kit` with the\n * ones that are imported via Vite and loaded internally, so that instanceof\n * checks work even though SvelteKit imports this module via Vite and consumers\n * import it via Node\n * @param {{\n * ActionFailure: typeof ActionFailure;\n * HttpError: typeof HttpError;\n * Redirect: typeof Redirect;\n * }} implementations\n */\nexport function replace_implementations(implementations) {\n\t// @ts-expect-error\n\tActionFailure = implementations.ActionFailure; // eslint-disable-line no-class-assign\n\t// @ts-expect-error\n\tHttpError = implementations.HttpError; // eslint-disable-line no-class-assign\n\t// @ts-expect-error\n\tRedirect = implementations.Redirect; // eslint-disable-line no-class-assign\n}\n","/**\n * Given an object, return a new object where all top level values are awaited\n *\n * @param {Record} object\n * @returns {Promise>}\n */\nexport async function unwrap_promises(object) {\n\tfor (const key in object) {\n\t\tif (typeof object[key]?.then === 'function') {\n\t\t\treturn Object.fromEntries(\n\t\t\t\tawait Promise.all(Object.entries(object).map(async ([key, value]) => [key, await value]))\n\t\t\t);\n\t\t}\n\t}\n\n\treturn object;\n}\n","export const UNDEFINED = -1;\nexport const HOLE = -2;\nexport const NAN = -3;\nexport const POSITIVE_INFINITY = -4;\nexport const NEGATIVE_INFINITY = -5;\nexport const NEGATIVE_ZERO = -6;\n","import {\n\tHOLE,\n\tNAN,\n\tNEGATIVE_INFINITY,\n\tNEGATIVE_ZERO,\n\tPOSITIVE_INFINITY,\n\tUNDEFINED\n} from './constants.js';\n\n/**\n * Revive a value serialized with `devalue.stringify`\n * @param {string} serialized\n * @param {Record any>} [revivers]\n */\nexport function parse(serialized, revivers) {\n\treturn unflatten(JSON.parse(serialized), revivers);\n}\n\n/**\n * Revive a value flattened with `devalue.stringify`\n * @param {number | any[]} parsed\n * @param {Record any>} [revivers]\n */\nexport function unflatten(parsed, revivers) {\n\tif (typeof parsed === 'number') return hydrate(parsed, true);\n\n\tif (!Array.isArray(parsed) || parsed.length === 0) {\n\t\tthrow new Error('Invalid input');\n\t}\n\n\tconst values = /** @type {any[]} */ (parsed);\n\n\tconst hydrated = Array(values.length);\n\n\t/**\n\t * @param {number} index\n\t * @returns {any}\n\t */\n\tfunction hydrate(index, standalone = false) {\n\t\tif (index === UNDEFINED) return undefined;\n\t\tif (index === NAN) return NaN;\n\t\tif (index === POSITIVE_INFINITY) return Infinity;\n\t\tif (index === NEGATIVE_INFINITY) return -Infinity;\n\t\tif (index === NEGATIVE_ZERO) return -0;\n\n\t\tif (standalone) throw new Error(`Invalid input`);\n\n\t\tif (index in hydrated) return hydrated[index];\n\n\t\tconst value = values[index];\n\n\t\tif (!value || typeof value !== 'object') {\n\t\t\thydrated[index] = value;\n\t\t} else if (Array.isArray(value)) {\n\t\t\tif (typeof value[0] === 'string') {\n\t\t\t\tconst type = value[0];\n\n\t\t\t\tconst reviver = revivers?.[type];\n\t\t\t\tif (reviver) {\n\t\t\t\t\treturn (hydrated[index] = reviver(hydrate(value[1])));\n\t\t\t\t}\n\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'Date':\n\t\t\t\t\t\thydrated[index] = new Date(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Set':\n\t\t\t\t\t\tconst set = new Set();\n\t\t\t\t\t\thydrated[index] = set;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 1) {\n\t\t\t\t\t\t\tset.add(hydrate(value[i]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Map':\n\t\t\t\t\t\tconst map = new Map();\n\t\t\t\t\t\thydrated[index] = map;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tmap.set(hydrate(value[i]), hydrate(value[i + 1]));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'RegExp':\n\t\t\t\t\t\thydrated[index] = new RegExp(value[1], value[2]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'Object':\n\t\t\t\t\t\thydrated[index] = Object(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'BigInt':\n\t\t\t\t\t\thydrated[index] = BigInt(value[1]);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'null':\n\t\t\t\t\t\tconst obj = Object.create(null);\n\t\t\t\t\t\thydrated[index] = obj;\n\t\t\t\t\t\tfor (let i = 1; i < value.length; i += 2) {\n\t\t\t\t\t\t\tobj[value[i]] = hydrate(value[i + 1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new Error(`Unknown type ${type}`);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst array = new Array(value.length);\n\t\t\t\thydrated[index] = array;\n\n\t\t\t\tfor (let i = 0; i < value.length; i += 1) {\n\t\t\t\t\tconst n = value[i];\n\t\t\t\t\tif (n === HOLE) continue;\n\n\t\t\t\t\tarray[i] = hydrate(n);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t/** @type {Record} */\n\t\t\tconst object = {};\n\t\t\thydrated[index] = object;\n\n\t\t\tfor (const key in value) {\n\t\t\t\tconst n = value[key];\n\t\t\t\tobject[key] = hydrate(n);\n\t\t\t}\n\t\t}\n\n\t\treturn hydrated[index];\n\t}\n\n\treturn hydrate(0);\n}\n","/**\n * @param {Set} expected\n */\nfunction validator(expected) {\n\t/**\n\t * @param {any} module\n\t * @param {string} [file]\n\t */\n\tfunction validate(module, file) {\n\t\tif (!module) return;\n\n\t\tfor (const key in module) {\n\t\t\tif (key[0] === '_' || expected.has(key)) continue; // key is valid in this module\n\n\t\t\tconst values = [...expected.values()];\n\n\t\t\tconst hint =\n\t\t\t\thint_for_supported_files(key, file?.slice(file.lastIndexOf('.'))) ??\n\t\t\t\t`valid exports are ${values.join(', ')}, or anything with a '_' prefix`;\n\n\t\t\tthrow new Error(`Invalid export '${key}'${file ? ` in ${file}` : ''} (${hint})`);\n\t\t}\n\t}\n\n\treturn validate;\n}\n\n/**\n * @param {string} key\n * @param {string} ext\n * @returns {string | void}\n */\nfunction hint_for_supported_files(key, ext = '.js') {\n\tconst supported_files = [];\n\n\tif (valid_layout_exports.has(key)) {\n\t\tsupported_files.push(`+layout${ext}`);\n\t}\n\n\tif (valid_page_exports.has(key)) {\n\t\tsupported_files.push(`+page${ext}`);\n\t}\n\n\tif (valid_layout_server_exports.has(key)) {\n\t\tsupported_files.push(`+layout.server${ext}`);\n\t}\n\n\tif (valid_page_server_exports.has(key)) {\n\t\tsupported_files.push(`+page.server${ext}`);\n\t}\n\n\tif (valid_server_exports.has(key)) {\n\t\tsupported_files.push(`+server${ext}`);\n\t}\n\n\tif (supported_files.length > 0) {\n\t\treturn `'${key}' is a valid export in ${supported_files.slice(0, -1).join(', ')}${\n\t\t\tsupported_files.length > 1 ? ' or ' : ''\n\t\t}${supported_files.at(-1)}`;\n\t}\n}\n\nconst valid_layout_exports = new Set([\n\t'load',\n\t'prerender',\n\t'csr',\n\t'ssr',\n\t'trailingSlash',\n\t'config'\n]);\nconst valid_page_exports = new Set([...valid_layout_exports, 'entries']);\nconst valid_layout_server_exports = new Set([...valid_layout_exports]);\nconst valid_page_server_exports = new Set([...valid_layout_server_exports, 'actions', 'entries']);\nconst valid_server_exports = new Set([\n\t'GET',\n\t'POST',\n\t'PATCH',\n\t'PUT',\n\t'DELETE',\n\t'OPTIONS',\n\t'prerender',\n\t'trailingSlash',\n\t'config',\n\t'entries'\n]);\n\nexport const validate_layout_exports = validator(valid_layout_exports);\nexport const validate_page_exports = validator(valid_page_exports);\nexport const validate_layout_server_exports = validator(valid_layout_server_exports);\nexport const validate_page_server_exports = validator(valid_page_server_exports);\nexport const validate_server_exports = validator(valid_server_exports);\n","/**\n * Removes nullish values from an array.\n *\n * @template T\n * @param {Array} arr\n */\nexport function compact(arr) {\n\treturn arr.filter(/** @returns {val is NonNullable} */ (val) => val != null);\n}\n","/**\n * @param {string} route_id\n * @param {string} dep\n */\nexport function validate_depends(route_id, dep) {\n\tconst match = /^(moz-icon|view-source|jar):/.exec(dep);\n\tif (match) {\n\t\tconsole.warn(\n\t\t\t`${route_id}: Calling \\`depends('${dep}')\\` will throw an error in Firefox because \\`${match[1]}\\` is a special URI scheme`\n\t\t);\n\t}\n}\n\nexport const INVALIDATED_PARAM = 'x-sveltekit-invalidated';\n","import { DEV } from 'esm-env';\nimport { onMount, tick } from 'svelte';\nimport {\n\tmake_trackable,\n\tdecode_pathname,\n\tdecode_params,\n\tnormalize_path,\n\tadd_data_suffix\n} from '../../utils/url.js';\nimport {\n\tfind_anchor,\n\tget_base_uri,\n\tget_link_info,\n\tget_router_options,\n\tis_external_url,\n\tscroll_state\n} from './utils.js';\nimport * as storage from './session-storage.js';\nimport {\n\tlock_fetch,\n\tunlock_fetch,\n\tinitial_fetch,\n\tsubsequent_fetch,\n\tnative_fetch\n} from './fetcher.js';\nimport { parse } from './parse.js';\n\nimport { base } from '__sveltekit/paths';\nimport { HttpError, Redirect } from '../control.js';\nimport { stores } from './singletons.js';\nimport { unwrap_promises } from '../../utils/promises.js';\nimport * as devalue from 'devalue';\nimport { INDEX_KEY, PRELOAD_PRIORITIES, SCROLL_KEY, SNAPSHOT_KEY } from './constants.js';\nimport { validate_page_exports } from '../../utils/exports.js';\nimport { compact } from '../../utils/array.js';\nimport { INVALIDATED_PARAM, validate_depends } from '../shared.js';\n\nlet errored = false;\n\n// We track the scroll position associated with each history entry in sessionStorage,\n// rather than on history.state itself, because when navigation is driven by\n// popstate it's too late to update the scroll position associated with the\n// state we're navigating from\n\n/** @typedef {{ x: number, y: number }} ScrollPosition */\n/** @type {Record} */\nconst scroll_positions = storage.get(SCROLL_KEY) ?? {};\n\n/** @type {Record} */\nconst snapshots = storage.get(SNAPSHOT_KEY) ?? {};\n\n/** @param {number} index */\nfunction update_scroll_positions(index) {\n\tscroll_positions[index] = scroll_state();\n}\n\n/**\n * @param {import('./types').SvelteKitApp} app\n * @param {HTMLElement} target\n * @returns {import('./types').Client}\n */\nexport function create_client(app, target) {\n\tconst routes = parse(app);\n\n\tconst default_layout_loader = app.nodes[0];\n\tconst default_error_loader = app.nodes[1];\n\n\t// we import the root layout/error nodes eagerly, so that\n\t// connectivity errors after initialisation don't nuke the app\n\tdefault_layout_loader();\n\tdefault_error_loader();\n\n\tconst container = __SVELTEKIT_EMBEDDED__ ? target : document.documentElement;\n\t/** @type {Array<((url: URL) => boolean)>} */\n\tconst invalidated = [];\n\n\t/**\n\t * An array of the `+layout.svelte` and `+page.svelte` component instances\n\t * that currently live on the page — used for capturing and restoring snapshots.\n\t * It's updated/manipulated through `bind:this` in `Root.svelte`.\n\t * @type {import('svelte').SvelteComponent[]}\n\t */\n\tconst components = [];\n\n\t/** @type {{id: string, promise: Promise} | null} */\n\tlet load_cache = null;\n\n\tconst callbacks = {\n\t\t/** @type {Array<(navigation: import('@sveltejs/kit').BeforeNavigate) => void>} */\n\t\tbefore_navigate: [],\n\n\t\t/** @type {Array<(navigation: import('@sveltejs/kit').AfterNavigate) => void>} */\n\t\tafter_navigate: []\n\t};\n\n\t/** @type {import('./types').NavigationState} */\n\tlet current = {\n\t\tbranch: [],\n\t\terror: null,\n\t\t// @ts-ignore - we need the initial value to be null\n\t\turl: null\n\t};\n\n\t/** this being true means we SSR'd */\n\tlet hydrated = false;\n\tlet started = false;\n\tlet autoscroll = true;\n\tlet updating = false;\n\tlet navigating = false;\n\tlet hash_navigating = false;\n\n\tlet force_invalidation = false;\n\n\t/** @type {import('svelte').SvelteComponent} */\n\tlet root;\n\n\t// keeping track of the history index in order to prevent popstate navigation events if needed\n\tlet current_history_index = history.state?.[INDEX_KEY];\n\n\tif (!current_history_index) {\n\t\t// we use Date.now() as an offset so that cross-document navigations\n\t\t// within the app don't result in data loss\n\t\tcurrent_history_index = Date.now();\n\n\t\t// create initial history entry, so we can return here\n\t\thistory.replaceState(\n\t\t\t{ ...history.state, [INDEX_KEY]: current_history_index },\n\t\t\t'',\n\t\t\tlocation.href\n\t\t);\n\t}\n\n\t// if we reload the page, or Cmd-Shift-T back to it,\n\t// recover scroll position\n\tconst scroll = scroll_positions[current_history_index];\n\tif (scroll) {\n\t\thistory.scrollRestoration = 'manual';\n\t\tscrollTo(scroll.x, scroll.y);\n\t}\n\n\t/** @type {import('@sveltejs/kit').Page} */\n\tlet page;\n\n\t/** @type {{}} */\n\tlet token;\n\n\t/** @type {Promise | null} */\n\tlet pending_invalidate;\n\n\tasync function invalidate() {\n\t\t// Accept all invalidations as they come, don't swallow any while another invalidation\n\t\t// is running because subsequent invalidations may make earlier ones outdated,\n\t\t// but batch multiple synchronous invalidations.\n\t\tpending_invalidate = pending_invalidate || Promise.resolve();\n\t\tawait pending_invalidate;\n\t\tpending_invalidate = null;\n\n\t\tconst url = new URL(location.href);\n\t\tconst intent = get_navigation_intent(url, true);\n\t\t// Clear preload, it might be affected by the invalidation.\n\t\t// Also solves an edge case where a preload is triggered, the navigation for it\n\t\t// was then triggered and is still running while the invalidation kicks in,\n\t\t// at which point the invalidation should take over and \"win\".\n\t\tload_cache = null;\n\n\t\tconst nav_token = (token = {});\n\t\tconst navigation_result = intent && (await load_route(intent));\n\t\tif (nav_token !== token) return;\n\n\t\tif (navigation_result) {\n\t\t\tif (navigation_result.type === 'redirect') {\n\t\t\t\treturn goto(new URL(navigation_result.location, url).href, {}, [url.pathname], nav_token);\n\t\t\t} else {\n\t\t\t\tif (navigation_result.props.page !== undefined) {\n\t\t\t\t\tpage = navigation_result.props.page;\n\t\t\t\t}\n\t\t\t\troot.$set(navigation_result.props);\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @param {number} index */\n\tfunction capture_snapshot(index) {\n\t\tif (components.some((c) => c?.snapshot)) {\n\t\t\tsnapshots[index] = components.map((c) => c?.snapshot?.capture());\n\t\t}\n\t}\n\n\t/** @param {number} index */\n\tfunction restore_snapshot(index) {\n\t\tsnapshots[index]?.forEach((value, i) => {\n\t\t\tcomponents[i]?.snapshot?.restore(value);\n\t\t});\n\t}\n\n\tfunction persist_state() {\n\t\tupdate_scroll_positions(current_history_index);\n\t\tstorage.set(SCROLL_KEY, scroll_positions);\n\n\t\tcapture_snapshot(current_history_index);\n\t\tstorage.set(SNAPSHOT_KEY, snapshots);\n\t}\n\n\t/**\n\t * @param {string | URL} url\n\t * @param {{ noScroll?: boolean; replaceState?: boolean; keepFocus?: boolean; state?: any; invalidateAll?: boolean }} opts\n\t * @param {string[]} redirect_chain\n\t * @param {{}} [nav_token]\n\t */\n\tasync function goto(\n\t\turl,\n\t\t{\n\t\t\tnoScroll = false,\n\t\t\treplaceState = false,\n\t\t\tkeepFocus = false,\n\t\t\tstate = {},\n\t\t\tinvalidateAll = false\n\t\t},\n\t\tredirect_chain,\n\t\tnav_token\n\t) {\n\t\tif (typeof url === 'string') {\n\t\t\turl = new URL(url, get_base_uri(document));\n\t\t}\n\n\t\treturn navigate({\n\t\t\turl,\n\t\t\tscroll: noScroll ? scroll_state() : null,\n\t\t\tkeepfocus: keepFocus,\n\t\t\tredirect_chain,\n\t\t\tdetails: {\n\t\t\t\tstate,\n\t\t\t\treplaceState\n\t\t\t},\n\t\t\tnav_token,\n\t\t\taccepted: () => {\n\t\t\t\tif (invalidateAll) {\n\t\t\t\t\tforce_invalidation = true;\n\t\t\t\t}\n\t\t\t},\n\t\t\tblocked: () => {},\n\t\t\ttype: 'goto'\n\t\t});\n\t}\n\n\t/** @param {import('./types').NavigationIntent} intent */\n\tasync function preload_data(intent) {\n\t\tload_cache = {\n\t\t\tid: intent.id,\n\t\t\tpromise: load_route(intent).then((result) => {\n\t\t\t\tif (result.type === 'loaded' && result.state.error) {\n\t\t\t\t\t// Don't cache errors, because they might be transient\n\t\t\t\t\tload_cache = null;\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t})\n\t\t};\n\n\t\treturn load_cache.promise;\n\t}\n\n\t/** @param {...string} pathnames */\n\tasync function preload_code(...pathnames) {\n\t\tconst matching = routes.filter((route) => pathnames.some((pathname) => route.exec(pathname)));\n\n\t\tconst promises = matching.map((r) => {\n\t\t\treturn Promise.all([...r.layouts, r.leaf].map((load) => load?.[1]()));\n\t\t});\n\n\t\tawait Promise.all(promises);\n\t}\n\n\t/** @param {import('./types').NavigationFinished} result */\n\tfunction initialize(result) {\n\t\tif (DEV && result.state.error && document.querySelector('vite-error-overlay')) return;\n\n\t\tcurrent = result.state;\n\n\t\tconst style = document.querySelector('style[data-sveltekit]');\n\t\tif (style) style.remove();\n\n\t\tpage = /** @type {import('@sveltejs/kit').Page} */ (result.props.page);\n\n\t\troot = new app.root({\n\t\t\ttarget,\n\t\t\tprops: { ...result.props, stores, components },\n\t\t\thydrate: true\n\t\t});\n\n\t\trestore_snapshot(current_history_index);\n\n\t\t/** @type {import('@sveltejs/kit').AfterNavigate} */\n\t\tconst navigation = {\n\t\t\tfrom: null,\n\t\t\tto: {\n\t\t\t\tparams: current.params,\n\t\t\t\troute: { id: current.route?.id ?? null },\n\t\t\t\turl: new URL(location.href)\n\t\t\t},\n\t\t\twillUnload: false,\n\t\t\ttype: 'enter'\n\t\t};\n\t\tcallbacks.after_navigate.forEach((fn) => fn(navigation));\n\n\t\tstarted = true;\n\t}\n\n\t/**\n\t *\n\t * @param {{\n\t * url: URL;\n\t * params: Record;\n\t * branch: Array;\n\t * status: number;\n\t * error: App.Error | null;\n\t * route: import('types').CSRRoute | null;\n\t * form?: Record | null;\n\t * }} opts\n\t */\n\tasync function get_navigation_result_from_branch({\n\t\turl,\n\t\tparams,\n\t\tbranch,\n\t\tstatus,\n\t\terror,\n\t\troute,\n\t\tform\n\t}) {\n\t\t/** @type {import('types').TrailingSlash} */\n\t\tlet slash = 'never';\n\t\tfor (const node of branch) {\n\t\t\tif (node?.slash !== undefined) slash = node.slash;\n\t\t}\n\t\turl.pathname = normalize_path(url.pathname, slash);\n\t\t// eslint-disable-next-line\n\t\turl.search = url.search; // turn `/?` into `/`\n\n\t\t/** @type {import('./types').NavigationFinished} */\n\t\tconst result = {\n\t\t\ttype: 'loaded',\n\t\t\tstate: {\n\t\t\t\turl,\n\t\t\t\tparams,\n\t\t\t\tbranch,\n\t\t\t\terror,\n\t\t\t\troute\n\t\t\t},\n\t\t\tprops: {\n\t\t\t\t// @ts-ignore Somehow it's getting SvelteComponent and SvelteComponentDev mixed up\n\t\t\t\tconstructors: compact(branch).map((branch_node) => branch_node.node.component)\n\t\t\t}\n\t\t};\n\n\t\tif (form !== undefined) {\n\t\t\tresult.props.form = form;\n\t\t}\n\n\t\tlet data = {};\n\t\tlet data_changed = !page;\n\n\t\tlet p = 0;\n\n\t\tfor (let i = 0; i < Math.max(branch.length, current.branch.length); i += 1) {\n\t\t\tconst node = branch[i];\n\t\t\tconst prev = current.branch[i];\n\n\t\t\tif (node?.data !== prev?.data) data_changed = true;\n\t\t\tif (!node) continue;\n\n\t\t\tdata = { ...data, ...node.data };\n\n\t\t\t// Only set props if the node actually updated. This prevents needless rerenders.\n\t\t\tif (data_changed) {\n\t\t\t\tresult.props[`data_${p}`] = data;\n\t\t\t}\n\n\t\t\tp += 1;\n\t\t}\n\n\t\tconst page_changed =\n\t\t\t!current.url ||\n\t\t\turl.href !== current.url.href ||\n\t\t\tcurrent.error !== error ||\n\t\t\t(form !== undefined && form !== page.form) ||\n\t\t\tdata_changed;\n\n\t\tif (page_changed) {\n\t\t\tresult.props.page = {\n\t\t\t\terror,\n\t\t\t\tparams,\n\t\t\t\troute: {\n\t\t\t\t\tid: route?.id ?? null\n\t\t\t\t},\n\t\t\t\tstatus,\n\t\t\t\turl: new URL(url),\n\t\t\t\tform: form ?? null,\n\t\t\t\t// The whole page store is updated, but this way the object reference stays the same\n\t\t\t\tdata: data_changed ? data : page.data\n\t\t\t};\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Call the load function of the given node, if it exists.\n\t * If `server_data` is passed, this is treated as the initial run and the page endpoint is not requested.\n\t *\n\t * @param {{\n\t * loader: import('types').CSRPageNodeLoader;\n\t * \t parent: () => Promise>;\n\t * url: URL;\n\t * params: Record;\n\t * route: { id: string | null };\n\t * \t server_data_node: import('./types').DataNode | null;\n\t * }} options\n\t * @returns {Promise}\n\t */\n\tasync function load_node({ loader, parent, url, params, route, server_data_node }) {\n\t\t/** @type {Record | null} */\n\t\tlet data = null;\n\n\t\t/** @type {import('types').Uses} */\n\t\tconst uses = {\n\t\t\tdependencies: new Set(),\n\t\t\tparams: new Set(),\n\t\t\tparent: false,\n\t\t\troute: false,\n\t\t\turl: false\n\t\t};\n\n\t\tconst node = await loader();\n\n\t\tif (DEV) {\n\t\t\tvalidate_page_exports(node.universal);\n\t\t}\n\n\t\tif (node.universal?.load) {\n\t\t\t/** @param {string[]} deps */\n\t\t\tfunction depends(...deps) {\n\t\t\t\tfor (const dep of deps) {\n\t\t\t\t\tif (DEV) validate_depends(/** @type {string} */ (route.id), dep);\n\n\t\t\t\t\tconst { href } = new URL(dep, url);\n\t\t\t\t\tuses.dependencies.add(href);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/** @type {import('@sveltejs/kit').LoadEvent} */\n\t\t\tconst load_input = {\n\t\t\t\troute: {\n\t\t\t\t\tget id() {\n\t\t\t\t\t\tuses.route = true;\n\t\t\t\t\t\treturn route.id;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tparams: new Proxy(params, {\n\t\t\t\t\tget: (target, key) => {\n\t\t\t\t\t\tuses.params.add(/** @type {string} */ (key));\n\t\t\t\t\t\treturn target[/** @type {string} */ (key)];\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t\tdata: server_data_node?.data ?? null,\n\t\t\t\turl: make_trackable(url, () => {\n\t\t\t\t\tuses.url = true;\n\t\t\t\t}),\n\t\t\t\tasync fetch(resource, init) {\n\t\t\t\t\t/** @type {URL | string} */\n\t\t\t\t\tlet requested;\n\n\t\t\t\t\tif (resource instanceof Request) {\n\t\t\t\t\t\trequested = resource.url;\n\n\t\t\t\t\t\t// we're not allowed to modify the received `Request` object, so in order\n\t\t\t\t\t\t// to fixup relative urls we create a new equivalent `init` object instead\n\t\t\t\t\t\tinit = {\n\t\t\t\t\t\t\t// the request body must be consumed in memory until browsers\n\t\t\t\t\t\t\t// implement streaming request bodies and/or the body getter\n\t\t\t\t\t\t\tbody:\n\t\t\t\t\t\t\t\tresource.method === 'GET' || resource.method === 'HEAD'\n\t\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t\t: await resource.blob(),\n\t\t\t\t\t\t\tcache: resource.cache,\n\t\t\t\t\t\t\tcredentials: resource.credentials,\n\t\t\t\t\t\t\theaders: resource.headers,\n\t\t\t\t\t\t\tintegrity: resource.integrity,\n\t\t\t\t\t\t\tkeepalive: resource.keepalive,\n\t\t\t\t\t\t\tmethod: resource.method,\n\t\t\t\t\t\t\tmode: resource.mode,\n\t\t\t\t\t\t\tredirect: resource.redirect,\n\t\t\t\t\t\t\treferrer: resource.referrer,\n\t\t\t\t\t\t\treferrerPolicy: resource.referrerPolicy,\n\t\t\t\t\t\t\tsignal: resource.signal,\n\t\t\t\t\t\t\t...init\n\t\t\t\t\t\t};\n\t\t\t\t\t} else {\n\t\t\t\t\t\trequested = resource;\n\t\t\t\t\t}\n\n\t\t\t\t\t// we must fixup relative urls so they are resolved from the target page\n\t\t\t\t\tconst resolved = new URL(requested, url);\n\t\t\t\t\tdepends(resolved.href);\n\n\t\t\t\t\t// match ssr serialized data url, which is important to find cached responses\n\t\t\t\t\tif (resolved.origin === url.origin) {\n\t\t\t\t\t\trequested = resolved.href.slice(url.origin.length);\n\t\t\t\t\t}\n\n\t\t\t\t\t// prerendered pages may be served from any origin, so `initial_fetch` urls shouldn't be resolved\n\t\t\t\t\treturn started\n\t\t\t\t\t\t? subsequent_fetch(requested, resolved.href, init)\n\t\t\t\t\t\t: initial_fetch(requested, init);\n\t\t\t\t},\n\t\t\t\tsetHeaders: () => {}, // noop\n\t\t\t\tdepends,\n\t\t\t\tparent() {\n\t\t\t\t\tuses.parent = true;\n\t\t\t\t\treturn parent();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tif (DEV) {\n\t\t\t\ttry {\n\t\t\t\t\tlock_fetch();\n\t\t\t\t\tdata = (await node.universal.load.call(null, load_input)) ?? null;\n\t\t\t\t\tif (data != null && Object.getPrototypeOf(data) !== Object.prototype) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`a load function related to route '${route.id}' returned ${\n\t\t\t\t\t\t\t\ttypeof data !== 'object'\n\t\t\t\t\t\t\t\t\t? `a ${typeof data}`\n\t\t\t\t\t\t\t\t\t: data instanceof Response\n\t\t\t\t\t\t\t\t\t? 'a Response object'\n\t\t\t\t\t\t\t\t\t: Array.isArray(data)\n\t\t\t\t\t\t\t\t\t? 'an array'\n\t\t\t\t\t\t\t\t\t: 'a non-plain object'\n\t\t\t\t\t\t\t}, but must return a plain object at the top level (i.e. \\`return {...}\\`)`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} finally {\n\t\t\t\t\tunlock_fetch();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdata = (await node.universal.load.call(null, load_input)) ?? null;\n\t\t\t}\n\t\t\tdata = data ? await unwrap_promises(data) : null;\n\t\t}\n\n\t\treturn {\n\t\t\tnode,\n\t\t\tloader,\n\t\t\tserver: server_data_node,\n\t\t\tuniversal: node.universal?.load ? { type: 'data', data, uses } : null,\n\t\t\tdata: data ?? server_data_node?.data ?? null,\n\t\t\tslash: node.universal?.trailingSlash ?? server_data_node?.slash\n\t\t};\n\t}\n\n\t/**\n\t * @param {boolean} parent_changed\n\t * @param {boolean} route_changed\n\t * @param {boolean} url_changed\n\t * @param {import('types').Uses | undefined} uses\n\t * @param {Record} params\n\t */\n\tfunction has_changed(parent_changed, route_changed, url_changed, uses, params) {\n\t\tif (force_invalidation) return true;\n\n\t\tif (!uses) return false;\n\n\t\tif (uses.parent && parent_changed) return true;\n\t\tif (uses.route && route_changed) return true;\n\t\tif (uses.url && url_changed) return true;\n\n\t\tfor (const param of uses.params) {\n\t\t\tif (params[param] !== current.params[param]) return true;\n\t\t}\n\n\t\tfor (const href of uses.dependencies) {\n\t\t\tif (invalidated.some((fn) => fn(new URL(href)))) return true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t * @param {import('types').ServerDataNode | import('types').ServerDataSkippedNode | null} node\n\t * @param {import('./types').DataNode | null} [previous]\n\t * @returns {import('./types').DataNode | null}\n\t */\n\tfunction create_data_node(node, previous) {\n\t\tif (node?.type === 'data') return node;\n\t\tif (node?.type === 'skip') return previous ?? null;\n\t\treturn null;\n\t}\n\n\t/**\n\t * @param {import('./types').NavigationIntent} intent\n\t * @returns {Promise}\n\t */\n\tasync function load_route({ id, invalidating, url, params, route }) {\n\t\tif (load_cache?.id === id) {\n\t\t\treturn load_cache.promise;\n\t\t}\n\n\t\tconst { errors, layouts, leaf } = route;\n\n\t\tconst loaders = [...layouts, leaf];\n\n\t\t// preload modules to avoid waterfall, but handle rejections\n\t\t// so they don't get reported to Sentry et al (we don't need\n\t\t// to act on the failures at this point)\n\t\terrors.forEach((loader) => loader?.().catch(() => {}));\n\t\tloaders.forEach((loader) => loader?.[1]().catch(() => {}));\n\n\t\t/** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */\n\t\tlet server_data = null;\n\n\t\tconst url_changed = current.url ? id !== current.url.pathname + current.url.search : false;\n\t\tconst route_changed = current.route ? route.id !== current.route.id : false;\n\n\t\tlet parent_invalid = false;\n\t\tconst invalid_server_nodes = loaders.map((loader, i) => {\n\t\t\tconst previous = current.branch[i];\n\n\t\t\tconst invalid =\n\t\t\t\t!!loader?.[0] &&\n\t\t\t\t(previous?.loader !== loader[1] ||\n\t\t\t\t\thas_changed(parent_invalid, route_changed, url_changed, previous.server?.uses, params));\n\n\t\t\tif (invalid) {\n\t\t\t\t// For the next one\n\t\t\t\tparent_invalid = true;\n\t\t\t}\n\n\t\t\treturn invalid;\n\t\t});\n\n\t\tif (invalid_server_nodes.some(Boolean)) {\n\t\t\ttry {\n\t\t\t\tserver_data = await load_data(url, invalid_server_nodes);\n\t\t\t} catch (error) {\n\t\t\t\treturn load_root_error_page({\n\t\t\t\t\tstatus: error instanceof HttpError ? error.status : 500,\n\t\t\t\t\terror: await handle_error(error, { url, params, route: { id: route.id } }),\n\t\t\t\t\turl,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (server_data.type === 'redirect') {\n\t\t\t\treturn server_data;\n\t\t\t}\n\t\t}\n\n\t\tconst server_data_nodes = server_data?.nodes;\n\n\t\tlet parent_changed = false;\n\n\t\tconst branch_promises = loaders.map(async (loader, i) => {\n\t\t\tif (!loader) return;\n\n\t\t\t/** @type {import('./types').BranchNode | undefined} */\n\t\t\tconst previous = current.branch[i];\n\n\t\t\tconst server_data_node = server_data_nodes?.[i];\n\n\t\t\t// re-use data from previous load if it's still valid\n\t\t\tconst valid =\n\t\t\t\t(!server_data_node || server_data_node.type === 'skip') &&\n\t\t\t\tloader[1] === previous?.loader &&\n\t\t\t\t!has_changed(parent_changed, route_changed, url_changed, previous.universal?.uses, params);\n\t\t\tif (valid) return previous;\n\n\t\t\tparent_changed = true;\n\n\t\t\tif (server_data_node?.type === 'error') {\n\t\t\t\t// rethrow and catch below\n\t\t\t\tthrow server_data_node;\n\t\t\t}\n\n\t\t\treturn load_node({\n\t\t\t\tloader: loader[1],\n\t\t\t\turl,\n\t\t\t\tparams,\n\t\t\t\troute,\n\t\t\t\tparent: async () => {\n\t\t\t\t\tconst data = {};\n\t\t\t\t\tfor (let j = 0; j < i; j += 1) {\n\t\t\t\t\t\tObject.assign(data, (await branch_promises[j])?.data);\n\t\t\t\t\t}\n\t\t\t\t\treturn data;\n\t\t\t\t},\n\t\t\t\tserver_data_node: create_data_node(\n\t\t\t\t\t// server_data_node is undefined if it wasn't reloaded from the server;\n\t\t\t\t\t// and if current loader uses server data, we want to reuse previous data.\n\t\t\t\t\tserver_data_node === undefined && loader[0] ? { type: 'skip' } : server_data_node ?? null,\n\t\t\t\t\tloader[0] ? previous?.server : undefined\n\t\t\t\t)\n\t\t\t});\n\t\t});\n\n\t\t// if we don't do this, rejections will be unhandled\n\t\tfor (const p of branch_promises) p.catch(() => {});\n\n\t\t/** @type {Array} */\n\t\tconst branch = [];\n\n\t\tfor (let i = 0; i < loaders.length; i += 1) {\n\t\t\tif (loaders[i]) {\n\t\t\t\ttry {\n\t\t\t\t\tbranch.push(await branch_promises[i]);\n\t\t\t\t} catch (err) {\n\t\t\t\t\tif (err instanceof Redirect) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\ttype: 'redirect',\n\t\t\t\t\t\t\tlocation: err.location\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\tlet status = 500;\n\t\t\t\t\t/** @type {App.Error} */\n\t\t\t\t\tlet error;\n\n\t\t\t\t\tif (server_data_nodes?.includes(/** @type {import('types').ServerErrorNode} */ (err))) {\n\t\t\t\t\t\t// this is the server error rethrown above, reconstruct but don't invoke\n\t\t\t\t\t\t// the client error handler; it should've already been handled on the server\n\t\t\t\t\t\tstatus = /** @type {import('types').ServerErrorNode} */ (err).status ?? status;\n\t\t\t\t\t\terror = /** @type {import('types').ServerErrorNode} */ (err).error;\n\t\t\t\t\t} else if (err instanceof HttpError) {\n\t\t\t\t\t\tstatus = err.status;\n\t\t\t\t\t\terror = err.body;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Referenced node could have been removed due to redeploy, check\n\t\t\t\t\t\tconst updated = await stores.updated.check();\n\t\t\t\t\t\tif (updated) {\n\t\t\t\t\t\t\treturn await native_navigation(url);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\terror = await handle_error(err, { params, url, route: { id: route.id } });\n\t\t\t\t\t}\n\n\t\t\t\t\tconst error_load = await load_nearest_error_page(i, branch, errors);\n\t\t\t\t\tif (error_load) {\n\t\t\t\t\t\treturn await get_navigation_result_from_branch({\n\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\tparams,\n\t\t\t\t\t\t\tbranch: branch.slice(0, error_load.idx).concat(error_load.node),\n\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\troute\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we get here, it's because the root `load` function failed,\n\t\t\t\t\t\t// and we need to fall back to the server\n\t\t\t\t\t\treturn await server_fallback(url, { id: route.id }, error, status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// push an empty slot so we can rewind past gaps to the\n\t\t\t\t// layout that corresponds with an +error.svelte page\n\t\t\t\tbranch.push(undefined);\n\t\t\t}\n\t\t}\n\n\t\treturn await get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch,\n\t\t\tstatus: 200,\n\t\t\terror: null,\n\t\t\troute,\n\t\t\t// Reset `form` on navigation, but not invalidation\n\t\t\tform: invalidating ? undefined : null\n\t\t});\n\t}\n\n\t/**\n\t * @param {number} i Start index to backtrack from\n\t * @param {Array} branch Branch to backtrack\n\t * @param {Array} errors All error pages for this branch\n\t * @returns {Promise<{idx: number; node: import('./types').BranchNode} | undefined>}\n\t */\n\tasync function load_nearest_error_page(i, branch, errors) {\n\t\twhile (i--) {\n\t\t\tif (errors[i]) {\n\t\t\t\tlet j = i;\n\t\t\t\twhile (!branch[j]) j -= 1;\n\t\t\t\ttry {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tidx: j + 1,\n\t\t\t\t\t\tnode: {\n\t\t\t\t\t\t\tnode: await /** @type {import('types').CSRPageNodeLoader } */ (errors[i])(),\n\t\t\t\t\t\t\tloader: /** @type {import('types').CSRPageNodeLoader } */ (errors[i]),\n\t\t\t\t\t\t\tdata: {},\n\t\t\t\t\t\t\tserver: null,\n\t\t\t\t\t\t\tuniversal: null\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t} catch (e) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * @param {{\n\t * status: number;\n\t * error: App.Error;\n\t * url: URL;\n\t * route: { id: string | null }\n\t * }} opts\n\t * @returns {Promise}\n\t */\n\tasync function load_root_error_page({ status, error, url, route }) {\n\t\t/** @type {Record} */\n\t\tconst params = {}; // error page does not have params\n\n\t\t/** @type {import('types').ServerDataNode | null} */\n\t\tlet server_data_node = null;\n\n\t\tconst default_layout_has_server_load = app.server_loads[0] === 0;\n\n\t\tif (default_layout_has_server_load) {\n\t\t\t// TODO post-https://github.com/sveltejs/kit/discussions/6124 we can use\n\t\t\t// existing root layout data\n\t\t\ttry {\n\t\t\t\tconst server_data = await load_data(url, [true]);\n\n\t\t\t\tif (\n\t\t\t\t\tserver_data.type !== 'data' ||\n\t\t\t\t\t(server_data.nodes[0] && server_data.nodes[0].type !== 'data')\n\t\t\t\t) {\n\t\t\t\t\tthrow 0;\n\t\t\t\t}\n\n\t\t\t\tserver_data_node = server_data.nodes[0] ?? null;\n\t\t\t} catch {\n\t\t\t\t// at this point we have no choice but to fall back to the server, if it wouldn't\n\t\t\t\t// bring us right back here, turning this into an endless loop\n\t\t\t\tif (url.origin !== location.origin || url.pathname !== location.pathname || hydrated) {\n\t\t\t\t\tawait native_navigation(url);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst root_layout = await load_node({\n\t\t\tloader: default_layout_loader,\n\t\t\turl,\n\t\t\tparams,\n\t\t\troute,\n\t\t\tparent: () => Promise.resolve({}),\n\t\t\tserver_data_node: create_data_node(server_data_node)\n\t\t});\n\n\t\t/** @type {import('./types').BranchNode} */\n\t\tconst root_error = {\n\t\t\tnode: await default_error_loader(),\n\t\t\tloader: default_error_loader,\n\t\t\tuniversal: null,\n\t\t\tserver: null,\n\t\t\tdata: null\n\t\t};\n\n\t\treturn await get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch: [root_layout, root_error],\n\t\t\tstatus,\n\t\t\terror,\n\t\t\troute: null\n\t\t});\n\t}\n\n\t/**\n\t * @param {URL} url\n\t * @param {boolean} invalidating\n\t */\n\tfunction get_navigation_intent(url, invalidating) {\n\t\tif (is_external_url(url, base)) return;\n\n\t\tconst path = get_url_path(url);\n\n\t\tfor (const route of routes) {\n\t\t\tconst params = route.exec(path);\n\n\t\t\tif (params) {\n\t\t\t\tconst id = url.pathname + url.search;\n\t\t\t\t/** @type {import('./types').NavigationIntent} */\n\t\t\t\tconst intent = { id, invalidating, route, params: decode_params(params), url };\n\t\t\t\treturn intent;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @param {URL} url */\n\tfunction get_url_path(url) {\n\t\treturn decode_pathname(url.pathname.slice(base.length) || '/');\n\t}\n\n\t/**\n\t * @param {{\n\t * url: URL;\n\t * type: import('@sveltejs/kit').NavigationType;\n\t * intent?: import('./types').NavigationIntent;\n\t * delta?: number;\n\t * }} opts\n\t */\n\tfunction before_navigate({ url, type, intent, delta }) {\n\t\tlet should_block = false;\n\n\t\t/** @type {import('@sveltejs/kit').Navigation} */\n\t\tconst navigation = {\n\t\t\tfrom: {\n\t\t\t\tparams: current.params,\n\t\t\t\troute: { id: current.route?.id ?? null },\n\t\t\t\turl: current.url\n\t\t\t},\n\t\t\tto: {\n\t\t\t\tparams: intent?.params ?? null,\n\t\t\t\troute: { id: intent?.route?.id ?? null },\n\t\t\t\turl\n\t\t\t},\n\t\t\twillUnload: !intent,\n\t\t\ttype\n\t\t};\n\n\t\tif (delta !== undefined) {\n\t\t\tnavigation.delta = delta;\n\t\t}\n\n\t\tconst cancellable = {\n\t\t\t...navigation,\n\t\t\tcancel: () => {\n\t\t\t\tshould_block = true;\n\t\t\t}\n\t\t};\n\n\t\tif (!navigating) {\n\t\t\t// Don't run the event during redirects\n\t\t\tcallbacks.before_navigate.forEach((fn) => fn(cancellable));\n\t\t}\n\n\t\treturn should_block ? null : navigation;\n\t}\n\n\t/**\n\t * @param {{\n\t * url: URL;\n\t * scroll: { x: number, y: number } | null;\n\t * keepfocus: boolean;\n\t * redirect_chain: string[];\n\t * details: {\n\t * replaceState: boolean;\n\t * state: any;\n\t * } | null;\n\t * type: import('@sveltejs/kit').NavigationType;\n\t * delta?: number;\n\t * nav_token?: {};\n\t * accepted: () => void;\n\t * blocked: () => void;\n\t * }} opts\n\t */\n\tasync function navigate({\n\t\turl,\n\t\tscroll,\n\t\tkeepfocus,\n\t\tredirect_chain,\n\t\tdetails,\n\t\ttype,\n\t\tdelta,\n\t\tnav_token = {},\n\t\taccepted,\n\t\tblocked\n\t}) {\n\t\tconst intent = get_navigation_intent(url, false);\n\t\tconst navigation = before_navigate({ url, type, delta, intent });\n\n\t\tif (!navigation) {\n\t\t\tblocked();\n\t\t\treturn;\n\t\t}\n\n\t\t// store this before calling `accepted()`, which may change the index\n\t\tconst previous_history_index = current_history_index;\n\n\t\taccepted();\n\n\t\tnavigating = true;\n\n\t\tif (started) {\n\t\t\tstores.navigating.set(navigation);\n\t\t}\n\n\t\ttoken = nav_token;\n\t\tlet navigation_result = intent && (await load_route(intent));\n\n\t\tif (!navigation_result) {\n\t\t\tif (is_external_url(url, base)) {\n\t\t\t\treturn await native_navigation(url);\n\t\t\t}\n\t\t\tnavigation_result = await server_fallback(\n\t\t\t\turl,\n\t\t\t\t{ id: null },\n\t\t\t\tawait handle_error(new Error(`Not found: ${url.pathname}`), {\n\t\t\t\t\turl,\n\t\t\t\t\tparams: {},\n\t\t\t\t\troute: { id: null }\n\t\t\t\t}),\n\t\t\t\t404\n\t\t\t);\n\t\t}\n\n\t\t// if this is an internal navigation intent, use the normalized\n\t\t// URL for the rest of the function\n\t\turl = intent?.url || url;\n\n\t\t// abort if user navigated during update\n\t\tif (token !== nav_token) return false;\n\n\t\tif (navigation_result.type === 'redirect') {\n\t\t\tif (redirect_chain.length > 10 || redirect_chain.includes(url.pathname)) {\n\t\t\t\tnavigation_result = await load_root_error_page({\n\t\t\t\t\tstatus: 500,\n\t\t\t\t\terror: await handle_error(new Error('Redirect loop'), {\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams: {},\n\t\t\t\t\t\troute: { id: null }\n\t\t\t\t\t}),\n\t\t\t\t\turl,\n\t\t\t\t\troute: { id: null }\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tgoto(\n\t\t\t\t\tnew URL(navigation_result.location, url).href,\n\t\t\t\t\t{},\n\t\t\t\t\t[...redirect_chain, url.pathname],\n\t\t\t\t\tnav_token\n\t\t\t\t);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (/** @type {number} */ (navigation_result.props.page?.status) >= 400) {\n\t\t\tconst updated = await stores.updated.check();\n\t\t\tif (updated) {\n\t\t\t\tawait native_navigation(url);\n\t\t\t}\n\t\t}\n\n\t\t// reset invalidation only after a finished navigation. If there are redirects or\n\t\t// additional invalidations, they should get the same invalidation treatment\n\t\tinvalidated.length = 0;\n\t\tforce_invalidation = false;\n\n\t\tupdating = true;\n\n\t\tupdate_scroll_positions(previous_history_index);\n\t\tcapture_snapshot(previous_history_index);\n\n\t\t// ensure the url pathname matches the page's trailing slash option\n\t\tif (\n\t\t\tnavigation_result.props.page?.url &&\n\t\t\tnavigation_result.props.page.url.pathname !== url.pathname\n\t\t) {\n\t\t\turl.pathname = navigation_result.props.page?.url.pathname;\n\t\t}\n\n\t\tif (details) {\n\t\t\tconst change = details.replaceState ? 0 : 1;\n\t\t\tdetails.state[INDEX_KEY] = current_history_index += change;\n\t\t\thistory[details.replaceState ? 'replaceState' : 'pushState'](details.state, '', url);\n\n\t\t\tif (!details.replaceState) {\n\t\t\t\t// if we navigated back, then pushed a new state, we can\n\t\t\t\t// release memory by pruning the scroll/snapshot lookup\n\t\t\t\tlet i = current_history_index + 1;\n\t\t\t\twhile (snapshots[i] || scroll_positions[i]) {\n\t\t\t\t\tdelete snapshots[i];\n\t\t\t\t\tdelete scroll_positions[i];\n\t\t\t\t\ti += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// reset preload synchronously after the history state has been set to avoid race conditions\n\t\tload_cache = null;\n\n\t\tif (started) {\n\t\t\tcurrent = navigation_result.state;\n\n\t\t\t// reset url before updating page store\n\t\t\tif (navigation_result.props.page) {\n\t\t\t\tnavigation_result.props.page.url = url;\n\t\t\t}\n\n\t\t\troot.$set(navigation_result.props);\n\t\t} else {\n\t\t\tinitialize(navigation_result);\n\t\t}\n\n\t\tconst { activeElement } = document;\n\n\t\t// need to render the DOM before we can scroll to the rendered elements and do focus management\n\t\tawait tick();\n\n\t\t// we reset scroll before dealing with focus, to avoid a flash of unscrolled content\n\t\tif (autoscroll) {\n\t\t\tconst deep_linked =\n\t\t\t\turl.hash && document.getElementById(decodeURIComponent(url.hash.slice(1)));\n\t\t\tif (scroll) {\n\t\t\t\tscrollTo(scroll.x, scroll.y);\n\t\t\t} else if (deep_linked) {\n\t\t\t\t// Here we use `scrollIntoView` on the element instead of `scrollTo`\n\t\t\t\t// because it natively supports the `scroll-margin` and `scroll-behavior`\n\t\t\t\t// CSS properties.\n\t\t\t\tdeep_linked.scrollIntoView();\n\t\t\t} else {\n\t\t\t\tscrollTo(0, 0);\n\t\t\t}\n\t\t}\n\n\t\tconst changed_focus =\n\t\t\t// reset focus only if any manual focus management didn't override it\n\t\t\tdocument.activeElement !== activeElement &&\n\t\t\t// also refocus when activeElement is body already because the\n\t\t\t// focus event might not have been fired on it yet\n\t\t\tdocument.activeElement !== document.body;\n\n\t\tif (!keepfocus && !changed_focus) {\n\t\t\treset_focus();\n\t\t}\n\n\t\tautoscroll = true;\n\n\t\tif (navigation_result.props.page) {\n\t\t\tpage = navigation_result.props.page;\n\t\t}\n\n\t\tnavigating = false;\n\n\t\tif (type === 'popstate') {\n\t\t\trestore_snapshot(current_history_index);\n\t\t}\n\n\t\tcallbacks.after_navigate.forEach((fn) =>\n\t\t\tfn(/** @type {import('@sveltejs/kit').AfterNavigate} */ (navigation))\n\t\t);\n\t\tstores.navigating.set(null);\n\n\t\tupdating = false;\n\t}\n\n\t/**\n\t * Does a full page reload if it wouldn't result in an endless loop in the SPA case\n\t * @param {URL} url\n\t * @param {{ id: string | null }} route\n\t * @param {App.Error} error\n\t * @param {number} status\n\t * @returns {Promise}\n\t */\n\tasync function server_fallback(url, route, error, status) {\n\t\tif (url.origin === location.origin && url.pathname === location.pathname && !hydrated) {\n\t\t\t// We would reload the same page we're currently on, which isn't hydrated,\n\t\t\t// which means no SSR, which means we would end up in an endless loop\n\t\t\treturn await load_root_error_page({\n\t\t\t\tstatus,\n\t\t\t\terror,\n\t\t\t\turl,\n\t\t\t\troute\n\t\t\t});\n\t\t}\n\n\t\tif (DEV && status !== 404) {\n\t\t\tconsole.error(\n\t\t\t\t'An error occurred while loading the page. This will cause a full page reload. (This message will only appear during development.)'\n\t\t\t);\n\n\t\t\tdebugger; // eslint-disable-line\n\t\t}\n\n\t\treturn await native_navigation(url);\n\t}\n\n\t/**\n\t * Loads `href` the old-fashioned way, with a full page reload.\n\t * Returns a `Promise` that never resolves (to prevent any\n\t * subsequent work, e.g. history manipulation, from happening)\n\t * @param {URL} url\n\t */\n\tfunction native_navigation(url) {\n\t\tlocation.href = url.href;\n\t\treturn new Promise(() => {});\n\t}\n\n\tif (import.meta.hot) {\n\t\timport.meta.hot.on('vite:beforeUpdate', () => {\n\t\t\tif (current.error) location.reload();\n\t\t});\n\t}\n\n\tfunction setup_preload() {\n\t\t/** @type {NodeJS.Timeout} */\n\t\tlet mousemove_timeout;\n\n\t\tcontainer.addEventListener('mousemove', (event) => {\n\t\t\tconst target = /** @type {Element} */ (event.target);\n\n\t\t\tclearTimeout(mousemove_timeout);\n\t\t\tmousemove_timeout = setTimeout(() => {\n\t\t\t\tpreload(target, 2);\n\t\t\t}, 20);\n\t\t});\n\n\t\t/** @param {Event} event */\n\t\tfunction tap(event) {\n\t\t\tpreload(/** @type {Element} */ (event.composedPath()[0]), 1);\n\t\t}\n\n\t\tcontainer.addEventListener('mousedown', tap);\n\t\tcontainer.addEventListener('touchstart', tap, { passive: true });\n\n\t\tconst observer = new IntersectionObserver(\n\t\t\t(entries) => {\n\t\t\t\tfor (const entry of entries) {\n\t\t\t\t\tif (entry.isIntersecting) {\n\t\t\t\t\t\tpreload_code(\n\t\t\t\t\t\t\tget_url_path(new URL(/** @type {HTMLAnchorElement} */ (entry.target).href))\n\t\t\t\t\t\t);\n\t\t\t\t\t\tobserver.unobserve(entry.target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t{ threshold: 0 }\n\t\t);\n\n\t\t/**\n\t\t * @param {Element} element\n\t\t * @param {number} priority\n\t\t */\n\t\tfunction preload(element, priority) {\n\t\t\tconst a = find_anchor(element, container);\n\t\t\tif (!a) return;\n\n\t\t\tconst { url, external, download } = get_link_info(a, base);\n\t\t\tif (external || download) return;\n\n\t\t\tconst options = get_router_options(a);\n\n\t\t\tif (!options.reload) {\n\t\t\t\tif (priority <= options.preload_data) {\n\t\t\t\t\tconst intent = get_navigation_intent(/** @type {URL} */ (url), false);\n\t\t\t\t\tif (intent) {\n\t\t\t\t\t\tif (DEV) {\n\t\t\t\t\t\t\tpreload_data(intent).then((result) => {\n\t\t\t\t\t\t\t\tif (result.type === 'loaded' && result.state.error) {\n\t\t\t\t\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\t\t\t\t`Preloading data for ${intent.url.pathname} failed with the following error: ${result.state.error.message}\\n` +\n\t\t\t\t\t\t\t\t\t\t\t'If this error is transient, you can ignore it. Otherwise, consider disabling preloading for this route. ' +\n\t\t\t\t\t\t\t\t\t\t\t'This route was preloaded due to a data-sveltekit-preload-data attribute. ' +\n\t\t\t\t\t\t\t\t\t\t\t'See https://kit.svelte.dev/docs/link-options for more info'\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpreload_data(intent);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (priority <= options.preload_code) {\n\t\t\t\t\tpreload_code(get_url_path(/** @type {URL} */ (url)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfunction after_navigate() {\n\t\t\tobserver.disconnect();\n\n\t\t\tfor (const a of container.querySelectorAll('a')) {\n\t\t\t\tconst { url, external, download } = get_link_info(a, base);\n\t\t\t\tif (external || download) continue;\n\n\t\t\t\tconst options = get_router_options(a);\n\t\t\t\tif (options.reload) continue;\n\n\t\t\t\tif (options.preload_code === PRELOAD_PRIORITIES.viewport) {\n\t\t\t\t\tobserver.observe(a);\n\t\t\t\t}\n\n\t\t\t\tif (options.preload_code === PRELOAD_PRIORITIES.eager) {\n\t\t\t\t\tpreload_code(get_url_path(/** @type {URL} */ (url)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcallbacks.after_navigate.push(after_navigate);\n\t\tafter_navigate();\n\t}\n\n\t/**\n\t * @param {unknown} error\n\t * @param {import('@sveltejs/kit').NavigationEvent} event\n\t * @returns {import('types').MaybePromise}\n\t */\n\tfunction handle_error(error, event) {\n\t\tif (error instanceof HttpError) {\n\t\t\treturn error.body;\n\t\t}\n\n\t\tif (DEV) {\n\t\t\terrored = true;\n\t\t\tconsole.warn('The next HMR update will cause the page to reload');\n\t\t}\n\n\t\treturn (\n\t\t\tapp.hooks.handleError({ error, event }) ??\n\t\t\t/** @type {any} */ ({ message: event.route.id != null ? 'Internal Error' : 'Not Found' })\n\t\t);\n\t}\n\n\treturn {\n\t\tafter_navigate: (fn) => {\n\t\t\tonMount(() => {\n\t\t\t\tcallbacks.after_navigate.push(fn);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tconst i = callbacks.after_navigate.indexOf(fn);\n\t\t\t\t\tcallbacks.after_navigate.splice(i, 1);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tbefore_navigate: (fn) => {\n\t\t\tonMount(() => {\n\t\t\t\tcallbacks.before_navigate.push(fn);\n\n\t\t\t\treturn () => {\n\t\t\t\t\tconst i = callbacks.before_navigate.indexOf(fn);\n\t\t\t\t\tcallbacks.before_navigate.splice(i, 1);\n\t\t\t\t};\n\t\t\t});\n\t\t},\n\n\t\tdisable_scroll_handling: () => {\n\t\t\tif (DEV && started && !updating) {\n\t\t\t\tthrow new Error('Can only disable scroll handling during navigation');\n\t\t\t}\n\n\t\t\tif (updating || !started) {\n\t\t\t\tautoscroll = false;\n\t\t\t}\n\t\t},\n\n\t\tgoto: (href, opts = {}) => {\n\t\t\treturn goto(href, opts, []);\n\t\t},\n\n\t\tinvalidate: (resource) => {\n\t\t\tif (typeof resource === 'function') {\n\t\t\t\tinvalidated.push(resource);\n\t\t\t} else {\n\t\t\t\tconst { href } = new URL(resource, location.href);\n\t\t\t\tinvalidated.push((url) => url.href === href);\n\t\t\t}\n\n\t\t\treturn invalidate();\n\t\t},\n\n\t\tinvalidate_all: () => {\n\t\t\tforce_invalidation = true;\n\t\t\treturn invalidate();\n\t\t},\n\n\t\tpreload_data: async (href) => {\n\t\t\tconst url = new URL(href, get_base_uri(document));\n\t\t\tconst intent = get_navigation_intent(url, false);\n\n\t\t\tif (!intent) {\n\t\t\t\tthrow new Error(`Attempted to preload a URL that does not belong to this app: ${url}`);\n\t\t\t}\n\n\t\t\tawait preload_data(intent);\n\t\t},\n\n\t\tpreload_code,\n\n\t\tapply_action: async (result) => {\n\t\t\tif (result.type === 'error') {\n\t\t\t\tconst url = new URL(location.href);\n\n\t\t\t\tconst { branch, route } = current;\n\t\t\t\tif (!route) return;\n\n\t\t\t\tconst error_load = await load_nearest_error_page(\n\t\t\t\t\tcurrent.branch.length,\n\t\t\t\t\tbranch,\n\t\t\t\t\troute.errors\n\t\t\t\t);\n\t\t\t\tif (error_load) {\n\t\t\t\t\tconst navigation_result = await get_navigation_result_from_branch({\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams: current.params,\n\t\t\t\t\t\tbranch: branch.slice(0, error_load.idx).concat(error_load.node),\n\t\t\t\t\t\tstatus: result.status ?? 500,\n\t\t\t\t\t\terror: result.error,\n\t\t\t\t\t\troute\n\t\t\t\t\t});\n\n\t\t\t\t\tcurrent = navigation_result.state;\n\n\t\t\t\t\troot.$set(navigation_result.props);\n\n\t\t\t\t\ttick().then(reset_focus);\n\t\t\t\t}\n\t\t\t} else if (result.type === 'redirect') {\n\t\t\t\tgoto(result.location, { invalidateAll: true }, []);\n\t\t\t} else {\n\t\t\t\t/** @type {Record} */\n\t\t\t\troot.$set({\n\t\t\t\t\t// this brings Svelte's view of the world in line with SvelteKit's\n\t\t\t\t\t// after use:enhance reset the form....\n\t\t\t\t\tform: null,\n\t\t\t\t\tpage: { ...page, form: result.data, status: result.status }\n\t\t\t\t});\n\n\t\t\t\t// ...so that setting the `form` prop takes effect and isn't ignored\n\t\t\t\tawait tick();\n\t\t\t\troot.$set({ form: result.data });\n\n\t\t\t\tif (result.type === 'success') {\n\t\t\t\t\treset_focus();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_start_router: () => {\n\t\t\thistory.scrollRestoration = 'manual';\n\n\t\t\t// Adopted from Nuxt.js\n\t\t\t// Reset scrollRestoration to auto when leaving page, allowing page reload\n\t\t\t// and back-navigation from other pages to use the browser to restore the\n\t\t\t// scrolling position.\n\t\t\taddEventListener('beforeunload', (e) => {\n\t\t\t\tlet should_block = false;\n\n\t\t\t\tpersist_state();\n\n\t\t\t\tif (!navigating) {\n\t\t\t\t\t// If we're navigating, beforeNavigate was already called. If we end up in here during navigation,\n\t\t\t\t\t// it's due to an external or full-page-reload link, for which we don't want to call the hook again.\n\t\t\t\t\t/** @type {import('@sveltejs/kit').BeforeNavigate} */\n\t\t\t\t\tconst navigation = {\n\t\t\t\t\t\tfrom: {\n\t\t\t\t\t\t\tparams: current.params,\n\t\t\t\t\t\t\troute: { id: current.route?.id ?? null },\n\t\t\t\t\t\t\turl: current.url\n\t\t\t\t\t\t},\n\t\t\t\t\t\tto: null,\n\t\t\t\t\t\twillUnload: true,\n\t\t\t\t\t\ttype: 'leave',\n\t\t\t\t\t\tcancel: () => (should_block = true)\n\t\t\t\t\t};\n\n\t\t\t\t\tcallbacks.before_navigate.forEach((fn) => fn(navigation));\n\t\t\t\t}\n\n\t\t\t\tif (should_block) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\te.returnValue = '';\n\t\t\t\t} else {\n\t\t\t\t\thistory.scrollRestoration = 'auto';\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taddEventListener('visibilitychange', () => {\n\t\t\t\tif (document.visibilityState === 'hidden') {\n\t\t\t\t\tpersist_state();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// @ts-expect-error this isn't supported everywhere yet\n\t\t\tif (!navigator.connection?.saveData) {\n\t\t\t\tsetup_preload();\n\t\t\t}\n\n\t\t\t/** @param {MouseEvent} event */\n\t\t\tcontainer.addEventListener('click', (event) => {\n\t\t\t\t// Adapted from https://github.com/visionmedia/page.js\n\t\t\t\t// MIT license https://github.com/visionmedia/page.js#license\n\t\t\t\tif (event.button || event.which !== 1) return;\n\t\t\t\tif (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n\t\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t\tconst a = find_anchor(/** @type {Element} */ (event.composedPath()[0]), container);\n\t\t\t\tif (!a) return;\n\n\t\t\t\tconst { url, external, target, download } = get_link_info(a, base);\n\t\t\t\tif (!url) return;\n\n\t\t\t\t// bail out before `beforeNavigate` if link opens in a different tab\n\t\t\t\tif (target === '_parent' || target === '_top') {\n\t\t\t\t\tif (window.parent !== window) return;\n\t\t\t\t} else if (target && target !== '_self') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst options = get_router_options(a);\n\t\t\t\tconst is_svg_a_element = a instanceof SVGAElement;\n\n\t\t\t\t// Ignore URL protocols that differ to the current one and are not http(s) (e.g. `mailto:`, `tel:`, `myapp:`, etc.)\n\t\t\t\t// This may be wrong when the protocol is x: and the link goes to y:.. which should be treated as an external\n\t\t\t\t// navigation, but it's not clear how to handle that case and it's not likely to come up in practice.\n\t\t\t\t// MEMO: Without this condition, firefox will open mailer twice.\n\t\t\t\t// See:\n\t\t\t\t// - https://github.com/sveltejs/kit/issues/4045\n\t\t\t\t// - https://github.com/sveltejs/kit/issues/5725\n\t\t\t\t// - https://github.com/sveltejs/kit/issues/6496\n\t\t\t\tif (\n\t\t\t\t\t!is_svg_a_element &&\n\t\t\t\t\turl.protocol !== location.protocol &&\n\t\t\t\t\t!(url.protocol === 'https:' || url.protocol === 'http:')\n\t\t\t\t)\n\t\t\t\t\treturn;\n\n\t\t\t\tif (download) return;\n\n\t\t\t\t// Ignore the following but fire beforeNavigate\n\t\t\t\tif (external || options.reload) {\n\t\t\t\t\tif (before_navigate({ url, type: 'link' })) {\n\t\t\t\t\t\t// set `navigating` to `true` to prevent `beforeNavigate` callbacks\n\t\t\t\t\t\t// being called when the page unloads\n\t\t\t\t\t\tnavigating = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Check if new url only differs by hash and use the browser default behavior in that case\n\t\t\t\t// This will ensure the `hashchange` event is fired\n\t\t\t\t// Removing the hash does a full page navigation in the browser, so make sure a hash is present\n\t\t\t\tconst [nonhash, hash] = url.href.split('#');\n\t\t\t\tif (hash !== undefined && nonhash === location.href.split('#')[0]) {\n\t\t\t\t\t// If we are trying to navigate to the same hash, we should only\n\t\t\t\t\t// attempt to scroll to that element and avoid any history changes.\n\t\t\t\t\t// Otherwise, this can cause Firefox to incorrectly assign a null\n\t\t\t\t\t// history state value without any signal that we can detect.\n\t\t\t\t\tif (current.url.hash === url.hash) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\ta.ownerDocument.getElementById(hash)?.scrollIntoView();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t// set this flag to distinguish between navigations triggered by\n\t\t\t\t\t// clicking a hash link and those triggered by popstate\n\t\t\t\t\thash_navigating = true;\n\n\t\t\t\t\tupdate_scroll_positions(current_history_index);\n\n\t\t\t\t\tcurrent.url = url;\n\t\t\t\t\tstores.page.set({ ...page, url });\n\t\t\t\t\tstores.page.notify();\n\n\t\t\t\t\tif (!options.replace_state) return;\n\n\t\t\t\t\t// hashchange event shouldn't occur if the router is replacing state.\n\t\t\t\t\thash_navigating = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\n\t\t\t\tnavigate({\n\t\t\t\t\turl,\n\t\t\t\t\tscroll: options.noscroll ? scroll_state() : null,\n\t\t\t\t\tkeepfocus: options.keep_focus ?? false,\n\t\t\t\t\tredirect_chain: [],\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\tstate: {},\n\t\t\t\t\t\treplaceState: options.replace_state ?? url.href === location.href\n\t\t\t\t\t},\n\t\t\t\t\taccepted: () => event.preventDefault(),\n\t\t\t\t\tblocked: () => event.preventDefault(),\n\t\t\t\t\ttype: 'link'\n\t\t\t\t});\n\t\t\t});\n\n\t\t\tcontainer.addEventListener('submit', (event) => {\n\t\t\t\tif (event.defaultPrevented) return;\n\n\t\t\t\tconst form = /** @type {HTMLFormElement} */ (\n\t\t\t\t\tHTMLFormElement.prototype.cloneNode.call(event.target)\n\t\t\t\t);\n\n\t\t\t\tconst submitter = /** @type {HTMLButtonElement | HTMLInputElement | null} */ (\n\t\t\t\t\tevent.submitter\n\t\t\t\t);\n\n\t\t\t\tconst method = submitter?.formMethod || form.method;\n\n\t\t\t\tif (method !== 'get') return;\n\n\t\t\t\tconst url = new URL(\n\t\t\t\t\t(submitter?.hasAttribute('formaction') && submitter?.formAction) || form.action\n\t\t\t\t);\n\n\t\t\t\tif (is_external_url(url, base)) return;\n\n\t\t\t\tconst event_form = /** @type {HTMLFormElement} */ (event.target);\n\n\t\t\t\tconst { keep_focus, noscroll, reload, replace_state } = get_router_options(event_form);\n\t\t\t\tif (reload) return;\n\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\n\t\t\t\tconst data = new FormData(event_form);\n\n\t\t\t\tconst submitter_name = submitter?.getAttribute('name');\n\t\t\t\tif (submitter_name) {\n\t\t\t\t\tdata.append(submitter_name, submitter?.getAttribute('value') ?? '');\n\t\t\t\t}\n\n\t\t\t\t// @ts-expect-error `URLSearchParams(fd)` is kosher, but typescript doesn't know that\n\t\t\t\turl.search = new URLSearchParams(data).toString();\n\n\t\t\t\tnavigate({\n\t\t\t\t\turl,\n\t\t\t\t\tscroll: noscroll ? scroll_state() : null,\n\t\t\t\t\tkeepfocus: keep_focus ?? false,\n\t\t\t\t\tredirect_chain: [],\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\tstate: {},\n\t\t\t\t\t\treplaceState: replace_state ?? url.href === location.href\n\t\t\t\t\t},\n\t\t\t\t\tnav_token: {},\n\t\t\t\t\taccepted: () => {},\n\t\t\t\t\tblocked: () => {},\n\t\t\t\t\ttype: 'form'\n\t\t\t\t});\n\t\t\t});\n\n\t\t\taddEventListener('popstate', async (event) => {\n\t\t\t\tif (event.state?.[INDEX_KEY]) {\n\t\t\t\t\t// if a popstate-driven navigation is cancelled, we need to counteract it\n\t\t\t\t\t// with history.go, which means we end up back here, hence this check\n\t\t\t\t\tif (event.state[INDEX_KEY] === current_history_index) return;\n\n\t\t\t\t\tconst scroll = scroll_positions[event.state[INDEX_KEY]];\n\n\t\t\t\t\t// if the only change is the hash, we don't need to do anything...\n\t\t\t\t\tif (current.url.href.split('#')[0] === location.href.split('#')[0]) {\n\t\t\t\t\t\t// ...except handle scroll\n\t\t\t\t\t\tscroll_positions[current_history_index] = scroll_state();\n\t\t\t\t\t\tcurrent_history_index = event.state[INDEX_KEY];\n\t\t\t\t\t\tscrollTo(scroll.x, scroll.y);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst delta = event.state[INDEX_KEY] - current_history_index;\n\n\t\t\t\t\tawait navigate({\n\t\t\t\t\t\turl: new URL(location.href),\n\t\t\t\t\t\tscroll,\n\t\t\t\t\t\tkeepfocus: false,\n\t\t\t\t\t\tredirect_chain: [],\n\t\t\t\t\t\tdetails: null,\n\t\t\t\t\t\taccepted: () => {\n\t\t\t\t\t\t\tcurrent_history_index = event.state[INDEX_KEY];\n\t\t\t\t\t\t},\n\t\t\t\t\t\tblocked: () => {\n\t\t\t\t\t\t\thistory.go(-delta);\n\t\t\t\t\t\t},\n\t\t\t\t\t\ttype: 'popstate',\n\t\t\t\t\t\tdelta\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taddEventListener('hashchange', () => {\n\t\t\t\t// if the hashchange happened as a result of clicking on a link,\n\t\t\t\t// we need to update history, otherwise we have to leave it alone\n\t\t\t\tif (hash_navigating) {\n\t\t\t\t\thash_navigating = false;\n\t\t\t\t\thistory.replaceState(\n\t\t\t\t\t\t{ ...history.state, [INDEX_KEY]: ++current_history_index },\n\t\t\t\t\t\t'',\n\t\t\t\t\t\tlocation.href\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// fix link[rel=icon], because browsers will occasionally try to load relative\n\t\t\t// URLs after a pushState/replaceState, resulting in a 404 — see\n\t\t\t// https://github.com/sveltejs/kit/issues/3748#issuecomment-1125980897\n\t\t\tfor (const link of document.querySelectorAll('link')) {\n\t\t\t\tif (link.rel === 'icon') link.href = link.href; // eslint-disable-line\n\t\t\t}\n\n\t\t\taddEventListener('pageshow', (event) => {\n\t\t\t\t// If the user navigates to another site and then uses the back button and\n\t\t\t\t// bfcache hits, we need to set navigating to null, the site doesn't know\n\t\t\t\t// the navigation away from it was successful.\n\t\t\t\t// Info about bfcache here: https://web.dev/bfcache\n\t\t\t\tif (event.persisted) {\n\t\t\t\t\tstores.navigating.set(null);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_hydrate: async ({\n\t\t\tstatus = 200,\n\t\t\terror,\n\t\t\tnode_ids,\n\t\t\tparams,\n\t\t\troute,\n\t\t\tdata: server_data_nodes,\n\t\t\tform\n\t\t}) => {\n\t\t\thydrated = true;\n\n\t\t\tconst url = new URL(location.href);\n\n\t\t\tif (!__SVELTEKIT_EMBEDDED__) {\n\t\t\t\t// See https://github.com/sveltejs/kit/pull/4935#issuecomment-1328093358 for one motivation\n\t\t\t\t// of determining the params on the client side.\n\t\t\t\t({ params = {}, route = { id: null } } = get_navigation_intent(url, false) || {});\n\t\t\t}\n\n\t\t\t/** @type {import('./types').NavigationFinished | undefined} */\n\t\t\tlet result;\n\n\t\t\ttry {\n\t\t\t\tconst branch_promises = node_ids.map(async (n, i) => {\n\t\t\t\t\tconst server_data_node = server_data_nodes[i];\n\t\t\t\t\t// Type isn't completely accurate, we still need to deserialize uses\n\t\t\t\t\tif (server_data_node?.uses) {\n\t\t\t\t\t\tserver_data_node.uses = deserialize_uses(server_data_node.uses);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn load_node({\n\t\t\t\t\t\tloader: app.nodes[n],\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams,\n\t\t\t\t\t\troute,\n\t\t\t\t\t\tparent: async () => {\n\t\t\t\t\t\t\tconst data = {};\n\t\t\t\t\t\t\tfor (let j = 0; j < i; j += 1) {\n\t\t\t\t\t\t\t\tObject.assign(data, (await branch_promises[j]).data);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn data;\n\t\t\t\t\t\t},\n\t\t\t\t\t\tserver_data_node: create_data_node(server_data_node)\n\t\t\t\t\t});\n\t\t\t\t});\n\n\t\t\t\t/** @type {Array} */\n\t\t\t\tconst branch = await Promise.all(branch_promises);\n\n\t\t\t\tconst parsed_route = routes.find(({ id }) => id === route.id);\n\n\t\t\t\t// server-side will have compacted the branch, reinstate empty slots\n\t\t\t\t// so that error boundaries can be lined up correctly\n\t\t\t\tif (parsed_route) {\n\t\t\t\t\tconst layouts = parsed_route.layouts;\n\t\t\t\t\tfor (let i = 0; i < layouts.length; i++) {\n\t\t\t\t\t\tif (!layouts[i]) {\n\t\t\t\t\t\t\tbranch.splice(i, 0, undefined);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresult = await get_navigation_result_from_branch({\n\t\t\t\t\turl,\n\t\t\t\t\tparams,\n\t\t\t\t\tbranch,\n\t\t\t\t\tstatus,\n\t\t\t\t\terror,\n\t\t\t\t\tform,\n\t\t\t\t\troute: parsed_route ?? null\n\t\t\t\t});\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Redirect) {\n\t\t\t\t\t// this is a real edge case — `load` would need to return\n\t\t\t\t\t// a redirect but only in the browser\n\t\t\t\t\tawait native_navigation(new URL(error.location, location.href));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresult = await load_root_error_page({\n\t\t\t\t\tstatus: error instanceof HttpError ? error.status : 500,\n\t\t\t\t\terror: await handle_error(error, { url, params, route }),\n\t\t\t\t\turl,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tinitialize(result);\n\t\t}\n\t};\n}\n\n/**\n * @param {URL} url\n * @param {boolean[]} invalid\n * @returns {Promise}\n */\nasync function load_data(url, invalid) {\n\tconst data_url = new URL(url);\n\tdata_url.pathname = add_data_suffix(url.pathname);\n\tif (DEV && url.searchParams.has(INVALIDATED_PARAM)) {\n\t\tthrow new Error(`Cannot used reserved query parameter \"${INVALIDATED_PARAM}\"`);\n\t}\n\tdata_url.searchParams.append(INVALIDATED_PARAM, invalid.map((i) => (i ? '1' : '0')).join(''));\n\n\tconst res = await native_fetch(data_url.href);\n\n\tif (!res.ok) {\n\t\t// error message is a JSON-stringified string which devalue can't handle at the top level\n\t\t// turn it into a HttpError to not call handleError on the client again (was already handled on the server)\n\t\tthrow new HttpError(res.status, await res.json());\n\t}\n\n\t// TODO: fix eslint error\n\t// eslint-disable-next-line\n\treturn new Promise(async (resolve) => {\n\t\t/**\n\t\t * Map of deferred promises that will be resolved by a subsequent chunk of data\n\t\t * @type {Map}\n\t\t */\n\t\tconst deferreds = new Map();\n\t\tconst reader = /** @type {ReadableStream} */ (res.body).getReader();\n\t\tconst decoder = new TextDecoder();\n\n\t\t/**\n\t\t * @param {any} data\n\t\t */\n\t\tfunction deserialize(data) {\n\t\t\treturn devalue.unflatten(data, {\n\t\t\t\tPromise: (id) => {\n\t\t\t\t\treturn new Promise((fulfil, reject) => {\n\t\t\t\t\t\tdeferreds.set(id, { fulfil, reject });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tlet text = '';\n\n\t\twhile (true) {\n\t\t\t// Format follows ndjson (each line is a JSON object) or regular JSON spec\n\t\t\tconst { done, value } = await reader.read();\n\t\t\tif (done && !text) break;\n\n\t\t\ttext += !value && text ? '\\n' : decoder.decode(value); // no value -> final chunk -> add a new line to trigger the last parse\n\n\t\t\twhile (true) {\n\t\t\t\tconst split = text.indexOf('\\n');\n\t\t\t\tif (split === -1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tconst node = JSON.parse(text.slice(0, split));\n\t\t\t\ttext = text.slice(split + 1);\n\n\t\t\t\tif (node.type === 'redirect') {\n\t\t\t\t\treturn resolve(node);\n\t\t\t\t}\n\n\t\t\t\tif (node.type === 'data') {\n\t\t\t\t\t// This is the first (and possibly only, if no pending promises) chunk\n\t\t\t\t\tnode.nodes?.forEach((/** @type {any} */ node) => {\n\t\t\t\t\t\tif (node?.type === 'data') {\n\t\t\t\t\t\t\tnode.uses = deserialize_uses(node.uses);\n\t\t\t\t\t\t\tnode.data = deserialize(node.data);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tresolve(node);\n\t\t\t\t} else if (node.type === 'chunk') {\n\t\t\t\t\t// This is a subsequent chunk containing deferred data\n\t\t\t\t\tconst { id, data, error } = node;\n\t\t\t\t\tconst deferred = /** @type {import('types').Deferred} */ (deferreds.get(id));\n\t\t\t\t\tdeferreds.delete(id);\n\n\t\t\t\t\tif (error) {\n\t\t\t\t\t\tdeferred.reject(deserialize(error));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.fulfil(deserialize(data));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\n\t// TODO edge case handling necessary? stream() read fails?\n}\n\n/**\n * @param {any} uses\n * @return {import('types').Uses}\n */\nfunction deserialize_uses(uses) {\n\treturn {\n\t\tdependencies: new Set(uses?.dependencies ?? []),\n\t\tparams: new Set(uses?.params ?? []),\n\t\tparent: !!uses?.parent,\n\t\troute: !!uses?.route,\n\t\turl: !!uses?.url\n\t};\n}\n\nfunction reset_focus() {\n\tconst autofocus = document.querySelector('[autofocus]');\n\tif (autofocus) {\n\t\t// @ts-ignore\n\t\tautofocus.focus();\n\t} else {\n\t\t// Reset page selection and focus\n\t\t// We try to mimic browsers' behaviour as closely as possible by targeting the\n\t\t// first scrollable region, but unfortunately it's not a perfect match — e.g.\n\t\t// shift-tabbing won't immediately cycle up from the end of the page on Chromium\n\t\t// See https://html.spec.whatwg.org/multipage/interaction.html#get-the-focusable-area\n\t\tconst root = document.body;\n\t\tconst tabindex = root.getAttribute('tabindex');\n\n\t\troot.tabIndex = -1;\n\t\t// @ts-expect-error\n\t\troot.focus({ preventScroll: true, focusVisible: false });\n\n\t\t// restore `tabindex` as to prevent `root` from stealing input from elements\n\t\tif (tabindex !== null) {\n\t\t\troot.setAttribute('tabindex', tabindex);\n\t\t} else {\n\t\t\troot.removeAttribute('tabindex');\n\t\t}\n\n\t\t// capture current selection, so we can compare the state after\n\t\t// snapshot restoration and afterNavigate callbacks have run\n\t\tconst selection = getSelection();\n\n\t\tif (selection && selection.type !== 'None') {\n\t\t\t/** @type {Range[]} */\n\t\t\tconst ranges = [];\n\n\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) {\n\t\t\t\tranges.push(selection.getRangeAt(i));\n\t\t\t}\n\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (selection.rangeCount !== ranges.length) return;\n\n\t\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) {\n\t\t\t\t\tconst a = ranges[i];\n\t\t\t\t\tconst b = selection.getRangeAt(i);\n\n\t\t\t\t\t// we need to do a deep comparison rather than just `a !== b` because\n\t\t\t\t\t// Safari behaves differently to other browsers\n\t\t\t\t\tif (\n\t\t\t\t\t\ta.commonAncestorContainer !== b.commonAncestorContainer ||\n\t\t\t\t\t\ta.startContainer !== b.startContainer ||\n\t\t\t\t\t\ta.endContainer !== b.endContainer ||\n\t\t\t\t\t\ta.startOffset !== b.startOffset ||\n\t\t\t\t\t\ta.endOffset !== b.endOffset\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if the selection hasn't changed (as a result of an element being (auto)focused,\n\t\t\t\t// or a programmatic selection, we reset everything as part of the navigation)\n\t\t\t\t// fixes https://github.com/sveltejs/kit/issues/8439\n\t\t\t\tselection.removeAllRanges();\n\t\t\t});\n\t\t}\n\t}\n}\n\nif (DEV) {\n\t// Nasty hack to silence harmless warnings the user can do nothing about\n\tconst console_warn = console.warn;\n\tconsole.warn = function warn(...args) {\n\t\tif (\n\t\t\targs.length === 1 &&\n\t\t\t/<(Layout|Page|Error)(_[\\w$]+)?> was created (with unknown|without expected) prop '(data|form)'/.test(\n\t\t\t\targs[0]\n\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tconsole_warn(...args);\n\t};\n\n\tif (import.meta.hot) {\n\t\timport.meta.hot.on('vite:beforeUpdate', () => {\n\t\t\tif (errored) {\n\t\t\t\tlocation.reload();\n\t\t\t}\n\t\t});\n\t}\n}\n","import { DEV } from 'esm-env';\nimport { create_client } from './client.js';\nimport { init } from './singletons.js';\n\n/**\n * @param {import('./types').SvelteKitApp} app\n * @param {HTMLElement} target\n * @param {Parameters[0]} [hydrate]\n */\nexport async function start(app, target, hydrate) {\n\tif (DEV && target === document.body) {\n\t\tconsole.warn(\n\t\t\t'Placing %sveltekit.body% directly inside is not recommended, as your app may break for users who have certain browser extensions installed.\\n\\nConsider wrapping it in an element:\\n\\n
\\n %sveltekit.body%\\n
'\n\t\t);\n\t}\n\n\tconst client = create_client(app, target);\n\n\tinit({ client });\n\n\tif (hydrate) {\n\t\tawait client._hydrate(hydrate);\n\t} else {\n\t\tclient.goto(location.href, { replaceState: true });\n\t}\n\n\tclient._start_router();\n}\n"],"names":["normalize_path","path","trailing_slash","decode_pathname","pathname","decode_params","params","key","tracked_url_properties","make_trackable","url","callback","tracked","property","disable_hash","DATA_SUFFIX","add_data_suffix","get","set","value","json","hash","values","buffer","i","native_fetch","input","init","cache","build_selector","initial_fetch","resource","opts","selector","script","body","ttl","subsequent_fetch","resolved","cached","param_pattern","parse_route_id","id","get_route_segments","segment","rest_match","optional_match","parts","content","escape","code","match","is_optional","is_rest","name","matcher","affects_path","route","exec","matchers","result","buffered","param","s","next_param","next_value","str","parse","nodes","server_loads","dictionary","layouts_with_server_load","leaf","layouts","errors","pattern","n","create_layout_loader","create_leaf_loader","uses_server_data","HttpError","status","Redirect","location","unwrap_promises","object","_a","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","unflatten","parsed","revivers","hydrate","hydrated","index","standalone","type","reviver","map","obj","array","valid_layout_exports","valid_layout_server_exports","compact","arr","val","INVALIDATED_PARAM","scroll_positions","storage.get","SCROLL_KEY","snapshots","SNAPSHOT_KEY","update_scroll_positions","scroll_state","create_client","app","target","routes","default_layout_loader","default_error_loader","container","invalidated","components","load_cache","callbacks","current","started","autoscroll","updating","navigating","hash_navigating","force_invalidation","root","current_history_index","INDEX_KEY","scroll","page","token","pending_invalidate","invalidate","intent","get_navigation_intent","nav_token","navigation_result","load_route","goto","capture_snapshot","c","restore_snapshot","_b","persist_state","storage.set","noScroll","replaceState","keepFocus","state","invalidateAll","redirect_chain","get_base_uri","navigate","preload_data","preload_code","pathnames","promises","r","load","initialize","style","stores","navigation","fn","get_navigation_result_from_branch","branch","error","form","slash","node","branch_node","data","data_changed","p","prev","load_node","loader","parent","server_data_node","uses","depends","deps","dep","href","load_input","requested","_c","has_changed","parent_changed","route_changed","url_changed","create_data_node","previous","invalidating","loaders","server_data","parent_invalid","invalid_server_nodes","invalid","load_data","load_root_error_page","handle_error","server_data_nodes","branch_promises","j","err","native_navigation","error_load","load_nearest_error_page","server_fallback","root_layout","root_error","is_external_url","base","get_url_path","before_navigate","delta","should_block","cancellable","keepfocus","details","accepted","blocked","previous_history_index","change","activeElement","tick","deep_linked","changed_focus","reset_focus","setup_preload","mousemove_timeout","event","preload","tap","observer","entries","entry","element","priority","a","find_anchor","external","download","get_link_info","options","get_router_options","after_navigate","PRELOAD_PRIORITIES","onMount","e","nonhash","submitter","event_form","keep_focus","noscroll","reload","replace_state","submitter_name","link","node_ids","deserialize_uses","parsed_route","data_url","res","resolve","deferreds","reader","decoder","deserialize","devalue.unflatten","fulfil","reject","text","done","split","deferred","autofocus","tabindex","selection","ranges","b","start","client"],"mappings":"2MA8CO,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