{"version":3,"file":"start.16217950.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/@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\tlet 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\tvalue = 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}\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","/**\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","i","buffer","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","valid_layout_exports","valid_layout_server_exports","compact","arr","val","INVALIDATED_PARAM","scroll_positions","storage.get","SCROLL_KEY","snapshots","SNAPSHOT_KEY","update_scroll_positions","index","scroll_state","create_client","app","target","routes","default_layout_loader","default_error_loader","container","invalidated","components","load_cache","callbacks","current","hydrated","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","type","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","hydrate","client"],"mappings":"qSA8CO,SAASA,GAAeC,EAAMC,EAAgB,CACpD,OAAID,IAAS,KAAOC,IAAmB,SAAiBD,EAEpDC,IAAmB,QACfD,EAAK,SAAS,GAAG,EAAIA,EAAK,MAAM,EAAG,EAAE,EAAIA,EACtCC,IAAmB,UAAY,CAACD,EAAK,SAAS,GAAG,EACpDA,EAAO,IAGRA,CACR,CAMO,SAASE,GAAgBC,EAAU,CACzC,OAAOA,EAAS,MAAM,KAAK,EAAE,IAAI,SAAS,EAAE,KAAK,KAAK,CACvD,CAGO,SAASC,GAAcC,EAAQ,CACrC,UAAWC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