\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, '