\n\t\t\t );\n\n\treturn { pattern, names, types };\n}\n\n\u002F**\n * @param {RegExpMatchArray} match\n * @param {string[]} names\n * @param {string[]} types\n * @param {Record\u003Cstring, import('types').ParamMatcher\u003E} matchers\n *\u002F\nfunction exec(match, names, types, matchers) {\n\t\u002F** @type {Record\u003Cstring, string\u003E} *\u002F\n\tconst params = {};\n\n\tfor (let i = 0; i \u003C names.length; i += 1) {\n\t\tconst name = names[i];\n\t\tconst type = types[i];\n\t\tconst value = match[i + 1] || '';\n\n\t\tif (type) {\n\t\t\tconst matcher = matchers[type];\n\t\t\tif (!matcher) throw new Error(`Missing \"${type}\" param matcher`); \u002F\u002F TODO do this ahead of time?\n\n\t\t\tif (!matcher(value)) return;\n\t\t}\n\n\t\tparams[name] = value;\n\t}\n\n\treturn params;\n}\n\n\u002F**\n * @param {import('types').CSRComponentLoader[]} components\n * @param {Record\u003Cstring, [number[], number[], 1?]\u003E} dictionary\n * @param {Record\u003Cstring, (param: string) =\u003E boolean\u003E} matchers\n * @returns {import('types').CSRRoute[]}\n *\u002F\nfunction parse(components, dictionary, matchers) {\n\tconst routes = Object.entries(dictionary).map(([id, [a, b, has_shadow]]) =\u003E {\n\t\tconst { pattern, names, types } = parse_route_id(id);\n\n\t\treturn {\n\t\t\tid,\n\t\t\t\u002F** @param {string} path *\u002F\n\t\t\texec: (path) =\u003E {\n\t\t\t\tconst match = pattern.exec(path);\n\t\t\t\tif (match) return exec(match, names, types, matchers);\n\t\t\t},\n\t\t\ta: a.map((n) =\u003E components[n]),\n\t\t\tb: b.map((n) =\u003E components[n]),\n\t\t\thas_shadow: !!has_shadow\n\t\t};\n\t});\n\n\treturn routes;\n}\n\nconst SCROLL_KEY = 'sveltekit:scroll';\nconst INDEX_KEY = 'sveltekit:index';\n\nconst routes = parse(components, dictionary, matchers);\n\n\u002F\u002F we import the root layout\u002Ferror components eagerly, so that\n\u002F\u002F connectivity errors after initialisation don't nuke the app\nconst default_layout = components[0]();\nconst default_error = components[1]();\n\nconst root_stuff = {};\n\n\u002F\u002F We track the scroll position associated with each history entry in sessionStorage,\n\u002F\u002F rather than on history.state itself, because when navigation is driven by\n\u002F\u002F popstate it's too late to update the scroll position associated with the\n\u002F\u002F state we're navigating from\n\n\u002F** @typedef {{ x: number, y: number }} ScrollPosition *\u002F\n\u002F** @type {Record\u003Cnumber, ScrollPosition\u003E} *\u002F\nlet scroll_positions = {};\ntry {\n\tscroll_positions = JSON.parse(sessionStorage[SCROLL_KEY]);\n} catch {\n\t\u002F\u002F do nothing\n}\n\n\u002F** @param {number} index *\u002F\nfunction update_scroll_positions(index) {\n\tscroll_positions[index] = scroll_state();\n}\n\n\u002F**\n * @param {{\n * target: Element;\n * session: App.Session;\n * base: string;\n * trailing_slash: import('types').TrailingSlash;\n * }} opts\n * @returns {import('.\u002Ftypes').Client}\n *\u002F\nfunction create_client({ target, session, base, trailing_slash }) {\n\t\u002F** @type {Map\u003Cstring, import('.\u002Ftypes').NavigationResult\u003E} *\u002F\n\tconst cache = new Map();\n\n\t\u002F** @type {Array\u003C((href: string) =\u003E boolean)\u003E} *\u002F\n\tconst invalidated = [];\n\n\tconst stores = {\n\t\turl: notifiable_store({}),\n\t\tpage: notifiable_store({}),\n\t\tnavigating: writable(\u002F** @type {import('types').Navigation | null} *\u002F (null)),\n\t\tsession: writable(session),\n\t\tupdated: create_updated_store()\n\t};\n\n\t\u002F** @type {{id: string | null, promise: Promise\u003Cimport('.\u002Ftypes').NavigationResult | undefined\u003E | null}} *\u002F\n\tconst load_cache = {\n\t\tid: null,\n\t\tpromise: null\n\t};\n\n\tconst callbacks = {\n\t\t\u002F** @type {Array\u003C(opts: { from: URL, to: URL | null, cancel: () =\u003E void }) =\u003E void\u003E} *\u002F\n\t\tbefore_navigate: [],\n\n\t\t\u002F** @type {Array\u003C(opts: { from: URL | null, to: URL }) =\u003E void\u003E} *\u002F\n\t\tafter_navigate: []\n\t};\n\n\t\u002F** @type {import('.\u002Ftypes').NavigationState} *\u002F\n\tlet current = {\n\t\tbranch: [],\n\t\terror: null,\n\t\tsession_id: 0,\n\t\tstuff: root_stuff,\n\t\t\u002F\u002F @ts-ignore - we need the initial value to be null\n\t\turl: null\n\t};\n\n\tlet started = false;\n\tlet autoscroll = true;\n\tlet updating = false;\n\tlet session_id = 1;\n\n\t\u002F** @type {Promise\u003Cvoid\u003E | null} *\u002F\n\tlet invalidating = null;\n\n\t\u002F** @type {import('svelte').SvelteComponent} *\u002F\n\tlet root;\n\n\t\u002F** @type {App.Session} *\u002F\n\tlet $session;\n\n\tlet ready = false;\n\tstores.session.subscribe(async (value) =\u003E {\n\t\t$session = value;\n\n\t\tif (!ready) return;\n\t\tsession_id += 1;\n\n\t\tupdate(new URL(location.href), [], true);\n\t});\n\tready = true;\n\n\tlet router_enabled = true;\n\n\t\u002F\u002F 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\u002F\u002F we use Date.now() as an offset so that cross-document navigations\n\t\t\u002F\u002F within the app don't result in data loss\n\t\tcurrent_history_index = Date.now();\n\n\t\t\u002F\u002F 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\u002F\u002F if we reload the page, or Cmd-Shift-T back to it,\n\t\u002F\u002F 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\tlet hash_navigating = false;\n\n\t\u002F** @type {import('types').Page} *\u002F\n\tlet page;\n\n\t\u002F** @type {{}} *\u002F\n\tlet token;\n\n\t\u002F**\n\t * @param {string} href\n\t * @param {{ noscroll?: boolean; replaceState?: boolean; keepfocus?: boolean; state?: any }} opts\n\t * @param {string[]} redirect_chain\n\t *\u002F\n\tasync function goto(\n\t\thref,\n\t\t{ noscroll = false, replaceState = false, keepfocus = false, state = {} },\n\t\tredirect_chain\n\t) {\n\t\tconst url = new URL(href, get_base_uri(document));\n\n\t\tif (router_enabled) {\n\t\t\treturn navigate({\n\t\t\t\turl,\n\t\t\t\tscroll: noscroll ? scroll_state() : null,\n\t\t\t\tkeepfocus,\n\t\t\t\tredirect_chain,\n\t\t\t\tdetails: {\n\t\t\t\t\tstate,\n\t\t\t\t\treplaceState\n\t\t\t\t},\n\t\t\t\taccepted: () =\u003E {},\n\t\t\t\tblocked: () =\u003E {}\n\t\t\t});\n\t\t}\n\n\t\tawait native_navigation(url);\n\t}\n\n\t\u002F** @param {URL} url *\u002F\n\tasync function prefetch(url) {\n\t\tconst intent = get_navigation_intent(url);\n\n\t\tif (!intent) {\n\t\t\tthrow new Error('Attempted to prefetch a URL that does not belong to this app');\n\t\t}\n\n\t\tload_cache.promise = load_route(intent, false);\n\t\tload_cache.id = intent.id;\n\n\t\treturn load_cache.promise;\n\t}\n\n\t\u002F**\n\t * Returns `true` if update completes, `false` if it is aborted\n\t * @param {URL} url\n\t * @param {string[]} redirect_chain\n\t * @param {boolean} no_cache\n\t * @param {{hash?: string, scroll: { x: number, y: number } | null, keepfocus: boolean, details: { replaceState: boolean, state: any } | null}} [opts]\n\t *\u002F\n\tasync function update(url, redirect_chain, no_cache, opts) {\n\t\tconst intent = get_navigation_intent(url);\n\n\t\tconst current_token = (token = {});\n\t\tlet navigation_result = intent && (await load_route(intent, no_cache));\n\n\t\tif (\n\t\t\t!navigation_result &&\n\t\t\turl.origin === location.origin &&\n\t\t\turl.pathname === location.pathname\n\t\t) {\n\t\t\t\u002F\u002F this could happen in SPA fallback mode if the user navigated to\n\t\t\t\u002F\u002F `\u002Fnon-existent-page`. if we fall back to reloading the page, it\n\t\t\t\u002F\u002F will create an infinite loop. so whereas we normally handle\n\t\t\t\u002F\u002F unknown routes by going to the server, in this special case\n\t\t\t\u002F\u002F we render a client-side error page instead\n\t\t\tnavigation_result = await load_root_error_page({\n\t\t\t\tstatus: 404,\n\t\t\t\terror: new Error(`Not found: ${url.pathname}`),\n\t\t\t\turl,\n\t\t\t\trouteId: null\n\t\t\t});\n\t\t}\n\n\t\tif (!navigation_result) {\n\t\t\tawait native_navigation(url);\n\t\t\treturn false; \u002F\u002F unnecessary, but TypeScript prefers it this way\n\t\t}\n\n\t\t\u002F\u002F abort if user navigated during update\n\t\tif (token !== current_token) return false;\n\n\t\tinvalidated.length = 0;\n\n\t\tif (navigation_result.redirect) {\n\t\t\tif (redirect_chain.length \u003E 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: new Error('Redirect loop'),\n\t\t\t\t\turl,\n\t\t\t\t\trouteId: null\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (router_enabled) {\n\t\t\t\t\tgoto(new URL(navigation_result.redirect, url).href, {}, [\n\t\t\t\t\t\t...redirect_chain,\n\t\t\t\t\t\turl.pathname\n\t\t\t\t\t]);\n\t\t\t\t} else {\n\t\t\t\t\tawait native_navigation(new URL(navigation_result.redirect, location.href));\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (navigation_result.props?.page?.status \u003E= 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\tupdating = true;\n\n\t\tif (opts && opts.details) {\n\t\t\tconst { details } = opts;\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\t\t}\n\n\t\tif (started) {\n\t\t\tcurrent = navigation_result.state;\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\t\u002F\u002F opts must be passed if we're navigating\n\t\tif (opts) {\n\t\t\tconst { scroll, keepfocus } = opts;\n\n\t\t\tif (!keepfocus) {\n\t\t\t\t\u002F\u002F Reset page selection and focus\n\t\t\t\t\u002F\u002F We try to mimic browsers' behaviour as closely as possible by targeting the\n\t\t\t\t\u002F\u002F first scrollable region, but unfortunately it's not a perfect match — e.g.\n\t\t\t\t\u002F\u002F shift-tabbing won't immediately cycle up from the end of the page on Chromium\n\t\t\t\t\u002F\u002F See https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Finteraction.html#get-the-focusable-area\n\t\t\t\tconst root = document.body;\n\t\t\t\tconst tabindex = root.getAttribute('tabindex');\n\n\t\t\t\tgetSelection()?.removeAllRanges();\n\t\t\t\troot.tabIndex = -1;\n\t\t\t\troot.focus({ preventScroll: true });\n\n\t\t\t\t\u002F\u002F restore `tabindex` as to prevent `root` from stealing input from elements\n\t\t\t\tif (tabindex !== null) {\n\t\t\t\t\troot.setAttribute('tabindex', tabindex);\n\t\t\t\t} else {\n\t\t\t\t\troot.removeAttribute('tabindex');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\u002F\u002F need to render the DOM before we can scroll to the rendered elements\n\t\t\tawait tick();\n\n\t\t\tif (autoscroll) {\n\t\t\t\tconst deep_linked = url.hash && document.getElementById(url.hash.slice(1));\n\t\t\t\tif (scroll) {\n\t\t\t\t\tscrollTo(scroll.x, scroll.y);\n\t\t\t\t} else if (deep_linked) {\n\t\t\t\t\t\u002F\u002F Here we use `scrollIntoView` on the element instead of `scrollTo`\n\t\t\t\t\t\u002F\u002F because it natively supports the `scroll-margin` and `scroll-behavior`\n\t\t\t\t\t\u002F\u002F CSS properties.\n\t\t\t\t\tdeep_linked.scrollIntoView();\n\t\t\t\t} else {\n\t\t\t\t\tscrollTo(0, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\u002F\u002F in this case we're simply invalidating\n\t\t\tawait tick();\n\t\t}\n\n\t\tload_cache.promise = null;\n\t\tload_cache.id = null;\n\t\tautoscroll = true;\n\t\tupdating = false;\n\n\t\tif (navigation_result.props.page) {\n\t\t\tpage = navigation_result.props.page;\n\t\t}\n\n\t\tconst leaf_node = navigation_result.state.branch[navigation_result.state.branch.length - 1];\n\t\trouter_enabled = leaf_node?.module.router !== false;\n\n\t\treturn true;\n\t}\n\n\t\u002F** @param {import('.\u002Ftypes').NavigationResult} result *\u002F\n\tfunction initialize(result) {\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 = result.props.page;\n\n\t\troot = new Root({\n\t\t\ttarget,\n\t\t\tprops: { ...result.props, stores },\n\t\t\thydrate: true\n\t\t});\n\n\t\tstarted = true;\n\n\t\tif (router_enabled) {\n\t\t\tconst navigation = { from: null, to: new URL(location.href) };\n\t\t\tcallbacks.after_navigate.forEach((fn) =\u003E fn(navigation));\n\t\t}\n\t}\n\n\t\u002F**\n\t *\n\t * @param {{\n\t * url: URL;\n\t * params: Record\u003Cstring, string\u003E;\n\t * stuff: Record\u003Cstring, any\u003E;\n\t * branch: Array\u003Cimport('.\u002Ftypes').BranchNode | undefined\u003E;\n\t * status: number;\n\t * error: Error | null;\n\t * routeId: string | null;\n\t * }} opts\n\t *\u002F\n\tasync function get_navigation_result_from_branch({\n\t\turl,\n\t\tparams,\n\t\tstuff,\n\t\tbranch,\n\t\tstatus,\n\t\terror,\n\t\trouteId\n\t}) {\n\t\tconst filtered = \u002F** @type {import('.\u002Ftypes').BranchNode[] } *\u002F (branch.filter(Boolean));\n\t\tconst redirect = filtered.find((f) =\u003E f.loaded?.redirect);\n\n\t\t\u002F** @type {import('.\u002Ftypes').NavigationResult} *\u002F\n\t\tconst result = {\n\t\t\tredirect: redirect?.loaded?.redirect,\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\tstuff,\n\t\t\t\tsession_id\n\t\t\t},\n\t\t\tprops: {\n\t\t\t\tcomponents: filtered.map((node) =\u003E node.module.default)\n\t\t\t}\n\t\t};\n\n\t\tfor (let i = 0; i \u003C filtered.length; i += 1) {\n\t\t\tconst loaded = filtered[i].loaded;\n\t\t\tresult.props[`props_${i}`] = loaded ? await loaded.props : null;\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\tcurrent.stuff !== stuff;\n\n\t\tif (page_changed) {\n\t\t\tresult.props.page = { error, params, routeId, status, stuff, url };\n\n\t\t\t\u002F\u002F TODO remove this for 1.0\n\t\t\t\u002F**\n\t\t\t * @param {string} property\n\t\t\t * @param {string} replacement\n\t\t\t *\u002F\n\t\t\tconst print_error = (property, replacement) =\u003E {\n\t\t\t\tObject.defineProperty(result.props.page, property, {\n\t\t\t\t\tget: () =\u003E {\n\t\t\t\t\t\tthrow new Error(`$page.${property} has been replaced by $page.url.${replacement}`);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tprint_error('origin', 'origin');\n\t\t\tprint_error('path', 'pathname');\n\t\t\tprint_error('query', 'searchParams');\n\t\t}\n\n\t\tconst leaf = filtered[filtered.length - 1];\n\t\tconst load_cache = leaf?.loaded?.cache;\n\n\t\tif (load_cache) {\n\t\t\tconst key = url.pathname + url.search; \u002F\u002F omit hash\n\t\t\tlet ready = false;\n\n\t\t\tconst clear = () =\u003E {\n\t\t\t\tif (cache.get(key) === result) {\n\t\t\t\t\tcache.delete(key);\n\t\t\t\t}\n\n\t\t\t\tunsubscribe();\n\t\t\t\tclearTimeout(timeout);\n\t\t\t};\n\n\t\t\tconst timeout = setTimeout(clear, load_cache.maxage * 1000);\n\n\t\t\tconst unsubscribe = stores.session.subscribe(() =\u003E {\n\t\t\t\tif (ready) clear();\n\t\t\t});\n\n\t\t\tready = true;\n\n\t\t\tcache.set(key, result);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t\u002F**\n\t * @param {{\n\t * status?: number;\n\t * error?: Error;\n\t * module: import('types').CSRComponent;\n\t * url: URL;\n\t * params: Record\u003Cstring, string\u003E;\n\t * stuff: Record\u003Cstring, any\u003E;\n\t * props?: Record\u003Cstring, any\u003E;\n\t * routeId: string | null;\n\t * }} options\n\t *\u002F\n\tasync function load_node({ status, error, module, url, params, stuff, props, routeId }) {\n\t\t\u002F** @type {import('.\u002Ftypes').BranchNode} *\u002F\n\t\tconst node = {\n\t\t\tmodule,\n\t\t\tuses: {\n\t\t\t\tparams: new Set(),\n\t\t\t\turl: false,\n\t\t\t\tsession: false,\n\t\t\t\tstuff: false,\n\t\t\t\tdependencies: new Set()\n\t\t\t},\n\t\t\tloaded: null,\n\t\t\tstuff\n\t\t};\n\n\t\t\u002F** @param dep {string} *\u002F\n\t\tfunction add_dependency(dep) {\n\t\t\tconst { href } = new URL(dep, url);\n\t\t\tnode.uses.dependencies.add(href);\n\t\t}\n\n\t\tif (props) {\n\t\t\t\u002F\u002F shadow endpoint props means we need to mark this URL as a dependency of itself\n\t\t\tnode.uses.dependencies.add(url.href);\n\t\t}\n\n\t\t\u002F** @type {Record\u003Cstring, string\u003E} *\u002F\n\t\tconst uses_params = {};\n\t\tfor (const key in params) {\n\t\t\tObject.defineProperty(uses_params, key, {\n\t\t\t\tget() {\n\t\t\t\t\tnode.uses.params.add(key);\n\t\t\t\t\treturn params[key];\n\t\t\t\t},\n\t\t\t\tenumerable: true\n\t\t\t});\n\t\t}\n\n\t\tconst session = $session;\n\n\t\tif (module.load) {\n\t\t\t\u002F** @type {import('types').LoadInput} *\u002F\n\t\t\tconst load_input = {\n\t\t\t\trouteId,\n\t\t\t\tparams: uses_params,\n\t\t\t\tprops: props || {},\n\t\t\t\tget url() {\n\t\t\t\t\tnode.uses.url = true;\n\t\t\t\t\treturn url;\n\t\t\t\t},\n\t\t\t\tget session() {\n\t\t\t\t\tnode.uses.session = true;\n\t\t\t\t\treturn session;\n\t\t\t\t},\n\t\t\t\tget stuff() {\n\t\t\t\t\tnode.uses.stuff = true;\n\t\t\t\t\treturn { ...stuff };\n\t\t\t\t},\n\t\t\t\tfetch(resource, info) {\n\t\t\t\t\tconst requested = typeof resource === 'string' ? resource : resource.url;\n\t\t\t\t\tadd_dependency(requested);\n\n\t\t\t\t\treturn started ? fetch(resource, info) : initial_fetch(resource, info);\n\t\t\t\t},\n\t\t\t\tstatus: status ?? null,\n\t\t\t\terror: error ?? null\n\t\t\t};\n\n\t\t\tif (import.meta.env.DEV) {\n\t\t\t\t\u002F\u002F TODO remove this for 1.0\n\t\t\t\tObject.defineProperty(load_input, 'page', {\n\t\t\t\t\tget: () =\u003E {\n\t\t\t\t\t\tthrow new Error('`page` in `load` functions has been replaced by `url` and `params`');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tconst loaded = await module.load.call(null, load_input);\n\n\t\t\tif (!loaded) {\n\t\t\t\tthrow new Error('load function must return a value');\n\t\t\t}\n\n\t\t\tnode.loaded = normalize(loaded);\n\t\t\tif (node.loaded.stuff) node.stuff = node.loaded.stuff;\n\t\t\tif (node.loaded.dependencies) {\n\t\t\t\tnode.loaded.dependencies.forEach(add_dependency);\n\t\t\t}\n\t\t} else if (props) {\n\t\t\tnode.loaded = normalize({ props });\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t\u002F**\n\t * @param {import('.\u002Ftypes').NavigationIntent} intent\n\t * @param {boolean} no_cache\n\t *\u002F\n\tasync function load_route({ id, url, params, route }, no_cache) {\n\t\tif (load_cache.id === id && load_cache.promise) {\n\t\t\treturn load_cache.promise;\n\t\t}\n\n\t\tif (!no_cache) {\n\t\t\tconst cached = cache.get(id);\n\t\t\tif (cached) return cached;\n\t\t}\n\n\t\tconst { a, b, has_shadow } = route;\n\n\t\tconst changed = current.url && {\n\t\t\turl: id !== current.url.pathname + current.url.search,\n\t\t\tparams: Object.keys(params).filter((key) =\u003E current.params[key] !== params[key]),\n\t\t\tsession: session_id !== current.session_id\n\t\t};\n\n\t\t\u002F** @type {Array\u003Cimport('.\u002Ftypes').BranchNode | undefined\u003E} *\u002F\n\t\tlet branch = [];\n\n\t\t\u002F** @type {Record\u003Cstring, any\u003E} *\u002F\n\t\tlet stuff = root_stuff;\n\t\tlet stuff_changed = false;\n\n\t\t\u002F** @type {number | undefined} *\u002F\n\t\tlet status = 200;\n\n\t\t\u002F** @type {Error | null} *\u002F\n\t\tlet error = null;\n\n\t\t\u002F\u002F preload modules to avoid waterfall, but handle rejections\n\t\t\u002F\u002F so they don't get reported to Sentry et al (we don't need\n\t\t\u002F\u002F to act on the failures at this point)\n\t\ta.forEach((loader) =\u003E loader().catch(() =\u003E {}));\n\n\t\tload: for (let i = 0; i \u003C a.length; i += 1) {\n\t\t\t\u002F** @type {import('.\u002Ftypes').BranchNode | undefined} *\u002F\n\t\t\tlet node;\n\n\t\t\ttry {\n\t\t\t\tif (!a[i]) continue;\n\n\t\t\t\tconst module = await a[i]();\n\t\t\t\tconst previous = current.branch[i];\n\n\t\t\t\tconst changed_since_last_render =\n\t\t\t\t\t!previous ||\n\t\t\t\t\tmodule !== previous.module ||\n\t\t\t\t\t(changed.url && previous.uses.url) ||\n\t\t\t\t\tchanged.params.some((param) =\u003E previous.uses.params.has(param)) ||\n\t\t\t\t\t(changed.session && previous.uses.session) ||\n\t\t\t\t\tArray.from(previous.uses.dependencies).some((dep) =\u003E invalidated.some((fn) =\u003E fn(dep))) ||\n\t\t\t\t\t(stuff_changed && previous.uses.stuff);\n\n\t\t\t\tif (changed_since_last_render) {\n\t\t\t\t\t\u002F** @type {Record\u003Cstring, any\u003E} *\u002F\n\t\t\t\t\tlet props = {};\n\n\t\t\t\t\tconst is_shadow_page = has_shadow && i === a.length - 1;\n\n\t\t\t\t\tif (is_shadow_page) {\n\t\t\t\t\t\tconst res = await fetch(\n\t\t\t\t\t\t\t`${url.pathname}${url.pathname.endsWith('\u002F') ? '' : '\u002F'}__data.json${url.search}`,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\t'x-sveltekit-load': 'true'\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tif (res.ok) {\n\t\t\t\t\t\t\tconst redirect = res.headers.get('x-sveltekit-location');\n\n\t\t\t\t\t\t\tif (redirect) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tredirect,\n\t\t\t\t\t\t\t\t\tprops: {},\n\t\t\t\t\t\t\t\t\tstate: current\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tprops = res.status === 204 ? {} : await res.json();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstatus = res.status;\n\t\t\t\t\t\t\terror = new Error('Failed to load data');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!error) {\n\t\t\t\t\t\tnode = await load_node({\n\t\t\t\t\t\t\tmodule,\n\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\tparams,\n\t\t\t\t\t\t\tprops,\n\t\t\t\t\t\t\tstuff,\n\t\t\t\t\t\t\trouteId: route.id\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (node) {\n\t\t\t\t\t\tif (is_shadow_page) {\n\t\t\t\t\t\t\tnode.uses.url = true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (node.loaded) {\n\t\t\t\t\t\t\tif (node.loaded.error) {\n\t\t\t\t\t\t\t\tstatus = node.loaded.status;\n\t\t\t\t\t\t\t\terror = node.loaded.error;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (node.loaded.redirect) {\n\t\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t\tredirect: node.loaded.redirect,\n\t\t\t\t\t\t\t\t\tprops: {},\n\t\t\t\t\t\t\t\t\tstate: current\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (node.loaded.stuff) {\n\t\t\t\t\t\t\t\tstuff_changed = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tnode = previous;\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tstatus = 500;\n\t\t\t\terror = coalesce_to_error(e);\n\t\t\t}\n\n\t\t\tif (error) {\n\t\t\t\twhile (i--) {\n\t\t\t\t\tif (b[i]) {\n\t\t\t\t\t\tlet error_loaded;\n\n\t\t\t\t\t\t\u002F** @type {import('.\u002Ftypes').BranchNode | undefined} *\u002F\n\t\t\t\t\t\tlet node_loaded;\n\t\t\t\t\t\tlet j = i;\n\t\t\t\t\t\twhile (!(node_loaded = branch[j])) {\n\t\t\t\t\t\t\tj -= 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\terror_loaded = await load_node({\n\t\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\t\tmodule: await b[i](),\n\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\tparams,\n\t\t\t\t\t\t\t\tstuff: node_loaded.stuff,\n\t\t\t\t\t\t\t\trouteId: route.id\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tif (error_loaded?.loaded?.error) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (error_loaded?.loaded?.stuff) {\n\t\t\t\t\t\t\t\tstuff = {\n\t\t\t\t\t\t\t\t\t...stuff,\n\t\t\t\t\t\t\t\t\t...error_loaded.loaded.stuff\n\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbranch = branch.slice(0, j + 1).concat(error_loaded);\n\t\t\t\t\t\t\tbreak load;\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn await load_root_error_page({\n\t\t\t\t\tstatus,\n\t\t\t\t\terror,\n\t\t\t\t\turl,\n\t\t\t\t\trouteId: route.id\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif (node?.loaded?.stuff) {\n\t\t\t\t\tstuff = {\n\t\t\t\t\t\t...stuff,\n\t\t\t\t\t\t...node.loaded.stuff\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tbranch.push(node);\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\tstuff,\n\t\t\tbranch,\n\t\t\tstatus,\n\t\t\terror,\n\t\t\trouteId: route.id\n\t\t});\n\t}\n\n\t\u002F**\n\t * @param {{\n\t * status: number;\n\t * error: Error;\n\t * url: URL;\n\t * routeId: string | null\n\t * }} opts\n\t *\u002F\n\tasync function load_root_error_page({ status, error, url, routeId }) {\n\t\t\u002F** @type {Record\u003Cstring, string\u003E} *\u002F\n\t\tconst params = {}; \u002F\u002F error page does not have params\n\n\t\tconst root_layout = await load_node({\n\t\t\tmodule: await default_layout,\n\t\t\turl,\n\t\t\tparams,\n\t\t\tstuff: {},\n\t\t\trouteId\n\t\t});\n\n\t\tconst root_error = await load_node({\n\t\t\tstatus,\n\t\t\terror,\n\t\t\tmodule: await default_error,\n\t\t\turl,\n\t\t\tparams,\n\t\t\tstuff: (root_layout && root_layout.loaded && root_layout.loaded.stuff) || {},\n\t\t\trouteId\n\t\t});\n\n\t\treturn await get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tstuff: {\n\t\t\t\t...root_layout?.loaded?.stuff,\n\t\t\t\t...root_error?.loaded?.stuff\n\t\t\t},\n\t\t\tbranch: [root_layout, root_error],\n\t\t\tstatus,\n\t\t\terror,\n\t\t\trouteId\n\t\t});\n\t}\n\n\t\u002F** @param {URL} url *\u002F\n\tfunction get_navigation_intent(url) {\n\t\tif (url.origin !== location.origin || !url.pathname.startsWith(base)) return;\n\n\t\tconst path = decodeURI(url.pathname.slice(base.length) || '\u002F');\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\t\u002F** @type {import('.\u002Ftypes').NavigationIntent} *\u002F\n\t\t\t\tconst intent = {\n\t\t\t\t\tid: url.pathname + url.search,\n\t\t\t\t\troute,\n\t\t\t\t\tparams,\n\t\t\t\t\turl\n\t\t\t\t};\n\n\t\t\t\treturn intent;\n\t\t\t}\n\t\t}\n\t}\n\n\t\u002F**\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 * accepted: () =\u003E void;\n\t * blocked: () =\u003E void;\n\t * }} opts\n\t *\u002F\n\tasync function navigate({ url, scroll, keepfocus, redirect_chain, details, accepted, blocked }) {\n\t\tconst from = current.url;\n\t\tlet should_block = false;\n\n\t\tconst navigation = {\n\t\t\tfrom,\n\t\t\tto: url,\n\t\t\tcancel: () =\u003E (should_block = true)\n\t\t};\n\n\t\tcallbacks.before_navigate.forEach((fn) =\u003E fn(navigation));\n\n\t\tif (should_block) {\n\t\t\tblocked();\n\t\t\treturn;\n\t\t}\n\n\t\tconst pathname = normalize_path(url.pathname, trailing_slash);\n\t\tconst normalized = new URL(url.origin + pathname + url.search + url.hash);\n\n\t\tupdate_scroll_positions(current_history_index);\n\n\t\taccepted();\n\n\t\tif (started) {\n\t\t\tstores.navigating.set({\n\t\t\t\tfrom: current.url,\n\t\t\t\tto: normalized\n\t\t\t});\n\t\t}\n\n\t\tconst completed = await update(normalized, redirect_chain, false, {\n\t\t\tscroll,\n\t\t\tkeepfocus,\n\t\t\tdetails\n\t\t});\n\n\t\tif (completed) {\n\t\t\tconst navigation = { from, to: normalized };\n\t\t\tcallbacks.after_navigate.forEach((fn) =\u003E fn(navigation));\n\n\t\t\tstores.navigating.set(null);\n\t\t}\n\t}\n\n\t\u002F**\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 *\u002F\n\tfunction native_navigation(url) {\n\t\tlocation.href = url.href;\n\t\treturn new Promise(() =\u003E {});\n\t}\n\n\treturn {\n\t\tafter_navigate: (fn) =\u003E {\n\t\t\tonMount(() =\u003E {\n\t\t\t\tcallbacks.after_navigate.push(fn);\n\n\t\t\t\treturn () =\u003E {\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) =\u003E {\n\t\t\tonMount(() =\u003E {\n\t\t\t\tcallbacks.before_navigate.push(fn);\n\n\t\t\t\treturn () =\u003E {\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: () =\u003E {\n\t\t\tif (import.meta.env.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 = {}) =\u003E goto(href, opts, []),\n\n\t\tinvalidate: (resource) =\u003E {\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((dep) =\u003E dep === href);\n\t\t\t}\n\n\t\t\tif (!invalidating) {\n\t\t\t\tinvalidating = Promise.resolve().then(async () =\u003E {\n\t\t\t\t\tawait update(new URL(location.href), [], true);\n\n\t\t\t\t\tinvalidating = null;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\treturn invalidating;\n\t\t},\n\n\t\tprefetch: async (href) =\u003E {\n\t\t\tconst url = new URL(href, get_base_uri(document));\n\t\t\tawait prefetch(url);\n\t\t},\n\n\t\t\u002F\u002F TODO rethink this API\n\t\tprefetch_routes: async (pathnames) =\u003E {\n\t\t\tconst matching = pathnames\n\t\t\t\t? routes.filter((route) =\u003E pathnames.some((pathname) =\u003E route.exec(pathname)))\n\t\t\t\t: routes;\n\n\t\t\tconst promises = matching.map((r) =\u003E Promise.all(r.a.map((load) =\u003E load())));\n\n\t\t\tawait Promise.all(promises);\n\t\t},\n\n\t\t_start_router: () =\u003E {\n\t\t\thistory.scrollRestoration = 'manual';\n\n\t\t\t\u002F\u002F Adopted from Nuxt.js\n\t\t\t\u002F\u002F Reset scrollRestoration to auto when leaving page, allowing page reload\n\t\t\t\u002F\u002F and back-navigation from other pages to use the browser to restore the\n\t\t\t\u002F\u002F scrolling position.\n\t\t\taddEventListener('beforeunload', (e) =\u003E {\n\t\t\t\tlet should_block = false;\n\n\t\t\t\tconst navigation = {\n\t\t\t\t\tfrom: current.url,\n\t\t\t\t\tto: null,\n\t\t\t\t\tcancel: () =\u003E (should_block = true)\n\t\t\t\t};\n\n\t\t\t\tcallbacks.before_navigate.forEach((fn) =\u003E fn(navigation));\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', () =\u003E {\n\t\t\t\tif (document.visibilityState === 'hidden') {\n\t\t\t\t\tupdate_scroll_positions(current_history_index);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsessionStorage[SCROLL_KEY] = JSON.stringify(scroll_positions);\n\t\t\t\t\t} catch {\n\t\t\t\t\t\t\u002F\u002F do nothing\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t\u002F** @param {Event} event *\u002F\n\t\t\tconst trigger_prefetch = (event) =\u003E {\n\t\t\t\tconst a = find_anchor(event);\n\t\t\t\tif (a && a.href && a.hasAttribute('sveltekit:prefetch')) {\n\t\t\t\t\tprefetch(get_href(a));\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t\u002F** @type {NodeJS.Timeout} *\u002F\n\t\t\tlet mousemove_timeout;\n\n\t\t\t\u002F** @param {MouseEvent|TouchEvent} event *\u002F\n\t\t\tconst handle_mousemove = (event) =\u003E {\n\t\t\t\tclearTimeout(mousemove_timeout);\n\t\t\t\tmousemove_timeout = setTimeout(() =\u003E {\n\t\t\t\t\t\u002F\u002F event.composedPath(), which is used in find_anchor, will be empty if the event is read in a timeout\n\t\t\t\t\t\u002F\u002F add a layer of indirection to address that\n\t\t\t\t\tevent.target?.dispatchEvent(\n\t\t\t\t\t\tnew CustomEvent('sveltekit:trigger_prefetch', { bubbles: true })\n\t\t\t\t\t);\n\t\t\t\t}, 20);\n\t\t\t};\n\n\t\t\taddEventListener('touchstart', trigger_prefetch);\n\t\t\taddEventListener('mousemove', handle_mousemove);\n\t\t\taddEventListener('sveltekit:trigger_prefetch', trigger_prefetch);\n\n\t\t\t\u002F** @param {MouseEvent} event *\u002F\n\t\t\taddEventListener('click', (event) =\u003E {\n\t\t\t\tif (!router_enabled) return;\n\n\t\t\t\t\u002F\u002F Adapted from https:\u002F\u002Fgithub.com\u002Fvisionmedia\u002Fpage.js\n\t\t\t\t\u002F\u002F MIT license https:\u002F\u002Fgithub.com\u002Fvisionmedia\u002Fpage.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(event);\n\t\t\t\tif (!a) return;\n\n\t\t\t\tif (!a.href) return;\n\n\t\t\t\tconst is_svg_a_element = a instanceof SVGAElement;\n\t\t\t\tconst url = get_href(a);\n\n\t\t\t\t\u002F\u002F Ignore if url does not have origin (e.g. `mailto:`, `tel:`.)\n\t\t\t\t\u002F\u002F MEMO: Without this condition, firefox will open mailer twice.\n\t\t\t\t\u002F\u002F See: https:\u002F\u002Fgithub.com\u002Fsveltejs\u002Fkit\u002Fissues\u002F4045\n\t\t\t\tif (!is_svg_a_element && url.origin === 'null') return;\n\n\t\t\t\t\u002F\u002F Ignore if tag has\n\t\t\t\t\u002F\u002F 1. 'download' attribute\n\t\t\t\t\u002F\u002F 2. 'rel' attribute includes external\n\t\t\t\tconst rel = (a.getAttribute('rel') || '').split(\u002F\\s+\u002F);\n\n\t\t\t\tif (\n\t\t\t\t\ta.hasAttribute('download') ||\n\t\t\t\t\trel.includes('external') ||\n\t\t\t\t\ta.hasAttribute('sveltekit:reload')\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t\u002F\u002F Ignore if \u003Ca\u003E has a target\n\t\t\t\tif (is_svg_a_element ? a.target.baseVal : a.target) return;\n\n\t\t\t\t\u002F\u002F Check if new url only differs by hash and use the browser default behavior in that case\n\t\t\t\t\u002F\u002F This will ensure the `hashchange` event is fired\n\t\t\t\t\u002F\u002F Removing the hash does a full page navigation in the browser, so make sure a hash is present\n\t\t\t\tconst [base, hash] = url.href.split('#');\n\t\t\t\tif (hash !== undefined && base === location.href.split('#')[0]) {\n\t\t\t\t\t\u002F\u002F set this flag to distinguish between navigations triggered by\n\t\t\t\t\t\u002F\u002F 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\tstores.page.set({ ...page, url });\n\t\t\t\t\tstores.page.notify();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tnavigate({\n\t\t\t\t\turl,\n\t\t\t\t\tscroll: a.hasAttribute('sveltekit:noscroll') ? scroll_state() : null,\n\t\t\t\t\tkeepfocus: 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: url.href === location.href\n\t\t\t\t\t},\n\t\t\t\t\taccepted: () =\u003E event.preventDefault(),\n\t\t\t\t\tblocked: () =\u003E event.preventDefault()\n\t\t\t\t});\n\t\t\t});\n\n\t\t\taddEventListener('popstate', (event) =\u003E {\n\t\t\t\tif (event.state && router_enabled) {\n\t\t\t\t\t\u002F\u002F if a popstate-driven navigation is cancelled, we need to counteract it\n\t\t\t\t\t\u002F\u002F 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\tnavigate({\n\t\t\t\t\t\turl: new URL(location.href),\n\t\t\t\t\t\tscroll: scroll_positions[event.state[INDEX_KEY]],\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: () =\u003E {\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: () =\u003E {\n\t\t\t\t\t\t\tconst delta = current_history_index - event.state[INDEX_KEY];\n\t\t\t\t\t\t\thistory.go(delta);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taddEventListener('hashchange', () =\u003E {\n\t\t\t\t\u002F\u002F if the hashchange happened as a result of clicking on a link,\n\t\t\t\t\u002F\u002F 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\t\t},\n\n\t\t_hydrate: async ({ status, error, nodes, params, routeId }) =\u003E {\n\t\t\tconst url = new URL(location.href);\n\n\t\t\t\u002F** @type {Array\u003Cimport('.\u002Ftypes').BranchNode | undefined\u003E} *\u002F\n\t\t\tconst branch = [];\n\n\t\t\t\u002F** @type {Record\u003Cstring, any\u003E} *\u002F\n\t\t\tlet stuff = {};\n\n\t\t\t\u002F** @type {import('.\u002Ftypes').NavigationResult | undefined} *\u002F\n\t\t\tlet result;\n\n\t\t\tlet error_args;\n\n\t\t\ttry {\n\t\t\t\tfor (let i = 0; i \u003C nodes.length; i += 1) {\n\t\t\t\t\tconst is_leaf = i === nodes.length - 1;\n\n\t\t\t\t\tlet props;\n\n\t\t\t\t\tif (is_leaf) {\n\t\t\t\t\t\tconst serialized = document.querySelector('script[sveltekit\\\\:data-type=\"props\"]');\n\t\t\t\t\t\tif (serialized) {\n\t\t\t\t\t\t\tprops = JSON.parse(\u002F** @type {string} *\u002F (serialized.textContent));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tconst node = await load_node({\n\t\t\t\t\t\tmodule: await nodes[i],\n\t\t\t\t\t\turl,\n\t\t\t\t\t\tparams,\n\t\t\t\t\t\tstuff,\n\t\t\t\t\t\tstatus: is_leaf ? status : undefined,\n\t\t\t\t\t\terror: is_leaf ? error : undefined,\n\t\t\t\t\t\tprops,\n\t\t\t\t\t\trouteId\n\t\t\t\t\t});\n\n\t\t\t\t\tif (props) {\n\t\t\t\t\t\tnode.uses.dependencies.add(url.href);\n\t\t\t\t\t\tnode.uses.url = true;\n\t\t\t\t\t}\n\n\t\t\t\t\tbranch.push(node);\n\n\t\t\t\t\tif (node && node.loaded) {\n\t\t\t\t\t\tif (node.loaded.error) {\n\t\t\t\t\t\t\tif (error) throw node.loaded.error;\n\t\t\t\t\t\t\terror_args = {\n\t\t\t\t\t\t\t\tstatus: node.loaded.status,\n\t\t\t\t\t\t\t\terror: node.loaded.error,\n\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t\trouteId\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else if (node.loaded.stuff) {\n\t\t\t\t\t\t\tstuff = {\n\t\t\t\t\t\t\t\t...stuff,\n\t\t\t\t\t\t\t\t...node.loaded.stuff\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tresult = error_args\n\t\t\t\t\t? await load_root_error_page(error_args)\n\t\t\t\t\t: 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\tstuff,\n\t\t\t\t\t\t\tbranch,\n\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\trouteId\n\t\t\t\t\t });\n\t\t\t} catch (e) {\n\t\t\t\tif (error) throw e;\n\n\t\t\t\tresult = await load_root_error_page({\n\t\t\t\t\tstatus: 500,\n\t\t\t\t\terror: coalesce_to_error(e),\n\t\t\t\t\turl,\n\t\t\t\t\trouteId\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (result.redirect) {\n\t\t\t\t\u002F\u002F this is a real edge case — `load` would need to return\n\t\t\t\t\u002F\u002F a redirect but only in the browser\n\t\t\t\tawait native_navigation(new URL(result.redirect, location.href));\n\t\t\t}\n\n\t\t\tinitialize(result);\n\t\t}\n\t};\n}\n\n\u002F**\n * @param {{\n * paths: {\n * assets: string;\n * base: string;\n * },\n * target: Element;\n * session: any;\n * route: boolean;\n * spa: boolean;\n * trailing_slash: import('types').TrailingSlash;\n * hydrate: {\n * status: number;\n * error: Error;\n * nodes: Array\u003CPromise\u003Cimport('types').CSRComponent\u003E\u003E;\n * params: Record\u003Cstring, string\u003E;\n * routeId: string | null;\n * };\n * }} opts\n *\u002F\nasync function start({ paths, target, session, route, spa, trailing_slash, hydrate }) {\n\tconst client = create_client({\n\t\ttarget,\n\t\tsession,\n\t\tbase: paths.base,\n\t\ttrailing_slash\n\t});\n\n\tinit({ client });\n\tset_paths(paths);\n\n\tif (hydrate) {\n\t\tawait client._hydrate(hydrate);\n\t}\n\n\tif (route) {\n\t\tif (spa) client.goto(location.href, { replaceState: true });\n\t\tclient._start_router();\n\t}\n\n\tdispatchEvent(new CustomEvent('sveltekit:start'));\n}\n\nexport { start };\n","directory_shortid":"NW5M6","id":"e7ab779e-db3b-4818-a185-2ae28c8abca1","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"0Mq7V","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"start.js","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"export { prerendering } from '..\u002Fenv.js';\n\n\u002F**\n * @type {import('$app\u002Fenv').browser}\n *\u002F\nconst browser = !import.meta.env.SSR;\n\u002F**\n * @type {import('$app\u002Fenv').dev}\n *\u002F\nconst dev = !!import.meta.env.DEV;\n\u002F**\n * @type {import('$app\u002Fenv').mode}\n *\u002F\nconst mode = import.meta.env.MODE;\n\u002F**\n * @type {import('$app\u002Fenv').amp}\n *\u002F\nconst amp = !!import.meta.env.VITE_SVELTEKIT_AMP;\n\nexport { amp, browser, dev, mode };\n","directory_shortid":"xynzJ","id":"b9a535ed-6976-4f7e-8c09-a4a45b6cafff","inserted_at":"2022-01-30T16:18:03","is_binary":null,"sha":null,"shortid":"1NOwZ","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"env.js","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"\u002F** @param {HTMLDocument} doc *\u002F\nfunction get_base_uri(doc) {\n\tlet baseURI = doc.baseURI;\n\n\tif (!baseURI) {\n\t\tconst baseTags = doc.getElementsByTagName('base');\n\t\tbaseURI = baseTags.length ? baseTags[0].href : doc.URL;\n\t}\n\n\treturn baseURI;\n}\n\nexport { get_base_uri as g };\n","directory_shortid":"gPDoj","id":"14bc40af-e9e1-47ec-8787-9d9e24b3e206","inserted_at":"2022-01-30T16:18:03","is_binary":null,"sha":null,"shortid":"OP9wG","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"utils.js","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"\u002F** @type {string} *\u002F\nlet base = '';\n\n\u002F** @type {string} *\u002F\nlet assets = '';\n\n\u002F** @param {{ base: string, assets: string }} paths *\u002F\nfunction set_paths(paths) {\n\tbase = paths.base;\n\tassets = paths.assets || base;\n}\n\nexport { assets, base, set_paths };\n","directory_shortid":"yrBVw","id":"4ef4dd0d-38f4-4796-abf7-5dfb854c086f","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"EmrGY","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"paths.js","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"export { assets, base } from '..\u002Fpaths.js';\n","directory_shortid":"xynzJ","id":"6a162597-68d0-45cb-855b-7d58bf63ada5","inserted_at":"2022-01-30T16:18:03","is_binary":null,"sha":null,"shortid":"Z07LR","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"paths.js","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"const c = [\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002F__layout.svelte\"),\n\t() =\u003E import(\"..\u002Fruntime\u002Fcomponents\u002Ferror.svelte\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Findex.svelte\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Findex.svelte\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Fpost\u002Fmy-first-post.svx\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Fpost\u002Fsecond-post.svx\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Fpost\u002Fthird-post.svx\")\n];\n\nconst d = decodeURIComponent;\n\nexport const routes = [\n\t\u002F\u002F src\u002Froutes\u002Findex.svelte\n\t[\u002F^\\\u002F$\u002F, [c[0], c[2]], [c[1]]],\n\n\t\u002F\u002F src\u002Froutes\u002Fblog\u002Findex.svelte\n\t[\u002F^\\\u002Fblog\\\u002F?$\u002F, [c[0], c[3]], [c[1]]],\n\n\t\u002F\u002F src\u002Froutes\u002Fblog\u002Fpost\u002Fmy-first-post.svx\n\t[\u002F^\\\u002Fblog\\\u002Fpost\\\u002Fmy-first-post\\\u002F?$\u002F, [c[0], c[4]], [c[1]]],\n\n\t\u002F\u002F src\u002Froutes\u002Fblog\u002Fpost\u002Fsecond-post.svx\n\t[\u002F^\\\u002Fblog\\\u002Fpost\\\u002Fsecond-post\\\u002F?$\u002F, [c[0], c[5]], [c[1]]],\n\n\t\u002F\u002F src\u002Froutes\u002Fblog\u002Fpost\u002Fthird-post.svx\n\t[\u002F^\\\u002Fblog\\\u002Fpost\\\u002Fthird-post\\\u002F?$\u002F, [c[0], c[6]], [c[1]]]\n];\n\n\u002F\u002F we import the root layout\u002Ferror components eagerly, so that\n\u002F\u002F connectivity errors after initialisation don't nuke the app\nexport const fallback = [c[0](), c[1]()];","directory_shortid":"Zp35E","id":"0e3201a3-e2ce-47be-a273-e5c9aa9df750","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"4w4z0","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"manifest.js","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"let prerendering = false;\n\n\u002F** @param {boolean} value *\u002F\nfunction set_prerendering(value) {\n\tprerendering = value;\n}\n\nexport { prerendering, set_prerendering };\n","directory_shortid":"yrBVw","id":"a42a229c-bc3e-469f-8145-5e8c763d3897","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"43Q5x","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"env.js","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"\u003Cslot\u003E\u003C\u002Fslot\u003E","directory_shortid":"WKv5X","id":"465384af-2f2c-49ae-bb3f-1d89cd43daf6","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"kgzJY","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"layout.svelte","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"\u003C!-- This file is generated by @sveltejs\u002Fkit — do not edit it! --\u003E\n\u003Cscript\u003E\n\timport { setContext, afterUpdate, onMount } from 'svelte';\n\n\t\u002F\u002F stores\n\texport let stores;\n\texport let page;\n\n\texport let components;\n\texport let props_0 = null;\n\texport let props_1 = null;\n\texport let props_2 = null;\n\n\tsetContext('__svelte__', stores);\n\n\t$: stores.page.set(page);\n\tafterUpdate(stores.page.notify);\n\n\tlet mounted = false;\n\tlet navigated = false;\n\tlet title = null;\n\n\tonMount(() =\u003E {\n\t\tconst unsubscribe = stores.page.subscribe(() =\u003E {\n\t\t\tif (mounted) {\n\t\t\t\tnavigated = true;\n\t\t\t\ttitle = document.title || 'untitled page';\n\t\t\t}\n\t\t});\n\n\t\tmounted = true;\n\t\treturn unsubscribe;\n\t});\n\u003C\u002Fscript\u003E\n\n{#if components[1]}\n\t\u003Csvelte:component this={components[0]} {...(props_0 || {})}\u003E\n\t\t{#if components[2]}\n\t\t\t\u003Csvelte:component this={components[1]} {...(props_1 || {})}\u003E\n\t\t\t\t\u003Csvelte:component this={components[2]} {...(props_2 || {})}\u002F\u003E\n\t\t\t\u003C\u002Fsvelte:component\u003E\n\t\t{:else}\n\t\t\t\u003Csvelte:component this={components[1]} {...(props_1 || {})} \u002F\u003E\n\t\t{\u002Fif}\n\t\u003C\u002Fsvelte:component\u003E\n{:else}\n\t\u003Csvelte:component this={components[0]} {...(props_0 || {})} \u002F\u003E\n{\u002Fif}\n\n{#if mounted}\n\t\u003Cdiv id=\"svelte-announcer\" aria-live=\"assertive\" aria-atomic=\"true\" style=\"position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px\"\u003E\n\t\t{#if navigated}\n\t\t\t{title}\n\t\t{\u002Fif}\n\t\u003C\u002Fdiv\u003E\n{\u002Fif}","directory_shortid":"Zp35E","id":"319ead43-9636-4692-af93-34b6426a1c13","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"BPV5k","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"root.svelte","updated_at":"2022-02-01T06:07:20","upload_id":null},{"code":"import { mdsvex } from 'mdsvex';\nimport mdsvexConfig from '.\u002Fmdsvex.config.js';\nimport preprocess from 'svelte-preprocess';\nimport vercel from '@sveltejs\u002Fadapter-vercel';\n\n\u002F** @type {import('@sveltejs\u002Fkit').Config} *\u002F\nconst config = {\n\textensions: ['.svelte', ...mdsvexConfig.extensions],\n\n\t\u002F\u002F Consult https:\u002F\u002Fgithub.com\u002Fsveltejs\u002Fsvelte-preprocess\n\t\u002F\u002F for more information about preprocessors\n\tpreprocess: [\n\t\tpreprocess({\n\t\t\tdefaults: {\n\t\t\t\tstyle: 'postcss'\n\t\t\t},\n\t\t\tpostcss: true\n\t\t}),\n\t\tmdsvex(mdsvexConfig)\n\t],\n\n\tkit: {\n\t\tadapter: vercel()\n\t}\n};\n\nexport default config;\n","directory_shortid":null,"id":"68c4512a-1bfb-4457-b34a-3ca9f7059998","inserted_at":"2021-08-30T18:46:43","is_binary":false,"sha":null,"shortid":"j8YPv","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"svelte.config.js","updated_at":"2022-05-24T14:33:44","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { RequestHandler as GenericRequestHandler, ResponseBody } from '@sveltejs\u002Fkit';\n\nexport type RequestHandler\u003COutput = ResponseBody\u003E = GenericRequestHandler\u003C{}, Output\u003E;","directory_shortid":"Zro1g","id":"ee80fcb3-46fd-4bb7-9d64-91d39ce61562","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"l86or","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"index.json.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { Load as GenericLoad } from '@sveltejs\u002Fkit';\n\nexport type Load\u003C\n\tInputProps extends Record\u003Cstring, any\u003E = Record\u003Cstring, any\u003E,\n\tOutputProps extends Record\u003Cstring, any\u003E = InputProps\n\u003E = GenericLoad\u003C{}, InputProps, OutputProps\u003E;","directory_shortid":"jNNOP","id":"806bb8ab-d7f1-4801-a28b-af30094e6f59","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"olZrj","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"index.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F** @type {import('.\u002Ftypes').Client} *\u002F\nlet client;\n\n\u002F**\n * @param {{\n * client: import('.\u002Ftypes').Client;\n * }} opts\n *\u002F\nfunction init(opts) {\n\tclient = opts.client;\n}\n\nexport { client, init };\n","directory_shortid":"NW5M6","id":"a7af947c-3419-42fa-8911-6591fe7ba212","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"YWGRA","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"singletons.js","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"export const matchers = {};","directory_shortid":"Zp35E","id":"572af577-5c13-4c58-ab28-729eed7f7544","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"Y6QmA","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"client-matchers.js","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { Load as GenericLoad } from '@sveltejs\u002Fkit';\n\nexport type Load\u003C\n\tInputProps extends Record\u003Cstring, any\u003E = Record\u003Cstring, any\u003E,\n\tOutputProps extends Record\u003Cstring, any\u003E = InputProps\n\u003E = GenericLoad\u003C{}, InputProps, OutputProps\u003E;","directory_shortid":"jNNOP","id":"d0445395-2935-42e7-a209-632471b35061","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"RjwRO","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"__layout.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"import { client } from '..\u002Fclient\u002Fsingletons.js';\n\n\u002F**\n * @param {string} name\n *\u002F\nfunction guard(name) {\n\treturn () =\u003E {\n\t\tthrow new Error(`Cannot call ${name}(...) on the server`);\n\t};\n}\n\nconst ssr = import.meta.env.SSR;\n\nconst disableScrollHandling = ssr\n\t? guard('disableScrollHandling')\n\t: client.disable_scroll_handling;\nconst goto = ssr ? guard('goto') : client.goto;\nconst invalidate = ssr ? guard('invalidate') : client.invalidate;\nconst prefetch = ssr ? guard('prefetch') : client.prefetch;\nconst prefetchRoutes = ssr ? guard('prefetchRoutes') : client.prefetch_routes;\nconst beforeNavigate = ssr ? () =\u003E {} : client.before_navigate;\nconst afterNavigate = ssr ? () =\u003E {} : client.after_navigate;\n\nexport { afterNavigate, beforeNavigate, disableScrollHandling, goto, invalidate, prefetch, prefetchRoutes };\n","directory_shortid":"xynzJ","id":"636050df-d2c8-4a26-9fe7-1596169d9f07","inserted_at":"2022-01-30T16:18:03","is_binary":null,"sha":null,"shortid":"o7Jy3","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"navigation.js","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F** @param {Partial\u003Cimport('types').ResponseHeaders\u003E | undefined} object *\u002F\nfunction to_headers(object) {\n\tconst headers = new Headers();\n\n\tif (object) {\n\t\tfor (const key in object) {\n\t\t\tconst value = object[key];\n\t\t\tif (!value) continue;\n\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tvalue.forEach((value) =\u003E {\n\t\t\t\t\theaders.append(key, \u002F** @type {string} *\u002F (value));\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\theaders.set(key, \u002F** @type {string} *\u002F (value));\n\t\t\t}\n\t\t}\n\t}\n\n\treturn headers;\n}\n\n\u002F**\n * Hash using djb2\n * @param {import('types').StrictBody} value\n *\u002F\nfunction hash(value) {\n\tlet hash = 5381;\n\tlet i = value.length;\n\n\tif (typeof value === 'string') {\n\t\twhile (i) hash = (hash * 33) ^ value.charCodeAt(--i);\n\t} else {\n\t\twhile (i) hash = (hash * 33) ^ value[--i];\n\t}\n\n\treturn (hash \u003E\u003E\u003E 0).toString(36);\n}\n\n\u002F** @param {Record\u003Cstring, any\u003E} obj *\u002F\nfunction lowercase_keys(obj) {\n\t\u002F** @type {Record\u003Cstring, any\u003E} *\u002F\n\tconst clone = {};\n\n\tfor (const key in obj) {\n\t\tclone[key.toLowerCase()] = obj[key];\n\t}\n\n\treturn clone;\n}\n\n\u002F** @param {Record\u003Cstring, string\u003E} params *\u002F\nfunction decode_params(params) {\n\tfor (const key in params) {\n\t\t\u002F\u002F input has already been decoded by decodeURI\n\t\t\u002F\u002F now handle the rest that decodeURIComponent would do\n\t\tparams[key] = params[key]\n\t\t\t.replace(\u002F%23\u002Fg, '#')\n\t\t\t.replace(\u002F%3[Bb]\u002Fg, ';')\n\t\t\t.replace(\u002F%2[Cc]\u002Fg, ',')\n\t\t\t.replace(\u002F%2[Ff]\u002Fg, '\u002F')\n\t\t\t.replace(\u002F%3[Ff]\u002Fg, '?')\n\t\t\t.replace(\u002F%3[Aa]\u002Fg, ':')\n\t\t\t.replace(\u002F%40\u002Fg, '@')\n\t\t\t.replace(\u002F%26\u002Fg, '&')\n\t\t\t.replace(\u002F%3[Dd]\u002Fg, '=')\n\t\t\t.replace(\u002F%2[Bb]\u002Fg, '+')\n\t\t\t.replace(\u002F%24\u002Fg, '
);\n\t}\n\n\treturn params;\n}\n\n\u002F** @param {any} body *\u002F\nfunction is_pojo(body) {\n\tif (typeof body !== 'object') return false;\n\n\tif (body) {\n\t\tif (body instanceof Uint8Array) return false;\n\n\t\t\u002F\u002F body could be a node Readable, but we don't want to import\n\t\t\u002F\u002F node built-ins, so we use duck typing\n\t\tif (body._readableState && typeof body.pipe === 'function') return false;\n\n\t\t\u002F\u002F similarly, it could be a web ReadableStream\n\t\tif (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return false;\n\t}\n\n\treturn true;\n}\n\n\u002F** @param {import('types').RequestEvent} event *\u002F\nfunction normalize_request_method(event) {\n\tconst method = event.request.method.toLowerCase();\n\treturn method === 'delete' ? 'del' : method; \u002F\u002F 'delete' is a reserved word\n}\n\n\u002F** @param {string} body *\u002F\nfunction error(body) {\n\treturn new Response(body, {\n\t\tstatus: 500\n\t});\n}\n\n\u002F** @param {unknown} s *\u002F\nfunction is_string(s) {\n\treturn typeof s === 'string' || s instanceof String;\n}\n\nconst text_types = new Set([\n\t'application\u002Fxml',\n\t'application\u002Fjson',\n\t'application\u002Fx-www-form-urlencoded',\n\t'multipart\u002Fform-data'\n]);\n\n\u002F**\n * Decides how the body should be parsed based on its mime type. Should match what's in parse_body\n *\n * @param {string | undefined | null} content_type The `content-type` header of a request\u002Fresponse.\n * @returns {boolean}\n *\u002F\nfunction is_text(content_type) {\n\tif (!content_type) return true; \u002F\u002F defaults to json\n\tconst type = content_type.split(';')[0].toLowerCase(); \u002F\u002F get the mime type\n\n\treturn type.startsWith('text\u002F') || type.endsWith('+xml') || text_types.has(type);\n}\n\n\u002F**\n * @param {import('types').RequestEvent} event\n * @param {{ [method: string]: import('types').RequestHandler }} mod\n * @returns {Promise\u003CResponse\u003E}\n *\u002F\nasync function render_endpoint(event, mod) {\n\tconst method = normalize_request_method(event);\n\n\t\u002F** @type {import('types').RequestHandler} *\u002F\n\tlet handler = mod[method];\n\n\tif (!handler && method === 'head') {\n\t\thandler = mod.get;\n\t}\n\n\tif (!handler) {\n\t\tconst allowed = [];\n\n\t\tfor (const method in ['get', 'post', 'put', 'patch']) {\n\t\t\tif (mod[method]) allowed.push(method.toUpperCase());\n\t\t}\n\n\t\tif (mod.del) allowed.push('DELETE');\n\t\tif (mod.get || mod.head) allowed.push('HEAD');\n\n\t\treturn event.request.headers.get('x-sveltekit-load')\n\t\t\t? \u002F\u002F TODO would be nice to avoid these requests altogether,\n\t\t\t \u002F\u002F by noting whether or not page endpoints export `get`\n\t\t\t new Response(undefined, {\n\t\t\t\t\tstatus: 204\n\t\t\t })\n\t\t\t: new Response(`${event.request.method} method not allowed`, {\n\t\t\t\t\tstatus: 405,\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\u002F\u002F https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FHTTP\u002FStatus\u002F405\n\t\t\t\t\t\t\u002F\u002F \"The server must generate an Allow header field in a 405 status code response\"\n\t\t\t\t\t\tallow: allowed.join(', ')\n\t\t\t\t\t}\n\t\t\t });\n\t}\n\n\tconst response = await handler(event);\n\tconst preface = `Invalid response from route ${event.url.pathname}`;\n\n\tif (typeof response !== 'object') {\n\t\treturn error(`${preface}: expected an object, got ${typeof response}`);\n\t}\n\n\t\u002F\u002F TODO remove for 1.0\n\t\u002F\u002F @ts-expect-error\n\tif (response.fallthrough) {\n\t\tthrow new Error(\n\t\t\t'fallthrough is no longer supported. Use matchers instead: https:\u002F\u002Fkit.svelte.dev\u002Fdocs\u002Frouting#advanced-routing-matching'\n\t\t);\n\t}\n\n\tconst { status = 200, body = {} } = response;\n\tconst headers =\n\t\tresponse.headers instanceof Headers\n\t\t\t? new Headers(response.headers)\n\t\t\t: to_headers(response.headers);\n\n\tconst type = headers.get('content-type');\n\n\tif (!is_text(type) && !(body instanceof Uint8Array || is_string(body))) {\n\t\treturn error(\n\t\t\t`${preface}: body must be an instance of string or Uint8Array if content-type is not a supported textual content-type`\n\t\t);\n\t}\n\n\t\u002F** @type {import('types').StrictBody} *\u002F\n\tlet normalized_body;\n\n\tif (is_pojo(body) && (!type || type.startsWith('application\u002Fjson'))) {\n\t\theaders.set('content-type', 'application\u002Fjson; charset=utf-8');\n\t\tnormalized_body = JSON.stringify(body);\n\t} else {\n\t\tnormalized_body = \u002F** @type {import('types').StrictBody} *\u002F (body);\n\t}\n\n\tif (\n\t\t(typeof normalized_body === 'string' || normalized_body instanceof Uint8Array) &&\n\t\t!headers.has('etag')\n\t) {\n\t\tconst cache_control = headers.get('cache-control');\n\t\tif (!cache_control || !\u002F(no-store|immutable)\u002F.test(cache_control)) {\n\t\t\theaders.set('etag', `\"${hash(normalized_body)}\"`);\n\t\t}\n\t}\n\n\treturn new Response(method !== 'head' ? normalized_body : undefined, {\n\t\tstatus,\n\t\theaders\n\t});\n}\n\nvar chars$1 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
;\nvar unsafeChars = \u002F[\u003C\u003E\\b\\f\\n\\r\\t\\0\\u2028\\u2029]\u002Fg;\nvar reserved = \u002F^(?:do|if|in|for|int|let|new|try|var|byte|case|char|else|enum|goto|long|this|void|with|await|break|catch|class|const|final|float|short|super|throw|while|yield|delete|double|export|import|native|return|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$\u002F;\nvar escaped = {\n '\u003C': '\\\\u003C',\n '\u003E': '\\\\u003E',\n '\u002F': '\\\\u002F',\n '\\\\': '\\\\\\\\',\n '\\b': '\\\\b',\n '\\f': '\\\\f',\n '\\n': '\\\\n',\n '\\r': '\\\\r',\n '\\t': '\\\\t',\n '\\0': '\\\\0',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029'\n};\nvar objectProtoOwnPropertyNames = Object.getOwnPropertyNames(Object.prototype).sort().join('\\0');\nfunction devalue(value) {\n var counts = new Map();\n function walk(thing) {\n if (typeof thing === 'function') {\n throw new Error(\"Cannot stringify a function\");\n }\n if (counts.has(thing)) {\n counts.set(thing, counts.get(thing) + 1);\n return;\n }\n counts.set(thing, 1);\n if (!isPrimitive(thing)) {\n var type = getType(thing);\n switch (type) {\n case 'Number':\n case 'String':\n case 'Boolean':\n case 'Date':\n case 'RegExp':\n return;\n case 'Array':\n thing.forEach(walk);\n break;\n case 'Set':\n case 'Map':\n Array.from(thing).forEach(walk);\n break;\n default:\n var proto = Object.getPrototypeOf(thing);\n if (proto !== Object.prototype &&\n proto !== null &&\n Object.getOwnPropertyNames(proto).sort().join('\\0') !== objectProtoOwnPropertyNames) {\n throw new Error(\"Cannot stringify arbitrary non-POJOs\");\n }\n if (Object.getOwnPropertySymbols(thing).length \u003E 0) {\n throw new Error(\"Cannot stringify POJOs with symbolic keys\");\n }\n Object.keys(thing).forEach(function (key) { return walk(thing[key]); });\n }\n }\n }\n walk(value);\n var names = new Map();\n Array.from(counts)\n .filter(function (entry) { return entry[1] \u003E 1; })\n .sort(function (a, b) { return b[1] - a[1]; })\n .forEach(function (entry, i) {\n names.set(entry[0], getName(i));\n });\n function stringify(thing) {\n if (names.has(thing)) {\n return names.get(thing);\n }\n if (isPrimitive(thing)) {\n return stringifyPrimitive(thing);\n }\n var type = getType(thing);\n switch (type) {\n case 'Number':\n case 'String':\n case 'Boolean':\n return \"Object(\" + stringify(thing.valueOf()) + \")\";\n case 'RegExp':\n return \"new RegExp(\" + stringifyString(thing.source) + \", \\\"\" + thing.flags + \"\\\")\";\n case 'Date':\n return \"new Date(\" + thing.getTime() + \")\";\n case 'Array':\n var members = thing.map(function (v, i) { return i in thing ? stringify(v) : ''; });\n var tail = thing.length === 0 || (thing.length - 1 in thing) ? '' : ',';\n return \"[\" + members.join(',') + tail + \"]\";\n case 'Set':\n case 'Map':\n return \"new \" + type + \"([\" + Array.from(thing).map(stringify).join(',') + \"])\";\n default:\n var obj = \"{\" + Object.keys(thing).map(function (key) { return safeKey(key) + \":\" + stringify(thing[key]); }).join(',') + \"}\";\n var proto = Object.getPrototypeOf(thing);\n if (proto === null) {\n return Object.keys(thing).length \u003E 0\n ? \"Object.assign(Object.create(null),\" + obj + \")\"\n : \"Object.create(null)\";\n }\n return obj;\n }\n }\n var str = stringify(value);\n if (names.size) {\n var params_1 = [];\n var statements_1 = [];\n var values_1 = [];\n names.forEach(function (name, thing) {\n params_1.push(name);\n if (isPrimitive(thing)) {\n values_1.push(stringifyPrimitive(thing));\n return;\n }\n var type = getType(thing);\n switch (type) {\n case 'Number':\n case 'String':\n case 'Boolean':\n values_1.push(\"Object(\" + stringify(thing.valueOf()) + \")\");\n break;\n case 'RegExp':\n values_1.push(thing.toString());\n break;\n case 'Date':\n values_1.push(\"new Date(\" + thing.getTime() + \")\");\n break;\n case 'Array':\n values_1.push(\"Array(\" + thing.length + \")\");\n thing.forEach(function (v, i) {\n statements_1.push(name + \"[\" + i + \"]=\" + stringify(v));\n });\n break;\n case 'Set':\n values_1.push(\"new Set\");\n statements_1.push(name + \".\" + Array.from(thing).map(function (v) { return \"add(\" + stringify(v) + \")\"; }).join('.'));\n break;\n case 'Map':\n values_1.push(\"new Map\");\n statements_1.push(name + \".\" + Array.from(thing).map(function (_a) {\n var k = _a[0], v = _a[1];\n return \"set(\" + stringify(k) + \", \" + stringify(v) + \")\";\n }).join('.'));\n break;\n default:\n values_1.push(Object.getPrototypeOf(thing) === null ? 'Object.create(null)' : '{}');\n Object.keys(thing).forEach(function (key) {\n statements_1.push(\"\" + name + safeProp(key) + \"=\" + stringify(thing[key]));\n });\n }\n });\n statements_1.push(\"return \" + str);\n return \"(function(\" + params_1.join(',') + \"){\" + statements_1.join(';') + \"}(\" + values_1.join(',') + \"))\";\n }\n else {\n return str;\n }\n}\nfunction getName(num) {\n var name = '';\n do {\n name = chars$1[num % chars$1.length] + name;\n num = ~~(num \u002F chars$1.length) - 1;\n } while (num \u003E= 0);\n return reserved.test(name) ? name + \"_\" : name;\n}\nfunction isPrimitive(thing) {\n return Object(thing) !== thing;\n}\nfunction stringifyPrimitive(thing) {\n if (typeof thing === 'string')\n return stringifyString(thing);\n if (thing === void 0)\n return 'void 0';\n if (thing === 0 && 1 \u002F thing \u003C 0)\n return '-0';\n var str = String(thing);\n if (typeof thing === 'number')\n return str.replace(\u002F^(-)?0\\.\u002F, '$1.');\n return str;\n}\nfunction getType(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction escapeUnsafeChar(c) {\n return escaped[c] || c;\n}\nfunction escapeUnsafeChars(str) {\n return str.replace(unsafeChars, escapeUnsafeChar);\n}\nfunction safeKey(key) {\n return \u002F^[_$a-zA-Z][_$a-zA-Z0-9]*$\u002F.test(key) ? key : escapeUnsafeChars(JSON.stringify(key));\n}\nfunction safeProp(key) {\n return \u002F^[_$a-zA-Z][_$a-zA-Z0-9]*$\u002F.test(key) ? \".\" + key : \"[\" + escapeUnsafeChars(JSON.stringify(key)) + \"]\";\n}\nfunction stringifyString(str) {\n var result = '\"';\n for (var i = 0; i \u003C str.length; i += 1) {\n var char = str.charAt(i);\n var code = char.charCodeAt(0);\n if (char === '\"') {\n result += '\\\\\"';\n }\n else if (char in escaped) {\n result += escaped[char];\n }\n else if (code \u003E= 0xd800 && code \u003C= 0xdfff) {\n var next = str.charCodeAt(i + 1);\n \u002F\u002F If this is the beginning of a [high, low] surrogate pair,\n \u002F\u002F add the next two characters, otherwise escape\n if (code \u003C= 0xdbff && (next \u003E= 0xdc00 && next \u003C= 0xdfff)) {\n result += char + str[++i];\n }\n else {\n result += \"\\\\u\" + code.toString(16).toUpperCase();\n }\n }\n else {\n result += char;\n }\n }\n result += '\"';\n return result;\n}\n\nfunction noop() { }\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nPromise.resolve();\n\nconst subscriber_queue = [];\n\u002F**\n * Creates a `Readable` store that allows reading by subscription.\n * @param value initial value\n * @param {StartStopNotifier}start start and stop notifications for subscriptions\n *\u002F\nfunction readable(value, start) {\n return {\n subscribe: writable(value, start).subscribe\n };\n}\n\u002F**\n * Create a `Writable` store that allows both updating and reading by subscription.\n * @param {*=}value initial value\n * @param {StartStopNotifier=}start start and stop notifications for subscriptions\n *\u002F\nfunction writable(value, start = noop) {\n let stop;\n const subscribers = new Set();\n function set(new_value) {\n if (safe_not_equal(value, new_value)) {\n value = new_value;\n if (stop) { \u002F\u002F store is ready\n const run_queue = !subscriber_queue.length;\n for (const subscriber of subscribers) {\n subscriber[1]();\n subscriber_queue.push(subscriber, value);\n }\n if (run_queue) {\n for (let i = 0; i \u003C subscriber_queue.length; i += 2) {\n subscriber_queue[i][0](subscriber_queue[i + 1]);\n }\n subscriber_queue.length = 0;\n }\n }\n }\n }\n function update(fn) {\n set(fn(value));\n }\n function subscribe(run, invalidate = noop) {\n const subscriber = [run, invalidate];\n subscribers.add(subscriber);\n if (subscribers.size === 1) {\n stop = start(set) || noop;\n }\n run(value);\n return () =\u003E {\n subscribers.delete(subscriber);\n if (subscribers.size === 0) {\n stop();\n stop = null;\n }\n };\n }\n return { set, update, subscribe };\n}\n\n\u002F**\n * @param {unknown} err\n * @return {Error}\n *\u002F\nfunction coalesce_to_error(err) {\n\treturn err instanceof Error ||\n\t\t(err && \u002F** @type {any} *\u002F (err).name && \u002F** @type {any} *\u002F (err).message)\n\t\t? \u002F** @type {Error} *\u002F (err)\n\t\t: new Error(JSON.stringify(err));\n}\n\n\u002F**\n * Inside a script element, only `\u003C\u002Fscript` and `\u003C!--` hold special meaning to the HTML parser.\n *\n * The first closes the script element, so everything after is treated as raw HTML.\n * The second disables further parsing until `--\u003E`, so the script element might be unexpectedly\n * kept open until until an unrelated HTML comment in the page.\n *\n * U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are escaped for the sake of pre-2018\n * browsers.\n *\n * @see tests for unsafe parsing examples.\n * @see https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fscripting.html#restrictions-for-contents-of-script-elements\n * @see https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fsyntax.html#cdata-rcdata-restrictions\n * @see https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fparsing.html#script-data-state\n * @see https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fparsing.html#script-data-double-escaped-state\n * @see https:\u002F\u002Fgithub.com\u002Ftc39\u002Fproposal-json-superset\n * @type {Record\u003Cstring, string\u003E}\n *\u002F\nconst render_json_payload_script_dict = {\n\t'\u003C': '\\\\u003C',\n\t'\\u2028': '\\\\u2028',\n\t'\\u2029': '\\\\u2029'\n};\n\nconst render_json_payload_script_regex = new RegExp(\n\t`[${Object.keys(render_json_payload_script_dict).join('')}]`,\n\t'g'\n);\n\n\u002F**\n * Generates a raw HTML string containing a safe script element carrying JSON data and associated attributes.\n *\n * It escapes all the special characters needed to guarantee the element is unbroken, but care must\n * be taken to ensure it is inserted in the document at an acceptable position for a script element,\n * and that the resulting string isn't further modified.\n *\n * Attribute names must be type-checked so we don't need to escape them.\n *\n * @param {import('types').PayloadScriptAttributes} attrs A list of attributes to be added to the element.\n * @param {import('types').JSONValue} payload The data to be carried by the element. Must be serializable to JSON.\n * @returns {string} The raw HTML of a script element carrying the JSON payload.\n * @example const html = render_json_payload_script({ type: 'data', url: '\u002Fdata.json' }, { foo: 'bar' });\n *\u002F\nfunction render_json_payload_script(attrs, payload) {\n\tconst safe_payload = JSON.stringify(payload).replace(\n\t\trender_json_payload_script_regex,\n\t\t(match) =\u003E render_json_payload_script_dict[match]\n\t);\n\n\tlet safe_attrs = '';\n\tfor (const [key, value] of Object.entries(attrs)) {\n\t\tif (value === undefined) continue;\n\t\tsafe_attrs += ` sveltekit:data-${key}=${escape_html_attr(value)}`;\n\t}\n\n\treturn `\u003Cscript type=\"application\u002Fjson\"${safe_attrs}\u003E${safe_payload}\u003C\u002Fscript\u003E`;\n}\n\n\u002F**\n * When inside a double-quoted attribute value, only `&` and `\"` hold special meaning.\n * @see https:\u002F\u002Fhtml.spec.whatwg.org\u002Fmultipage\u002Fparsing.html#attribute-value-(double-quoted)-state\n * @type {Record\u003Cstring, string\u003E}\n *\u002F\nconst escape_html_attr_dict = {\n\t'&': '&',\n\t'\"': '"'\n};\n\nconst escape_html_attr_regex = new RegExp(\n\t\u002F\u002F special characters\n\t`[${Object.keys(escape_html_attr_dict).join('')}]|` +\n\t\t\u002F\u002F high surrogate without paired low surrogate\n\t\t'[\\\\ud800-\\\\udbff](?![\\\\udc00-\\\\udfff])|' +\n\t\t\u002F\u002F a valid surrogate pair, the only match with 2 code units\n\t\t\u002F\u002F we match it so that we can match unpaired low surrogates in the same pass\n\t\t\u002F\u002F TODO: use lookbehind assertions once they are widely supported: (?\u003C![\\ud800-udbff])[\\udc00-\\udfff]\n\t\t'[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|' +\n\t\t\u002F\u002F unpaired low surrogate (see previous match)\n\t\t'[\\\\udc00-\\\\udfff]',\n\t'g'\n);\n\n\u002F**\n * Formats a string to be used as an attribute's value in raw HTML.\n *\n * It escapes unpaired surrogates (which are allowed in js strings but invalid in HTML), escapes\n * characters that are special in attributes, and surrounds the whole string in double-quotes.\n *\n * @param {string} str\n * @returns {string} Escaped string surrounded by double-quotes.\n * @example const html = `\u003Ctag data-value=${escape_html_attr('value')}\u003E...\u003C\u002Ftag\u003E`;\n *\u002F\nfunction escape_html_attr(str) {\n\tconst escaped_str = str.replace(escape_html_attr_regex, (match) =\u003E {\n\t\tif (match.length === 2) {\n\t\t\t\u002F\u002F valid surrogate pair\n\t\t\treturn match;\n\t\t}\n\n\t\treturn escape_html_attr_dict[match] ?? `&#${match.charCodeAt(0)};`;\n\t});\n\n\treturn `\"${escaped_str}\"`;\n}\n\nconst s = JSON.stringify;\n\n\u002F** @param {URL} url *\u002F\nfunction create_prerendering_url_proxy(url) {\n\treturn new Proxy(url, {\n\t\tget: (target, prop, receiver) =\u003E {\n\t\t\tif (prop === 'search' || prop === 'searchParams') {\n\t\t\t\tthrow new Error(`Cannot access url.${prop} on a page with prerendering enabled`);\n\t\t\t}\n\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t}\n\t});\n}\n\nconst encoder = new TextEncoder();\n\n\u002F**\n * SHA-256 hashing function adapted from https:\u002F\u002Fbitwiseshiftleft.github.io\u002Fsjcl\n * modified and redistributed under BSD license\n * @param {string} data\n *\u002F\nfunction sha256(data) {\n\tif (!key[0]) precompute();\n\n\tconst out = init.slice(0);\n\tconst array = encode$1(data);\n\n\tfor (let i = 0; i \u003C array.length; i += 16) {\n\t\tconst w = array.subarray(i, i + 16);\n\n\t\tlet tmp;\n\t\tlet a;\n\t\tlet b;\n\n\t\tlet out0 = out[0];\n\t\tlet out1 = out[1];\n\t\tlet out2 = out[2];\n\t\tlet out3 = out[3];\n\t\tlet out4 = out[4];\n\t\tlet out5 = out[5];\n\t\tlet out6 = out[6];\n\t\tlet out7 = out[7];\n\n\t\t\u002F* Rationale for placement of |0 :\n\t\t * If a value can overflow is original 32 bits by a factor of more than a few\n\t\t * million (2^23 ish), there is a possibility that it might overflow the\n\t\t * 53-bit mantissa and lose precision.\n\t\t *\n\t\t * To avoid this, we clamp back to 32 bits by |'ing with 0 on any value that\n\t\t * propagates around the loop, and on the hash state out[]. I don't believe\n\t\t * that the clamps on out4 and on out0 are strictly necessary, but it's close\n\t\t * (for out4 anyway), and better safe than sorry.\n\t\t *\n\t\t * The clamps on out[] are necessary for the output to be correct even in the\n\t\t * common case and for short inputs.\n\t\t *\u002F\n\n\t\tfor (let i = 0; i \u003C 64; i++) {\n\t\t\t\u002F\u002F load up the input word for this round\n\n\t\t\tif (i \u003C 16) {\n\t\t\t\ttmp = w[i];\n\t\t\t} else {\n\t\t\t\ta = w[(i + 1) & 15];\n\n\t\t\t\tb = w[(i + 14) & 15];\n\n\t\t\t\ttmp = w[i & 15] =\n\t\t\t\t\t(((a \u003E\u003E\u003E 7) ^ (a \u003E\u003E\u003E 18) ^ (a \u003E\u003E\u003E 3) ^ (a \u003C\u003C 25) ^ (a \u003C\u003C 14)) +\n\t\t\t\t\t\t((b \u003E\u003E\u003E 17) ^ (b \u003E\u003E\u003E 19) ^ (b \u003E\u003E\u003E 10) ^ (b \u003C\u003C 15) ^ (b \u003C\u003C 13)) +\n\t\t\t\t\t\tw[i & 15] +\n\t\t\t\t\t\tw[(i + 9) & 15]) |\n\t\t\t\t\t0;\n\t\t\t}\n\n\t\t\ttmp =\n\t\t\t\ttmp +\n\t\t\t\tout7 +\n\t\t\t\t((out4 \u003E\u003E\u003E 6) ^ (out4 \u003E\u003E\u003E 11) ^ (out4 \u003E\u003E\u003E 25) ^ (out4 \u003C\u003C 26) ^ (out4 \u003C\u003C 21) ^ (out4 \u003C\u003C 7)) +\n\t\t\t\t(out6 ^ (out4 & (out5 ^ out6))) +\n\t\t\t\tkey[i]; \u002F\u002F | 0;\n\n\t\t\t\u002F\u002F shift register\n\t\t\tout7 = out6;\n\t\t\tout6 = out5;\n\t\t\tout5 = out4;\n\n\t\t\tout4 = (out3 + tmp) | 0;\n\n\t\t\tout3 = out2;\n\t\t\tout2 = out1;\n\t\t\tout1 = out0;\n\n\t\t\tout0 =\n\t\t\t\t(tmp +\n\t\t\t\t\t((out1 & out2) ^ (out3 & (out1 ^ out2))) +\n\t\t\t\t\t((out1 \u003E\u003E\u003E 2) ^\n\t\t\t\t\t\t(out1 \u003E\u003E\u003E 13) ^\n\t\t\t\t\t\t(out1 \u003E\u003E\u003E 22) ^\n\t\t\t\t\t\t(out1 \u003C\u003C 30) ^\n\t\t\t\t\t\t(out1 \u003C\u003C 19) ^\n\t\t\t\t\t\t(out1 \u003C\u003C 10))) |\n\t\t\t\t0;\n\t\t}\n\n\t\tout[0] = (out[0] + out0) | 0;\n\t\tout[1] = (out[1] + out1) | 0;\n\t\tout[2] = (out[2] + out2) | 0;\n\t\tout[3] = (out[3] + out3) | 0;\n\t\tout[4] = (out[4] + out4) | 0;\n\t\tout[5] = (out[5] + out5) | 0;\n\t\tout[6] = (out[6] + out6) | 0;\n\t\tout[7] = (out[7] + out7) | 0;\n\t}\n\n\tconst bytes = new Uint8Array(out.buffer);\n\treverse_endianness(bytes);\n\n\treturn base64(bytes);\n}\n\n\u002F** The SHA-256 initialization vector *\u002F\nconst init = new Uint32Array(8);\n\n\u002F** The SHA-256 hash key *\u002F\nconst key = new Uint32Array(64);\n\n\u002F** Function to precompute init and key. *\u002F\nfunction precompute() {\n\t\u002F** @param {number} x *\u002F\n\tfunction frac(x) {\n\t\treturn (x - Math.floor(x)) * 0x100000000;\n\t}\n\n\tlet prime = 2;\n\n\tfor (let i = 0; i \u003C 64; prime++) {\n\t\tlet is_prime = true;\n\n\t\tfor (let factor = 2; factor * factor \u003C= prime; factor++) {\n\t\t\tif (prime % factor === 0) {\n\t\t\t\tis_prime = false;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (is_prime) {\n\t\t\tif (i \u003C 8) {\n\t\t\t\tinit[i] = frac(prime ** (1 \u002F 2));\n\t\t\t}\n\n\t\t\tkey[i] = frac(prime ** (1 \u002F 3));\n\n\t\t\ti++;\n\t\t}\n\t}\n}\n\n\u002F** @param {Uint8Array} bytes *\u002F\nfunction reverse_endianness(bytes) {\n\tfor (let i = 0; i \u003C bytes.length; i += 4) {\n\t\tconst a = bytes[i + 0];\n\t\tconst b = bytes[i + 1];\n\t\tconst c = bytes[i + 2];\n\t\tconst d = bytes[i + 3];\n\n\t\tbytes[i + 0] = d;\n\t\tbytes[i + 1] = c;\n\t\tbytes[i + 2] = b;\n\t\tbytes[i + 3] = a;\n\t}\n}\n\n\u002F** @param {string} str *\u002F\nfunction encode$1(str) {\n\tconst encoded = encoder.encode(str);\n\tconst length = encoded.length * 8;\n\n\t\u002F\u002F result should be a multiple of 512 bits in length,\n\t\u002F\u002F with room for a 1 (after the data) and two 32-bit\n\t\u002F\u002F words containing the original input bit length\n\tconst size = 512 * Math.ceil((length + 65) \u002F 512);\n\tconst bytes = new Uint8Array(size \u002F 8);\n\tbytes.set(encoded);\n\n\t\u002F\u002F append a 1\n\tbytes[encoded.length] = 0b10000000;\n\n\treverse_endianness(bytes);\n\n\t\u002F\u002F add the input bit length\n\tconst words = new Uint32Array(bytes.buffer);\n\twords[words.length - 2] = Math.floor(length \u002F 0x100000000); \u002F\u002F this will always be zero for us\n\twords[words.length - 1] = length;\n\n\treturn words;\n}\n\n\u002F*\n\tBased on https:\u002F\u002Fgist.github.com\u002Fenepomnyaschih\u002F72c423f727d395eeaa09697058238727\n\n\tMIT License\n\tCopyright (c) 2020 Egor Nepomnyaschih\n\tPermission is hereby granted, free of charge, to any person obtaining a copy\n\tof this software and associated documentation files (the \"Software\"), to deal\n\tin the Software without restriction, including without limitation the rights\n\tto use, copy, modify, merge, publish, distribute, sublicense, and\u002For sell\n\tcopies of the Software, and to permit persons to whom the Software is\n\tfurnished to do so, subject to the following conditions:\n\tThe above copyright notice and this permission notice shall be included in all\n\tcopies or substantial portions of the Software.\n\tTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\tIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\tFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\tAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\tLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\tOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\tSOFTWARE.\n*\u002F\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+\u002F'.split('');\n\n\u002F** @param {Uint8Array} bytes *\u002F\nfunction base64(bytes) {\n\tconst l = bytes.length;\n\n\tlet result = '';\n\tlet i;\n\n\tfor (i = 2; i \u003C l; i += 3) {\n\t\tresult += chars[bytes[i - 2] \u003E\u003E 2];\n\t\tresult += chars[((bytes[i - 2] & 0x03) \u003C\u003C 4) | (bytes[i - 1] \u003E\u003E 4)];\n\t\tresult += chars[((bytes[i - 1] & 0x0f) \u003C\u003C 2) | (bytes[i] \u003E\u003E 6)];\n\t\tresult += chars[bytes[i] & 0x3f];\n\t}\n\n\tif (i === l + 1) {\n\t\t\u002F\u002F 1 octet yet to write\n\t\tresult += chars[bytes[i - 2] \u003E\u003E 2];\n\t\tresult += chars[(bytes[i - 2] & 0x03) \u003C\u003C 4];\n\t\tresult += '==';\n\t}\n\n\tif (i === l) {\n\t\t\u002F\u002F 2 octets yet to write\n\t\tresult += chars[bytes[i - 2] \u003E\u003E 2];\n\t\tresult += chars[((bytes[i - 2] & 0x03) \u003C\u003C 4) | (bytes[i - 1] \u003E\u003E 4)];\n\t\tresult += chars[(bytes[i - 1] & 0x0f) \u003C\u003C 2];\n\t\tresult += '=';\n\t}\n\n\treturn result;\n}\n\n\u002F** @type {Promise\u003Cvoid\u003E} *\u002F\nlet csp_ready;\n\n\u002F** @type {() =\u003E string} *\u002F\nlet generate_nonce;\n\n\u002F** @type {(input: string) =\u003E string} *\u002F\nlet generate_hash;\n\nif (typeof crypto !== 'undefined') {\n\tconst array = new Uint8Array(16);\n\n\tgenerate_nonce = () =\u003E {\n\t\tcrypto.getRandomValues(array);\n\t\treturn base64(array);\n\t};\n\n\tgenerate_hash = sha256;\n} else {\n\t\u002F\u002F TODO: remove this in favor of web crypto API once we no longer support Node 14\n\tconst name = 'crypto'; \u002F\u002F store in a variable to fool esbuild when adapters bundle kit\n\tcsp_ready = import(name).then((crypto) =\u003E {\n\t\tgenerate_nonce = () =\u003E {\n\t\t\treturn crypto.randomBytes(16).toString('base64');\n\t\t};\n\n\t\tgenerate_hash = (input) =\u003E {\n\t\t\treturn crypto.createHash('sha256').update(input, 'utf-8').digest().toString('base64');\n\t\t};\n\t});\n}\n\nconst quoted = new Set([\n\t'self',\n\t'unsafe-eval',\n\t'unsafe-hashes',\n\t'unsafe-inline',\n\t'none',\n\t'strict-dynamic',\n\t'report-sample'\n]);\n\nconst crypto_pattern = \u002F^(nonce|sha\\d\\d\\d)-\u002F;\n\nclass Csp {\n\t\u002F** @type {boolean} *\u002F\n\t#use_hashes;\n\n\t\u002F** @type {boolean} *\u002F\n\t#dev;\n\n\t\u002F** @type {boolean} *\u002F\n\t#script_needs_csp;\n\n\t\u002F** @type {boolean} *\u002F\n\t#style_needs_csp;\n\n\t\u002F** @type {import('types').CspDirectives} *\u002F\n\t#directives;\n\n\t\u002F** @type {import('types').Csp.Source[]} *\u002F\n\t#script_src;\n\n\t\u002F** @type {import('types').Csp.Source[]} *\u002F\n\t#style_src;\n\n\t\u002F**\n\t * @param {{\n\t * mode: string,\n\t * directives: import('types').CspDirectives\n\t * }} config\n\t * @param {{\n\t * dev: boolean;\n\t * prerender: boolean;\n\t * needs_nonce: boolean;\n\t * }} opts\n\t *\u002F\n\tconstructor({ mode, directives }, { dev, prerender, needs_nonce }) {\n\t\tthis.#use_hashes = mode === 'hash' || (mode === 'auto' && prerender);\n\t\tthis.#directives = dev ? { ...directives } : directives; \u002F\u002F clone in dev so we can safely mutate\n\t\tthis.#dev = dev;\n\n\t\tconst d = this.#directives;\n\n\t\tif (dev) {\n\t\t\t\u002F\u002F remove strict-dynamic in dev...\n\t\t\t\u002F\u002F TODO reinstate this if we can figure out how to make strict-dynamic work\n\t\t\t\u002F\u002F if (d['default-src']) {\n\t\t\t\u002F\u002F \td['default-src'] = d['default-src'].filter((name) =\u003E name !== 'strict-dynamic');\n\t\t\t\u002F\u002F \tif (d['default-src'].length === 0) delete d['default-src'];\n\t\t\t\u002F\u002F }\n\n\t\t\t\u002F\u002F if (d['script-src']) {\n\t\t\t\u002F\u002F \td['script-src'] = d['script-src'].filter((name) =\u003E name !== 'strict-dynamic');\n\t\t\t\u002F\u002F \tif (d['script-src'].length === 0) delete d['script-src'];\n\t\t\t\u002F\u002F }\n\n\t\t\tconst effective_style_src = d['style-src'] || d['default-src'];\n\n\t\t\t\u002F\u002F ...and add unsafe-inline so we can inject \u003Cstyle\u003E elements\n\t\t\tif (effective_style_src && !effective_style_src.includes('unsafe-inline')) {\n\t\t\t\td['style-src'] = [...effective_style_src, 'unsafe-inline'];\n\t\t\t}\n\t\t}\n\n\t\tthis.#script_src = [];\n\t\tthis.#style_src = [];\n\n\t\tconst effective_script_src = d['script-src'] || d['default-src'];\n\t\tconst effective_style_src = d['style-src'] || d['default-src'];\n\n\t\tthis.#script_needs_csp =\n\t\t\t!!effective_script_src &&\n\t\t\teffective_script_src.filter((value) =\u003E value !== 'unsafe-inline').length \u003E 0;\n\n\t\tthis.#style_needs_csp =\n\t\t\t!dev &&\n\t\t\t!!effective_style_src &&\n\t\t\teffective_style_src.filter((value) =\u003E value !== 'unsafe-inline').length \u003E 0;\n\n\t\tthis.script_needs_nonce = this.#script_needs_csp && !this.#use_hashes;\n\t\tthis.style_needs_nonce = this.#style_needs_csp && !this.#use_hashes;\n\n\t\tif (this.script_needs_nonce || this.style_needs_nonce || needs_nonce) {\n\t\t\tthis.nonce = generate_nonce();\n\t\t}\n\t}\n\n\t\u002F** @param {string} content *\u002F\n\tadd_script(content) {\n\t\tif (this.#script_needs_csp) {\n\t\t\tif (this.#use_hashes) {\n\t\t\t\tthis.#script_src.push(`sha256-${generate_hash(content)}`);\n\t\t\t} else if (this.#script_src.length === 0) {\n\t\t\t\tthis.#script_src.push(`nonce-${this.nonce}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t\u002F** @param {string} content *\u002F\n\tadd_style(content) {\n\t\tif (this.#style_needs_csp) {\n\t\t\tif (this.#use_hashes) {\n\t\t\t\tthis.#style_src.push(`sha256-${generate_hash(content)}`);\n\t\t\t} else if (this.#style_src.length === 0) {\n\t\t\t\tthis.#style_src.push(`nonce-${this.nonce}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t\u002F** @param {boolean} [is_meta] *\u002F\n\tget_header(is_meta = false) {\n\t\tconst header = [];\n\n\t\t\u002F\u002F due to browser inconsistencies, we can't append sources to default-src\n\t\t\u002F\u002F (specifically, Firefox appears to not ignore nonce-{nonce} directives\n\t\t\u002F\u002F on default-src), so we ensure that script-src and style-src exist\n\n\t\tconst directives = { ...this.#directives };\n\n\t\tif (this.#style_src.length \u003E 0) {\n\t\t\tdirectives['style-src'] = [\n\t\t\t\t...(directives['style-src'] || directives['default-src'] || []),\n\t\t\t\t...this.#style_src\n\t\t\t];\n\t\t}\n\n\t\tif (this.#script_src.length \u003E 0) {\n\t\t\tdirectives['script-src'] = [\n\t\t\t\t...(directives['script-src'] || directives['default-src'] || []),\n\t\t\t\t...this.#script_src\n\t\t\t];\n\t\t}\n\n\t\tfor (const key in directives) {\n\t\t\tif (is_meta && (key === 'frame-ancestors' || key === 'report-uri' || key === 'sandbox')) {\n\t\t\t\t\u002F\u002F these values cannot be used with a \u003Cmeta\u003E tag\n\t\t\t\t\u002F\u002F TODO warn?\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t\u002F\u002F @ts-expect-error gimme a break typescript, `key` is obviously a member of directives\n\t\t\tconst value = \u002F** @type {string[] | true} *\u002F (directives[key]);\n\n\t\t\tif (!value) continue;\n\n\t\t\tconst directive = [key];\n\t\t\tif (Array.isArray(value)) {\n\t\t\t\tvalue.forEach((value) =\u003E {\n\t\t\t\t\tif (quoted.has(value) || crypto_pattern.test(value)) {\n\t\t\t\t\t\tdirective.push(`'${value}'`);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdirective.push(value);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\theader.push(directive.join(' '));\n\t\t}\n\n\t\treturn header.join('; ');\n\t}\n\n\tget_meta() {\n\t\tconst content = escape_html_attr(this.get_header(true));\n\t\treturn `\u003Cmeta http-equiv=\"content-security-policy\" content=${content}\u003E`;\n\t}\n}\n\n\u002F\u002F TODO rename this function\u002Fmodule\n\nconst updated = {\n\t...readable(false),\n\tcheck: () =\u003E false\n};\n\n\u002F**\n * @param {{\n * branch: Array\u003Cimport('.\u002Ftypes').Loaded\u003E;\n * options: import('types').SSROptions;\n * state: import('types').SSRState;\n * $session: any;\n * page_config: { hydrate: boolean, router: boolean };\n * status: number;\n * error: Error | null;\n * event: import('types').RequestEvent;\n * resolve_opts: import('types').RequiredResolveOptions;\n * stuff: Record\u003Cstring, any\u003E;\n * }} opts\n *\u002F\nasync function render_response({\n\tbranch,\n\toptions,\n\tstate,\n\t$session,\n\tpage_config,\n\tstatus,\n\terror = null,\n\tevent,\n\tresolve_opts,\n\tstuff\n}) {\n\tif (state.prerender) {\n\t\tif (options.csp.mode === 'nonce') {\n\t\t\tthrow new Error('Cannot use prerendering if config.kit.csp.mode === \"nonce\"');\n\t\t}\n\n\t\tif (options.template_contains_nonce) {\n\t\t\tthrow new Error('Cannot use prerendering if page template contains %svelte.nonce%');\n\t\t}\n\t}\n\n\tconst stylesheets = new Set(options.manifest._.entry.css);\n\tconst modulepreloads = new Set(options.manifest._.entry.js);\n\t\u002F** @type {Map\u003Cstring, string\u003E} *\u002F\n\tconst styles = new Map();\n\n\t\u002F** @type {Array\u003Cimport('.\u002Ftypes').Fetched\u003E} *\u002F\n\tconst serialized_data = [];\n\n\tlet shadow_props;\n\n\tlet rendered;\n\n\tlet is_private = false;\n\t\u002F** @type {import('types').NormalizedLoadOutputCache | undefined} *\u002F\n\tlet cache;\n\n\tif (error) {\n\t\terror.stack = options.get_stack(error);\n\t}\n\n\tif (resolve_opts.ssr) {\n\t\tbranch.forEach(({ node, props, loaded, fetched, uses_credentials }) =\u003E {\n\t\t\tif (node.css) node.css.forEach((url) =\u003E stylesheets.add(url));\n\t\t\tif (node.js) node.js.forEach((url) =\u003E modulepreloads.add(url));\n\t\t\tif (node.styles) Object.entries(node.styles).forEach(([k, v]) =\u003E styles.set(k, v));\n\n\t\t\t\u002F\u002F TODO probably better if `fetched` wasn't populated unless `hydrate`\n\t\t\tif (fetched && page_config.hydrate) serialized_data.push(...fetched);\n\t\t\tif (props) shadow_props = props;\n\n\t\t\tcache = loaded?.cache;\n\t\t\tis_private = cache?.private ?? uses_credentials;\n\t\t});\n\n\t\tconst session = writable($session);\n\n\t\t\u002F** @type {Record\u003Cstring, any\u003E} *\u002F\n\t\tconst props = {\n\t\t\tstores: {\n\t\t\t\tpage: writable(null),\n\t\t\t\tnavigating: writable(null),\n\t\t\t\t\u002F** @type {import('svelte\u002Fstore').Writable\u003CApp.Session\u003E} *\u002F\n\t\t\t\tsession: {\n\t\t\t\t\t...session,\n\t\t\t\t\tsubscribe: (fn) =\u003E {\n\t\t\t\t\t\tis_private = cache?.private ?? true;\n\t\t\t\t\t\treturn session.subscribe(fn);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tupdated\n\t\t\t},\n\t\t\t\u002F** @type {import('types').Page} *\u002F\n\t\t\tpage: {\n\t\t\t\terror,\n\t\t\t\tparams: event.params,\n\t\t\t\trouteId: event.routeId,\n\t\t\t\tstatus,\n\t\t\t\tstuff,\n\t\t\t\turl: state.prerender ? create_prerendering_url_proxy(event.url) : event.url\n\t\t\t},\n\t\t\tcomponents: branch.map(({ node }) =\u003E node.module.default)\n\t\t};\n\n\t\t\u002F\u002F TODO remove this for 1.0\n\t\t\u002F**\n\t\t * @param {string} property\n\t\t * @param {string} replacement\n\t\t *\u002F\n\t\tconst print_error = (property, replacement) =\u003E {\n\t\t\tObject.defineProperty(props.page, property, {\n\t\t\t\tget: () =\u003E {\n\t\t\t\t\tthrow new Error(`$page.${property} has been replaced by $page.url.${replacement}`);\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\n\t\tprint_error('origin', 'origin');\n\t\tprint_error('path', 'pathname');\n\t\tprint_error('query', 'searchParams');\n\n\t\t\u002F\u002F props_n (instead of props[n]) makes it easy to avoid\n\t\t\u002F\u002F unnecessary updates for layout components\n\t\tfor (let i = 0; i \u003C branch.length; i += 1) {\n\t\t\tprops[`props_${i}`] = await branch[i].loaded.props;\n\t\t}\n\n\t\trendered = options.root.render(props);\n\t} else {\n\t\trendered = { head: '', html: '', css: { code: '', map: null } };\n\t}\n\n\tlet { head, html: body } = rendered;\n\n\tconst inlined_style = Array.from(styles.values()).join('\\n');\n\n\tawait csp_ready;\n\tconst csp = new Csp(options.csp, {\n\t\tdev: options.dev,\n\t\tprerender: !!state.prerender,\n\t\tneeds_nonce: options.template_contains_nonce\n\t});\n\n\tconst target = hash(body);\n\n\t\u002F\u002F prettier-ignore\n\tconst init_app = `\n\t\timport { start } from ${s(options.prefix + options.manifest._.entry.file)};\n\t\tstart({\n\t\t\ttarget: document.querySelector('[data-hydrate=\"${target}\"]').parentNode,\n\t\t\tpaths: ${s(options.paths)},\n\t\t\tsession: ${try_serialize($session, (error) =\u003E {\n\t\t\t\tthrow new Error(`Failed to serialize session data: ${error.message}`);\n\t\t\t})},\n\t\t\troute: ${!!page_config.router},\n\t\t\tspa: ${!resolve_opts.ssr},\n\t\t\ttrailing_slash: ${s(options.trailing_slash)},\n\t\t\thydrate: ${resolve_opts.ssr && page_config.hydrate ? `{\n\t\t\t\tstatus: ${status},\n\t\t\t\terror: ${serialize_error(error)},\n\t\t\t\tnodes: [\n\t\t\t\t\t${(branch || [])\n\t\t\t\t\t.map(({ node }) =\u003E `import(${s(options.prefix + node.entry)})`)\n\t\t\t\t\t.join(',\\n\\t\\t\\t\\t\\t\\t')}\n\t\t\t\t],\n\t\t\t\tparams: ${devalue(event.params)},\n\t\t\t\trouteId: ${s(event.routeId)}\n\t\t\t}` : 'null'}\n\t\t});\n\t`;\n\n\tconst init_service_worker = `\n\t\tif ('serviceWorker' in navigator) {\n\t\t\tnavigator.serviceWorker.register('${options.service_worker}');\n\t\t}\n\t`;\n\n\tif (options.amp) {\n\t\t\u002F\u002F inline_style contains CSS files (i.e. `import '.\u002Fstyles.css'`)\n\t\t\u002F\u002F rendered.css contains the CSS from `\u003Cstyle\u003E` tags in Svelte components\n\t\tconst styles = `${inlined_style}\\n${rendered.css.code}`;\n\t\thead += `\n\t\t\u003Cstyle amp-boilerplate\u003Ebody{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}\u003C\u002Fstyle\u003E\n\t\t\u003Cnoscript\u003E\u003Cstyle amp-boilerplate\u003Ebody{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}\u003C\u002Fstyle\u003E\u003C\u002Fnoscript\u003E\n\t\t\u003Cscript async src=\"https:\u002F\u002Fcdn.ampproject.org\u002Fv0.js\"\u003E\u003C\u002Fscript\u003E\n\n\t\t\u003Cstyle amp-custom\u003E${styles}\u003C\u002Fstyle\u003E`;\n\n\t\tif (options.service_worker) {\n\t\t\thead +=\n\t\t\t\t'\u003Cscript async custom-element=\"amp-install-serviceworker\" src=\"https:\u002F\u002Fcdn.ampproject.org\u002Fv0\u002Famp-install-serviceworker-0.1.js\"\u003E\u003C\u002Fscript\u003E';\n\n\t\t\tbody += `\u003Camp-install-serviceworker src=\"${options.service_worker}\" layout=\"nodisplay\"\u003E\u003C\u002Famp-install-serviceworker\u003E`;\n\t\t}\n\t} else {\n\t\tif (inlined_style) {\n\t\t\tconst attributes = [];\n\t\t\tif (options.dev) attributes.push(' data-sveltekit');\n\t\t\tif (csp.style_needs_nonce) attributes.push(` nonce=\"${csp.nonce}\"`);\n\n\t\t\tcsp.add_style(inlined_style);\n\n\t\t\thead += `\\n\\t\u003Cstyle${attributes.join('')}\u003E${inlined_style}\u003C\u002Fstyle\u003E`;\n\t\t}\n\n\t\t\u002F\u002F prettier-ignore\n\t\thead += Array.from(stylesheets)\n\t\t\t.map((dep) =\u003E {\n\t\t\t\tconst attributes = [\n\t\t\t\t\t'rel=\"stylesheet\"',\n\t\t\t\t\t`href=\"${options.prefix + dep}\"`\n\t\t\t\t];\n\n\t\t\t\tif (csp.style_needs_nonce) {\n\t\t\t\t\tattributes.push(`nonce=\"${csp.nonce}\"`);\n\t\t\t\t}\n\n\t\t\t\tif (styles.has(dep)) {\n\t\t\t\t\t\u002F\u002F don't load stylesheets that are already inlined\n\t\t\t\t\t\u002F\u002F include them in disabled state so that Vite can detect them and doesn't try to add them\n\t\t\t\t\tattributes.push('disabled', 'media=\"(max-width: 0)\"');\n\t\t\t\t}\n\n\t\t\t\treturn `\\n\\t\u003Clink ${attributes.join(' ')}\u003E`;\n\t\t\t})\n\t\t\t.join('');\n\n\t\tif (page_config.router || page_config.hydrate) {\n\t\t\thead += Array.from(modulepreloads)\n\t\t\t\t.map((dep) =\u003E `\\n\\t\u003Clink rel=\"modulepreload\" href=\"${options.prefix + dep}\"\u003E`)\n\t\t\t\t.join('');\n\n\t\t\tconst attributes = ['type=\"module\"', `data-hydrate=\"${target}\"`];\n\n\t\t\tcsp.add_script(init_app);\n\n\t\t\tif (csp.script_needs_nonce) {\n\t\t\t\tattributes.push(`nonce=\"${csp.nonce}\"`);\n\t\t\t}\n\n\t\t\tbody += `\\n\\t\\t\u003Cscript ${attributes.join(' ')}\u003E${init_app}\u003C\u002Fscript\u003E`;\n\n\t\t\tbody += serialized_data\n\t\t\t\t.map(({ url, body, response }) =\u003E\n\t\t\t\t\trender_json_payload_script(\n\t\t\t\t\t\t{ type: 'data', url, body: typeof body === 'string' ? hash(body) : undefined },\n\t\t\t\t\t\tresponse\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t\t.join('\\n\\t');\n\n\t\t\tif (shadow_props) {\n\t\t\t\tbody += render_json_payload_script({ type: 'props' }, shadow_props);\n\t\t\t}\n\t\t}\n\n\t\tif (options.service_worker) {\n\t\t\t\u002F\u002F always include service worker unless it's turned off explicitly\n\t\t\tcsp.add_script(init_service_worker);\n\n\t\t\thead += `\n\t\t\t\t\u003Cscript${csp.script_needs_nonce ? ` nonce=\"${csp.nonce}\"` : ''}\u003E${init_service_worker}\u003C\u002Fscript\u003E`;\n\t\t}\n\t}\n\n\tif (state.prerender && !options.amp) {\n\t\tconst http_equiv = [];\n\n\t\tconst csp_headers = csp.get_meta();\n\t\tif (csp_headers) {\n\t\t\thttp_equiv.push(csp_headers);\n\t\t}\n\n\t\tif (cache) {\n\t\t\thttp_equiv.push(`\u003Cmeta http-equiv=\"cache-control\" content=\"max-age=${cache.maxage}\"\u003E`);\n\t\t}\n\n\t\tif (http_equiv.length \u003E 0) {\n\t\t\thead = http_equiv.join('\\n') + head;\n\t\t}\n\t}\n\n\tconst segments = event.url.pathname.slice(options.paths.base.length).split('\u002F').slice(2);\n\tconst assets =\n\t\toptions.paths.assets || (segments.length \u003E 0 ? segments.map(() =\u003E '..').join('\u002F') : '.');\n\n\tconst html = await resolve_opts.transformPage({\n\t\thtml: options.template({ head, body, assets, nonce: \u002F** @type {string} *\u002F (csp.nonce) })\n\t});\n\n\tconst headers = new Headers({\n\t\t'content-type': 'text\u002Fhtml',\n\t\tetag: `\"${hash(html)}\"`\n\t});\n\n\tif (cache) {\n\t\theaders.set('cache-control', `${is_private ? 'private' : 'public'}, max-age=${cache.maxage}`);\n\t}\n\n\tif (!options.floc) {\n\t\theaders.set('permissions-policy', 'interest-cohort=()');\n\t}\n\n\tif (!state.prerender) {\n\t\tconst csp_header = csp.get_header();\n\t\tif (csp_header) {\n\t\t\theaders.set('content-security-policy', csp_header);\n\t\t}\n\t}\n\n\treturn new Response(html, {\n\t\tstatus,\n\t\theaders\n\t});\n}\n\n\u002F**\n * @param {any} data\n * @param {(error: Error) =\u003E void} [fail]\n *\u002F\nfunction try_serialize(data, fail) {\n\ttry {\n\t\treturn devalue(data);\n\t} catch (err) {\n\t\tif (fail) fail(coalesce_to_error(err));\n\t\treturn null;\n\t}\n}\n\n\u002F\u002F Ensure we return something truthy so the client will not re-render the page over the error\n\n\u002F** @param {(Error & {frame?: string} & {loc?: object}) | undefined | null} error *\u002F\nfunction serialize_error(error) {\n\tif (!error) return null;\n\tlet serialized = try_serialize(error);\n\tif (!serialized) {\n\t\tconst { name, message, stack } = error;\n\t\tserialized = try_serialize({ ...error, name, message, stack });\n\t}\n\tif (!serialized) {\n\t\tserialized = '{}';\n\t}\n\treturn serialized;\n}\n\n\u002F*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n *\u002F\n\n\u002F**\n * Module exports.\n * @public\n *\u002F\n\nvar parse_1 = parse$1;\nvar serialize_1 = serialize;\n\n\u002F**\n * Module variables.\n * @private\n *\u002F\n\nvar __toString = Object.prototype.toString;\n\n\u002F**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP \u002F HTAB ) field-vchar ]\n * field-vchar = VCHAR \u002F obs-text\n * obs-text = %x80-FF\n *\u002F\n\nvar fieldContentRegExp = \u002F^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$\u002F;\n\n\u002F**\n * Parse a cookie header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) =\u003E values\n *\n * @param {string} str\n * @param {object} [options]\n * @return {object}\n * @public\n *\u002F\n\nfunction parse$1(str, options) {\n if (typeof str !== 'string') {\n throw new TypeError('argument str must be a string');\n }\n\n var obj = {};\n var opt = options || {};\n var dec = opt.decode || decode;\n\n var index = 0;\n while (index \u003C str.length) {\n var eqIdx = str.indexOf('=', index);\n\n \u002F\u002F no more cookie pairs\n if (eqIdx === -1) {\n break\n }\n\n var endIdx = str.indexOf(';', index);\n\n if (endIdx === -1) {\n endIdx = str.length;\n } else if (endIdx \u003C eqIdx) {\n \u002F\u002F backtrack on prior semicolon\n index = str.lastIndexOf(';', eqIdx - 1) + 1;\n continue\n }\n\n var key = str.slice(index, eqIdx).trim();\n\n \u002F\u002F only assign once\n if (undefined === obj[key]) {\n var val = str.slice(eqIdx + 1, endIdx).trim();\n\n \u002F\u002F quoted values\n if (val.charCodeAt(0) === 0x22) {\n val = val.slice(1, -1);\n }\n\n obj[key] = tryDecode(val, dec);\n }\n\n index = endIdx + 1;\n }\n\n return obj;\n}\n\n\u002F**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * serialize('foo', 'bar', { httpOnly: true })\n * =\u003E \"foo=bar; httpOnly\"\n *\n * @param {string} name\n * @param {string} val\n * @param {object} [options]\n * @return {string}\n * @public\n *\u002F\n\nfunction serialize(name, val, options) {\n var opt = options || {};\n var enc = opt.encode || encode;\n\n if (typeof enc !== 'function') {\n throw new TypeError('option encode is invalid');\n }\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n\n var value = enc(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument val is invalid');\n }\n\n var str = name + '=' + value;\n\n if (null != opt.maxAge) {\n var maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError('option maxAge is invalid')\n }\n\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n\n str += '; Domain=' + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n\n str += '; Path=' + opt.path;\n }\n\n if (opt.expires) {\n var expires = opt.expires;\n\n if (!isDate(expires) || isNaN(expires.valueOf())) {\n throw new TypeError('option expires is invalid');\n }\n\n str += '; Expires=' + expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n str += '; HttpOnly';\n }\n\n if (opt.secure) {\n str += '; Secure';\n }\n\n if (opt.priority) {\n var priority = typeof opt.priority === 'string'\n ? opt.priority.toLowerCase()\n : opt.priority;\n\n switch (priority) {\n case 'low':\n str += '; Priority=Low';\n break\n case 'medium':\n str += '; Priority=Medium';\n break\n case 'high':\n str += '; Priority=High';\n break\n default:\n throw new TypeError('option priority is invalid')\n }\n }\n\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string'\n ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n\n return str;\n}\n\n\u002F**\n * URL-decode string value. Optimized to skip native call when no %.\n *\n * @param {string} str\n * @returns {string}\n *\u002F\n\nfunction decode (str) {\n return str.indexOf('%') !== -1\n ? decodeURIComponent(str)\n : str\n}\n\n\u002F**\n * URL-encode value.\n *\n * @param {string} str\n * @returns {string}\n *\u002F\n\nfunction encode (val) {\n return encodeURIComponent(val)\n}\n\n\u002F**\n * Determine if value is a Date.\n *\n * @param {*} val\n * @private\n *\u002F\n\nfunction isDate (val) {\n return __toString.call(val) === '[object Date]' ||\n val instanceof Date\n}\n\n\u002F**\n * Try decoding a string using a decoding function.\n *\n * @param {string} str\n * @param {function} decode\n * @private\n *\u002F\n\nfunction tryDecode(str, decode) {\n try {\n return decode(str);\n } catch (e) {\n return str;\n }\n}\n\nvar setCookie = {exports: {}};\n\nvar defaultParseOptions = {\n decodeValues: true,\n map: false,\n silent: false,\n};\n\nfunction isNonEmptyString(str) {\n return typeof str === \"string\" && !!str.trim();\n}\n\nfunction parseString(setCookieValue, options) {\n var parts = setCookieValue.split(\";\").filter(isNonEmptyString);\n var nameValue = parts.shift().split(\"=\");\n var name = nameValue.shift();\n var value = nameValue.join(\"=\"); \u002F\u002F everything after the first =, joined by a \"=\" if there was more than one part\n\n options = options\n ? Object.assign({}, defaultParseOptions, options)\n : defaultParseOptions;\n\n try {\n value = options.decodeValues ? decodeURIComponent(value) : value; \u002F\u002F decode cookie value\n } catch (e) {\n console.error(\n \"set-cookie-parser encountered an error while decoding a cookie with value '\" +\n value +\n \"'. Set options.decodeValues to false to disable this feature.\",\n e\n );\n }\n\n var cookie = {\n name: name, \u002F\u002F grab everything before the first =\n value: value,\n };\n\n parts.forEach(function (part) {\n var sides = part.split(\"=\");\n var key = sides.shift().trimLeft().toLowerCase();\n var value = sides.join(\"=\");\n if (key === \"expires\") {\n cookie.expires = new Date(value);\n } else if (key === \"max-age\") {\n cookie.maxAge = parseInt(value, 10);\n } else if (key === \"secure\") {\n cookie.secure = true;\n } else if (key === \"httponly\") {\n cookie.httpOnly = true;\n } else if (key === \"samesite\") {\n cookie.sameSite = value;\n } else {\n cookie[key] = value;\n }\n });\n\n return cookie;\n}\n\nfunction parse(input, options) {\n options = options\n ? Object.assign({}, defaultParseOptions, options)\n : defaultParseOptions;\n\n if (!input) {\n if (!options.map) {\n return [];\n } else {\n return {};\n }\n }\n\n if (input.headers && input.headers[\"set-cookie\"]) {\n \u002F\u002F fast-path for node.js (which automatically normalizes header names to lower-case\n input = input.headers[\"set-cookie\"];\n } else if (input.headers) {\n \u002F\u002F slow-path for other environments - see #25\n var sch =\n input.headers[\n Object.keys(input.headers).find(function (key) {\n return key.toLowerCase() === \"set-cookie\";\n })\n ];\n \u002F\u002F warn if called on a request-like object with a cookie header rather than a set-cookie header - see #34, 36\n if (!sch && input.headers.cookie && !options.silent) {\n console.warn(\n \"Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning.\"\n );\n }\n input = sch;\n }\n if (!Array.isArray(input)) {\n input = [input];\n }\n\n options = options\n ? Object.assign({}, defaultParseOptions, options)\n : defaultParseOptions;\n\n if (!options.map) {\n return input.filter(isNonEmptyString).map(function (str) {\n return parseString(str, options);\n });\n } else {\n var cookies = {};\n return input.filter(isNonEmptyString).reduce(function (cookies, str) {\n var cookie = parseString(str, options);\n cookies[cookie.name] = cookie;\n return cookies;\n }, cookies);\n }\n}\n\n\u002F*\n Set-Cookie header field-values are sometimes comma joined in one string. This splits them without choking on commas\n that are within a single set-cookie field-value, such as in the Expires portion.\n\n This is uncommon, but explicitly allowed - see https:\u002F\u002Ftools.ietf.org\u002Fhtml\u002Frfc2616#section-4.2\n Node.js does this for every header *except* set-cookie - see https:\u002F\u002Fgithub.com\u002Fnodejs\u002Fnode\u002Fblob\u002Fd5e363b77ebaf1caf67cd7528224b651c86815c1\u002Flib\u002F_http_incoming.js#L128\n React Native's fetch does this for *every* header, including set-cookie.\n\n Based on: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fj2objc\u002Fcommit\u002F16820fdbc8f76ca0c33472810ce0cb03d20efe25\n Credits to: https:\u002F\u002Fgithub.com\u002Ftomball for original and https:\u002F\u002Fgithub.com\u002Fchrusart for JavaScript implementation\n*\u002F\nfunction splitCookiesString(cookiesString) {\n if (Array.isArray(cookiesString)) {\n return cookiesString;\n }\n if (typeof cookiesString !== \"string\") {\n return [];\n }\n\n var cookiesStrings = [];\n var pos = 0;\n var start;\n var ch;\n var lastComma;\n var nextStart;\n var cookiesSeparatorFound;\n\n function skipWhitespace() {\n while (pos \u003C cookiesString.length && \u002F\\s\u002F.test(cookiesString.charAt(pos))) {\n pos += 1;\n }\n return pos \u003C cookiesString.length;\n }\n\n function notSpecialChar() {\n ch = cookiesString.charAt(pos);\n\n return ch !== \"=\" && ch !== \";\" && ch !== \",\";\n }\n\n while (pos \u003C cookiesString.length) {\n start = pos;\n cookiesSeparatorFound = false;\n\n while (skipWhitespace()) {\n ch = cookiesString.charAt(pos);\n if (ch === \",\") {\n \u002F\u002F ',' is a cookie separator if we have later first '=', not ';' or ','\n lastComma = pos;\n pos += 1;\n\n skipWhitespace();\n nextStart = pos;\n\n while (pos \u003C cookiesString.length && notSpecialChar()) {\n pos += 1;\n }\n\n \u002F\u002F currently special character\n if (pos \u003C cookiesString.length && cookiesString.charAt(pos) === \"=\") {\n \u002F\u002F we found cookies separator\n cookiesSeparatorFound = true;\n \u002F\u002F pos is inside the next cookie, so back up and return it.\n pos = nextStart;\n cookiesStrings.push(cookiesString.substring(start, lastComma));\n start = pos;\n } else {\n \u002F\u002F in param ',' or param separator ';',\n \u002F\u002F we continue from that comma\n pos = lastComma + 1;\n }\n } else {\n pos += 1;\n }\n }\n\n if (!cookiesSeparatorFound || pos \u003E= cookiesString.length) {\n cookiesStrings.push(cookiesString.substring(start, cookiesString.length));\n }\n }\n\n return cookiesStrings;\n}\n\nsetCookie.exports = parse;\nsetCookie.exports.parse = parse;\nvar parseString_1 = setCookie.exports.parseString = parseString;\nvar splitCookiesString_1 = setCookie.exports.splitCookiesString = splitCookiesString;\n\n\u002F**\n * @param {import('types').LoadOutput} loaded\n * @returns {import('types').NormalizedLoadOutput}\n *\u002F\nfunction normalize(loaded) {\n\t\u002F\u002F TODO remove for 1.0\n\t\u002F\u002F @ts-expect-error\n\tif (loaded.fallthrough) {\n\t\tthrow new Error(\n\t\t\t'fallthrough is no longer supported. Use matchers instead: https:\u002F\u002Fkit.svelte.dev\u002Fdocs\u002Frouting#advanced-routing-matching'\n\t\t);\n\t}\n\n\t\u002F\u002F TODO remove for 1.0\n\tif ('maxage' in loaded) {\n\t\tthrow new Error('maxage should be replaced with cache: { maxage }');\n\t}\n\n\tconst has_error_status =\n\t\tloaded.status && loaded.status \u003E= 400 && loaded.status \u003C= 599 && !loaded.redirect;\n\tif (loaded.error || has_error_status) {\n\t\tconst status = loaded.status;\n\n\t\tif (!loaded.error && has_error_status) {\n\t\t\treturn { status: status || 500, error: new Error() };\n\t\t}\n\n\t\tconst error = typeof loaded.error === 'string' ? new Error(loaded.error) : loaded.error;\n\n\t\tif (!(error instanceof Error)) {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error(\n\t\t\t\t\t`\"error\" property returned from load() must be a string or instance of Error, received type \"${typeof error}\"`\n\t\t\t\t)\n\t\t\t};\n\t\t}\n\n\t\tif (!status || status \u003C 400 || status \u003E 599) {\n\t\t\tconsole.warn('\"error\" returned from load() without a valid status code — defaulting to 500');\n\t\t\treturn { status: 500, error };\n\t\t}\n\n\t\treturn { status, error };\n\t}\n\n\tif (loaded.redirect) {\n\t\tif (!loaded.status || Math.floor(loaded.status \u002F 100) !== 3) {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error(\n\t\t\t\t\t'\"redirect\" property returned from load() must be accompanied by a 3xx status code'\n\t\t\t\t)\n\t\t\t};\n\t\t}\n\n\t\tif (typeof loaded.redirect !== 'string') {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error('\"redirect\" property returned from load() must be a string')\n\t\t\t};\n\t\t}\n\t}\n\n\tif (loaded.dependencies) {\n\t\tif (\n\t\t\t!Array.isArray(loaded.dependencies) ||\n\t\t\tloaded.dependencies.some((dep) =\u003E typeof dep !== 'string')\n\t\t) {\n\t\t\treturn {\n\t\t\t\tstatus: 500,\n\t\t\t\terror: new Error('\"dependencies\" property returned from load() must be of type string[]')\n\t\t\t};\n\t\t}\n\t}\n\n\t\u002F\u002F TODO remove before 1.0\n\tif (\u002F** @type {any} *\u002F (loaded).context) {\n\t\tthrow new Error(\n\t\t\t'You are returning \"context\" from a load function. ' +\n\t\t\t\t'\"context\" was renamed to \"stuff\", please adjust your code accordingly.'\n\t\t);\n\t}\n\n\treturn \u002F** @type {import('types').NormalizedLoadOutput} *\u002F (loaded);\n}\n\nconst absolute = \u002F^([a-z]+:)?\\\u002F?\\\u002F\u002F;\nconst scheme = \u002F^[a-z]+:\u002F;\n\n\u002F**\n * @param {string} base\n * @param {string} path\n *\u002F\nfunction resolve(base, path) {\n\tif (scheme.test(path)) return 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('\u002F');\n\tconst pathparts = path_match ? path.slice(path_match[0].length).split('\u002F') : path.split('\u002F');\n\n\tbaseparts.pop();\n\n\tfor (let i = 0; i \u003C 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('\u002F')}`;\n}\n\n\u002F** @param {string} path *\u002F\nfunction is_root_relative(path) {\n\treturn path[0] === '\u002F' && path[1] !== '\u002F';\n}\n\n\u002F**\n * @param {string} path\n * @param {import('types').TrailingSlash} trailing_slash\n *\u002F\nfunction normalize_path(path, trailing_slash) {\n\tif (path === '\u002F' || trailing_slash === 'ignore') return path;\n\n\tif (trailing_slash === 'never') {\n\t\treturn path.endsWith('\u002F') ? path.slice(0, -1) : path;\n\t} else if (trailing_slash === 'always' && !path.endsWith('\u002F')) {\n\t\treturn path + '\u002F';\n\t}\n\n\treturn path;\n}\n\n\u002F**\n * @param {string} hostname\n * @param {string} [constraint]\n *\u002F\nfunction domain_matches(hostname, constraint) {\n\tif (!constraint) return true;\n\n\tconst normalized = constraint[0] === '.' ? constraint.slice(1) : constraint;\n\n\tif (hostname === normalized) return true;\n\treturn hostname.endsWith('.' + normalized);\n}\n\n\u002F**\n * @param {string} path\n * @param {string} [constraint]\n *\u002F\nfunction path_matches(path, constraint) {\n\tif (!constraint) return true;\n\n\tconst normalized = constraint.endsWith('\u002F') ? constraint.slice(0, -1) : constraint;\n\n\tif (path === normalized) return true;\n\treturn path.startsWith(normalized + '\u002F');\n}\n\n\u002F**\n * @param {{\n * event: import('types').RequestEvent;\n * options: import('types').SSROptions;\n * state: import('types').SSRState;\n * route: import('types').SSRPage | null;\n * node: import('types').SSRNode;\n * $session: any;\n * stuff: Record\u003Cstring, any\u003E;\n * is_error: boolean;\n * is_leaf: boolean;\n * status?: number;\n * error?: Error;\n * }} opts\n * @returns {Promise\u003Cimport('.\u002Ftypes').Loaded\u003E}\n *\u002F\nasync function load_node({\n\tevent,\n\toptions,\n\tstate,\n\troute,\n\tnode,\n\t$session,\n\tstuff,\n\tis_error,\n\tis_leaf,\n\tstatus,\n\terror\n}) {\n\tconst { module } = node;\n\n\tlet uses_credentials = false;\n\n\t\u002F** @type {Array\u003Cimport('.\u002Ftypes').Fetched\u003E} *\u002F\n\tconst fetched = [];\n\n\tconst cookies = parse_1(event.request.headers.get('cookie') || '');\n\n\t\u002F** @type {import('set-cookie-parser').Cookie[]} *\u002F\n\tconst new_cookies = [];\n\n\t\u002F** @type {import('types').LoadOutput} *\u002F\n\tlet loaded;\n\n\t\u002F** @type {import('types').ShadowData} *\u002F\n\tconst shadow = is_leaf\n\t\t? await load_shadow_data(\n\t\t\t\t\u002F** @type {import('types').SSRPage} *\u002F (route),\n\t\t\t\tevent,\n\t\t\t\toptions,\n\t\t\t\t!!state.prerender\n\t\t )\n\t\t: {};\n\n\tif (shadow.cookies) {\n\t\tshadow.cookies.forEach((header) =\u003E {\n\t\t\tnew_cookies.push(parseString_1(header));\n\t\t});\n\t}\n\n\tif (shadow.error) {\n\t\tloaded = {\n\t\t\tstatus: shadow.status,\n\t\t\terror: shadow.error\n\t\t};\n\t} else if (shadow.redirect) {\n\t\tloaded = {\n\t\t\tstatus: shadow.status,\n\t\t\tredirect: shadow.redirect\n\t\t};\n\t} else if (module.load) {\n\t\t\u002F** @type {import('types').LoadInput} *\u002F\n\t\tconst load_input = {\n\t\t\turl: state.prerender ? create_prerendering_url_proxy(event.url) : event.url,\n\t\t\tparams: event.params,\n\t\t\tprops: shadow.body || {},\n\t\t\trouteId: event.routeId,\n\t\t\tget session() {\n\t\t\t\tuses_credentials = true;\n\t\t\t\treturn $session;\n\t\t\t},\n\t\t\t\u002F**\n\t\t\t * @param {RequestInfo} resource\n\t\t\t * @param {RequestInit} opts\n\t\t\t *\u002F\n\t\t\tfetch: async (resource, opts = {}) =\u003E {\n\t\t\t\t\u002F** @type {string} *\u002F\n\t\t\t\tlet requested;\n\n\t\t\t\tif (typeof resource === 'string') {\n\t\t\t\t\trequested = resource;\n\t\t\t\t} else {\n\t\t\t\t\trequested = resource.url;\n\n\t\t\t\t\topts = {\n\t\t\t\t\t\tmethod: resource.method,\n\t\t\t\t\t\theaders: resource.headers,\n\t\t\t\t\t\tbody: resource.body,\n\t\t\t\t\t\tmode: resource.mode,\n\t\t\t\t\t\tcredentials: resource.credentials,\n\t\t\t\t\t\tcache: resource.cache,\n\t\t\t\t\t\tredirect: resource.redirect,\n\t\t\t\t\t\treferrer: resource.referrer,\n\t\t\t\t\t\tintegrity: resource.integrity,\n\t\t\t\t\t\t...opts\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\topts.headers = new Headers(opts.headers);\n\n\t\t\t\t\u002F\u002F merge headers from request\n\t\t\t\tfor (const [key, value] of event.request.headers) {\n\t\t\t\t\tif (\n\t\t\t\t\t\tkey !== 'authorization' &&\n\t\t\t\t\t\tkey !== 'cookie' &&\n\t\t\t\t\t\tkey !== 'host' &&\n\t\t\t\t\t\tkey !== 'if-none-match' &&\n\t\t\t\t\t\t!opts.headers.has(key)\n\t\t\t\t\t) {\n\t\t\t\t\t\topts.headers.set(key, value);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconst resolved = resolve(event.url.pathname, requested.split('?')[0]);\n\n\t\t\t\t\u002F** @type {Response} *\u002F\n\t\t\t\tlet response;\n\n\t\t\t\t\u002F** @type {import('types').PrerenderDependency} *\u002F\n\t\t\t\tlet dependency;\n\n\t\t\t\t\u002F\u002F handle fetch requests for static assets. e.g. prebaked data, etc.\n\t\t\t\t\u002F\u002F we need to support everything the browser's fetch supports\n\t\t\t\tconst prefix = options.paths.assets || options.paths.base;\n\t\t\t\tconst filename = decodeURIComponent(\n\t\t\t\t\tresolved.startsWith(prefix) ? resolved.slice(prefix.length) : resolved\n\t\t\t\t).slice(1);\n\t\t\t\tconst filename_html = `${filename}\u002Findex.html`; \u002F\u002F path may also match path\u002Findex.html\n\n\t\t\t\tconst is_asset = options.manifest.assets.has(filename);\n\t\t\t\tconst is_asset_html = options.manifest.assets.has(filename_html);\n\n\t\t\t\tif (is_asset || is_asset_html) {\n\t\t\t\t\tconst file = is_asset ? filename : filename_html;\n\n\t\t\t\t\tif (options.read) {\n\t\t\t\t\t\tconst type = is_asset\n\t\t\t\t\t\t\t? options.manifest.mimeTypes[filename.slice(filename.lastIndexOf('.'))]\n\t\t\t\t\t\t\t: 'text\u002Fhtml';\n\n\t\t\t\t\t\tresponse = new Response(options.read(file), {\n\t\t\t\t\t\t\theaders: type ? { 'content-type': type } : {}\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresponse = await fetch(\n\t\t\t\t\t\t\t`${event.url.origin}\u002F${file}`,\n\t\t\t\t\t\t\t\u002F** @type {RequestInit} *\u002F (opts)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t} else if (is_root_relative(resolved)) {\n\t\t\t\t\tif (opts.credentials !== 'omit') {\n\t\t\t\t\t\tuses_credentials = true;\n\n\t\t\t\t\t\tconst authorization = event.request.headers.get('authorization');\n\n\t\t\t\t\t\t\u002F\u002F combine cookies from the initiating request with any that were\n\t\t\t\t\t\t\u002F\u002F added via set-cookie\n\t\t\t\t\t\tconst combined_cookies = { ...cookies };\n\n\t\t\t\t\t\tfor (const cookie of new_cookies) {\n\t\t\t\t\t\t\tif (!domain_matches(event.url.hostname, cookie.domain)) continue;\n\t\t\t\t\t\t\tif (!path_matches(resolved, cookie.path)) continue;\n\n\t\t\t\t\t\t\tcombined_cookies[cookie.name] = cookie.value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst cookie = Object.entries(combined_cookies)\n\t\t\t\t\t\t\t.map(([name, value]) =\u003E `${name}=${value}`)\n\t\t\t\t\t\t\t.join('; ');\n\n\t\t\t\t\t\tif (cookie) {\n\t\t\t\t\t\t\topts.headers.set('cookie', cookie);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (authorization && !opts.headers.has('authorization')) {\n\t\t\t\t\t\t\topts.headers.set('authorization', authorization);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (opts.body && typeof opts.body !== 'string') {\n\t\t\t\t\t\t\u002F\u002F per https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FAPI\u002FRequest\u002FRequest, this can be a\n\t\t\t\t\t\t\u002F\u002F Blob, BufferSource, FormData, URLSearchParams, USVString, or ReadableStream object.\n\t\t\t\t\t\t\u002F\u002F non-string bodies are irksome to deal with, but luckily aren't particularly useful\n\t\t\t\t\t\t\u002F\u002F in this context anyway, so we take the easy route and ban them\n\t\t\t\t\t\tthrow new Error('Request body must be a string');\n\t\t\t\t\t}\n\n\t\t\t\t\tresponse = await respond(\n\t\t\t\t\t\t\u002F\u002F we set `credentials` to `undefined` to workaround a bug in Cloudflare\n\t\t\t\t\t\t\u002F\u002F (https:\u002F\u002Fgithub.com\u002Fsveltejs\u002Fkit\u002Fissues\u002F3728) — which is fine, because\n\t\t\t\t\t\t\u002F\u002F we only need the headers\n\t\t\t\t\t\tnew Request(new URL(requested, event.url).href, { ...opts, credentials: undefined }),\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...state,\n\t\t\t\t\t\t\tinitiator: route\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\n\t\t\t\t\tif (state.prerender) {\n\t\t\t\t\t\tdependency = { response, body: null };\n\t\t\t\t\t\tstate.prerender.dependencies.set(resolved, dependency);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t\u002F\u002F external\n\t\t\t\t\tif (resolved.startsWith('\u002F\u002F')) {\n\t\t\t\t\t\trequested = event.url.protocol + requested;\n\t\t\t\t\t}\n\n\t\t\t\t\t\u002F\u002F external fetch\n\t\t\t\t\t\u002F\u002F allow cookie passthrough for \"same-origin\"\n\t\t\t\t\t\u002F\u002F if SvelteKit is serving my.domain.com:\n\t\t\t\t\t\u002F\u002F - domain.com WILL NOT receive cookies\n\t\t\t\t\t\u002F\u002F - my.domain.com WILL receive cookies\n\t\t\t\t\t\u002F\u002F - api.domain.dom WILL NOT receive cookies\n\t\t\t\t\t\u002F\u002F - sub.my.domain.com WILL receive cookies\n\t\t\t\t\t\u002F\u002F ports do not affect the resolution\n\t\t\t\t\t\u002F\u002F leading dot prevents mydomain.com matching domain.com\n\t\t\t\t\tif (\n\t\t\t\t\t\t`.${new URL(requested).hostname}`.endsWith(`.${event.url.hostname}`) &&\n\t\t\t\t\t\topts.credentials !== 'omit'\n\t\t\t\t\t) {\n\t\t\t\t\t\tuses_credentials = true;\n\n\t\t\t\t\t\tconst cookie = event.request.headers.get('cookie');\n\t\t\t\t\t\tif (cookie) opts.headers.set('cookie', cookie);\n\t\t\t\t\t}\n\n\t\t\t\t\tconst external_request = new Request(requested, \u002F** @type {RequestInit} *\u002F (opts));\n\t\t\t\t\tresponse = await options.hooks.externalFetch.call(null, external_request);\n\t\t\t\t}\n\n\t\t\t\tconst set_cookie = response.headers.get('set-cookie');\n\t\t\t\tif (set_cookie) {\n\t\t\t\t\tnew_cookies.push(\n\t\t\t\t\t\t...splitCookiesString_1(set_cookie)\n\t\t\t\t\t\t\t.map((str) =\u003E parseString_1(str))\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst proxy = new Proxy(response, {\n\t\t\t\t\tget(response, key, _receiver) {\n\t\t\t\t\t\tasync function text() {\n\t\t\t\t\t\t\tconst body = await response.text();\n\n\t\t\t\t\t\t\t\u002F** @type {import('types').ResponseHeaders} *\u002F\n\t\t\t\t\t\t\tconst headers = {};\n\t\t\t\t\t\t\tfor (const [key, value] of response.headers) {\n\t\t\t\t\t\t\t\t\u002F\u002F TODO skip others besides set-cookie and etag?\n\t\t\t\t\t\t\t\tif (key !== 'set-cookie' && key !== 'etag') {\n\t\t\t\t\t\t\t\t\theaders[key] = value;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (!opts.body || typeof opts.body === 'string') {\n\t\t\t\t\t\t\t\tconst status_number = Number(response.status);\n\t\t\t\t\t\t\t\tif (isNaN(status_number)) {\n\t\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\t`response.status is not a number. value: \"${\n\t\t\t\t\t\t\t\t\t\t\tresponse.status\n\t\t\t\t\t\t\t\t\t\t}\" type: ${typeof response.status}`\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfetched.push({\n\t\t\t\t\t\t\t\t\turl: requested,\n\t\t\t\t\t\t\t\t\tbody: opts.body,\n\t\t\t\t\t\t\t\t\tresponse: {\n\t\t\t\t\t\t\t\t\t\tstatus: status_number,\n\t\t\t\t\t\t\t\t\t\tstatusText: response.statusText,\n\t\t\t\t\t\t\t\t\t\theaders,\n\t\t\t\t\t\t\t\t\t\tbody\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\n\t\t\t\t\t\t\tif (dependency) {\n\t\t\t\t\t\t\t\tdependency.body = body;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn body;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (key === 'arrayBuffer') {\n\t\t\t\t\t\t\treturn async () =\u003E {\n\t\t\t\t\t\t\t\tconst buffer = await response.arrayBuffer();\n\n\t\t\t\t\t\t\t\tif (dependency) {\n\t\t\t\t\t\t\t\t\tdependency.body = new Uint8Array(buffer);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\u002F\u002F TODO should buffer be inlined into the page (albeit base64'd)?\n\t\t\t\t\t\t\t\t\u002F\u002F any conditions in which it shouldn't be?\n\n\t\t\t\t\t\t\t\treturn buffer;\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (key === 'text') {\n\t\t\t\t\t\t\treturn text;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (key === 'json') {\n\t\t\t\t\t\t\treturn async () =\u003E {\n\t\t\t\t\t\t\t\treturn JSON.parse(await text());\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\u002F\u002F TODO arrayBuffer?\n\n\t\t\t\t\t\treturn Reflect.get(response, key, response);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\treturn proxy;\n\t\t\t},\n\t\t\tstuff: { ...stuff },\n\t\t\tstatus: is_error ? status ?? null : null,\n\t\t\terror: is_error ? error ?? null : null\n\t\t};\n\n\t\tif (options.dev) {\n\t\t\t\u002F\u002F TODO remove this for 1.0\n\t\t\tObject.defineProperty(load_input, 'page', {\n\t\t\t\tget: () =\u003E {\n\t\t\t\t\tthrow new Error('`page` in `load` functions has been replaced by `url` and `params`');\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tloaded = await module.load.call(null, load_input);\n\n\t\tif (!loaded) {\n\t\t\t\u002F\u002F TODO do we still want to enforce this now that there's no fallthrough?\n\t\t\tthrow new Error(`load function must return a value${options.dev ? ` (${node.entry})` : ''}`);\n\t\t}\n\t} else if (shadow.body) {\n\t\tloaded = {\n\t\t\tprops: shadow.body\n\t\t};\n\t} else {\n\t\tloaded = {};\n\t}\n\n\t\u002F\u002F generate __data.json files when prerendering\n\tif (shadow.body && state.prerender) {\n\t\tconst pathname = `${event.url.pathname.replace(\u002F\\\u002F$\u002F, '')}\u002F__data.json`;\n\n\t\tconst dependency = {\n\t\t\tresponse: new Response(undefined),\n\t\t\tbody: JSON.stringify(shadow.body)\n\t\t};\n\n\t\tstate.prerender.dependencies.set(pathname, dependency);\n\t}\n\n\treturn {\n\t\tnode,\n\t\tprops: shadow.body,\n\t\tloaded: normalize(loaded),\n\t\tstuff: loaded.stuff || stuff,\n\t\tfetched,\n\t\tset_cookie_headers: new_cookies.map((new_cookie) =\u003E {\n\t\t\tconst { name, value, ...options } = new_cookie;\n\t\t\t\u002F\u002F @ts-expect-error\n\t\t\treturn serialize_1(name, value, options);\n\t\t}),\n\t\tuses_credentials\n\t};\n}\n\n\u002F**\n *\n * @param {import('types').SSRPage} route\n * @param {import('types').RequestEvent} event\n * @param {import('types').SSROptions} options\n * @param {boolean} prerender\n * @returns {Promise\u003Cimport('types').ShadowData\u003E}\n *\u002F\nasync function load_shadow_data(route, event, options, prerender) {\n\tif (!route.shadow) return {};\n\n\ttry {\n\t\tconst mod = await route.shadow();\n\n\t\tif (prerender && (mod.post || mod.put || mod.del || mod.patch)) {\n\t\t\tthrow new Error('Cannot prerender pages that have endpoints with mutative methods');\n\t\t}\n\n\t\tconst method = normalize_request_method(event);\n\t\tconst is_get = method === 'head' || method === 'get';\n\t\tconst handler = method === 'head' ? mod.head || mod.get : mod[method];\n\n\t\tif (!handler && !is_get) {\n\t\t\treturn {\n\t\t\t\tstatus: 405,\n\t\t\t\terror: new Error(`${method} method not allowed`)\n\t\t\t};\n\t\t}\n\n\t\t\u002F** @type {import('types').ShadowData} *\u002F\n\t\tconst data = {\n\t\t\tstatus: 200,\n\t\t\tcookies: [],\n\t\t\tbody: {}\n\t\t};\n\n\t\tif (!is_get) {\n\t\t\tconst result = await handler(event);\n\n\t\t\t\u002F\u002F TODO remove for 1.0\n\t\t\t\u002F\u002F @ts-expect-error\n\t\t\tif (result.fallthrough) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'fallthrough is no longer supported. Use matchers instead: https:\u002F\u002Fkit.svelte.dev\u002Fdocs\u002Frouting#advanced-routing-matching'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst { status, headers, body } = validate_shadow_output(result);\n\t\t\tdata.status = status;\n\n\t\t\tadd_cookies(\u002F** @type {string[]} *\u002F (data.cookies), headers);\n\n\t\t\t\u002F\u002F Redirects are respected...\n\t\t\tif (status \u003E= 300 && status \u003C 400) {\n\t\t\t\tdata.redirect = \u002F** @type {string} *\u002F (\n\t\t\t\t\theaders instanceof Headers ? headers.get('location') : headers.location\n\t\t\t\t);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\t\u002F\u002F ...but 4xx and 5xx status codes _don't_ result in the error page\n\t\t\t\u002F\u002F rendering for non-GET requests — instead, we allow the page\n\t\t\t\u002F\u002F to render with any validation errors etc that were returned\n\t\t\tdata.body = body;\n\t\t}\n\n\t\tconst get = (method === 'head' && mod.head) || mod.get;\n\t\tif (get) {\n\t\t\tconst result = await get(event);\n\n\t\t\t\u002F\u002F TODO remove for 1.0\n\t\t\t\u002F\u002F @ts-expect-error\n\t\t\tif (result.fallthrough) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t'fallthrough is no longer supported. Use matchers instead: https:\u002F\u002Fkit.svelte.dev\u002Fdocs\u002Frouting#advanced-routing-matching'\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst { status, headers, body } = validate_shadow_output(result);\n\t\t\tadd_cookies(\u002F** @type {string[]} *\u002F (data.cookies), headers);\n\t\t\tdata.status = status;\n\n\t\t\tif (status \u003E= 400) {\n\t\t\t\tdata.error = new Error('Failed to load data');\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tif (status \u003E= 300) {\n\t\t\t\tdata.redirect = \u002F** @type {string} *\u002F (\n\t\t\t\t\theaders instanceof Headers ? headers.get('location') : headers.location\n\t\t\t\t);\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tdata.body = { ...body, ...data.body };\n\t\t}\n\n\t\treturn data;\n\t} catch (e) {\n\t\tconst error = coalesce_to_error(e);\n\t\toptions.handle_error(error, event);\n\n\t\treturn {\n\t\t\tstatus: 500,\n\t\t\terror\n\t\t};\n\t}\n}\n\n\u002F**\n * @param {string[]} target\n * @param {Partial\u003Cimport('types').ResponseHeaders\u003E} headers\n *\u002F\nfunction add_cookies(target, headers) {\n\tconst cookies = headers['set-cookie'];\n\tif (cookies) {\n\t\tif (Array.isArray(cookies)) {\n\t\t\ttarget.push(...cookies);\n\t\t} else {\n\t\t\ttarget.push(\u002F** @type {string} *\u002F (cookies));\n\t\t}\n\t}\n}\n\n\u002F**\n * @param {import('types').ShadowEndpointOutput} result\n *\u002F\nfunction validate_shadow_output(result) {\n\tconst { status = 200, body = {} } = result;\n\tlet headers = result.headers || {};\n\n\tif (headers instanceof Headers) {\n\t\tif (headers.has('set-cookie')) {\n\t\t\tthrow new Error(\n\t\t\t\t'Endpoint request handler cannot use Headers interface with Set-Cookie headers'\n\t\t\t);\n\t\t}\n\t} else {\n\t\theaders = lowercase_keys(\u002F** @type {Record\u003Cstring, string\u003E} *\u002F (headers));\n\t}\n\n\tif (!is_pojo(body)) {\n\t\tthrow new Error('Body returned from endpoint request handler must be a plain object');\n\t}\n\n\treturn { status, headers, body };\n}\n\n\u002F**\n * @typedef {import('.\u002Ftypes.js').Loaded} Loaded\n * @typedef {import('types').SSROptions} SSROptions\n * @typedef {import('types').SSRState} SSRState\n *\u002F\n\n\u002F**\n * @param {{\n * event: import('types').RequestEvent;\n * options: SSROptions;\n * state: SSRState;\n * $session: any;\n * status: number;\n * error: Error;\n * resolve_opts: import('types').RequiredResolveOptions;\n * }} opts\n *\u002F\nasync function respond_with_error({\n\tevent,\n\toptions,\n\tstate,\n\t$session,\n\tstatus,\n\terror,\n\tresolve_opts\n}) {\n\ttry {\n\t\tconst branch = [];\n\t\tlet stuff = {};\n\n\t\tif (resolve_opts.ssr) {\n\t\t\tconst default_layout = await options.manifest._.nodes[0](); \u002F\u002F 0 is always the root layout\n\t\t\tconst default_error = await options.manifest._.nodes[1](); \u002F\u002F 1 is always the root error\n\n\t\t\tconst layout_loaded = \u002F** @type {Loaded} *\u002F (\n\t\t\t\tawait load_node({\n\t\t\t\t\tevent,\n\t\t\t\t\toptions,\n\t\t\t\t\tstate,\n\t\t\t\t\troute: null,\n\t\t\t\t\tnode: default_layout,\n\t\t\t\t\t$session,\n\t\t\t\t\tstuff: {},\n\t\t\t\t\tis_error: false,\n\t\t\t\t\tis_leaf: false\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tconst error_loaded = \u002F** @type {Loaded} *\u002F (\n\t\t\t\tawait load_node({\n\t\t\t\t\tevent,\n\t\t\t\t\toptions,\n\t\t\t\t\tstate,\n\t\t\t\t\troute: null,\n\t\t\t\t\tnode: default_error,\n\t\t\t\t\t$session,\n\t\t\t\t\tstuff: layout_loaded ? layout_loaded.stuff : {},\n\t\t\t\t\tis_error: true,\n\t\t\t\t\tis_leaf: false,\n\t\t\t\t\tstatus,\n\t\t\t\t\terror\n\t\t\t\t})\n\t\t\t);\n\n\t\t\tbranch.push(layout_loaded, error_loaded);\n\t\t\tstuff = error_loaded.stuff;\n\t\t}\n\n\t\treturn await render_response({\n\t\t\toptions,\n\t\t\tstate,\n\t\t\t$session,\n\t\t\tpage_config: {\n\t\t\t\thydrate: options.hydrate,\n\t\t\t\trouter: options.router\n\t\t\t},\n\t\t\tstuff,\n\t\t\tstatus,\n\t\t\terror,\n\t\t\tbranch,\n\t\t\tevent,\n\t\t\tresolve_opts\n\t\t});\n\t} catch (err) {\n\t\tconst error = coalesce_to_error(err);\n\n\t\toptions.handle_error(error, event);\n\n\t\treturn new Response(error.stack, {\n\t\t\tstatus: 500\n\t\t});\n\t}\n}\n\n\u002F**\n * @typedef {import('.\u002Ftypes.js').Loaded} Loaded\n * @typedef {import('types').SSRNode} SSRNode\n * @typedef {import('types').SSROptions} SSROptions\n * @typedef {import('types').SSRState} SSRState\n *\u002F\n\n\u002F**\n * @param {{\n * event: import('types').RequestEvent;\n * options: SSROptions;\n * state: SSRState;\n * $session: any;\n * resolve_opts: import('types').RequiredResolveOptions;\n * route: import('types').SSRPage;\n * }} opts\n * @returns {Promise\u003CResponse\u003E}\n *\u002F\nasync function respond$1(opts) {\n\tconst { event, options, state, $session, route, resolve_opts } = opts;\n\n\t\u002F** @type {Array\u003CSSRNode | undefined\u003E} *\u002F\n\tlet nodes;\n\n\tif (!resolve_opts.ssr) {\n\t\treturn await render_response({\n\t\t\t...opts,\n\t\t\tbranch: [],\n\t\t\tpage_config: {\n\t\t\t\thydrate: true,\n\t\t\t\trouter: true\n\t\t\t},\n\t\t\tstatus: 200,\n\t\t\terror: null,\n\t\t\tevent,\n\t\t\tstuff: {}\n\t\t});\n\t}\n\n\ttry {\n\t\tnodes = await Promise.all(\n\t\t\t\u002F\u002F we use == here rather than === because [undefined] serializes as \"[null]\"\n\t\t\troute.a.map((n) =\u003E (n == undefined ? n : options.manifest._.nodes[n]()))\n\t\t);\n\t} catch (err) {\n\t\tconst error = coalesce_to_error(err);\n\n\t\toptions.handle_error(error, event);\n\n\t\treturn await respond_with_error({\n\t\t\tevent,\n\t\t\toptions,\n\t\t\tstate,\n\t\t\t$session,\n\t\t\tstatus: 500,\n\t\t\terror,\n\t\t\tresolve_opts\n\t\t});\n\t}\n\n\t\u002F\u002F the leaf node will be present. only layouts may be undefined\n\tconst leaf = \u002F** @type {SSRNode} *\u002F (nodes[nodes.length - 1]).module;\n\n\tlet page_config = get_page_config(leaf, options);\n\n\tif (state.prerender) {\n\t\t\u002F\u002F if the page isn't marked as prerenderable (or is explicitly\n\t\t\u002F\u002F marked NOT prerenderable, if `prerender.default` is `true`),\n\t\t\u002F\u002F then bail out at this point\n\t\tconst should_prerender = leaf.prerender ?? state.prerender.default;\n\t\tif (!should_prerender) {\n\t\t\treturn new Response(undefined, {\n\t\t\t\tstatus: 204\n\t\t\t});\n\t\t}\n\t}\n\n\t\u002F** @type {Array\u003CLoaded\u003E} *\u002F\n\tlet branch = [];\n\n\t\u002F** @type {number} *\u002F\n\tlet status = 200;\n\n\t\u002F** @type {Error | null} *\u002F\n\tlet error = null;\n\n\t\u002F** @type {string[]} *\u002F\n\tlet set_cookie_headers = [];\n\n\tlet stuff = {};\n\n\tssr: {\n\t\tfor (let i = 0; i \u003C nodes.length; i += 1) {\n\t\t\tconst node = nodes[i];\n\n\t\t\t\u002F** @type {Loaded | undefined} *\u002F\n\t\t\tlet loaded;\n\n\t\t\tif (node) {\n\t\t\t\ttry {\n\t\t\t\t\tloaded = await load_node({\n\t\t\t\t\t\t...opts,\n\t\t\t\t\t\tnode,\n\t\t\t\t\t\tstuff,\n\t\t\t\t\t\tis_error: false,\n\t\t\t\t\t\tis_leaf: i === nodes.length - 1\n\t\t\t\t\t});\n\n\t\t\t\t\tset_cookie_headers = set_cookie_headers.concat(loaded.set_cookie_headers);\n\n\t\t\t\t\tif (loaded.loaded.redirect) {\n\t\t\t\t\t\treturn with_cookies(\n\t\t\t\t\t\t\tnew Response(undefined, {\n\t\t\t\t\t\t\t\tstatus: loaded.loaded.status,\n\t\t\t\t\t\t\t\theaders: {\n\t\t\t\t\t\t\t\t\tlocation: loaded.loaded.redirect\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\tset_cookie_headers\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (loaded.loaded.error) {\n\t\t\t\t\t\t({ status, error } = loaded.loaded);\n\t\t\t\t\t}\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconst e = coalesce_to_error(err);\n\n\t\t\t\t\toptions.handle_error(e, event);\n\n\t\t\t\t\tstatus = 500;\n\t\t\t\t\terror = e;\n\t\t\t\t}\n\n\t\t\t\tif (loaded && !error) {\n\t\t\t\t\tbranch.push(loaded);\n\t\t\t\t}\n\n\t\t\t\tif (error) {\n\t\t\t\t\twhile (i--) {\n\t\t\t\t\t\tif (route.b[i]) {\n\t\t\t\t\t\t\tconst index = \u002F** @type {number} *\u002F (route.b[i]);\n\t\t\t\t\t\t\tconst error_node = await options.manifest._.nodes[index]();\n\n\t\t\t\t\t\t\t\u002F** @type {Loaded} *\u002F\n\t\t\t\t\t\t\tlet node_loaded;\n\t\t\t\t\t\t\tlet j = i;\n\t\t\t\t\t\t\twhile (!(node_loaded = branch[j])) {\n\t\t\t\t\t\t\t\tj -= 1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tconst error_loaded = \u002F** @type {import('.\u002Ftypes').Loaded} *\u002F (\n\t\t\t\t\t\t\t\t\tawait load_node({\n\t\t\t\t\t\t\t\t\t\t...opts,\n\t\t\t\t\t\t\t\t\t\tnode: error_node,\n\t\t\t\t\t\t\t\t\t\tstuff: node_loaded.stuff,\n\t\t\t\t\t\t\t\t\t\tis_error: true,\n\t\t\t\t\t\t\t\t\t\tis_leaf: false,\n\t\t\t\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\t\t\t\terror\n\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif (error_loaded.loaded.error) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpage_config = get_page_config(error_node.module, options);\n\t\t\t\t\t\t\t\tbranch = branch.slice(0, j + 1).concat(error_loaded);\n\t\t\t\t\t\t\t\tstuff = { ...node_loaded.stuff, ...error_loaded.stuff };\n\t\t\t\t\t\t\t\tbreak ssr;\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\tconst e = coalesce_to_error(err);\n\n\t\t\t\t\t\t\t\toptions.handle_error(e, event);\n\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t\u002F\u002F TODO backtrack until we find an __error.svelte component\n\t\t\t\t\t\u002F\u002F that we can use as the leaf node\n\t\t\t\t\t\u002F\u002F for now just return regular error page\n\t\t\t\t\treturn with_cookies(\n\t\t\t\t\t\tawait respond_with_error({\n\t\t\t\t\t\t\tevent,\n\t\t\t\t\t\t\toptions,\n\t\t\t\t\t\t\tstate,\n\t\t\t\t\t\t\t$session,\n\t\t\t\t\t\t\tstatus,\n\t\t\t\t\t\t\terror,\n\t\t\t\t\t\t\tresolve_opts\n\t\t\t\t\t\t}),\n\t\t\t\t\t\tset_cookie_headers\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (loaded && loaded.loaded.stuff) {\n\t\t\t\tstuff = {\n\t\t\t\t\t...stuff,\n\t\t\t\t\t...loaded.loaded.stuff\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\ttry {\n\t\treturn with_cookies(\n\t\t\tawait render_response({\n\t\t\t\t...opts,\n\t\t\t\tstuff,\n\t\t\t\tevent,\n\t\t\t\tpage_config,\n\t\t\t\tstatus,\n\t\t\t\terror,\n\t\t\t\tbranch: branch.filter(Boolean)\n\t\t\t}),\n\t\t\tset_cookie_headers\n\t\t);\n\t} catch (err) {\n\t\tconst error = coalesce_to_error(err);\n\n\t\toptions.handle_error(error, event);\n\n\t\treturn with_cookies(\n\t\t\tawait respond_with_error({\n\t\t\t\t...opts,\n\t\t\t\tstatus: 500,\n\t\t\t\terror\n\t\t\t}),\n\t\t\tset_cookie_headers\n\t\t);\n\t}\n}\n\n\u002F**\n * @param {import('types').SSRComponent} leaf\n * @param {SSROptions} options\n *\u002F\nfunction get_page_config(leaf, options) {\n\t\u002F\u002F TODO remove for 1.0\n\tif ('ssr' in leaf) {\n\t\tthrow new Error(\n\t\t\t'`export const ssr` has been removed — use the handle hook instead: https:\u002F\u002Fkit.svelte.dev\u002Fdocs\u002Fhooks#handle'\n\t\t);\n\t}\n\n\treturn {\n\t\trouter: 'router' in leaf ? !!leaf.router : options.router,\n\t\thydrate: 'hydrate' in leaf ? !!leaf.hydrate : options.hydrate\n\t};\n}\n\n\u002F**\n * @param {Response} response\n * @param {string[]} set_cookie_headers\n *\u002F\nfunction with_cookies(response, set_cookie_headers) {\n\tif (set_cookie_headers.length) {\n\t\tset_cookie_headers.forEach((value) =\u003E {\n\t\t\tresponse.headers.append('set-cookie', value);\n\t\t});\n\t}\n\treturn response;\n}\n\n\u002F**\n * @param {import('types').RequestEvent} event\n * @param {import('types').SSRPage} route\n * @param {import('types').SSROptions} options\n * @param {import('types').SSRState} state\n * @param {import('types').RequiredResolveOptions} resolve_opts\n * @returns {Promise\u003CResponse\u003E}\n *\u002F\nasync function render_page(event, route, options, state, resolve_opts) {\n\tif (state.initiator === route) {\n\t\t\u002F\u002F infinite request cycle detected\n\t\treturn new Response(`Not found: ${event.url.pathname}`, {\n\t\t\tstatus: 404\n\t\t});\n\t}\n\n\tif (route.shadow) {\n\t\tconst type = negotiate(event.request.headers.get('accept') || 'text\u002Fhtml', [\n\t\t\t'text\u002Fhtml',\n\t\t\t'application\u002Fjson'\n\t\t]);\n\n\t\tif (type === 'application\u002Fjson') {\n\t\t\treturn render_endpoint(event, await route.shadow());\n\t\t}\n\t}\n\n\tconst $session = await options.hooks.getSession(event);\n\n\treturn respond$1({\n\t\tevent,\n\t\toptions,\n\t\tstate,\n\t\t$session,\n\t\tresolve_opts,\n\t\troute\n\t});\n}\n\n\u002F**\n * @param {string} accept\n * @param {string[]} types\n *\u002F\nfunction negotiate(accept, types) {\n\tconst parts = accept\n\t\t.split(',')\n\t\t.map((str, i) =\u003E {\n\t\t\tconst match = \u002F([^\u002F]+)\\\u002F([^;]+)(?:;q=([0-9.]+))?\u002F.exec(str);\n\t\t\tif (match) {\n\t\t\t\tconst [, type, subtype, q = '1'] = match;\n\t\t\t\treturn { type, subtype, q: +q, i };\n\t\t\t}\n\n\t\t\tthrow new Error(`Invalid Accept header: ${accept}`);\n\t\t})\n\t\t.sort((a, b) =\u003E {\n\t\t\tif (a.q !== b.q) {\n\t\t\t\treturn b.q - a.q;\n\t\t\t}\n\n\t\t\tif ((a.subtype === '*') !== (b.subtype === '*')) {\n\t\t\t\treturn a.subtype === '*' ? 1 : -1;\n\t\t\t}\n\n\t\t\tif ((a.type === '*') !== (b.type === '*')) {\n\t\t\t\treturn a.type === '*' ? 1 : -1;\n\t\t\t}\n\n\t\t\treturn a.i - b.i;\n\t\t});\n\n\tlet accepted;\n\tlet min_priority = Infinity;\n\n\tfor (const mimetype of types) {\n\t\tconst [type, subtype] = mimetype.split('\u002F');\n\t\tconst priority = parts.findIndex(\n\t\t\t(part) =\u003E\n\t\t\t\t(part.type === type || part.type === '*') &&\n\t\t\t\t(part.subtype === subtype || part.subtype === '*')\n\t\t);\n\n\t\tif (priority !== -1 && priority \u003C min_priority) {\n\t\t\taccepted = mimetype;\n\t\t\tmin_priority = priority;\n\t\t}\n\t}\n\n\treturn accepted;\n}\n\n\u002F**\n * @param {RegExpMatchArray} match\n * @param {string[]} names\n * @param {string[]} types\n * @param {Record\u003Cstring, import('types').ParamMatcher\u003E} matchers\n *\u002F\nfunction exec(match, names, types, matchers) {\n\t\u002F** @type {Record\u003Cstring, string\u003E} *\u002F\n\tconst params = {};\n\n\tfor (let i = 0; i \u003C names.length; i += 1) {\n\t\tconst name = names[i];\n\t\tconst type = types[i];\n\t\tconst value = match[i + 1] || '';\n\n\t\tif (type) {\n\t\t\tconst matcher = matchers[type];\n\t\t\tif (!matcher) throw new Error(`Missing \"${type}\" param matcher`); \u002F\u002F TODO do this ahead of time?\n\n\t\t\tif (!matcher(value)) return;\n\t\t}\n\n\t\tparams[name] = value;\n\t}\n\n\treturn params;\n}\n\nconst DATA_SUFFIX = '\u002F__data.json';\n\n\u002F** @param {{ html: string }} opts *\u002F\nconst default_transform = ({ html }) =\u003E html;\n\n\u002F** @type {import('types').Respond} *\u002F\nasync function respond(request, options, state) {\n\tlet url = new URL(request.url);\n\n\tconst { parameter, allowed } = options.method_override;\n\tconst method_override = url.searchParams.get(parameter)?.toUpperCase();\n\n\tif (method_override) {\n\t\tif (request.method === 'POST') {\n\t\t\tif (allowed.includes(method_override)) {\n\t\t\t\trequest = new Proxy(request, {\n\t\t\t\t\tget: (target, property, _receiver) =\u003E {\n\t\t\t\t\t\tif (property === 'method') return method_override;\n\t\t\t\t\t\treturn Reflect.get(target, property, target);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst verb = allowed.length === 0 ? 'enabled' : 'allowed';\n\t\t\t\tconst body = `${parameter}=${method_override} is not ${verb}. See https:\u002F\u002Fkit.svelte.dev\u002Fdocs\u002Fconfiguration#methodoverride`;\n\n\t\t\t\treturn new Response(body, {\n\t\t\t\t\tstatus: 400\n\t\t\t\t});\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new Error(`${parameter}=${method_override} is only allowed with POST requests`);\n\t\t}\n\t}\n\n\tlet decoded = decodeURI(url.pathname);\n\n\t\u002F** @type {import('types').SSRRoute | null} *\u002F\n\tlet route = null;\n\n\t\u002F** @type {Record\u003Cstring, string\u003E} *\u002F\n\tlet params = {};\n\n\tif (options.paths.base && !state.prerender?.fallback) {\n\t\tif (!decoded.startsWith(options.paths.base)) {\n\t\t\treturn new Response(undefined, { status: 404 });\n\t\t}\n\t\tdecoded = decoded.slice(options.paths.base.length) || '\u002F';\n\t}\n\n\tconst is_data_request = decoded.endsWith(DATA_SUFFIX);\n\n\tif (is_data_request) {\n\t\tdecoded = decoded.slice(0, -DATA_SUFFIX.length) || '\u002F';\n\t\turl = new URL(url.origin + url.pathname.slice(0, -DATA_SUFFIX.length) + url.search);\n\t}\n\n\tif (!state.prerender || !state.prerender.fallback) {\n\t\tconst matchers = await options.manifest._.matchers();\n\n\t\tfor (const candidate of options.manifest._.routes) {\n\t\t\tconst match = candidate.pattern.exec(decoded);\n\t\t\tif (!match) continue;\n\n\t\t\tconst matched = exec(match, candidate.names, candidate.types, matchers);\n\t\t\tif (matched) {\n\t\t\t\troute = candidate;\n\t\t\t\tparams = decode_params(matched);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (route?.type === 'page') {\n\t\tconst normalized = normalize_path(url.pathname, options.trailing_slash);\n\n\t\tif (normalized !== url.pathname && !state.prerender?.fallback) {\n\t\t\treturn new Response(undefined, {\n\t\t\t\tstatus: 301,\n\t\t\t\theaders: {\n\t\t\t\t\t'x-sveltekit-normalize': '1',\n\t\t\t\t\tlocation:\n\t\t\t\t\t\t\u002F\u002F ensure paths starting with '\u002F\u002F' are not treated as protocol-relative\n\t\t\t\t\t\t(normalized.startsWith('\u002F\u002F') ? url.origin + normalized : normalized) +\n\t\t\t\t\t\t(url.search === '?' ? '' : url.search)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t\u002F** @type {import('types').RequestEvent} *\u002F\n\tconst event = {\n\t\tget clientAddress() {\n\t\t\tif (!state.getClientAddress) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`${\n\t\t\t\t\t\timport.meta.env.VITE_SVELTEKIT_ADAPTER_NAME\n\t\t\t\t\t} does not specify getClientAddress. Please raise an issue`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tObject.defineProperty(event, 'clientAddress', {\n\t\t\t\tvalue: state.getClientAddress()\n\t\t\t});\n\n\t\t\treturn event.clientAddress;\n\t\t},\n\t\tlocals: {},\n\t\tparams,\n\t\tplatform: state.platform,\n\t\trequest,\n\t\trouteId: route && route.id,\n\t\turl\n\t};\n\n\t\u002F\u002F TODO remove this for 1.0\n\t\u002F**\n\t * @param {string} property\n\t * @param {string} replacement\n\t * @param {string} suffix\n\t *\u002F\n\tconst removed = (property, replacement, suffix = '') =\u003E ({\n\t\tget: () =\u003E {\n\t\t\tthrow new Error(`event.${property} has been replaced by event.${replacement}` + suffix);\n\t\t}\n\t});\n\n\tconst details = '. See https:\u002F\u002Fgithub.com\u002Fsveltejs\u002Fkit\u002Fpull\u002F3384 for details';\n\n\tconst body_getter = {\n\t\tget: () =\u003E {\n\t\t\tthrow new Error(\n\t\t\t\t'To access the request body use the text\u002Fjson\u002FarrayBuffer\u002FformData methods, e.g. `body = await request.json()`' +\n\t\t\t\t\tdetails\n\t\t\t);\n\t\t}\n\t};\n\n\tObject.defineProperties(event, {\n\t\tmethod: removed('method', 'request.method', details),\n\t\theaders: removed('headers', 'request.headers', details),\n\t\torigin: removed('origin', 'url.origin'),\n\t\tpath: removed('path', 'url.pathname'),\n\t\tquery: removed('query', 'url.searchParams'),\n\t\tbody: body_getter,\n\t\trawBody: body_getter\n\t});\n\n\t\u002F** @type {import('types').RequiredResolveOptions} *\u002F\n\tlet resolve_opts = {\n\t\tssr: true,\n\t\ttransformPage: default_transform\n\t};\n\n\t\u002F\u002F TODO match route before calling handle?\n\n\ttry {\n\t\tconst response = await options.hooks.handle({\n\t\t\tevent,\n\t\t\tresolve: async (event, opts) =\u003E {\n\t\t\t\tif (opts) {\n\t\t\t\t\tresolve_opts = {\n\t\t\t\t\t\tssr: opts.ssr !== false,\n\t\t\t\t\t\ttransformPage: opts.transformPage || default_transform\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (state.prerender && state.prerender.fallback) {\n\t\t\t\t\treturn await render_response({\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\tstate,\n\t\t\t\t\t\t$session: await options.hooks.getSession(event),\n\t\t\t\t\t\tpage_config: { router: true, hydrate: true },\n\t\t\t\t\t\tstuff: {},\n\t\t\t\t\t\tstatus: 200,\n\t\t\t\t\t\terror: null,\n\t\t\t\t\t\tbranch: [],\n\t\t\t\t\t\tresolve_opts: {\n\t\t\t\t\t\t\t...resolve_opts,\n\t\t\t\t\t\t\tssr: false\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (route) {\n\t\t\t\t\t\u002F** @type {Response} *\u002F\n\t\t\t\t\tlet response;\n\n\t\t\t\t\tif (is_data_request && route.type === 'page' && route.shadow) {\n\t\t\t\t\t\tresponse = await render_endpoint(event, await route.shadow());\n\n\t\t\t\t\t\t\u002F\u002F loading data for a client-side transition is a special case\n\t\t\t\t\t\tif (request.headers.has('x-sveltekit-load')) {\n\t\t\t\t\t\t\t\u002F\u002F since redirects are opaque to the browser, we need to repackage\n\t\t\t\t\t\t\t\u002F\u002F 3xx responses as 200s with a custom header\n\t\t\t\t\t\t\tif (response.status \u003E= 300 && response.status \u003C 400) {\n\t\t\t\t\t\t\t\tconst location = response.headers.get('location');\n\n\t\t\t\t\t\t\t\tif (location) {\n\t\t\t\t\t\t\t\t\tconst headers = new Headers(response.headers);\n\t\t\t\t\t\t\t\t\theaders.set('x-sveltekit-location', location);\n\t\t\t\t\t\t\t\t\tresponse = new Response(undefined, {\n\t\t\t\t\t\t\t\t\t\tstatus: 204,\n\t\t\t\t\t\t\t\t\t\theaders\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}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresponse =\n\t\t\t\t\t\t\troute.type === 'endpoint'\n\t\t\t\t\t\t\t\t? await render_endpoint(event, await route.load())\n\t\t\t\t\t\t\t\t: await render_page(event, route, options, state, resolve_opts);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (response) {\n\t\t\t\t\t\t\u002F\u002F respond with 304 if etag matches\n\t\t\t\t\t\tif (response.status === 200 && response.headers.has('etag')) {\n\t\t\t\t\t\t\tlet if_none_match_value = request.headers.get('if-none-match');\n\n\t\t\t\t\t\t\t\u002F\u002F ignore W\u002F prefix https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FHTTP\u002FHeaders\u002FIf-None-Match#directives\n\t\t\t\t\t\t\tif (if_none_match_value?.startsWith('W\u002F\"')) {\n\t\t\t\t\t\t\t\tif_none_match_value = if_none_match_value.substring(2);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst etag = \u002F** @type {string} *\u002F (response.headers.get('etag'));\n\n\t\t\t\t\t\t\tif (if_none_match_value === etag) {\n\t\t\t\t\t\t\t\tconst headers = new Headers({ etag });\n\n\t\t\t\t\t\t\t\t\u002F\u002F https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc7232#section-4.1\n\t\t\t\t\t\t\t\tfor (const key of [\n\t\t\t\t\t\t\t\t\t'cache-control',\n\t\t\t\t\t\t\t\t\t'content-location',\n\t\t\t\t\t\t\t\t\t'date',\n\t\t\t\t\t\t\t\t\t'expires',\n\t\t\t\t\t\t\t\t\t'vary'\n\t\t\t\t\t\t\t\t]) {\n\t\t\t\t\t\t\t\t\tconst value = response.headers.get(key);\n\t\t\t\t\t\t\t\t\tif (value) headers.set(key, value);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\treturn new Response(undefined, {\n\t\t\t\t\t\t\t\t\tstatus: 304,\n\t\t\t\t\t\t\t\t\theaders\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn response;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\u002F\u002F if this request came direct from the user, rather than\n\t\t\t\t\u002F\u002F via a `fetch` in a `load`, render a 404 page\n\t\t\t\tif (!state.initiator) {\n\t\t\t\t\tconst $session = await options.hooks.getSession(event);\n\t\t\t\t\treturn await respond_with_error({\n\t\t\t\t\t\tevent,\n\t\t\t\t\t\toptions,\n\t\t\t\t\t\tstate,\n\t\t\t\t\t\t$session,\n\t\t\t\t\t\tstatus: 404,\n\t\t\t\t\t\terror: new Error(`Not found: ${event.url.pathname}`),\n\t\t\t\t\t\tresolve_opts\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif (state.prerender) {\n\t\t\t\t\treturn new Response('not found', { status: 404 });\n\t\t\t\t}\n\n\t\t\t\t\u002F\u002F we can't load the endpoint from our own manifest,\n\t\t\t\t\u002F\u002F so we need to make an actual HTTP request\n\t\t\t\treturn await fetch(request);\n\t\t\t},\n\n\t\t\t\u002F\u002F TODO remove for 1.0\n\t\t\t\u002F\u002F @ts-expect-error\n\t\t\tget request() {\n\t\t\t\tthrow new Error('request in handle has been replaced with event' + details);\n\t\t\t}\n\t\t});\n\n\t\t\u002F\u002F TODO for 1.0, change the error message to point to docs rather than PR\n\t\tif (response && !(response instanceof Response)) {\n\t\t\tthrow new Error('handle must return a Response object' + details);\n\t\t}\n\n\t\treturn response;\n\t} catch (\u002F** @type {unknown} *\u002F e) {\n\t\tconst error = coalesce_to_error(e);\n\n\t\toptions.handle_error(error, event);\n\n\t\ttry {\n\t\t\tconst $session = await options.hooks.getSession(event);\n\t\t\treturn await respond_with_error({\n\t\t\t\tevent,\n\t\t\t\toptions,\n\t\t\t\tstate,\n\t\t\t\t$session,\n\t\t\t\tstatus: 500,\n\t\t\t\terror,\n\t\t\t\tresolve_opts\n\t\t\t});\n\t\t} catch (\u002F** @type {unknown} *\u002F e) {\n\t\t\tconst error = coalesce_to_error(e);\n\n\t\t\treturn new Response(options.dev ? error.stack : error.message, {\n\t\t\t\tstatus: 500\n\t\t\t});\n\t\t}\n\t}\n}\n\nexport { respond };\n","directory_shortid":"xL96E","id":"3f40f1bf-7a0e-405c-afd8-751f09dbda42","inserted_at":"2022-01-30T16:18:04","is_binary":null,"sha":null,"shortid":"yDnBE","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"index.js","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { Load as GenericLoad } from '@sveltejs\u002Fkit';\n\nexport type Load\u003C\n\tInputProps extends Record\u003Cstring, any\u003E = Record\u003Cstring, any\u003E,\n\tOutputProps extends Record\u003Cstring, any\u003E = InputProps\n\u003E = GenericLoad\u003C{}, InputProps, OutputProps\u003E;","directory_shortid":"8Em9r","id":"9f5a59af-7e39-4034-af71-a460b9463a59","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"QOYm0","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"index.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { Load as GenericLoad } from '@sveltejs\u002Fkit';\n\nexport type Load\u003C\n\tInputProps extends Record\u003Cstring, any\u003E = Record\u003Cstring, any\u003E,\n\tOutputProps extends Record\u003Cstring, any\u003E = InputProps\n\u003E = GenericLoad\u003C{}, InputProps, OutputProps\u003E;","directory_shortid":"Wv1AQ","id":"038a0392-42b8-41f7-afcf-e3dd6ba5a678","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"3E43R","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"third-post.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { Load as GenericLoad } from '@sveltejs\u002Fkit';\n\nexport type Load\u003C\n\tInputProps extends Record\u003Cstring, any\u003E = Record\u003Cstring, any\u003E,\n\tOutputProps extends Record\u003Cstring, any\u003E = InputProps\n\u003E = GenericLoad\u003C{}, InputProps, OutputProps\u003E;","directory_shortid":"Wv1AQ","id":"c59a5816-fcec-4ca8-95b6-ff8cbec5d8f1","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"RrVQR","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"second-post.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"{\n\t\"compilerOptions\": {\n\t\t\"baseUrl\": \"..\",\n\t\t\"paths\": {\n\t\t\t\"$lib\": [\n\t\t\t\t\"src\u002Flib\"\n\t\t\t],\n\t\t\t\"$lib\u002F*\": [\n\t\t\t\t\"src\u002Flib\u002F*\"\n\t\t\t]\n\t\t},\n\t\t\"rootDirs\": [\n\t\t\t\"..\",\n\t\t\t\".\u002Ftypes\"\n\t\t],\n\t\t\"importsNotUsedAsValues\": \"error\",\n\t\t\"isolatedModules\": true,\n\t\t\"preserveValueImports\": true,\n\t\t\"lib\": [\n\t\t\t\"esnext\",\n\t\t\t\"DOM\"\n\t\t],\n\t\t\"moduleResolution\": \"node\",\n\t\t\"module\": \"esnext\",\n\t\t\"target\": \"esnext\"\n\t},\n\t\"include\": [\n\t\t\"..\u002Fsrc\u002F**\u002F*.js\",\n\t\t\"..\u002Fsrc\u002F**\u002F*.ts\",\n\t\t\"..\u002Fsrc\u002F**\u002F*.svelte\"\n\t],\n\t\"exclude\": [\n\t\t\"..\u002Fnode_modules\u002F**\",\n\t\t\".\u002F**\"\n\t]\n}","directory_shortid":"wkJJX","id":"ba5dece4-e22d-4a35-a928-f76b85658499","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"z5rgZ","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"tsconfig.json","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"export { matchers } from '.\u002Fclient-matchers.js';\n\nexport const components = [\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002F__layout.svelte\"),\n\t() =\u003E import(\"..\u002Fruntime\u002Fcomponents\u002Ferror.svelte\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Findex.svelte\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Fpost\u002Fmy-first-post.svx\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Fpost\u002Fsecond-post.svx\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Fblog\u002Fpost\u002Fthird-post.svx\"),\n\t() =\u003E import(\"..\u002F..\u002Fsrc\u002Froutes\u002Findex.svelte\")\n];\n\nexport const dictionary = {\n\t\"\": [[0, 6], [1]],\n\t\"blog\": [[0, 2], [1]],\n\t\"blog\u002Fpost\u002Fmy-first-post\": [[0, 3], [1]],\n\t\"blog\u002Fpost\u002Fsecond-post\": [[0, 4], [1]],\n\t\"blog\u002Fpost\u002Fthird-post\": [[0, 5], [1]]\n};","directory_shortid":"Zp35E","id":"768e6679-928f-4c6a-b2fa-af657e658084","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"lmjxj","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"client-manifest.js","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"\u002F\u002F this file is auto-generated\nimport type { Load as GenericLoad } from '@sveltejs\u002Fkit';\n\nexport type Load\u003C\n\tInputProps extends Record\u003Cstring, any\u003E = Record\u003Cstring, any\u003E,\n\tOutputProps extends Record\u003Cstring, any\u003E = InputProps\n\u003E = GenericLoad\u003C{}, InputProps, OutputProps\u003E;","directory_shortid":"Wv1AQ","id":"c15d400e-6e54-4e95-aecf-ef4a8f9db1a4","inserted_at":"2022-05-24T14:34:27","is_binary":null,"sha":null,"shortid":"Vy1GX","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"my-first-post.d.ts","updated_at":"2022-05-24T14:34:39","upload_id":null},{"code":"{\n\t\"name\": \"mdsvex-blog\",\n\t\"version\": \"0.0.1\",\n\t\"scripts\": {\n\t\t\"dev\": \"svelte-kit dev\",\n\t\t\"build\": \"svelte-kit build\",\n\t\t\"preview\": \"svelte-kit preview\",\n\t\t\"check\": \"svelte-check --tsconfig .\u002Ftsconfig.json\",\n\t\t\"check:watch\": \"svelte-check --tsconfig .\u002Ftsconfig.json --watch\",\n\t\t\"lint\": \"prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .\",\n\t\t\"format\": \"prettier --write --plugin-search-dir=. .\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@sveltejs\u002Fadapter-vercel\": \"latest\",\n\t\t\"@sveltejs\u002Fapp-utils\": \"latest\",\n\t\t\"@sveltejs\u002Fkit\": \"latest\",\n\t\t\"@tsconfig\u002Fsvelte\": \"latest\",\n\t\t\"@typescript-eslint\u002Feslint-plugin\": \"^4.19.0\",\n\t\t\"@typescript-eslint\u002Fparser\": \"^4.19.0\",\n\t\t\"autoprefixer\": \"^10.2.5\",\n\t\t\"cssnano\": \"5.0.6\",\n\t\t\"eslint\": \"^7.22.0\",\n\t\t\"eslint-config-prettier\": \"^8.1.0\",\n\t\t\"eslint-plugin-svelte3\": \"latest\",\n\t\t\"postcss\": \"latest\",\n\t\t\"postcss-load-config\": \"^3.0.1\",\n\t\t\"prettier\": \"~2.2.1\",\n\t\t\"prettier-plugin-svelte\": \"^2.2.0\",\n\t\t\"svelte\": \"latest\",\n\t\t\"svelte-check\": \"latest\",\n\t\t\"svelte-preprocess\": \"latest\",\n\t\t\"tailwindcss\": \"2.1.2\",\n\t\t\"tslib\": \"2.0.0\",\n\t\t\"typescript\": \"4.3.4\",\n\t\t\"mdsvex\": \"0.9.8\"\n\t},\n\t\"type\": \"module\",\n\t\"dependencies\": {}\n}\n","directory_shortid":null,"id":"81b32673-ca69-4883-8ca6-b8a62c8fc8f9","inserted_at":"2021-08-30T18:38:58","is_binary":false,"sha":null,"shortid":"ZGQK6","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"package.json","updated_at":"2022-05-24T14:36:54","upload_id":null},{"code":"export { prerendering } from '..\u002Fenv.js';\n\n\u002F**\n * @type {import('$app\u002Fenv').browser}\n *\u002F\nconst browser = !import.meta.env.SSR;\n\u002F**\n * @type {import('$app\u002Fenv').dev}\n *\u002F\nconst dev = !!import.meta.env.DEV;\n\u002F**\n * @type {import('$app\u002Fenv').mode}\n *\u002F\nconst mode = import.meta.env.MODE;\n\u002F**\n * @type {import('$app\u002Fenv').amp}\n *\u002F\nconst amp = !!import.meta.env.VITE_SVELTEKIT_AMP;\n\nexport { amp, browser, dev, mode };\n","directory_shortid":"3Kq4","id":"910684b0-e809-427d-92aa-5043338fea82","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"QR7Pl","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"env.js","updated_at":"2022-05-29T09:48:14","upload_id":null},{"code":"let prerendering = false;\n\n\u002F** @param {boolean} value *\u002F\nfunction set_prerendering(value) {\n\tprerendering = value;\n}\n\nexport { prerendering, set_prerendering };\n","directory_shortid":"v8DAr","id":"895dda94-e531-4348-b036-5a4190b93993","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"kgRA6","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"env.js","updated_at":"2022-05-29T09:48:14","upload_id":null},{"code":"\u002F** @param {HTMLDocument} doc *\u002F\nfunction get_base_uri(doc) {\n\tlet baseURI = doc.baseURI;\n\n\tif (!baseURI) {\n\t\tconst baseTags = doc.getElementsByTagName('base');\n\t\tbaseURI = baseTags.length ? baseTags[0].href : doc.URL;\n\t}\n\n\treturn baseURI;\n}\n\nexport { get_base_uri as g };\n","directory_shortid":"EQmM4","id":"ebd51039-ef8a-4cad-9f31-42cf30ed975e","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"XY4xk","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"utils.js","updated_at":"2022-05-29T09:48:14","upload_id":null},{"code":"\u002F** @type {import('.\u002Frouter').Router?} *\u002F\nlet router;\n\n\u002F** @param {import('.\u002Frouter').Router?} _ *\u002F\nfunction init(_) {\n\trouter = _;\n}\n\nexport { init, router };\n","directory_shortid":"VoYv9","id":"77b31ad7-ccaf-4be4-9ad3-7ba5b60005de","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"1YB9Z","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"singletons.js","updated_at":"2022-05-29T09:48:14","upload_id":null},{"code":"import { router as router$1 } from '..\u002Finternal\u002Fsingletons.js';\nimport { g as get_base_uri } from '..\u002Fchunks\u002Futils.js';\n\nconst router = \u002F** @type {import('..\u002Fclient\u002Frouter').Router} *\u002F (router$1);\n\n\u002F**\n * @param {string} name\n *\u002F\nfunction guard(name) {\n\treturn () =\u003E {\n\t\tthrow new Error(`Cannot call ${name}(...) on the server`);\n\t};\n}\n\nconst goto = import.meta.env.SSR ? guard('goto') : goto_;\nconst invalidate = import.meta.env.SSR ? guard('invalidate') : invalidate_;\nconst prefetch = import.meta.env.SSR ? guard('prefetch') : prefetch_;\nconst prefetchRoutes = import.meta.env.SSR ? guard('prefetchRoutes') : prefetchRoutes_;\n\n\u002F**\n * @type {import('$app\u002Fnavigation').goto}\n *\u002F\nasync function goto_(href, opts) {\n\treturn router.goto(href, opts, []);\n}\n\n\u002F**\n * @type {import('$app\u002Fnavigation').invalidate}\n *\u002F\nasync function invalidate_(resource) {\n\tconst { href } = new URL(resource, location.href);\n\treturn router.renderer.invalidate(href);\n}\n\n\u002F**\n * @type {import('$app\u002Fnavigation').prefetch}\n *\u002F\nfunction prefetch_(href) {\n\treturn router.prefetch(new URL(href, get_base_uri(document)));\n}\n\n\u002F**\n * @type {import('$app\u002Fnavigation').prefetchRoutes}\n *\u002F\nasync function prefetchRoutes_(pathnames) {\n\tconst matching = pathnames\n\t\t? router.routes.filter((route) =\u003E pathnames.some((pathname) =\u003E route[0].test(pathname)))\n\t\t: router.routes;\n\n\tconst promises = matching\n\t\t.filter(\u002F** @returns {r is import('types\u002Finternal').CSRPage} *\u002F (r) =\u003E r && r.length \u003E 1)\n\t\t.map((r) =\u003E Promise.all(r[1].map((load) =\u003E load())));\n\n\tawait Promise.all(promises);\n}\n\nexport { goto, invalidate, prefetch, prefetchRoutes };\n","directory_shortid":"3Kq4","id":"4ffff01b-d2d7-4d49-ac23-40db6355f835","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"YrmRK","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"navigation.js","updated_at":"2022-05-29T09:48:14","upload_id":null},{"code":"\u002F** @type {string} *\u002F\nlet base = '';\n\n\u002F** @type {string} *\u002F\nlet assets = '';\n\n\u002F** @param {{ base: string, assets: string }} paths *\u002F\nfunction set_paths(paths) {\n\tbase = paths.base;\n\tassets = paths.assets || base;\n}\n\nexport { assets, base, set_paths };\n","directory_shortid":"v8DAr","id":"b36f122a-5c0d-4ae3-b7c8-bb3f001eae03","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"kgo1N","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"paths.js","updated_at":"2022-05-29T09:48:15","upload_id":null},{"code":"import { getContext } from 'svelte';\n\nconst ssr = import.meta.env.SSR;\n\n\u002F\u002F TODO remove this (for 1.0? after 1.0?)\nlet warned = false;\nfunction stores() {\n\tif (!warned) {\n\t\tconsole.error('stores() is deprecated; use getStores() instead');\n\t\twarned = true;\n\t}\n\treturn getStores();\n}\n\n\u002F**\n * @type {import('$app\u002Fstores').getStores}\n *\u002F\nconst getStores = () =\u003E {\n\tconst stores = getContext('__svelte__');\n\n\treturn {\n\t\tpage: {\n\t\t\tsubscribe: stores.page.subscribe\n\t\t},\n\t\tnavigating: {\n\t\t\tsubscribe: stores.navigating.subscribe\n\t\t},\n\t\t\u002F\u002F TODO remove this (for 1.0? after 1.0?)\n\t\t\u002F\u002F @ts-expect-error - deprecated, not part of type definitions, but still callable\n\t\tget preloading() {\n\t\t\tconsole.error('stores.preloading is deprecated; use stores.navigating instead');\n\t\t\treturn {\n\t\t\t\tsubscribe: stores.navigating.subscribe\n\t\t\t};\n\t\t},\n\t\tsession: stores.session\n\t};\n};\n\n\u002F** @type {typeof import('$app\u002Fstores').page} *\u002F\nconst page = {\n\t\u002F** @param {(value: any) =\u003E void} fn *\u002F\n\tsubscribe(fn) {\n\t\tconst store = getStores().page;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\n\u002F** @type {typeof import('$app\u002Fstores').navigating} *\u002F\nconst navigating = {\n\tsubscribe(fn) {\n\t\tconst store = getStores().navigating;\n\t\treturn store.subscribe(fn);\n\t}\n};\n\n\u002F** @param {string} verb *\u002F\nconst error = (verb) =\u003E {\n\tthrow new Error(\n\t\tssr\n\t\t\t? `Can only ${verb} session store in browser`\n\t\t\t: `Cannot ${verb} session store before subscribing`\n\t);\n};\n\n\u002F** @type {typeof import('$app\u002Fstores').session} *\u002F\nconst session = {\n\tsubscribe(fn) {\n\t\tconst store = getStores().session;\n\n\t\tif (!ssr) {\n\t\t\tsession.set = store.set;\n\t\t\tsession.update = store.update;\n\t\t}\n\n\t\treturn store.subscribe(fn);\n\t},\n\tset: () =\u003E error('set'),\n\tupdate: () =\u003E error('update')\n};\n\nexport { getStores, navigating, page, session, stores };\n","directory_shortid":"3Kq4","id":"e114e5e5-f83e-4416-b882-1ca2e73abbea","inserted_at":"2021-08-30T18:52:06","is_binary":null,"sha":null,"shortid":"X7KV8","source_id":"b3181da2-4d2d-46ea-a4cf-9d83ab7c259a","title":"stores.js","updated_at":"2022-05-29T09:48:14","upload_id":null}]};