@kozou/svelte-ui 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/_app/immutable/assets/0.BpzpdRYx.css +2 -0
- package/build/client/_app/immutable/assets/0.BpzpdRYx.css.br +0 -0
- package/build/client/_app/immutable/assets/0.BpzpdRYx.css.gz +0 -0
- package/build/client/_app/immutable/chunks/{DxikiVqj.js → BAfs2EwQ.js} +1 -1
- package/build/client/_app/immutable/chunks/BAfs2EwQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BAfs2EwQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BgT5WiOF.js → ClT4djUO.js} +1 -1
- package/build/client/_app/immutable/chunks/ClT4djUO.js.br +0 -0
- package/build/client/_app/immutable/chunks/{BgT5WiOF.js.gz → ClT4djUO.js.gz} +0 -0
- package/build/client/_app/immutable/chunks/CrFfElwr.js +1 -0
- package/build/client/_app/immutable/chunks/CrFfElwr.js.br +0 -0
- package/build/client/_app/immutable/chunks/CrFfElwr.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DHwlcjtp.js +214 -0
- package/build/client/_app/immutable/chunks/DHwlcjtp.js.br +0 -0
- package/build/client/_app/immutable/chunks/DHwlcjtp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{M-rQODG_.js → DqFR9xzq.js} +1 -1
- package/build/client/_app/immutable/chunks/DqFR9xzq.js.br +0 -0
- package/build/client/_app/immutable/chunks/DqFR9xzq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/POk9Ad1v.js +4 -0
- package/build/client/_app/immutable/chunks/POk9Ad1v.js.br +0 -0
- package/build/client/_app/immutable/chunks/POk9Ad1v.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.DX7U95N5.js +2 -0
- package/build/client/_app/immutable/entry/app.DX7U95N5.js.br +0 -0
- package/build/client/_app/immutable/entry/app.DX7U95N5.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.CTKpPXDp.js +1 -0
- package/build/client/_app/immutable/entry/start.CTKpPXDp.js.br +1 -0
- package/build/client/_app/immutable/entry/start.CTKpPXDp.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.BTi1ueXu.js → 0.ahUg4RPH.js} +1 -1
- package/build/client/_app/immutable/nodes/0.ahUg4RPH.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.ahUg4RPH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.BI5dO6h8.js → 1.BCx2aLZ9.js} +1 -1
- package/build/client/_app/immutable/nodes/1.BCx2aLZ9.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.BCx2aLZ9.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DXYbQoLe.js +1 -0
- package/build/client/_app/immutable/nodes/2.DXYbQoLe.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DXYbQoLe.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.D_kabCAZ.js +1 -0
- package/build/client/_app/immutable/nodes/3.D_kabCAZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.D_kabCAZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{3.BfuWEZdX.js → 4.C486-zEy.js} +1 -1
- package/build/client/_app/immutable/nodes/4.C486-zEy.js.br +2 -0
- package/build/client/_app/immutable/nodes/4.C486-zEy.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.D1OoUXND.js +1 -0
- package/build/client/_app/immutable/nodes/5.D1OoUXND.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.D1OoUXND.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.B3cCGwsZ.js +1 -0
- package/build/client/_app/immutable/nodes/6.B3cCGwsZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.B3cCGwsZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.cAEaWzyw.js +1 -0
- package/build/client/_app/immutable/nodes/7.cAEaWzyw.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.cAEaWzyw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CjEmXoAF.js → 8.Cb70WGbk.js} +1 -1
- package/build/client/_app/immutable/nodes/8.Cb70WGbk.js.br +1 -0
- package/build/client/_app/immutable/nodes/8.Cb70WGbk.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/server/chunks/{0-C4CgvBlc.js → 0-CTaiiMQp.js} +3 -3
- package/build/server/chunks/{0-C4CgvBlc.js.map → 0-CTaiiMQp.js.map} +1 -1
- package/build/server/chunks/{1-CVLmaMi2.js → 1-Dni7ax6A.js} +3 -3
- package/build/server/chunks/{1-CVLmaMi2.js.map → 1-Dni7ax6A.js.map} +1 -1
- package/build/server/chunks/{2-D9il_3ty.js → 2--1dA0mCa.js} +19 -5
- package/build/server/chunks/2--1dA0mCa.js.map +1 -0
- package/build/server/chunks/3-N0Oe_-32.js +144 -0
- package/build/server/chunks/3-N0Oe_-32.js.map +1 -0
- package/build/server/chunks/{3-DfrqlU53.js → 4-BB3nsMwf.js} +5 -5
- package/build/server/chunks/{3-DfrqlU53.js.map → 4-BB3nsMwf.js.map} +1 -1
- package/build/server/chunks/{4-Dc-NPvAO.js → 5-QdpSeSEB.js} +8 -6
- package/build/server/chunks/5-QdpSeSEB.js.map +1 -0
- package/build/server/chunks/{5-DvwPrYwd.js → 6-DQ9D4Rjj.js} +18 -15
- package/build/server/chunks/6-DQ9D4Rjj.js.map +1 -0
- package/build/server/chunks/{6-DxT9TB6A.js → 7-yY-k4F-J.js} +18 -15
- package/build/server/chunks/7-yY-k4F-J.js.map +1 -0
- package/build/server/chunks/{7-CKkRKfs8.js → 8-C6Rfqnpk.js} +5 -5
- package/build/server/chunks/{7-CKkRKfs8.js.map → 8-C6Rfqnpk.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-FkcquIeL.js → _page.svelte-6bUnnrWp.js} +9 -4
- package/build/server/chunks/_page.svelte-6bUnnrWp.js.map +1 -0
- package/build/server/chunks/_page.svelte-BAaP0Gbn.js +143 -0
- package/build/server/chunks/_page.svelte-BAaP0Gbn.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BN1au56r.js → _page.svelte-Cup_HkLy.js} +19 -3
- package/build/server/chunks/_page.svelte-Cup_HkLy.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BGxCzjmZ.js → _page.svelte-D1coeZL7.js} +8 -7
- package/build/server/chunks/_page.svelte-D1coeZL7.js.map +1 -0
- package/build/server/chunks/{_page.svelte-DvcE6zrM.js → _page.svelte-DsOlSzf6.js} +8 -7
- package/build/server/chunks/_page.svelte-DsOlSzf6.js.map +1 -0
- package/build/server/chunks/{_server.ts-C-Wy675T.js → _server.ts-DlnyELsA.js} +4 -4
- package/build/server/chunks/{_server.ts-C-Wy675T.js.map → _server.ts-DlnyELsA.js.map} +1 -1
- package/build/server/chunks/{adapter-CXNsjV1V.js → adapter-B1wOda2X.js} +13 -1
- package/build/server/chunks/adapter-B1wOda2X.js.map +1 -0
- package/build/server/chunks/{app-DST8OmzT.js → app-MIcRQ3KA.js} +2 -2
- package/build/server/chunks/{app-DST8OmzT.js.map → app-MIcRQ3KA.js.map} +1 -1
- package/build/server/chunks/{client-BfR0iysy.js → client-CF_AG7xO.js} +3 -3
- package/build/server/chunks/{client-BfR0iysy.js.map → client-CF_AG7xO.js.map} +1 -1
- package/build/server/chunks/{composite-form-DeAbT97s.js → composite-form-Khrcy6Jk.js} +83 -31
- package/build/server/chunks/composite-form-Khrcy6Jk.js.map +1 -0
- package/build/server/chunks/{error.svelte-CgmjtCM8.js → error.svelte-CrnPC1Ez.js} +6 -6
- package/build/server/chunks/{error.svelte-CgmjtCM8.js.map → error.svelte-CrnPC1Ez.js.map} +1 -1
- package/build/server/chunks/{hooks.server-BCX7tjO4.js → hooks.server-Oa_UD2Wo.js} +743 -13
- package/build/server/chunks/hooks.server-Oa_UD2Wo.js.map +1 -0
- package/build/server/chunks/{index-5kYmxIr9.js → index-CVekYGHP.js} +2 -2
- package/build/server/chunks/{index-5kYmxIr9.js.map → index-CVekYGHP.js.map} +1 -1
- package/build/server/chunks/index-DBqjc0Yf.js.map +1 -1
- package/build/server/chunks/{internal-D3PcExp3.js → internal-Z9Jwi6lX.js} +13 -13
- package/build/server/chunks/{internal-D3PcExp3.js.map → internal-Z9Jwi6lX.js.map} +1 -1
- package/build/server/chunks/privilege-readonly-CK4k2aYO.js +15 -0
- package/build/server/chunks/privilege-readonly-CK4k2aYO.js.map +1 -0
- package/build/server/chunks/{relation-options-Dzy9DaQG.js → relation-options-BQ3XnftO.js} +2 -2
- package/build/server/chunks/{relation-options-Dzy9DaQG.js.map → relation-options-BQ3XnftO.js.map} +1 -1
- package/build/server/chunks/relation-select-composite-field-D4LZijR_.js +101 -0
- package/build/server/chunks/relation-select-composite-field-D4LZijR_.js.map +1 -0
- package/build/server/chunks/{widget-registry-COKz4xxc.js → widget-registry-6ku8orXa.js} +3 -98
- package/build/server/chunks/widget-registry-6ku8orXa.js.map +1 -0
- package/build/server/index.js +32 -32
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +23 -15
- package/build/server/manifest.js.map +1 -1
- package/package.json +4 -4
- package/build/client/_app/immutable/assets/0._vgqT-Ja.css +0 -2
- package/build/client/_app/immutable/assets/0._vgqT-Ja.css.br +0 -0
- package/build/client/_app/immutable/assets/0._vgqT-Ja.css.gz +0 -0
- package/build/client/_app/immutable/chunks/0-MunKvN.js +0 -4
- package/build/client/_app/immutable/chunks/0-MunKvN.js.br +0 -0
- package/build/client/_app/immutable/chunks/0-MunKvN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BgT5WiOF.js.br +0 -0
- package/build/client/_app/immutable/chunks/CrTaJnzY.js +0 -214
- package/build/client/_app/immutable/chunks/CrTaJnzY.js.br +0 -0
- package/build/client/_app/immutable/chunks/CrTaJnzY.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DxikiVqj.js.br +0 -0
- package/build/client/_app/immutable/chunks/DxikiVqj.js.gz +0 -0
- package/build/client/_app/immutable/chunks/M-rQODG_.js.br +0 -0
- package/build/client/_app/immutable/chunks/M-rQODG_.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.ByhtJ88k.js +0 -2
- package/build/client/_app/immutable/entry/app.ByhtJ88k.js.br +0 -0
- package/build/client/_app/immutable/entry/app.ByhtJ88k.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.C_VgULzk.js +0 -1
- package/build/client/_app/immutable/entry/start.C_VgULzk.js.br +0 -0
- package/build/client/_app/immutable/entry/start.C_VgULzk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.BTi1ueXu.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.BTi1ueXu.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.BI5dO6h8.js.br +0 -3
- package/build/client/_app/immutable/nodes/1.BI5dO6h8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.CWOXCYvQ.js +0 -1
- package/build/client/_app/immutable/nodes/2.CWOXCYvQ.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CWOXCYvQ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.BfuWEZdX.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.BfuWEZdX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.PUtoqAEs.js +0 -1
- package/build/client/_app/immutable/nodes/4.PUtoqAEs.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.PUtoqAEs.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CEXAqzYO.js +0 -1
- package/build/client/_app/immutable/nodes/5.CEXAqzYO.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CEXAqzYO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.4fTWRTA8.js +0 -1
- package/build/client/_app/immutable/nodes/6.4fTWRTA8.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.4fTWRTA8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CjEmXoAF.js.br +0 -1
- package/build/client/_app/immutable/nodes/7.CjEmXoAF.js.gz +0 -0
- package/build/server/chunks/2-D9il_3ty.js.map +0 -1
- package/build/server/chunks/4-Dc-NPvAO.js.map +0 -1
- package/build/server/chunks/5-DvwPrYwd.js.map +0 -1
- package/build/server/chunks/6-DxT9TB6A.js.map +0 -1
- package/build/server/chunks/_page.svelte-BGxCzjmZ.js.map +0 -1
- package/build/server/chunks/_page.svelte-BN1au56r.js.map +0 -1
- package/build/server/chunks/_page.svelte-DvcE6zrM.js.map +0 -1
- package/build/server/chunks/_page.svelte-FkcquIeL.js.map +0 -1
- package/build/server/chunks/adapter-CXNsjV1V.js.map +0 -1
- package/build/server/chunks/composite-form-DeAbT97s.js.map +0 -1
- package/build/server/chunks/hooks.server-BCX7tjO4.js.map +0 -1
- package/build/server/chunks/widget-registry-COKz4xxc.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-BfR0iysy.js","sources":["../../../.svelte-kit/adapter-node/chunks/client.js"],"sourcesContent":["import { S as noop, f as get_message, h as base64_decode, n as TRAILING_SLASH_PARAM, p as get_status, r as create_remote_key, t as INVALIDATED_PARAM, x as unflatten } from \"./shared.js\";\nimport { a as index_server_exports, c as tick$1, h as base, s as settled } from \"./environment.js\";\nimport { Z as noop$1, k as writable } from \"./dev.js\";\nimport { S as compact, f as make_trackable, g as add_data_suffix, h as noop_span, l as decode_params, p as normalize_path, s as hash, u as decode_pathname } from \"./exports.js\";\nimport \"./internal.js\";\nimport { HttpError, Redirect, SvelteKitError } from \"@sveltejs/kit/internal\";\nimport \"@sveltejs/kit/internal/server\";\nvar STATES_KEY = \"sveltekit:states\";\nvar HISTORY_INDEX = \"sveltekit:history\";\nvar NAVIGATION_INDEX = \"sveltekit:navigation\";\nvar PRELOAD_PRIORITIES = {\n\ttap: 1,\n\thover: 2,\n\tviewport: 3,\n\teager: 4,\n\toff: -1,\n\tfalse: -1\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/client/utils.js\nvar origin = \"\";\n/** @param {string | URL} url */\nfunction resolve_url(url) {\n\tif (url instanceof URL) return url;\n\tlet baseURI = document.baseURI;\n\tif (!baseURI) {\n\t\tconst baseTags = document.getElementsByTagName(\"base\");\n\t\tbaseURI = baseTags.length ? baseTags[0].href : document.URL;\n\t}\n\treturn new URL(url, baseURI);\n}\nfunction scroll_state() {\n\treturn {\n\t\tx: pageXOffset,\n\t\ty: pageYOffset\n\t};\n}\n({ ...PRELOAD_PRIORITIES }), PRELOAD_PRIORITIES.hover;\n/** @param {any} value */\nfunction notifiable_store(value) {\n\tconst store = writable(value);\n\tlet ready = true;\n\tfunction notify() {\n\t\tready = true;\n\t\tstore.update((val) => val);\n\t}\n\t/** @param {any} new_value */\n\tfunction set(new_value) {\n\t\tready = false;\n\t\tstore.set(new_value);\n\t}\n\t/** @param {(value: any) => void} run */\n\tfunction subscribe(run) {\n\t\t/** @type {any} */\n\t\tlet old_value;\n\t\treturn store.subscribe((new_value) => {\n\t\t\tif (old_value === void 0 || ready && new_value !== old_value) run(old_value = new_value);\n\t\t});\n\t}\n\treturn {\n\t\tnotify,\n\t\tset,\n\t\tsubscribe\n\t};\n}\nvar updated_listener = { v: noop };\nfunction create_updated_store() {\n\tconst { set, subscribe } = writable(false);\n\treturn {\n\t\tsubscribe,\n\t\tcheck: async () => false\n\t};\n}\n/**\n* Is external if\n* - origin different\n* - path doesn't start with base\n* - uses hash router and pathname is more than base\n* @param {URL} url\n* @param {string} base\n* @param {boolean} hash_routing\n*/\nfunction is_external_url(url, base, hash_routing) {\n\tif (url.origin !== origin || !url.pathname.startsWith(base)) return true;\n\tif (hash_routing) return url.pathname !== location.pathname;\n\treturn false;\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/client/state.svelte.js\nvar page;\nvar navigating;\nvar updated;\nvar is_legacy = noop$1.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop$1.toString());\nvar placeholder_url = \"a:\";\nif (is_legacy) {\n\tpage = {\n\t\tdata: {},\n\t\tform: null,\n\t\terror: null,\n\t\tparams: {},\n\t\troute: { id: null },\n\t\tstate: {},\n\t\tstatus: -1,\n\t\turl: new URL(placeholder_url)\n\t};\n\tnavigating = { current: null };\n\tupdated = { current: false };\n} else {\n\tpage = new class Page {\n\t\tdata = {};\n\t\tform = null;\n\t\terror = null;\n\t\tparams = {};\n\t\troute = { id: null };\n\t\tstate = {};\n\t\tstatus = -1;\n\t\turl = new URL(placeholder_url);\n\t}();\n\tnavigating = new class Navigating {\n\t\tcurrent = null;\n\t}();\n\tupdated = new class Updated {\n\t\tcurrent = false;\n\t}();\n\tupdated_listener.v = () => updated.current = true;\n}\n/**\n* @param {import('@sveltejs/kit').Page} new_page\n*/\nfunction update(new_page) {\n\tObject.assign(page, new_page);\n}\nvar cache = /* @__PURE__ */ new Map();\n/**\n* Should be called on the initial run of load functions that hydrate the page.\n* Saves any requests with cache-control max-age to the cache.\n* @param {URL | string} resource\n* @param {RequestInit} [opts]\n*/\nfunction initial_fetch(resource, opts) {\n\tconst selector = build_selector(resource, opts);\n\tconst script = document.querySelector(selector);\n\tif (script?.textContent) {\n\t\tscript.remove();\n\t\tlet { body, ...init } = JSON.parse(script.textContent);\n\t\tconst ttl = script.getAttribute(\"data-ttl\");\n\t\tif (ttl) cache.set(selector, {\n\t\t\tbody,\n\t\t\tinit,\n\t\t\tttl: 1e3 * Number(ttl)\n\t\t});\n\t\tif (script.getAttribute(\"data-b64\") !== null) body = base64_decode(body);\n\t\treturn Promise.resolve(new Response(body, init));\n\t}\n\treturn window.fetch(resource, opts);\n}\n/**\n* Tries to get the response from the cache, if max-age allows it, else does a fetch.\n* @param {URL | string} resource\n* @param {string} resolved\n* @param {RequestInit} [opts]\n*/\nfunction subsequent_fetch(resource, resolved, opts) {\n\tif (cache.size > 0) {\n\t\tconst selector = build_selector(resource, opts);\n\t\tconst cached = cache.get(selector);\n\t\tif (cached) {\n\t\t\tif (performance.now() < cached.ttl && [\n\t\t\t\t\"default\",\n\t\t\t\t\"force-cache\",\n\t\t\t\t\"only-if-cached\",\n\t\t\t\tvoid 0\n\t\t\t].includes(opts?.cache)) return new Response(cached.body, cached.init);\n\t\t\tcache.delete(selector);\n\t\t}\n\t}\n\treturn window.fetch(resolved, opts);\n}\n/**\n* Build the cache key for a given request\n* @param {URL | RequestInfo} resource\n* @param {RequestInit} [opts]\n*/\nfunction build_selector(resource, opts) {\n\tlet selector = `script[data-sveltekit-fetched][data-url=${JSON.stringify(resource instanceof Request ? resource.url : resource)}]`;\n\tif (opts?.headers || opts?.body) {\n\t\t/** @type {import('types').StrictBody[]} */\n\t\tconst values = [];\n\t\tif (opts.headers) values.push([...new Headers(opts.headers)].join(\",\"));\n\t\tif (opts.body && (typeof opts.body === \"string\" || ArrayBuffer.isView(opts.body))) values.push(opts.body);\n\t\tselector += `[data-hash=\"${hash(...values)}\"]`;\n\t}\n\treturn selector;\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/client/session-storage.js\n/**\n* Read a value from `sessionStorage`\n* @param {string} key\n* @param {(value: string) => any} parse\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction get(key, parse = JSON.parse) {\n\ttry {\n\t\treturn parse(sessionStorage[key]);\n\t} catch {}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/client/ndjson.js\n/**\n* Yields parsed JSON objects from a ReadableStream of newline-delimited JSON.\n* Each yielded value is the raw `JSON.parse`'d object — callers handle deserialization.\n* @param {ReadableStreamDefaultReader<Uint8Array>} reader\n*/\nasync function* read_ndjson(reader) {\n\tlet done = false;\n\tlet buffer = \"\";\n\tconst decoder = new TextDecoder();\n\twhile (true) {\n\t\tlet split = buffer.indexOf(\"\\n\");\n\t\twhile (split !== -1) {\n\t\t\tconst line = buffer.slice(0, split).trim();\n\t\t\tbuffer = buffer.slice(split + 1);\n\t\t\tif (line) yield JSON.parse(line);\n\t\t\tsplit = buffer.indexOf(\"\\n\");\n\t\t}\n\t\tif (done) {\n\t\t\tconst line = buffer.trim();\n\t\t\tif (line) yield JSON.parse(line);\n\t\t\treturn;\n\t\t}\n\t\tconst chunk = await reader.read();\n\t\tdone = chunk.done;\n\t\tif (chunk.value) buffer += decoder.decode(chunk.value, { stream: true });\n\t\tif (done) buffer += decoder.decode();\n\t}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_692b2477997906027053802989c8d7b8/node_modules/@sveltejs/kit/src/runtime/client/client.js\n/** @import { CacheEntry } from './remote-functions/cache.svelte.js' */\n/** @import { Query } from './remote-functions/query/instance.svelte.js' */\n/** @import { LiveQuery } from './remote-functions/query-live/instance.svelte.js' */\nvar { onMount, tick } = index_server_exports;\n/**\n* Set via transformError, reset and read at the end of navigate.\n* Necessary because a navigation might succeed loading but during rendering\n* an error occurs, at which point the navigation result needs to be overridden with the error result.\n* TODO this is all very hacky, rethink for SvelteKit 3 where we can assume Svelte 5 and do an overhaul of client.js\n* @type {{ error: App.Error, status: number } | null}\n*/\nvar rendering_error = null;\n/**\n* history index -> { x, y }\n* @type {Record<number, { x: number; y: number }>}\n*/\nvar scroll_positions = /* @__PURE__ */ get(\"sveltekit:scroll\") ?? {};\n/**\n* navigation index -> any\n* @type {Record<string, any[]>}\n*/\nvar snapshots = /* @__PURE__ */ get(\"sveltekit:snapshot\") ?? {};\nvar stores = {\n\turl: /* @__PURE__ */ notifiable_store({}),\n\tpage: /* @__PURE__ */ notifiable_store({}),\n\tnavigating: /* @__PURE__ */ writable(null),\n\tupdated: /* @__PURE__ */ create_updated_store()\n};\n/** @param {number} index */\nfunction update_scroll_positions(index) {\n\tscroll_positions[index] = scroll_state();\n}\n/**\n* @param {number} current_history_index\n* @param {number} current_navigation_index\n*/\nfunction clear_onward_history(current_history_index, current_navigation_index) {\n\tlet i = current_history_index + 1;\n\twhile (scroll_positions[i]) {\n\t\tdelete scroll_positions[i];\n\t\ti += 1;\n\t}\n\ti = current_navigation_index + 1;\n\twhile (snapshots[i]) {\n\t\tdelete snapshots[i];\n\t\ti += 1;\n\t}\n}\n/**\n* Loads `href` the old-fashioned way, with a full page reload.\n* Returns a `Promise` that never resolves (to prevent any\n* subsequent work, e.g. history manipulation, from happening)\n* @param {URL} url\n* @param {boolean} [replace] If `true`, will replace the current `history` entry rather than creating a new one with `pushState`\n*/\nfunction native_navigation(url, replace = false) {\n\tif (replace) location.replace(url.href);\n\telse location.href = url.href;\n\treturn new Promise(noop);\n}\n/**\n* Checks whether a service worker is registered, and if it is,\n* tries to update it.\n*/\nasync function update_service_worker() {\n\tif (\"serviceWorker\" in navigator) {\n\t\tconst registration = await navigator.serviceWorker.getRegistration(base || \"/\");\n\t\tif (registration) await registration.update();\n\t}\n}\n/** @type {import('types').CSRRoute[]} All routes of the app. Only available when kit.router.resolution=client */\nvar routes;\n/** @type {import('types').CSRPageNodeLoader} */\nvar default_layout_loader;\n/** @type {import('types').CSRPageNodeLoader} */\nvar default_error_loader;\n/** @type {HTMLElement} */\nvar target;\n/** @type {import('./types.js').SvelteKitApp} */\nvar app;\n/** @type {Array<((url: URL) => boolean)>} */\nvar invalidated = [];\n/**\n* An array of the `+layout.svelte` and `+page.svelte` component instances\n* that currently live on the page — used for capturing and restoring snapshots.\n* It's updated/manipulated through `bind:this` in `Root.svelte`.\n* @type {import('svelte').SvelteComponent[]}\n*/\nvar components = [];\n/** @type {{id: string, token: {}, promise: Promise<import('./types.js').NavigationResult>, fork: Promise<import('svelte').Fork | null> | null} | null} */\nvar load_cache = null;\nfunction discard_load_cache() {\n\tload_cache?.fork?.then((f) => f?.discard());\n\tload_cache = null;\n}\n/**\n* @type {Map<string, Promise<URL>>}\n* Cache for client-side rerouting, since it could contain async calls which we want to\n* avoid running multiple times which would slow down navigations (e.g. else preloading\n* wouldn't help because on navigation it would be called again). Since `reroute` should be\n* a pure function (i.e. always return the same) value it's safe to cache across navigations.\n* The server reroute calls don't need to be cached because they are called using `import(...)`\n* which is cached per the JS spec.\n*/\nvar reroute_cache = /* @__PURE__ */ new Map();\n/**\n* Note on before_navigate_callbacks, on_navigate_callbacks and after_navigate_callbacks:\n* do not re-assign as some closures keep references to these Sets\n*/\n/** @type {Set<(navigation: import('@sveltejs/kit').BeforeNavigate) => void>} */\nvar before_navigate_callbacks = /* @__PURE__ */ new Set();\n/** @type {Set<(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>>} */\nvar on_navigate_callbacks = /* @__PURE__ */ new Set();\n/** @type {Set<(navigation: import('@sveltejs/kit').AfterNavigate) => void>} */\nvar after_navigate_callbacks = /* @__PURE__ */ new Set();\n/** @type {import('./types.js').NavigationState & { nav: import('@sveltejs/kit').NavigationEvent }} */\nvar current = {\n\tbranch: [],\n\terror: null,\n\turl: null,\n\tnav: null\n};\n/** this being true means we SSR'd */\nvar hydrated = false;\nvar started = false;\nvar autoscroll = true;\nvar is_navigating = false;\nvar force_invalidation = false;\n/** @type {import('svelte').SvelteComponent} */\nvar root;\n/** @type {number} keeping track of the history index in order to prevent popstate navigation events if needed */\nvar current_history_index;\n/** @type {number} */\nvar current_navigation_index;\n/** @type {{}} */\nvar token;\n/**\n* A set of tokens which are associated to current preloads.\n* If a preload becomes a real navigation, it's removed from the set.\n* If a preload token is in the set and the preload errors, the error\n* handling logic (for example reloading) is skipped.\n*/\nvar preload_tokens = /* @__PURE__ */ new Set();\n/**\n* @type {Map<string, Map<string, CacheEntry<Query<any>>>>}\n* A map of query id -> payload -> query internals for all active queries.\n*/\nvar query_map = /* @__PURE__ */ new Map();\n/**\n* @type {Map<string, Map<string, CacheEntry<LiveQuery<any>>>>}\n* A map of id -> payload -> live query internals for all active queries.\n*/\nvar live_query_map = /* @__PURE__ */ new Map();\nfunction reset_invalidation() {\n\tinvalidated.length = 0;\n\tforce_invalidation = false;\n}\n/** @param {number} index */\nfunction capture_snapshot(index) {\n\tif (components.some((c) => c?.snapshot)) snapshots[index] = components.map((c) => c?.snapshot?.capture());\n}\n/** @param {number} index */\nfunction restore_snapshot(index) {\n\tsnapshots[index]?.forEach((value, i) => {\n\t\tcomponents[i]?.snapshot?.restore(value);\n\t});\n}\n/**\n* @param {string | URL} url\n* @param {{ replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; invalidate?: Array<string | URL | ((url: URL) => boolean)>; state?: Record<string, any> }} options\n* @param {number} redirect_count\n* @param {{}} [nav_token]\n*/\nasync function _goto(url, options, redirect_count, nav_token) {\n\t/** @type {Set<string>} */\n\tlet query_keys;\n\t/** @type {Set<string>} */\n\tlet live_query_keys;\n\tif (options.invalidateAll) discard_load_cache();\n\tawait navigate({\n\t\ttype: \"goto\",\n\t\turl: resolve_url(url),\n\t\tkeepfocus: options.keepFocus,\n\t\tnoscroll: options.noScroll,\n\t\treplace_state: options.replaceState,\n\t\tstate: options.state,\n\t\tredirect_count,\n\t\tnav_token,\n\t\taccept: () => {\n\t\t\tif (options.invalidateAll) {\n\t\t\t\tforce_invalidation = true;\n\t\t\t\tquery_keys = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const [id, entries] of query_map) for (const payload of entries.keys()) query_keys.add(create_remote_key(id, payload));\n\t\t\t\tlive_query_keys = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const [id, entries] of live_query_map) for (const payload of entries.keys()) live_query_keys.add(create_remote_key(id, payload));\n\t\t\t}\n\t\t\tif (options.invalidate) options.invalidate.forEach(push_invalidated);\n\t\t}\n\t});\n\tif (options.invalidateAll) tick$1().then(tick$1).then(() => {\n\t\tfor (const [id, entries] of query_map) for (const [payload, { resource }] of entries) if (query_keys?.has(create_remote_key(id, payload))) resource.refresh();\n\t\tfor (const [id, entries] of live_query_map) for (const [payload, { resource }] of entries) if (live_query_keys?.has(create_remote_key(id, payload))) resource.reconnect();\n\t});\n}\n/**\n* @param {import('./types.js').NavigationFinished} result\n* @param {HTMLElement} target\n* @param {boolean} hydrate\n*/\nasync function initialize(result, target, hydrate) {\n\t/** @type {import('@sveltejs/kit').NavigationEvent} */\n\tconst nav = {\n\t\tparams: current.params,\n\t\troute: { id: current.route?.id ?? null },\n\t\turl: new URL(location.href)\n\t};\n\tcurrent = {\n\t\t...result.state,\n\t\tnav\n\t};\n\tupdate(result.props.page);\n\troot = new app.root({\n\t\ttarget,\n\t\tprops: {\n\t\t\t...result.props,\n\t\t\tstores,\n\t\t\tcomponents\n\t\t},\n\t\thydrate,\n\t\tsync: false,\n\t\ttransformError: void 0\n\t});\n\tawait Promise.resolve();\n\trestore_snapshot(current_navigation_index);\n\tif (hydrate) {\n\t\t/** @type {import('@sveltejs/kit').AfterNavigate} */\n\t\tconst navigation = {\n\t\t\tfrom: null,\n\t\t\tto: {\n\t\t\t\t...nav,\n\t\t\t\tscroll: scroll_positions[current_history_index] ?? scroll_state()\n\t\t\t},\n\t\t\twillUnload: false,\n\t\t\ttype: \"enter\",\n\t\t\tcomplete: Promise.resolve()\n\t\t};\n\t\tafter_navigate_callbacks.forEach((fn) => fn(navigation));\n\t}\n\tstarted = true;\n}\n/**\n*\n* @param {{\n* url: URL;\n* params: Record<string, string>;\n* branch: Array<import('./types.js').BranchNode | undefined>;\n* errors?: Array<import('types').CSRPageNodeLoader | undefined>;\n* status: number;\n* error: App.Error | null;\n* route: import('types').CSRRoute | null;\n* form?: Record<string, any> | null;\n* }} opts\n*/\nasync function get_navigation_result_from_branch({ url, params, branch, errors, status, error, route, form }) {\n\t/** @type {import('types').TrailingSlash} */\n\tlet slash = \"never\";\n\tif (base && (url.pathname === base || url.pathname === base + \"/\")) slash = \"always\";\n\telse for (const node of branch) if (node?.slash !== void 0) slash = node.slash;\n\turl.pathname = normalize_path(url.pathname, slash);\n\turl.search = url.search;\n\t/** @type {import('./types.js').NavigationFinished} */\n\tconst result = {\n\t\ttype: \"loaded\",\n\t\tstate: {\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch,\n\t\t\terror,\n\t\t\troute\n\t\t},\n\t\tprops: {\n\t\t\tconstructors: compact(branch).map((branch_node) => branch_node.node.component),\n\t\t\tpage: clone_page(page)\n\t\t}\n\t};\n\tif (form !== void 0) result.props.form = form;\n\tlet data = {};\n\tlet data_changed = !page;\n\tlet p = 0;\n\tfor (let i = 0; i < Math.max(branch.length, current.branch.length); i += 1) {\n\t\tconst node = branch[i];\n\t\tconst prev = current.branch[i];\n\t\tif (node?.data !== prev?.data) data_changed = true;\n\t\tif (!node) continue;\n\t\tdata = {\n\t\t\t...data,\n\t\t\t...node.data\n\t\t};\n\t\tif (data_changed) result.props[`data_${p}`] = data;\n\t\tp += 1;\n\t}\n\tif (!current.url || url.href !== current.url.href || current.error !== error || form !== void 0 && form !== page.form || data_changed) result.props.page = {\n\t\terror,\n\t\tparams,\n\t\troute: { id: route?.id ?? null },\n\t\tstate: {},\n\t\tstatus,\n\t\turl: new URL(url),\n\t\tform: form ?? null,\n\t\tdata: data_changed ? data : page.data\n\t};\n\treturn result;\n}\n/**\n* Call the universal load function of the given node, if it exists.\n*\n* @param {{\n* loader: import('types').CSRPageNodeLoader;\n* \t parent: () => Promise<Record<string, any>>;\n* url: URL;\n* params: Record<string, string>;\n* route: { id: string | null };\n* \t server_data_node: import('./types.js').DataNode | null;\n* }} options\n* @returns {Promise<import('./types.js').BranchNode>}\n*/\nasync function load_node({ loader, parent, url, params, route, server_data_node }) {\n\t/** @type {Record<string, any> | null} */\n\tlet data = null;\n\tlet is_tracking = true;\n\t/** @type {import('types').Uses} */\n\tconst uses = {\n\t\tdependencies: /* @__PURE__ */ new Set(),\n\t\tparams: /* @__PURE__ */ new Set(),\n\t\tparent: false,\n\t\troute: false,\n\t\turl: false,\n\t\tsearch_params: /* @__PURE__ */ new Set()\n\t};\n\tconst node = await loader();\n\tif (node.universal?.load) {\n\t\t/** @param {string[]} deps */\n\t\tfunction depends(...deps) {\n\t\t\tfor (const dep of deps) {\n\t\t\t\tconst { href } = new URL(dep, url);\n\t\t\t\tuses.dependencies.add(href);\n\t\t\t}\n\t\t}\n\t\t/** @type {import('@sveltejs/kit').LoadEvent} */\n\t\tconst load_input = {\n\t\t\ttracing: {\n\t\t\t\tenabled: false,\n\t\t\t\troot: noop_span,\n\t\t\t\tcurrent: noop_span\n\t\t\t},\n\t\t\troute: new Proxy(route, { get: (target, key) => {\n\t\t\t\tif (is_tracking) uses.route = true;\n\t\t\t\treturn target[key];\n\t\t\t} }),\n\t\t\tparams: new Proxy(params, { get: (target, key) => {\n\t\t\t\tif (is_tracking) uses.params.add(key);\n\t\t\t\treturn target[key];\n\t\t\t} }),\n\t\t\tdata: server_data_node?.data ?? null,\n\t\t\turl: make_trackable(url, () => {\n\t\t\t\tif (is_tracking) uses.url = true;\n\t\t\t}, (param) => {\n\t\t\t\tif (is_tracking) uses.search_params.add(param);\n\t\t\t}, app.hash),\n\t\t\tasync fetch(resource, init) {\n\t\t\t\tif (resource instanceof Request) init = {\n\t\t\t\t\tbody: resource.method === \"GET\" || resource.method === \"HEAD\" ? void 0 : await resource.blob(),\n\t\t\t\t\tcache: resource.cache,\n\t\t\t\t\tcredentials: resource.credentials,\n\t\t\t\t\theaders: [...resource.headers].length > 0 ? resource?.headers : void 0,\n\t\t\t\t\tintegrity: resource.integrity,\n\t\t\t\t\tkeepalive: resource.keepalive,\n\t\t\t\t\tmethod: resource.method,\n\t\t\t\t\tmode: resource.mode,\n\t\t\t\t\tredirect: resource.redirect,\n\t\t\t\t\treferrer: resource.referrer,\n\t\t\t\t\treferrerPolicy: resource.referrerPolicy,\n\t\t\t\t\tsignal: resource.signal,\n\t\t\t\t\t...init\n\t\t\t\t};\n\t\t\t\tconst { resolved, promise } = resolve_fetch_url(resource, init, url);\n\t\t\t\tif (is_tracking) depends(resolved.href);\n\t\t\t\treturn promise;\n\t\t\t},\n\t\t\tsetHeaders: noop,\n\t\t\tdepends,\n\t\t\tparent() {\n\t\t\t\tif (is_tracking) uses.parent = true;\n\t\t\t\treturn parent();\n\t\t\t},\n\t\t\tuntrack(fn) {\n\t\t\t\tis_tracking = false;\n\t\t\t\ttry {\n\t\t\t\t\treturn fn();\n\t\t\t\t} finally {\n\t\t\t\t\tis_tracking = true;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tdata = await node.universal.load.call(null, load_input) ?? null;\n\t}\n\treturn {\n\t\tnode,\n\t\tloader,\n\t\tserver: server_data_node,\n\t\tuniversal: node.universal?.load ? {\n\t\t\ttype: \"data\",\n\t\t\tdata,\n\t\t\tuses\n\t\t} : null,\n\t\tdata: data ?? server_data_node?.data ?? null,\n\t\tslash: node.universal?.trailingSlash ?? server_data_node?.slash\n\t};\n}\n/**\n* @param {Request | string | URL} input\n* @param {RequestInit | undefined} init\n* @param {URL} url\n*/\nfunction resolve_fetch_url(input, init, url) {\n\tlet requested = input instanceof Request ? input.url : input;\n\tconst resolved = new URL(requested, url);\n\tif (resolved.origin === url.origin) requested = resolved.href.slice(url.origin.length);\n\treturn {\n\t\tresolved,\n\t\tpromise: started ? subsequent_fetch(requested, resolved.href, init) : initial_fetch(requested, init)\n\t};\n}\n/**\n* @param {boolean} parent_changed\n* @param {boolean} route_changed\n* @param {boolean} url_changed\n* @param {Set<string>} search_params_changed\n* @param {import('types').Uses | undefined} uses\n* @param {Record<string, string>} params\n*/\nfunction has_changed(parent_changed, route_changed, url_changed, search_params_changed, uses, params) {\n\tif (force_invalidation) return true;\n\tif (!uses) return false;\n\tif (uses.parent && parent_changed) return true;\n\tif (uses.route && route_changed) return true;\n\tif (uses.url && url_changed) return true;\n\tfor (const tracked_params of uses.search_params) if (search_params_changed.has(tracked_params)) return true;\n\tfor (const param of uses.params) if (params[param] !== current.params[param]) return true;\n\tfor (const href of uses.dependencies) if (invalidated.some((fn) => fn(new URL(href)))) return true;\n\treturn false;\n}\n/**\n* @param {import('types').ServerDataNode | import('types').ServerDataSkippedNode | null} node\n* @param {import('./types.js').DataNode | null} [previous]\n* @returns {import('./types.js').DataNode | null}\n*/\nfunction create_data_node(node, previous) {\n\tif (node?.type === \"data\") return node;\n\tif (node?.type === \"skip\") return previous ?? null;\n\treturn null;\n}\n/**\n* @param {URL | null} old_url\n* @param {URL} new_url\n*/\nfunction diff_search_params(old_url, new_url) {\n\tif (!old_url) return new Set(new_url.searchParams.keys());\n\tconst changed = new Set([...old_url.searchParams.keys(), ...new_url.searchParams.keys()]);\n\tfor (const key of changed) {\n\t\tconst old_values = old_url.searchParams.getAll(key);\n\t\tconst new_values = new_url.searchParams.getAll(key);\n\t\tif (old_values.every((value) => new_values.includes(value)) && new_values.every((value) => old_values.includes(value))) changed.delete(key);\n\t}\n\treturn changed;\n}\n/**\n* @param {Omit<import('./types.js').NavigationFinished['state'], 'branch'> & { error: App.Error }} opts\n* @returns {import('./types.js').NavigationFinished}\n*/\nfunction preload_error({ error, url, route, params }) {\n\treturn {\n\t\ttype: \"loaded\",\n\t\tstate: {\n\t\t\terror,\n\t\t\turl,\n\t\t\troute,\n\t\t\tparams,\n\t\t\tbranch: []\n\t\t},\n\t\tprops: {\n\t\t\tpage: clone_page(page),\n\t\t\tconstructors: []\n\t\t}\n\t};\n}\n/**\n* @param {import('./types.js').NavigationIntent & { preload?: {} }} intent\n* @returns {Promise<import('./types.js').NavigationResult>}\n*/\nasync function load_route({ id, invalidating, url, params, route, preload }) {\n\tif (load_cache?.id === id) {\n\t\tpreload_tokens.delete(load_cache.token);\n\t\treturn load_cache.promise;\n\t}\n\tconst { errors, layouts, leaf } = route;\n\tconst loaders = [...layouts, leaf];\n\terrors.forEach((loader) => loader?.().catch(noop));\n\tloaders.forEach((loader) => loader?.[1]().catch(noop));\n\t/** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */\n\tlet server_data = null;\n\tconst url_changed = current.url ? id !== get_page_key(current.url) : false;\n\tconst route_changed = current.route ? route.id !== current.route.id : false;\n\tconst search_params_changed = diff_search_params(current.url, url);\n\tlet parent_invalid = false;\n\t{\n\t\tconst invalid_server_nodes = loaders.map((loader, i) => {\n\t\t\tconst previous = current.branch[i];\n\t\t\tconst invalid = !!loader?.[0] && (previous?.loader !== loader[1] || has_changed(parent_invalid, route_changed, url_changed, search_params_changed, previous.server?.uses, params));\n\t\t\tif (invalid) parent_invalid = true;\n\t\t\treturn invalid;\n\t\t});\n\t\tif (invalid_server_nodes.some(Boolean)) {\n\t\t\ttry {\n\t\t\t\tserver_data = await load_data(url, invalid_server_nodes);\n\t\t\t} catch (error) {\n\t\t\t\tconst handled_error = await handle_error(error, {\n\t\t\t\t\turl,\n\t\t\t\t\tparams,\n\t\t\t\t\troute: { id }\n\t\t\t\t});\n\t\t\t\tif (preload_tokens.has(preload)) return preload_error({\n\t\t\t\t\terror: handled_error,\n\t\t\t\t\turl,\n\t\t\t\t\tparams,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t\treturn load_root_error_page({\n\t\t\t\t\tstatus: get_status(error),\n\t\t\t\t\terror: handled_error,\n\t\t\t\t\turl,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (server_data.type === \"redirect\") return server_data;\n\t\t}\n\t}\n\tconst server_data_nodes = server_data?.nodes;\n\tlet parent_changed = false;\n\tconst branch_promises = loaders.map(async (loader, i) => {\n\t\tif (!loader) return;\n\t\t/** @type {import('./types.js').BranchNode | undefined} */\n\t\tconst previous = current.branch[i];\n\t\tconst server_data_node = server_data_nodes?.[i];\n\t\tif ((!server_data_node || server_data_node.type === \"skip\") && loader[1] === previous?.loader && !has_changed(parent_changed, route_changed, url_changed, search_params_changed, previous.universal?.uses, params)) return previous;\n\t\tparent_changed = true;\n\t\tif (server_data_node?.type === \"error\") throw server_data_node;\n\t\treturn load_node({\n\t\t\tloader: loader[1],\n\t\t\turl,\n\t\t\tparams,\n\t\t\troute,\n\t\t\tparent: async () => {\n\t\t\t\tconst data = {};\n\t\t\t\tfor (let j = 0; j < i; j += 1) Object.assign(data, (await branch_promises[j])?.data);\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\tserver_data_node: create_data_node(server_data_node === void 0 && loader[0] ? { type: \"skip\" } : server_data_node ?? null, loader[0] ? previous?.server : void 0)\n\t\t});\n\t});\n\tfor (const p of branch_promises) p.catch(noop);\n\t/** @type {Array<import('./types.js').BranchNode | undefined>} */\n\tconst branch = [];\n\tfor (let i = 0; i < loaders.length; i += 1) if (loaders[i]) try {\n\t\tbranch.push(await branch_promises[i]);\n\t} catch (err) {\n\t\tif (err instanceof Redirect) return {\n\t\t\ttype: \"redirect\",\n\t\t\tlocation: err.location\n\t\t};\n\t\tif (preload_tokens.has(preload)) return preload_error({\n\t\t\terror: await handle_error(err, {\n\t\t\t\tparams,\n\t\t\t\turl,\n\t\t\t\troute: { id: route.id }\n\t\t\t}),\n\t\t\turl,\n\t\t\tparams,\n\t\t\troute\n\t\t});\n\t\tlet status = get_status(err);\n\t\t/** @type {App.Error} */\n\t\tlet error;\n\t\tif (server_data_nodes?.includes(err)) {\n\t\t\tstatus = err.status ?? status;\n\t\t\terror = err.error;\n\t\t} else if (err instanceof HttpError) error = err.body;\n\t\telse {\n\t\t\tif (await stores.updated.check()) {\n\t\t\t\tawait update_service_worker();\n\t\t\t\treturn await native_navigation(url);\n\t\t\t}\n\t\t\terror = await handle_error(err, {\n\t\t\t\tparams,\n\t\t\t\turl,\n\t\t\t\troute: { id: route.id }\n\t\t\t});\n\t\t}\n\t\tconst error_load = await load_nearest_error_page(i, branch, errors);\n\t\tif (error_load) return get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch: branch.slice(0, error_load.idx).concat(error_load.node),\n\t\t\terrors,\n\t\t\tstatus,\n\t\t\terror,\n\t\t\troute\n\t\t});\n\t\telse return await server_fallback(url, { id: route.id }, error, status);\n\t}\n\telse branch.push(void 0);\n\treturn get_navigation_result_from_branch({\n\t\turl,\n\t\tparams,\n\t\tbranch,\n\t\terrors,\n\t\tstatus: 200,\n\t\terror: null,\n\t\troute,\n\t\tform: invalidating ? void 0 : null\n\t});\n}\n/**\n* @param {number} i Start index to backtrack from\n* @param {Array<import('./types.js').BranchNode | undefined>} branch Branch to backtrack\n* @param {Array<import('types').CSRPageNodeLoader | undefined>} errors All error pages for this branch\n* @returns {Promise<{idx: number; node: import('./types.js').BranchNode} | undefined>}\n*/\nasync function load_nearest_error_page(i, branch, errors) {\n\twhile (i--) if (errors[i]) {\n\t\tlet j = i;\n\t\twhile (!branch[j]) j -= 1;\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tidx: j + 1,\n\t\t\t\tnode: {\n\t\t\t\t\tnode: await errors[i](),\n\t\t\t\t\tloader: errors[i],\n\t\t\t\t\tdata: {},\n\t\t\t\t\tserver: null,\n\t\t\t\t\tuniversal: null\n\t\t\t\t}\n\t\t\t};\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t}\n}\n/**\n* @param {{\n* status: number;\n* error: App.Error;\n* url: URL;\n* route: { id: string | null }\n* }} opts\n* @returns {Promise<import('./types.js').NavigationFinished>}\n*/\nasync function load_root_error_page({ status, error, url, route }) {\n\t/** @type {Record<string, string>} */\n\tconst params = {};\n\t/** @type {import('types').ServerDataNode | null} */\n\tlet server_data_node = null;\n\tif (app.server_loads[0] === 0) try {\n\t\tconst server_data = await load_data(url, [true]);\n\t\tif (server_data.type !== \"data\" || server_data.nodes[0] && server_data.nodes[0].type !== \"data\") throw 0;\n\t\tserver_data_node = server_data.nodes[0] ?? null;\n\t} catch {\n\t\tif (url.origin !== origin || url.pathname !== location.pathname || hydrated) await native_navigation(url);\n\t}\n\ttry {\n\t\treturn get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch: [await load_node({\n\t\t\t\tloader: default_layout_loader,\n\t\t\t\turl,\n\t\t\t\tparams,\n\t\t\t\troute,\n\t\t\t\tparent: () => Promise.resolve({}),\n\t\t\t\tserver_data_node: create_data_node(server_data_node)\n\t\t\t}), {\n\t\t\t\tnode: await default_error_loader(),\n\t\t\t\tloader: default_error_loader,\n\t\t\t\tuniversal: null,\n\t\t\t\tserver: null,\n\t\t\t\tdata: null\n\t\t\t}],\n\t\t\tstatus,\n\t\t\terror,\n\t\t\terrors: [],\n\t\t\troute: null\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof Redirect) return _goto(new URL(error.location, location.href), {}, 0);\n\t\tthrow error;\n\t}\n}\n/**\n* Resolve the relative rerouted URL for a client-side navigation\n* @param {URL} url\n* @returns {Promise<URL | undefined>}\n*/\nasync function get_rerouted_url(url) {\n\tconst href = url.href;\n\tif (reroute_cache.has(href)) return reroute_cache.get(href);\n\tlet rerouted;\n\ttry {\n\t\tconst promise = (async () => {\n\t\t\tlet rerouted = await app.hooks.reroute({\n\t\t\t\turl: new URL(url),\n\t\t\t\tfetch: async (input, init) => {\n\t\t\t\t\treturn resolve_fetch_url(input, init, url).promise;\n\t\t\t\t}\n\t\t\t}) ?? url;\n\t\t\tif (typeof rerouted === \"string\") {\n\t\t\t\tconst tmp = new URL(url);\n\t\t\t\tif (app.hash) tmp.hash = rerouted;\n\t\t\t\telse tmp.pathname = rerouted;\n\t\t\t\trerouted = tmp;\n\t\t\t}\n\t\t\treturn rerouted;\n\t\t})();\n\t\treroute_cache.set(href, promise);\n\t\trerouted = await promise;\n\t} catch (e) {\n\t\treroute_cache.delete(href);\n\t\treturn;\n\t}\n\treturn rerouted;\n}\n/**\n* Resolve the full info (which route, params, etc.) for a client-side navigation from the URL,\n* taking the reroute hook into account. If this isn't a client-side-navigation (or the URL is undefined),\n* returns undefined.\n* @param {URL | undefined} url\n* @param {boolean} invalidating\n* @returns {Promise<import('./types.js').NavigationIntent | undefined>}\n*/\nasync function get_navigation_intent(url, invalidating) {\n\tif (!url) return;\n\tif (is_external_url(url, base, app.hash)) return;\n\t{\n\t\tconst rerouted = await get_rerouted_url(url);\n\t\tif (!rerouted) return;\n\t\tconst path = get_url_path(rerouted);\n\t\tfor (const route of routes) {\n\t\t\tconst params = route.exec(path);\n\t\t\tif (params) return {\n\t\t\t\tid: get_page_key(url),\n\t\t\t\tinvalidating,\n\t\t\t\troute,\n\t\t\t\tparams: decode_params(params),\n\t\t\t\turl\n\t\t\t};\n\t\t}\n\t}\n}\n/** @param {URL} url */\nfunction get_url_path(url) {\n\treturn decode_pathname(app.hash ? url.hash.replace(/^#/, \"\").replace(/[?#].+/, \"\") : url.pathname.slice(base.length)) || \"/\";\n}\n/** @param {URL} url */\nfunction get_page_key(url) {\n\treturn (app.hash ? url.hash.replace(/^#/, \"\") : url.pathname) + url.search;\n}\n/**\n* @param {{\n* url: URL;\n* type: import('@sveltejs/kit').Navigation[\"type\"];\n* intent?: import('./types.js').NavigationIntent;\n* delta?: number;\n* event?: PopStateEvent | MouseEvent;\n* scroll?: { x: number, y: number };\n* }} opts\n*/\nfunction _before_navigate({ url, type, intent, delta, event, scroll }) {\n\tlet should_block = false;\n\tconst nav = create_navigation(current, intent, url, type, scroll ?? null);\n\tif (delta !== void 0) nav.navigation.delta = delta;\n\tif (event !== void 0) nav.navigation.event = event;\n\tconst cancellable = {\n\t\t...nav.navigation,\n\t\tcancel: () => {\n\t\t\tshould_block = true;\n\t\t\tnav.reject(/* @__PURE__ */ new Error(\"navigation cancelled\"));\n\t\t}\n\t};\n\tif (!is_navigating) before_navigate_callbacks.forEach((fn) => fn(cancellable));\n\treturn should_block ? null : nav;\n}\n/**\n* @param {{\n* type: import('@sveltejs/kit').NavigationType;\n* url: URL;\n* popped?: {\n* state: Record<string, any>;\n* scroll: { x: number, y: number };\n* delta: number;\n* };\n* keepfocus?: boolean;\n* noscroll?: boolean;\n* replace_state?: boolean;\n* state?: Record<string, any>;\n* redirect_count?: number;\n* nav_token?: {};\n* accept?: () => void;\n* block?: () => void;\n* event?: Event\n* }} opts\n*/\nasync function navigate({ type, url, popped, keepfocus, noscroll, replace_state, state = {}, redirect_count = 0, nav_token = {}, accept = noop, block = noop, event }) {\n\tconst prev_token = token;\n\ttoken = nav_token;\n\tconst intent = await get_navigation_intent(url, false);\n\tconst nav = type === \"enter\" ? create_navigation(current, intent, url, type) : _before_navigate({\n\t\turl,\n\t\ttype,\n\t\tdelta: popped?.delta,\n\t\tintent,\n\t\tscroll: popped?.scroll,\n\t\tevent\n\t});\n\tif (!nav) {\n\t\tblock();\n\t\tif (token === nav_token) token = prev_token;\n\t\treturn;\n\t}\n\tconst previous_history_index = current_history_index;\n\tconst previous_navigation_index = current_navigation_index;\n\taccept();\n\tis_navigating = true;\n\tif (started && nav.navigation.type !== \"enter\") stores.navigating.set(navigating.current = nav.navigation);\n\tlet navigation_result = intent && await load_route(intent);\n\tif (!navigation_result) if (is_external_url(url, base, app.hash)) return await native_navigation(url, replace_state);\n\telse navigation_result = await server_fallback(url, { id: null }, await handle_error(new SvelteKitError(404, \"Not Found\", `Not found: ${url.pathname}`), {\n\t\turl,\n\t\tparams: {},\n\t\troute: { id: null }\n\t}), 404, replace_state);\n\turl = intent?.url || url;\n\tif (token !== nav_token) {\n\t\tnav.reject(/* @__PURE__ */ new Error(\"navigation aborted\"));\n\t\treturn false;\n\t}\n\tif (navigation_result.type === \"redirect\") {\n\t\tif (redirect_count < 20) {\n\t\t\tawait navigate({\n\t\t\t\ttype,\n\t\t\t\turl: new URL(navigation_result.location, url),\n\t\t\t\tpopped,\n\t\t\t\tkeepfocus,\n\t\t\t\tnoscroll,\n\t\t\t\treplace_state,\n\t\t\t\tstate,\n\t\t\t\tredirect_count: redirect_count + 1,\n\t\t\t\tnav_token\n\t\t\t});\n\t\t\tnav.fulfil(void 0);\n\t\t\treturn;\n\t\t}\n\t\tnavigation_result = await load_root_error_page({\n\t\t\tstatus: 500,\n\t\t\terror: await handle_error(/* @__PURE__ */ new Error(\"Redirect loop\"), {\n\t\t\t\turl,\n\t\t\t\tparams: {},\n\t\t\t\troute: { id: null }\n\t\t\t}),\n\t\t\turl,\n\t\t\troute: { id: null }\n\t\t});\n\t} else if (navigation_result.props.page.status >= 400) {\n\t\tif (await stores.updated.check()) {\n\t\t\tawait update_service_worker();\n\t\t\tawait native_navigation(url, replace_state);\n\t\t}\n\t}\n\treset_invalidation();\n\tupdate_scroll_positions(previous_history_index);\n\tcapture_snapshot(previous_navigation_index);\n\tif (navigation_result.props.page.url.pathname !== url.pathname) url.pathname = navigation_result.props.page.url.pathname;\n\tstate = popped ? popped.state : state;\n\tif (!popped) {\n\t\tconst change = replace_state ? 0 : 1;\n\t\tconst entry = {\n\t\t\t[HISTORY_INDEX]: current_history_index += change,\n\t\t\t[NAVIGATION_INDEX]: current_navigation_index += change,\n\t\t\t[STATES_KEY]: state\n\t\t};\n\t\t(replace_state ? history.replaceState : history.pushState).call(history, entry, \"\", url);\n\t\tif (!replace_state) clear_onward_history(current_history_index, current_navigation_index);\n\t}\n\tconst load_cache_fork = intent && load_cache?.id === intent.id ? load_cache.fork : null;\n\tif (load_cache?.fork && !load_cache_fork) discard_load_cache();\n\tload_cache = null;\n\tnavigation_result.props.page.state = state;\n\t/**\n\t* @type {Promise<void> | undefined}\n\t*/\n\tlet commit_promise;\n\tif (started) {\n\t\tconst after_navigate = (await Promise.all(Array.from(on_navigate_callbacks, (fn) => fn(nav.navigation)))).filter(\n\t\t\t/** @returns {value is () => void} */\n\t\t\t(value) => typeof value === \"function\"\n\t\t);\n\t\tif (after_navigate.length > 0) {\n\t\t\tfunction cleanup() {\n\t\t\t\tafter_navigate.forEach((fn) => {\n\t\t\t\t\tafter_navigate_callbacks.delete(fn);\n\t\t\t\t});\n\t\t\t}\n\t\t\tafter_navigate.push(cleanup);\n\t\t\tafter_navigate.forEach((fn) => {\n\t\t\t\tafter_navigate_callbacks.add(fn);\n\t\t\t});\n\t\t}\n\t\tconst target = nav.navigation.to;\n\t\tcurrent = {\n\t\t\t...navigation_result.state,\n\t\t\tnav: {\n\t\t\t\tparams: target.params,\n\t\t\t\troute: target.route,\n\t\t\t\turl: target.url\n\t\t\t}\n\t\t};\n\t\tif (navigation_result.props.page) navigation_result.props.page.url = url;\n\t\tconst fork = load_cache_fork && await load_cache_fork;\n\t\tif (fork) commit_promise = fork.commit();\n\t\telse {\n\t\t\trendering_error = null;\n\t\t\troot.$set(navigation_result.props);\n\t\t\tif (rendering_error) Object.assign(navigation_result.props.page, rendering_error);\n\t\t\tupdate(navigation_result.props.page);\n\t\t\tcommit_promise = settled?.();\n\t\t}\n\t} else await initialize(navigation_result, target, false);\n\tconst { activeElement } = document;\n\tawait commit_promise;\n\tawait tick$1();\n\tawait tick$1();\n\tif (token !== nav_token) {\n\t\tnav.reject(/* @__PURE__ */ new Error(\"navigation aborted\"));\n\t\treturn false;\n\t}\n\tif (navigation_result.props.page && rendering_error) Object.assign(navigation_result.props.page, rendering_error);\n\t/** @type {Element | null | ''} */\n\tlet deep_linked = null;\n\tif (autoscroll) {\n\t\tconst scroll = popped ? popped.scroll : noscroll ? scroll_state() : null;\n\t\tif (scroll) scrollTo(scroll.x, scroll.y);\n\t\telse if (deep_linked = url.hash && document.getElementById(get_id(url))) deep_linked.scrollIntoView();\n\t\telse scrollTo(0, 0);\n\t}\n\tconst changed_focus = document.activeElement !== activeElement && document.activeElement !== document.body;\n\tif (!keepfocus && !changed_focus) reset_focus(url, !deep_linked);\n\tautoscroll = true;\n\tis_navigating = false;\n\tif (type === \"popstate\") restore_snapshot(current_navigation_index);\n\tnav.fulfil(void 0);\n\tif (nav.navigation.to) nav.navigation.to.scroll = scroll_state();\n\tafter_navigate_callbacks.forEach((fn) => fn(nav.navigation));\n\tstores.navigating.set(navigating.current = null);\n}\n/**\n* Does a full page reload if it wouldn't result in an endless loop in the SPA case\n* @param {URL} url\n* @param {{ id: string | null }} route\n* @param {App.Error} error\n* @param {number} status\n* @param {boolean} [replace_state]\n* @returns {Promise<import('./types.js').NavigationFinished>}\n*/\nasync function server_fallback(url, route, error, status, replace_state) {\n\tif (url.origin === origin && url.pathname === location.pathname && !hydrated) return await load_root_error_page({\n\t\tstatus,\n\t\terror,\n\t\turl,\n\t\troute\n\t});\n\treturn await native_navigation(url, replace_state);\n}\n/**\n* @param {unknown} error\n* @param {import('@sveltejs/kit').NavigationEvent} event\n* @returns {import('types').MaybePromise<App.Error>}\n*/\nfunction handle_error(error, event) {\n\tif (error instanceof HttpError) return error.body;\n\tconst status = get_status(error);\n\tconst message = get_message(error);\n\treturn app.hooks.handleError({\n\t\terror,\n\t\tevent,\n\t\tstatus,\n\t\tmessage\n\t}) ?? { message };\n}\n/**\n* @template {Function} T\n* @param {Set<T>} callbacks\n* @param {T} callback\n*/\nfunction add_navigation_callback(callbacks, callback) {\n\tonMount(() => {\n\t\tcallbacks.add(callback);\n\t\treturn () => {\n\t\t\tcallbacks.delete(callback);\n\t\t};\n\t});\n}\n/**\n* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL.\n*\n* `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n* @param {(navigation: import('@sveltejs/kit').AfterNavigate) => void} callback\n* @returns {void}\n*/\nfunction afterNavigate(callback) {\n\tadd_navigation_callback(after_navigate_callbacks, callback);\n}\n/**\n* A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.\n*\n* Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response.\n*\n* When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`.\n*\n* If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`.\n*\n* `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n* @param {(navigation: import('@sveltejs/kit').BeforeNavigate) => void} callback\n* @returns {void}\n*/\nfunction beforeNavigate(callback) {\n\tadd_navigation_callback(before_navigate_callbacks, callback);\n}\n/**\n* Allows you to navigate programmatically to a given route, with options such as keeping the current element focused.\n* Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`.\n*\n* For external URLs, use `window.location = url` instead of calling `goto(url)`.\n*\n* @param {string | URL} url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app.\n* @param {Object} [opts] Options related to the navigation\n* @param {boolean} [opts.replaceState] If `true`, will replace the current `history` entry rather than creating a new one with `pushState`\n* @param {boolean} [opts.noScroll] If `true`, the browser will maintain its scroll position rather than scrolling to the top of the page after navigation\n* @param {boolean} [opts.keepFocus] If `true`, the currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body\n* @param {boolean} [opts.invalidateAll] If `true`, all `load` functions of the page will be rerun. See https://svelte.dev/docs/kit/load#rerunning-load-functions for more info on invalidation.\n* @param {Array<string | URL | ((url: URL) => boolean)>} [opts.invalidate] Causes any load functions to re-run if they depend on one of the urls\n* @param {App.PageState} [opts.state] An optional object that will be available as `page.state`\n* @returns {Promise<void>}\n*/\nfunction goto(url, opts = {}) {\n\tthrow new Error(\"Cannot call goto(...) on the server\");\n}\n/**\n* @param {string | URL | ((url: URL) => boolean)} resource The invalidated URL\n*/\nfunction push_invalidated(resource) {\n\tif (typeof resource === \"function\") invalidated.push(resource);\n\telse {\n\t\tconst { href } = new URL(resource, location.href);\n\t\tinvalidated.push((url) => url.href === href);\n\t}\n}\n/**\n* Causes all `load` and `query` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated.\n* @returns {Promise<void>}\n*/\nfunction invalidateAll() {\n\tthrow new Error(\"Cannot call invalidateAll() on the server\");\n}\n/**\n* This action updates the `form` property of the current page with the given data and updates `page.status`.\n* In case of an error, it redirects to the nearest error page.\n* @template {Record<string, unknown> | undefined} Success\n* @template {Record<string, unknown> | undefined} Failure\n* @param {import('@sveltejs/kit').ActionResult<Success, Failure>} result\n* @returns {Promise<void>}\n*/\nasync function applyAction(result) {\n\tthrow new Error(\"Cannot call applyAction(...) on the server\");\n}\n/**\n* @param {URL} url\n* @param {boolean[]} invalid\n* @returns {Promise<import('types').ServerNodesResponse | import('types').ServerRedirectNode>}\n*/\nasync function load_data(url, invalid) {\n\tconst data_url = new URL(url);\n\tdata_url.pathname = add_data_suffix(url.pathname);\n\tif (url.pathname.endsWith(\"/\")) data_url.searchParams.append(TRAILING_SLASH_PARAM, \"1\");\n\tdata_url.searchParams.append(INVALIDATED_PARAM, invalid.map((i) => i ? \"1\" : \"0\").join(\"\"));\n\tconst res = await (0, window.fetch)(data_url.href, {});\n\tif (!res.ok) {\n\t\t/** @type {string | undefined} */\n\t\tlet message;\n\t\tif (res.headers.get(\"content-type\")?.includes(\"application/json\")) message = await res.json();\n\t\telse if (res.status === 404) message = \"Not Found\";\n\t\telse if (res.status === 500) message = \"Internal Error\";\n\t\tthrow new HttpError(res.status, message);\n\t}\n\treturn new Promise(async (resolve) => {\n\t\t/**\n\t\t* Map of deferred promises that will be resolved by a subsequent chunk of data\n\t\t* @type {Map<string, import('types').Deferred>}\n\t\t*/\n\t\tconst deferreds = /* @__PURE__ */ new Map();\n\t\tconst reader = res.body.getReader();\n\t\t/**\n\t\t* @param {any} data\n\t\t*/\n\t\tfunction deserialize(data) {\n\t\t\treturn unflatten(data, {\n\t\t\t\t...app.decoders,\n\t\t\t\tPromise: (id) => {\n\t\t\t\t\treturn new Promise((fulfil, reject) => {\n\t\t\t\t\t\tdeferreds.set(id, {\n\t\t\t\t\t\t\tfulfil,\n\t\t\t\t\t\t\treject\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tfor await (const node of read_ndjson(reader)) {\n\t\t\tif (node.type === \"redirect\") return resolve(node);\n\t\t\tif (node.type === \"data\") {\n\t\t\t\tnode.nodes?.forEach((node) => {\n\t\t\t\t\tif (node?.type === \"data\") {\n\t\t\t\t\t\tnode.uses = deserialize_uses(node.uses);\n\t\t\t\t\t\tnode.data = deserialize(node.data);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tresolve(node);\n\t\t\t} else if (node.type === \"chunk\") {\n\t\t\t\tconst { id, data, error } = node;\n\t\t\t\tconst deferred = deferreds.get(id);\n\t\t\t\tdeferreds.delete(id);\n\t\t\t\tif (error) deferred.reject(deserialize(error));\n\t\t\t\telse deferred.fulfil(deserialize(data));\n\t\t\t}\n\t\t}\n\t});\n}\n/**\n* @param {any} uses\n* @return {import('types').Uses}\n*/\nfunction deserialize_uses(uses) {\n\treturn {\n\t\tdependencies: new Set(uses?.dependencies ?? []),\n\t\tparams: new Set(uses?.params ?? []),\n\t\tparent: !!uses?.parent,\n\t\troute: !!uses?.route,\n\t\turl: !!uses?.url,\n\t\tsearch_params: new Set(uses?.search_params ?? [])\n\t};\n}\n/**\n* @param {URL} url\n* @param {boolean} [scroll]\n*/\nfunction reset_focus(url, scroll = true) {\n\tconst autofocus = document.querySelector(\"[autofocus]\");\n\tif (autofocus) autofocus.focus();\n\telse {\n\t\tconst id = get_id(url);\n\t\tif (id && document.getElementById(id)) {\n\t\t\tconst { x, y } = scroll_state();\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst history_state = history.state;\n\t\t\t\tlocation.replace(new URL(`#${id}`, location.href));\n\t\t\t\thistory.replaceState(history_state, \"\", url);\n\t\t\t\tif (scroll) scrollTo(x, y);\n\t\t\t});\n\t\t} else {\n\t\t\tconst root = document.body;\n\t\t\tconst tabindex = root.getAttribute(\"tabindex\");\n\t\t\troot.tabIndex = -1;\n\t\t\troot.focus({\n\t\t\t\tpreventScroll: true,\n\t\t\t\tfocusVisible: false\n\t\t\t});\n\t\t\tif (tabindex !== null) root.setAttribute(\"tabindex\", tabindex);\n\t\t\telse root.removeAttribute(\"tabindex\");\n\t\t}\n\t\tconst selection = getSelection();\n\t\tif (selection && selection.type !== \"None\") {\n\t\t\t/** @type {Range[]} */\n\t\t\tconst ranges = [];\n\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) ranges.push(selection.getRangeAt(i));\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (selection.rangeCount !== ranges.length) return;\n\t\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) {\n\t\t\t\t\tconst a = ranges[i];\n\t\t\t\t\tconst b = selection.getRangeAt(i);\n\t\t\t\t\tif (a.commonAncestorContainer !== b.commonAncestorContainer || a.startContainer !== b.startContainer || a.endContainer !== b.endContainer || a.startOffset !== b.startOffset || a.endOffset !== b.endOffset) return;\n\t\t\t\t}\n\t\t\t\tselection.removeAllRanges();\n\t\t\t});\n\t\t}\n\t}\n}\n/**\n* @template {import('@sveltejs/kit').NavigationType} T\n* @param {import('./types.js').NavigationState} current\n* @param {import('./types.js').NavigationIntent | undefined} intent\n* @param {URL | null} url\n* @param {T} type\n* @param {{ x: number, y: number } | null} [target_scroll] The scroll position for the target (for popstate navigations)\n*/\nfunction create_navigation(current, intent, url, type, target_scroll = null) {\n\t/** @type {(value: any) => void} */\n\tlet fulfil;\n\t/** @type {(error: any) => void} */\n\tlet reject;\n\tconst complete = new Promise((f, r) => {\n\t\tfulfil = f;\n\t\treject = r;\n\t});\n\tcomplete.catch(noop);\n\treturn {\n\t\tnavigation: {\n\t\t\tfrom: {\n\t\t\t\tparams: current.params,\n\t\t\t\troute: { id: current.route?.id ?? null },\n\t\t\t\turl: current.url,\n\t\t\t\tscroll: scroll_state()\n\t\t\t},\n\t\t\tto: url && {\n\t\t\t\tparams: intent?.params ?? null,\n\t\t\t\troute: { id: intent?.route?.id ?? null },\n\t\t\t\turl,\n\t\t\t\tscroll: target_scroll\n\t\t\t},\n\t\t\twillUnload: !intent,\n\t\t\ttype,\n\t\t\tcomplete\n\t\t},\n\t\tfulfil,\n\t\treject\n\t};\n}\n/**\n* TODO: remove this in 3.0 when the page store is also removed\n*\n* We need to assign a new page object so that subscribers are correctly notified.\n* However, spreading `{ ...page }` returns an empty object so we manually\n* assign to each property instead.\n*\n* @param {import('@sveltejs/kit').Page} page\n*/\nfunction clone_page(page) {\n\treturn {\n\t\tdata: page.data,\n\t\terror: page.error,\n\t\tform: page.form,\n\t\tparams: page.params,\n\t\troute: page.route,\n\t\tstate: page.state,\n\t\tstatus: page.status,\n\t\turl: page.url\n\t};\n}\n/**\n* @param {URL} url\n* @returns {string}\n*/\nfunction get_id(url) {\n\tlet id;\n\tif (app.hash) {\n\t\tconst [, , second] = url.hash.split(\"#\", 3);\n\t\tid = second ?? \"\";\n\t} else id = url.hash.slice(1);\n\treturn decodeURIComponent(id);\n}\n//#endregion\nexport { goto as a, navigating as c, beforeNavigate as i, page as l, app as n, invalidateAll as o, applyAction as r, stores as s, afterNavigate as t, updated as u };\n"],"names":["noop$1"],"mappings":";;;AA4FA,IAAI,SAAS,GAAGA,IAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAACA,IAAM,CAAC,QAAQ,EAAE,CAAC;AACnG,IAAI,eAAe,GAAG,IAAI;AAC1B,IAAI,SAAS,EAAE;AACf,EAAQ;AACR,EAAE,IAAI,EAAE,EAAE;AACV,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,KAAK,EAAE,IAAI;AACb,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;AACrB,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC,eAAe;AAC9B,GAAE;AAGF;AAkIA;AACA;AACA;AACA;AACA;AACA,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,oBAAoB;AA8G5C;AACA,IAAI,wBAAwB,mBAAmB,IAAI,GAAG,EAAE;AA43BxD;AACA;AACA;AACA;AACA;AACA,SAAS,uBAAuB,CAAC,SAAS,EAAE,QAAQ,EAAE;AACtD,CAAC,OAAO,CAAC,MAAM;AACf,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC;AACzB,EAAE,OAAO,MAAM;AACf,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC7B,EAAE,CAAC;AACH,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,CAAC,uBAAuB,CAAC,wBAAwB,EAAE,QAAQ,CAAC;AAC5D;AA8CA;AACA;AACA;AACA;AACA,SAAS,aAAa,GAAG;AACzB,CAAC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW,CAAC,MAAM,EAAE;AACnC,CAAC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC;AAC9D;;;;"}
|
|
1
|
+
{"version":3,"file":"client-CF_AG7xO.js","sources":["../../../.svelte-kit/adapter-node/chunks/client.js"],"sourcesContent":["import { S as noop, f as get_message, h as base64_decode, n as TRAILING_SLASH_PARAM, p as get_status, r as create_remote_key, t as INVALIDATED_PARAM, x as unflatten } from \"./shared.js\";\nimport { a as index_server_exports, c as tick$1, h as base, s as settled } from \"./environment.js\";\nimport { Z as noop$1, k as writable } from \"./dev.js\";\nimport { S as compact, f as make_trackable, g as add_data_suffix, h as noop_span, l as decode_params, p as normalize_path, s as hash, u as decode_pathname } from \"./exports.js\";\nimport \"./internal.js\";\nimport { HttpError, Redirect, SvelteKitError } from \"@sveltejs/kit/internal\";\nimport \"@sveltejs/kit/internal/server\";\nvar STATES_KEY = \"sveltekit:states\";\nvar HISTORY_INDEX = \"sveltekit:history\";\nvar NAVIGATION_INDEX = \"sveltekit:navigation\";\nvar PRELOAD_PRIORITIES = {\n\ttap: 1,\n\thover: 2,\n\tviewport: 3,\n\teager: 4,\n\toff: -1,\n\tfalse: -1\n};\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/client/utils.js\nvar origin = \"\";\n/** @param {string | URL} url */\nfunction resolve_url(url) {\n\tif (url instanceof URL) return url;\n\tlet baseURI = document.baseURI;\n\tif (!baseURI) {\n\t\tconst baseTags = document.getElementsByTagName(\"base\");\n\t\tbaseURI = baseTags.length ? baseTags[0].href : document.URL;\n\t}\n\treturn new URL(url, baseURI);\n}\nfunction scroll_state() {\n\treturn {\n\t\tx: pageXOffset,\n\t\ty: pageYOffset\n\t};\n}\n({ ...PRELOAD_PRIORITIES }), PRELOAD_PRIORITIES.hover;\n/** @param {any} value */\nfunction notifiable_store(value) {\n\tconst store = writable(value);\n\tlet ready = true;\n\tfunction notify() {\n\t\tready = true;\n\t\tstore.update((val) => val);\n\t}\n\t/** @param {any} new_value */\n\tfunction set(new_value) {\n\t\tready = false;\n\t\tstore.set(new_value);\n\t}\n\t/** @param {(value: any) => void} run */\n\tfunction subscribe(run) {\n\t\t/** @type {any} */\n\t\tlet old_value;\n\t\treturn store.subscribe((new_value) => {\n\t\t\tif (old_value === void 0 || ready && new_value !== old_value) run(old_value = new_value);\n\t\t});\n\t}\n\treturn {\n\t\tnotify,\n\t\tset,\n\t\tsubscribe\n\t};\n}\nvar updated_listener = { v: noop };\nfunction create_updated_store() {\n\tconst { set, subscribe } = writable(false);\n\treturn {\n\t\tsubscribe,\n\t\tcheck: async () => false\n\t};\n}\n/**\n* Is external if\n* - origin different\n* - path doesn't start with base\n* - uses hash router and pathname is more than base\n* @param {URL} url\n* @param {string} base\n* @param {boolean} hash_routing\n*/\nfunction is_external_url(url, base, hash_routing) {\n\tif (url.origin !== origin || !url.pathname.startsWith(base)) return true;\n\tif (hash_routing) return url.pathname !== location.pathname;\n\treturn false;\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/client/state.svelte.js\nvar page;\nvar navigating;\nvar updated;\nvar is_legacy = noop$1.toString().includes(\"$$\") || /function \\w+\\(\\) \\{\\}/.test(noop$1.toString());\nvar placeholder_url = \"a:\";\nif (is_legacy) {\n\tpage = {\n\t\tdata: {},\n\t\tform: null,\n\t\terror: null,\n\t\tparams: {},\n\t\troute: { id: null },\n\t\tstate: {},\n\t\tstatus: -1,\n\t\turl: new URL(placeholder_url)\n\t};\n\tnavigating = { current: null };\n\tupdated = { current: false };\n} else {\n\tpage = new class Page {\n\t\tdata = {};\n\t\tform = null;\n\t\terror = null;\n\t\tparams = {};\n\t\troute = { id: null };\n\t\tstate = {};\n\t\tstatus = -1;\n\t\turl = new URL(placeholder_url);\n\t}();\n\tnavigating = new class Navigating {\n\t\tcurrent = null;\n\t}();\n\tupdated = new class Updated {\n\t\tcurrent = false;\n\t}();\n\tupdated_listener.v = () => updated.current = true;\n}\n/**\n* @param {import('@sveltejs/kit').Page} new_page\n*/\nfunction update(new_page) {\n\tObject.assign(page, new_page);\n}\nvar cache = /* @__PURE__ */ new Map();\n/**\n* Should be called on the initial run of load functions that hydrate the page.\n* Saves any requests with cache-control max-age to the cache.\n* @param {URL | string} resource\n* @param {RequestInit} [opts]\n*/\nfunction initial_fetch(resource, opts) {\n\tconst selector = build_selector(resource, opts);\n\tconst script = document.querySelector(selector);\n\tif (script?.textContent) {\n\t\tscript.remove();\n\t\tlet { body, ...init } = JSON.parse(script.textContent);\n\t\tconst ttl = script.getAttribute(\"data-ttl\");\n\t\tif (ttl) cache.set(selector, {\n\t\t\tbody,\n\t\t\tinit,\n\t\t\tttl: 1e3 * Number(ttl)\n\t\t});\n\t\tif (script.getAttribute(\"data-b64\") !== null) body = base64_decode(body);\n\t\treturn Promise.resolve(new Response(body, init));\n\t}\n\treturn window.fetch(resource, opts);\n}\n/**\n* Tries to get the response from the cache, if max-age allows it, else does a fetch.\n* @param {URL | string} resource\n* @param {string} resolved\n* @param {RequestInit} [opts]\n*/\nfunction subsequent_fetch(resource, resolved, opts) {\n\tif (cache.size > 0) {\n\t\tconst selector = build_selector(resource, opts);\n\t\tconst cached = cache.get(selector);\n\t\tif (cached) {\n\t\t\tif (performance.now() < cached.ttl && [\n\t\t\t\t\"default\",\n\t\t\t\t\"force-cache\",\n\t\t\t\t\"only-if-cached\",\n\t\t\t\tvoid 0\n\t\t\t].includes(opts?.cache)) return new Response(cached.body, cached.init);\n\t\t\tcache.delete(selector);\n\t\t}\n\t}\n\treturn window.fetch(resolved, opts);\n}\n/**\n* Build the cache key for a given request\n* @param {URL | RequestInfo} resource\n* @param {RequestInit} [opts]\n*/\nfunction build_selector(resource, opts) {\n\tlet selector = `script[data-sveltekit-fetched][data-url=${JSON.stringify(resource instanceof Request ? resource.url : resource)}]`;\n\tif (opts?.headers || opts?.body) {\n\t\t/** @type {import('types').StrictBody[]} */\n\t\tconst values = [];\n\t\tif (opts.headers) values.push([...new Headers(opts.headers)].join(\",\"));\n\t\tif (opts.body && (typeof opts.body === \"string\" || ArrayBuffer.isView(opts.body))) values.push(opts.body);\n\t\tselector += `[data-hash=\"${hash(...values)}\"]`;\n\t}\n\treturn selector;\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/client/session-storage.js\n/**\n* Read a value from `sessionStorage`\n* @param {string} key\n* @param {(value: string) => any} parse\n*/\n/* @__NO_SIDE_EFFECTS__ */\nfunction get(key, parse = JSON.parse) {\n\ttry {\n\t\treturn parse(sessionStorage[key]);\n\t} catch {}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/client/ndjson.js\n/**\n* Yields parsed JSON objects from a ReadableStream of newline-delimited JSON.\n* Each yielded value is the raw `JSON.parse`'d object — callers handle deserialization.\n* @param {ReadableStreamDefaultReader<Uint8Array>} reader\n*/\nasync function* read_ndjson(reader) {\n\tlet done = false;\n\tlet buffer = \"\";\n\tconst decoder = new TextDecoder();\n\twhile (true) {\n\t\tlet split = buffer.indexOf(\"\\n\");\n\t\twhile (split !== -1) {\n\t\t\tconst line = buffer.slice(0, split).trim();\n\t\t\tbuffer = buffer.slice(split + 1);\n\t\t\tif (line) yield JSON.parse(line);\n\t\t\tsplit = buffer.indexOf(\"\\n\");\n\t\t}\n\t\tif (done) {\n\t\t\tconst line = buffer.trim();\n\t\t\tif (line) yield JSON.parse(line);\n\t\t\treturn;\n\t\t}\n\t\tconst chunk = await reader.read();\n\t\tdone = chunk.done;\n\t\tif (chunk.value) buffer += decoder.decode(chunk.value, { stream: true });\n\t\tif (done) buffer += decoder.decode();\n\t}\n}\n//#endregion\n//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/client/client.js\n/** @import { CacheEntry } from './remote-functions/cache.svelte.js' */\n/** @import { Query } from './remote-functions/query/instance.svelte.js' */\n/** @import { LiveQuery } from './remote-functions/query-live/instance.svelte.js' */\nvar { onMount, tick } = index_server_exports;\n/**\n* Set via transformError, reset and read at the end of navigate.\n* Necessary because a navigation might succeed loading but during rendering\n* an error occurs, at which point the navigation result needs to be overridden with the error result.\n* TODO this is all very hacky, rethink for SvelteKit 3 where we can assume Svelte 5 and do an overhaul of client.js\n* @type {{ error: App.Error, status: number } | null}\n*/\nvar rendering_error = null;\n/**\n* history index -> { x, y }\n* @type {Record<number, { x: number; y: number }>}\n*/\nvar scroll_positions = /* @__PURE__ */ get(\"sveltekit:scroll\") ?? {};\n/**\n* navigation index -> any\n* @type {Record<string, any[]>}\n*/\nvar snapshots = /* @__PURE__ */ get(\"sveltekit:snapshot\") ?? {};\nvar stores = {\n\turl: /* @__PURE__ */ notifiable_store({}),\n\tpage: /* @__PURE__ */ notifiable_store({}),\n\tnavigating: /* @__PURE__ */ writable(null),\n\tupdated: /* @__PURE__ */ create_updated_store()\n};\n/** @param {number} index */\nfunction update_scroll_positions(index) {\n\tscroll_positions[index] = scroll_state();\n}\n/**\n* @param {number} current_history_index\n* @param {number} current_navigation_index\n*/\nfunction clear_onward_history(current_history_index, current_navigation_index) {\n\tlet i = current_history_index + 1;\n\twhile (scroll_positions[i]) {\n\t\tdelete scroll_positions[i];\n\t\ti += 1;\n\t}\n\ti = current_navigation_index + 1;\n\twhile (snapshots[i]) {\n\t\tdelete snapshots[i];\n\t\ti += 1;\n\t}\n}\n/**\n* Loads `href` the old-fashioned way, with a full page reload.\n* Returns a `Promise` that never resolves (to prevent any\n* subsequent work, e.g. history manipulation, from happening)\n* @param {URL} url\n* @param {boolean} [replace] If `true`, will replace the current `history` entry rather than creating a new one with `pushState`\n*/\nfunction native_navigation(url, replace = false) {\n\tif (replace) location.replace(url.href);\n\telse location.href = url.href;\n\treturn new Promise(noop);\n}\n/**\n* Checks whether a service worker is registered, and if it is,\n* tries to update it.\n*/\nasync function update_service_worker() {\n\tif (\"serviceWorker\" in navigator) {\n\t\tconst registration = await navigator.serviceWorker.getRegistration(base || \"/\");\n\t\tif (registration) await registration.update();\n\t}\n}\n/** @type {import('types').CSRRoute[]} All routes of the app. Only available when kit.router.resolution=client */\nvar routes;\n/** @type {import('types').CSRPageNodeLoader} */\nvar default_layout_loader;\n/** @type {import('types').CSRPageNodeLoader} */\nvar default_error_loader;\n/** @type {HTMLElement} */\nvar target;\n/** @type {import('./types.js').SvelteKitApp} */\nvar app;\n/** @type {Array<((url: URL) => boolean)>} */\nvar invalidated = [];\n/**\n* An array of the `+layout.svelte` and `+page.svelte` component instances\n* that currently live on the page — used for capturing and restoring snapshots.\n* It's updated/manipulated through `bind:this` in `Root.svelte`.\n* @type {import('svelte').SvelteComponent[]}\n*/\nvar components = [];\n/** @type {{id: string, token: {}, promise: Promise<import('./types.js').NavigationResult>, fork: Promise<import('svelte').Fork | null> | null} | null} */\nvar load_cache = null;\nfunction discard_load_cache() {\n\tload_cache?.fork?.then((f) => f?.discard());\n\tload_cache = null;\n}\n/**\n* @type {Map<string, Promise<URL>>}\n* Cache for client-side rerouting, since it could contain async calls which we want to\n* avoid running multiple times which would slow down navigations (e.g. else preloading\n* wouldn't help because on navigation it would be called again). Since `reroute` should be\n* a pure function (i.e. always return the same) value it's safe to cache across navigations.\n* The server reroute calls don't need to be cached because they are called using `import(...)`\n* which is cached per the JS spec.\n*/\nvar reroute_cache = /* @__PURE__ */ new Map();\n/**\n* Note on before_navigate_callbacks, on_navigate_callbacks and after_navigate_callbacks:\n* do not re-assign as some closures keep references to these Sets\n*/\n/** @type {Set<(navigation: import('@sveltejs/kit').BeforeNavigate) => void>} */\nvar before_navigate_callbacks = /* @__PURE__ */ new Set();\n/** @type {Set<(navigation: import('@sveltejs/kit').OnNavigate) => import('types').MaybePromise<(() => void) | void>>} */\nvar on_navigate_callbacks = /* @__PURE__ */ new Set();\n/** @type {Set<(navigation: import('@sveltejs/kit').AfterNavigate) => void>} */\nvar after_navigate_callbacks = /* @__PURE__ */ new Set();\n/** @type {import('./types.js').NavigationState & { nav: import('@sveltejs/kit').NavigationEvent }} */\nvar current = {\n\tbranch: [],\n\terror: null,\n\turl: null,\n\tnav: null\n};\n/** this being true means we SSR'd */\nvar hydrated = false;\nvar started = false;\nvar autoscroll = true;\nvar is_navigating = false;\nvar force_invalidation = false;\n/** @type {import('svelte').SvelteComponent} */\nvar root;\n/** @type {number} keeping track of the history index in order to prevent popstate navigation events if needed */\nvar current_history_index;\n/** @type {number} */\nvar current_navigation_index;\n/** @type {{}} */\nvar token;\n/**\n* A set of tokens which are associated to current preloads.\n* If a preload becomes a real navigation, it's removed from the set.\n* If a preload token is in the set and the preload errors, the error\n* handling logic (for example reloading) is skipped.\n*/\nvar preload_tokens = /* @__PURE__ */ new Set();\n/**\n* @type {Map<string, Map<string, CacheEntry<Query<any>>>>}\n* A map of query id -> payload -> query internals for all active queries.\n*/\nvar query_map = /* @__PURE__ */ new Map();\n/**\n* @type {Map<string, Map<string, CacheEntry<LiveQuery<any>>>>}\n* A map of id -> payload -> live query internals for all active queries.\n*/\nvar live_query_map = /* @__PURE__ */ new Map();\nfunction reset_invalidation() {\n\tinvalidated.length = 0;\n\tforce_invalidation = false;\n}\n/** @param {number} index */\nfunction capture_snapshot(index) {\n\tif (components.some((c) => c?.snapshot)) snapshots[index] = components.map((c) => c?.snapshot?.capture());\n}\n/** @param {number} index */\nfunction restore_snapshot(index) {\n\tsnapshots[index]?.forEach((value, i) => {\n\t\tcomponents[i]?.snapshot?.restore(value);\n\t});\n}\n/**\n* @param {string | URL} url\n* @param {{ replaceState?: boolean; noScroll?: boolean; keepFocus?: boolean; invalidateAll?: boolean; invalidate?: Array<string | URL | ((url: URL) => boolean)>; state?: Record<string, any> }} options\n* @param {number} redirect_count\n* @param {{}} [nav_token]\n*/\nasync function _goto(url, options, redirect_count, nav_token) {\n\t/** @type {Set<string>} */\n\tlet query_keys;\n\t/** @type {Set<string>} */\n\tlet live_query_keys;\n\tif (options.invalidateAll) discard_load_cache();\n\tawait navigate({\n\t\ttype: \"goto\",\n\t\turl: resolve_url(url),\n\t\tkeepfocus: options.keepFocus,\n\t\tnoscroll: options.noScroll,\n\t\treplace_state: options.replaceState,\n\t\tstate: options.state,\n\t\tredirect_count,\n\t\tnav_token,\n\t\taccept: () => {\n\t\t\tif (options.invalidateAll) {\n\t\t\t\tforce_invalidation = true;\n\t\t\t\tquery_keys = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const [id, entries] of query_map) for (const payload of entries.keys()) query_keys.add(create_remote_key(id, payload));\n\t\t\t\tlive_query_keys = /* @__PURE__ */ new Set();\n\t\t\t\tfor (const [id, entries] of live_query_map) for (const payload of entries.keys()) live_query_keys.add(create_remote_key(id, payload));\n\t\t\t}\n\t\t\tif (options.invalidate) options.invalidate.forEach(push_invalidated);\n\t\t}\n\t});\n\tif (options.invalidateAll) tick$1().then(tick$1).then(() => {\n\t\tfor (const [id, entries] of query_map) for (const [payload, { resource }] of entries) if (query_keys?.has(create_remote_key(id, payload))) resource.refresh();\n\t\tfor (const [id, entries] of live_query_map) for (const [payload, { resource }] of entries) if (live_query_keys?.has(create_remote_key(id, payload))) resource.reconnect();\n\t});\n}\n/**\n* @param {import('./types.js').NavigationFinished} result\n* @param {HTMLElement} target\n* @param {boolean} hydrate\n*/\nasync function initialize(result, target, hydrate) {\n\t/** @type {import('@sveltejs/kit').NavigationEvent} */\n\tconst nav = {\n\t\tparams: current.params,\n\t\troute: { id: current.route?.id ?? null },\n\t\turl: new URL(location.href)\n\t};\n\tcurrent = {\n\t\t...result.state,\n\t\tnav\n\t};\n\tupdate(result.props.page);\n\troot = new app.root({\n\t\ttarget,\n\t\tprops: {\n\t\t\t...result.props,\n\t\t\tstores,\n\t\t\tcomponents\n\t\t},\n\t\thydrate,\n\t\tsync: false,\n\t\ttransformError: void 0\n\t});\n\tawait Promise.resolve();\n\trestore_snapshot(current_navigation_index);\n\tif (hydrate) {\n\t\t/** @type {import('@sveltejs/kit').AfterNavigate} */\n\t\tconst navigation = {\n\t\t\tfrom: null,\n\t\t\tto: {\n\t\t\t\t...nav,\n\t\t\t\tscroll: scroll_positions[current_history_index] ?? scroll_state()\n\t\t\t},\n\t\t\twillUnload: false,\n\t\t\ttype: \"enter\",\n\t\t\tcomplete: Promise.resolve()\n\t\t};\n\t\tafter_navigate_callbacks.forEach((fn) => fn(navigation));\n\t}\n\tstarted = true;\n}\n/**\n*\n* @param {{\n* url: URL;\n* params: Record<string, string>;\n* branch: Array<import('./types.js').BranchNode | undefined>;\n* errors?: Array<import('types').CSRPageNodeLoader | undefined>;\n* status: number;\n* error: App.Error | null;\n* route: import('types').CSRRoute | null;\n* form?: Record<string, any> | null;\n* }} opts\n*/\nasync function get_navigation_result_from_branch({ url, params, branch, errors, status, error, route, form }) {\n\t/** @type {import('types').TrailingSlash} */\n\tlet slash = \"never\";\n\tif (base && (url.pathname === base || url.pathname === base + \"/\")) slash = \"always\";\n\telse for (const node of branch) if (node?.slash !== void 0) slash = node.slash;\n\turl.pathname = normalize_path(url.pathname, slash);\n\turl.search = url.search;\n\t/** @type {import('./types.js').NavigationFinished} */\n\tconst result = {\n\t\ttype: \"loaded\",\n\t\tstate: {\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch,\n\t\t\terror,\n\t\t\troute\n\t\t},\n\t\tprops: {\n\t\t\tconstructors: compact(branch).map((branch_node) => branch_node.node.component),\n\t\t\tpage: clone_page(page)\n\t\t}\n\t};\n\tif (form !== void 0) result.props.form = form;\n\tlet data = {};\n\tlet data_changed = !page;\n\tlet p = 0;\n\tfor (let i = 0; i < Math.max(branch.length, current.branch.length); i += 1) {\n\t\tconst node = branch[i];\n\t\tconst prev = current.branch[i];\n\t\tif (node?.data !== prev?.data) data_changed = true;\n\t\tif (!node) continue;\n\t\tdata = {\n\t\t\t...data,\n\t\t\t...node.data\n\t\t};\n\t\tif (data_changed) result.props[`data_${p}`] = data;\n\t\tp += 1;\n\t}\n\tif (!current.url || url.href !== current.url.href || current.error !== error || form !== void 0 && form !== page.form || data_changed) result.props.page = {\n\t\terror,\n\t\tparams,\n\t\troute: { id: route?.id ?? null },\n\t\tstate: {},\n\t\tstatus,\n\t\turl: new URL(url),\n\t\tform: form ?? null,\n\t\tdata: data_changed ? data : page.data\n\t};\n\treturn result;\n}\n/**\n* Call the universal load function of the given node, if it exists.\n*\n* @param {{\n* loader: import('types').CSRPageNodeLoader;\n* \t parent: () => Promise<Record<string, any>>;\n* url: URL;\n* params: Record<string, string>;\n* route: { id: string | null };\n* \t server_data_node: import('./types.js').DataNode | null;\n* }} options\n* @returns {Promise<import('./types.js').BranchNode>}\n*/\nasync function load_node({ loader, parent, url, params, route, server_data_node }) {\n\t/** @type {Record<string, any> | null} */\n\tlet data = null;\n\tlet is_tracking = true;\n\t/** @type {import('types').Uses} */\n\tconst uses = {\n\t\tdependencies: /* @__PURE__ */ new Set(),\n\t\tparams: /* @__PURE__ */ new Set(),\n\t\tparent: false,\n\t\troute: false,\n\t\turl: false,\n\t\tsearch_params: /* @__PURE__ */ new Set()\n\t};\n\tconst node = await loader();\n\tif (node.universal?.load) {\n\t\t/** @param {string[]} deps */\n\t\tfunction depends(...deps) {\n\t\t\tfor (const dep of deps) {\n\t\t\t\tconst { href } = new URL(dep, url);\n\t\t\t\tuses.dependencies.add(href);\n\t\t\t}\n\t\t}\n\t\t/** @type {import('@sveltejs/kit').LoadEvent} */\n\t\tconst load_input = {\n\t\t\ttracing: {\n\t\t\t\tenabled: false,\n\t\t\t\troot: noop_span,\n\t\t\t\tcurrent: noop_span\n\t\t\t},\n\t\t\troute: new Proxy(route, { get: (target, key) => {\n\t\t\t\tif (is_tracking) uses.route = true;\n\t\t\t\treturn target[key];\n\t\t\t} }),\n\t\t\tparams: new Proxy(params, { get: (target, key) => {\n\t\t\t\tif (is_tracking) uses.params.add(key);\n\t\t\t\treturn target[key];\n\t\t\t} }),\n\t\t\tdata: server_data_node?.data ?? null,\n\t\t\turl: make_trackable(url, () => {\n\t\t\t\tif (is_tracking) uses.url = true;\n\t\t\t}, (param) => {\n\t\t\t\tif (is_tracking) uses.search_params.add(param);\n\t\t\t}, app.hash),\n\t\t\tasync fetch(resource, init) {\n\t\t\t\tif (resource instanceof Request) init = {\n\t\t\t\t\tbody: resource.method === \"GET\" || resource.method === \"HEAD\" ? void 0 : await resource.blob(),\n\t\t\t\t\tcache: resource.cache,\n\t\t\t\t\tcredentials: resource.credentials,\n\t\t\t\t\theaders: [...resource.headers].length > 0 ? resource?.headers : void 0,\n\t\t\t\t\tintegrity: resource.integrity,\n\t\t\t\t\tkeepalive: resource.keepalive,\n\t\t\t\t\tmethod: resource.method,\n\t\t\t\t\tmode: resource.mode,\n\t\t\t\t\tredirect: resource.redirect,\n\t\t\t\t\treferrer: resource.referrer,\n\t\t\t\t\treferrerPolicy: resource.referrerPolicy,\n\t\t\t\t\tsignal: resource.signal,\n\t\t\t\t\t...init\n\t\t\t\t};\n\t\t\t\tconst { resolved, promise } = resolve_fetch_url(resource, init, url);\n\t\t\t\tif (is_tracking) depends(resolved.href);\n\t\t\t\treturn promise;\n\t\t\t},\n\t\t\tsetHeaders: noop,\n\t\t\tdepends,\n\t\t\tparent() {\n\t\t\t\tif (is_tracking) uses.parent = true;\n\t\t\t\treturn parent();\n\t\t\t},\n\t\t\tuntrack(fn) {\n\t\t\t\tis_tracking = false;\n\t\t\t\ttry {\n\t\t\t\t\treturn fn();\n\t\t\t\t} finally {\n\t\t\t\t\tis_tracking = true;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tdata = await node.universal.load.call(null, load_input) ?? null;\n\t}\n\treturn {\n\t\tnode,\n\t\tloader,\n\t\tserver: server_data_node,\n\t\tuniversal: node.universal?.load ? {\n\t\t\ttype: \"data\",\n\t\t\tdata,\n\t\t\tuses\n\t\t} : null,\n\t\tdata: data ?? server_data_node?.data ?? null,\n\t\tslash: node.universal?.trailingSlash ?? server_data_node?.slash\n\t};\n}\n/**\n* @param {Request | string | URL} input\n* @param {RequestInit | undefined} init\n* @param {URL} url\n*/\nfunction resolve_fetch_url(input, init, url) {\n\tlet requested = input instanceof Request ? input.url : input;\n\tconst resolved = new URL(requested, url);\n\tif (resolved.origin === url.origin) requested = resolved.href.slice(url.origin.length);\n\treturn {\n\t\tresolved,\n\t\tpromise: started ? subsequent_fetch(requested, resolved.href, init) : initial_fetch(requested, init)\n\t};\n}\n/**\n* @param {boolean} parent_changed\n* @param {boolean} route_changed\n* @param {boolean} url_changed\n* @param {Set<string>} search_params_changed\n* @param {import('types').Uses | undefined} uses\n* @param {Record<string, string>} params\n*/\nfunction has_changed(parent_changed, route_changed, url_changed, search_params_changed, uses, params) {\n\tif (force_invalidation) return true;\n\tif (!uses) return false;\n\tif (uses.parent && parent_changed) return true;\n\tif (uses.route && route_changed) return true;\n\tif (uses.url && url_changed) return true;\n\tfor (const tracked_params of uses.search_params) if (search_params_changed.has(tracked_params)) return true;\n\tfor (const param of uses.params) if (params[param] !== current.params[param]) return true;\n\tfor (const href of uses.dependencies) if (invalidated.some((fn) => fn(new URL(href)))) return true;\n\treturn false;\n}\n/**\n* @param {import('types').ServerDataNode | import('types').ServerDataSkippedNode | null} node\n* @param {import('./types.js').DataNode | null} [previous]\n* @returns {import('./types.js').DataNode | null}\n*/\nfunction create_data_node(node, previous) {\n\tif (node?.type === \"data\") return node;\n\tif (node?.type === \"skip\") return previous ?? null;\n\treturn null;\n}\n/**\n* @param {URL | null} old_url\n* @param {URL} new_url\n*/\nfunction diff_search_params(old_url, new_url) {\n\tif (!old_url) return new Set(new_url.searchParams.keys());\n\tconst changed = new Set([...old_url.searchParams.keys(), ...new_url.searchParams.keys()]);\n\tfor (const key of changed) {\n\t\tconst old_values = old_url.searchParams.getAll(key);\n\t\tconst new_values = new_url.searchParams.getAll(key);\n\t\tif (old_values.every((value) => new_values.includes(value)) && new_values.every((value) => old_values.includes(value))) changed.delete(key);\n\t}\n\treturn changed;\n}\n/**\n* @param {Omit<import('./types.js').NavigationFinished['state'], 'branch'> & { error: App.Error }} opts\n* @returns {import('./types.js').NavigationFinished}\n*/\nfunction preload_error({ error, url, route, params }) {\n\treturn {\n\t\ttype: \"loaded\",\n\t\tstate: {\n\t\t\terror,\n\t\t\turl,\n\t\t\troute,\n\t\t\tparams,\n\t\t\tbranch: []\n\t\t},\n\t\tprops: {\n\t\t\tpage: clone_page(page),\n\t\t\tconstructors: []\n\t\t}\n\t};\n}\n/**\n* @param {import('./types.js').NavigationIntent & { preload?: {} }} intent\n* @returns {Promise<import('./types.js').NavigationResult>}\n*/\nasync function load_route({ id, invalidating, url, params, route, preload }) {\n\tif (load_cache?.id === id) {\n\t\tpreload_tokens.delete(load_cache.token);\n\t\treturn load_cache.promise;\n\t}\n\tconst { errors, layouts, leaf } = route;\n\tconst loaders = [...layouts, leaf];\n\terrors.forEach((loader) => loader?.().catch(noop));\n\tloaders.forEach((loader) => loader?.[1]().catch(noop));\n\t/** @type {import('types').ServerNodesResponse | import('types').ServerRedirectNode | null} */\n\tlet server_data = null;\n\tconst url_changed = current.url ? id !== get_page_key(current.url) : false;\n\tconst route_changed = current.route ? route.id !== current.route.id : false;\n\tconst search_params_changed = diff_search_params(current.url, url);\n\tlet parent_invalid = false;\n\t{\n\t\tconst invalid_server_nodes = loaders.map((loader, i) => {\n\t\t\tconst previous = current.branch[i];\n\t\t\tconst invalid = !!loader?.[0] && (previous?.loader !== loader[1] || has_changed(parent_invalid, route_changed, url_changed, search_params_changed, previous.server?.uses, params));\n\t\t\tif (invalid) parent_invalid = true;\n\t\t\treturn invalid;\n\t\t});\n\t\tif (invalid_server_nodes.some(Boolean)) {\n\t\t\ttry {\n\t\t\t\tserver_data = await load_data(url, invalid_server_nodes);\n\t\t\t} catch (error) {\n\t\t\t\tconst handled_error = await handle_error(error, {\n\t\t\t\t\turl,\n\t\t\t\t\tparams,\n\t\t\t\t\troute: { id }\n\t\t\t\t});\n\t\t\t\tif (preload_tokens.has(preload)) return preload_error({\n\t\t\t\t\terror: handled_error,\n\t\t\t\t\turl,\n\t\t\t\t\tparams,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t\treturn load_root_error_page({\n\t\t\t\t\tstatus: get_status(error),\n\t\t\t\t\terror: handled_error,\n\t\t\t\t\turl,\n\t\t\t\t\troute\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (server_data.type === \"redirect\") return server_data;\n\t\t}\n\t}\n\tconst server_data_nodes = server_data?.nodes;\n\tlet parent_changed = false;\n\tconst branch_promises = loaders.map(async (loader, i) => {\n\t\tif (!loader) return;\n\t\t/** @type {import('./types.js').BranchNode | undefined} */\n\t\tconst previous = current.branch[i];\n\t\tconst server_data_node = server_data_nodes?.[i];\n\t\tif ((!server_data_node || server_data_node.type === \"skip\") && loader[1] === previous?.loader && !has_changed(parent_changed, route_changed, url_changed, search_params_changed, previous.universal?.uses, params)) return previous;\n\t\tparent_changed = true;\n\t\tif (server_data_node?.type === \"error\") throw server_data_node;\n\t\treturn load_node({\n\t\t\tloader: loader[1],\n\t\t\turl,\n\t\t\tparams,\n\t\t\troute,\n\t\t\tparent: async () => {\n\t\t\t\tconst data = {};\n\t\t\t\tfor (let j = 0; j < i; j += 1) Object.assign(data, (await branch_promises[j])?.data);\n\t\t\t\treturn data;\n\t\t\t},\n\t\t\tserver_data_node: create_data_node(server_data_node === void 0 && loader[0] ? { type: \"skip\" } : server_data_node ?? null, loader[0] ? previous?.server : void 0)\n\t\t});\n\t});\n\tfor (const p of branch_promises) p.catch(noop);\n\t/** @type {Array<import('./types.js').BranchNode | undefined>} */\n\tconst branch = [];\n\tfor (let i = 0; i < loaders.length; i += 1) if (loaders[i]) try {\n\t\tbranch.push(await branch_promises[i]);\n\t} catch (err) {\n\t\tif (err instanceof Redirect) return {\n\t\t\ttype: \"redirect\",\n\t\t\tlocation: err.location\n\t\t};\n\t\tif (preload_tokens.has(preload)) return preload_error({\n\t\t\terror: await handle_error(err, {\n\t\t\t\tparams,\n\t\t\t\turl,\n\t\t\t\troute: { id: route.id }\n\t\t\t}),\n\t\t\turl,\n\t\t\tparams,\n\t\t\troute\n\t\t});\n\t\tlet status = get_status(err);\n\t\t/** @type {App.Error} */\n\t\tlet error;\n\t\tif (server_data_nodes?.includes(err)) {\n\t\t\tstatus = err.status ?? status;\n\t\t\terror = err.error;\n\t\t} else if (err instanceof HttpError) error = err.body;\n\t\telse {\n\t\t\tif (await stores.updated.check()) {\n\t\t\t\tawait update_service_worker();\n\t\t\t\treturn await native_navigation(url);\n\t\t\t}\n\t\t\terror = await handle_error(err, {\n\t\t\t\tparams,\n\t\t\t\turl,\n\t\t\t\troute: { id: route.id }\n\t\t\t});\n\t\t}\n\t\tconst error_load = await load_nearest_error_page(i, branch, errors);\n\t\tif (error_load) return get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch: branch.slice(0, error_load.idx).concat(error_load.node),\n\t\t\terrors,\n\t\t\tstatus,\n\t\t\terror,\n\t\t\troute\n\t\t});\n\t\telse return await server_fallback(url, { id: route.id }, error, status);\n\t}\n\telse branch.push(void 0);\n\treturn get_navigation_result_from_branch({\n\t\turl,\n\t\tparams,\n\t\tbranch,\n\t\terrors,\n\t\tstatus: 200,\n\t\terror: null,\n\t\troute,\n\t\tform: invalidating ? void 0 : null\n\t});\n}\n/**\n* @param {number} i Start index to backtrack from\n* @param {Array<import('./types.js').BranchNode | undefined>} branch Branch to backtrack\n* @param {Array<import('types').CSRPageNodeLoader | undefined>} errors All error pages for this branch\n* @returns {Promise<{idx: number; node: import('./types.js').BranchNode} | undefined>}\n*/\nasync function load_nearest_error_page(i, branch, errors) {\n\twhile (i--) if (errors[i]) {\n\t\tlet j = i;\n\t\twhile (!branch[j]) j -= 1;\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tidx: j + 1,\n\t\t\t\tnode: {\n\t\t\t\t\tnode: await errors[i](),\n\t\t\t\t\tloader: errors[i],\n\t\t\t\t\tdata: {},\n\t\t\t\t\tserver: null,\n\t\t\t\t\tuniversal: null\n\t\t\t\t}\n\t\t\t};\n\t\t} catch {\n\t\t\tcontinue;\n\t\t}\n\t}\n}\n/**\n* @param {{\n* status: number;\n* error: App.Error;\n* url: URL;\n* route: { id: string | null }\n* }} opts\n* @returns {Promise<import('./types.js').NavigationFinished>}\n*/\nasync function load_root_error_page({ status, error, url, route }) {\n\t/** @type {Record<string, string>} */\n\tconst params = {};\n\t/** @type {import('types').ServerDataNode | null} */\n\tlet server_data_node = null;\n\tif (app.server_loads[0] === 0) try {\n\t\tconst server_data = await load_data(url, [true]);\n\t\tif (server_data.type !== \"data\" || server_data.nodes[0] && server_data.nodes[0].type !== \"data\") throw 0;\n\t\tserver_data_node = server_data.nodes[0] ?? null;\n\t} catch {\n\t\tif (url.origin !== origin || url.pathname !== location.pathname || hydrated) await native_navigation(url);\n\t}\n\ttry {\n\t\treturn get_navigation_result_from_branch({\n\t\t\turl,\n\t\t\tparams,\n\t\t\tbranch: [await load_node({\n\t\t\t\tloader: default_layout_loader,\n\t\t\t\turl,\n\t\t\t\tparams,\n\t\t\t\troute,\n\t\t\t\tparent: () => Promise.resolve({}),\n\t\t\t\tserver_data_node: create_data_node(server_data_node)\n\t\t\t}), {\n\t\t\t\tnode: await default_error_loader(),\n\t\t\t\tloader: default_error_loader,\n\t\t\t\tuniversal: null,\n\t\t\t\tserver: null,\n\t\t\t\tdata: null\n\t\t\t}],\n\t\t\tstatus,\n\t\t\terror,\n\t\t\terrors: [],\n\t\t\troute: null\n\t\t});\n\t} catch (error) {\n\t\tif (error instanceof Redirect) return _goto(new URL(error.location, location.href), {}, 0);\n\t\tthrow error;\n\t}\n}\n/**\n* Resolve the relative rerouted URL for a client-side navigation\n* @param {URL} url\n* @returns {Promise<URL | undefined>}\n*/\nasync function get_rerouted_url(url) {\n\tconst href = url.href;\n\tif (reroute_cache.has(href)) return reroute_cache.get(href);\n\tlet rerouted;\n\ttry {\n\t\tconst promise = (async () => {\n\t\t\tlet rerouted = await app.hooks.reroute({\n\t\t\t\turl: new URL(url),\n\t\t\t\tfetch: async (input, init) => {\n\t\t\t\t\treturn resolve_fetch_url(input, init, url).promise;\n\t\t\t\t}\n\t\t\t}) ?? url;\n\t\t\tif (typeof rerouted === \"string\") {\n\t\t\t\tconst tmp = new URL(url);\n\t\t\t\tif (app.hash) tmp.hash = rerouted;\n\t\t\t\telse tmp.pathname = rerouted;\n\t\t\t\trerouted = tmp;\n\t\t\t}\n\t\t\treturn rerouted;\n\t\t})();\n\t\treroute_cache.set(href, promise);\n\t\trerouted = await promise;\n\t} catch (e) {\n\t\treroute_cache.delete(href);\n\t\treturn;\n\t}\n\treturn rerouted;\n}\n/**\n* Resolve the full info (which route, params, etc.) for a client-side navigation from the URL,\n* taking the reroute hook into account. If this isn't a client-side-navigation (or the URL is undefined),\n* returns undefined.\n* @param {URL | undefined} url\n* @param {boolean} invalidating\n* @returns {Promise<import('./types.js').NavigationIntent | undefined>}\n*/\nasync function get_navigation_intent(url, invalidating) {\n\tif (!url) return;\n\tif (is_external_url(url, base, app.hash)) return;\n\t{\n\t\tconst rerouted = await get_rerouted_url(url);\n\t\tif (!rerouted) return;\n\t\tconst path = get_url_path(rerouted);\n\t\tfor (const route of routes) {\n\t\t\tconst params = route.exec(path);\n\t\t\tif (params) return {\n\t\t\t\tid: get_page_key(url),\n\t\t\t\tinvalidating,\n\t\t\t\troute,\n\t\t\t\tparams: decode_params(params),\n\t\t\t\turl\n\t\t\t};\n\t\t}\n\t}\n}\n/** @param {URL} url */\nfunction get_url_path(url) {\n\treturn decode_pathname(app.hash ? url.hash.replace(/^#/, \"\").replace(/[?#].+/, \"\") : url.pathname.slice(base.length)) || \"/\";\n}\n/** @param {URL} url */\nfunction get_page_key(url) {\n\treturn (app.hash ? url.hash.replace(/^#/, \"\") : url.pathname) + url.search;\n}\n/**\n* @param {{\n* url: URL;\n* type: import('@sveltejs/kit').Navigation[\"type\"];\n* intent?: import('./types.js').NavigationIntent;\n* delta?: number;\n* event?: PopStateEvent | MouseEvent;\n* scroll?: { x: number, y: number };\n* }} opts\n*/\nfunction _before_navigate({ url, type, intent, delta, event, scroll }) {\n\tlet should_block = false;\n\tconst nav = create_navigation(current, intent, url, type, scroll ?? null);\n\tif (delta !== void 0) nav.navigation.delta = delta;\n\tif (event !== void 0) nav.navigation.event = event;\n\tconst cancellable = {\n\t\t...nav.navigation,\n\t\tcancel: () => {\n\t\t\tshould_block = true;\n\t\t\tnav.reject(/* @__PURE__ */ new Error(\"navigation cancelled\"));\n\t\t}\n\t};\n\tif (!is_navigating) before_navigate_callbacks.forEach((fn) => fn(cancellable));\n\treturn should_block ? null : nav;\n}\n/**\n* @param {{\n* type: import('@sveltejs/kit').NavigationType;\n* url: URL;\n* popped?: {\n* state: Record<string, any>;\n* scroll: { x: number, y: number };\n* delta: number;\n* };\n* keepfocus?: boolean;\n* noscroll?: boolean;\n* replace_state?: boolean;\n* state?: Record<string, any>;\n* redirect_count?: number;\n* nav_token?: {};\n* accept?: () => void;\n* block?: () => void;\n* event?: Event\n* }} opts\n*/\nasync function navigate({ type, url, popped, keepfocus, noscroll, replace_state, state = {}, redirect_count = 0, nav_token = {}, accept = noop, block = noop, event }) {\n\tconst prev_token = token;\n\ttoken = nav_token;\n\tconst intent = await get_navigation_intent(url, false);\n\tconst nav = type === \"enter\" ? create_navigation(current, intent, url, type) : _before_navigate({\n\t\turl,\n\t\ttype,\n\t\tdelta: popped?.delta,\n\t\tintent,\n\t\tscroll: popped?.scroll,\n\t\tevent\n\t});\n\tif (!nav) {\n\t\tblock();\n\t\tif (token === nav_token) token = prev_token;\n\t\treturn;\n\t}\n\tconst previous_history_index = current_history_index;\n\tconst previous_navigation_index = current_navigation_index;\n\taccept();\n\tis_navigating = true;\n\tif (started && nav.navigation.type !== \"enter\") stores.navigating.set(navigating.current = nav.navigation);\n\tlet navigation_result = intent && await load_route(intent);\n\tif (!navigation_result) if (is_external_url(url, base, app.hash)) return await native_navigation(url, replace_state);\n\telse navigation_result = await server_fallback(url, { id: null }, await handle_error(new SvelteKitError(404, \"Not Found\", `Not found: ${url.pathname}`), {\n\t\turl,\n\t\tparams: {},\n\t\troute: { id: null }\n\t}), 404, replace_state);\n\turl = intent?.url || url;\n\tif (token !== nav_token) {\n\t\tnav.reject(/* @__PURE__ */ new Error(\"navigation aborted\"));\n\t\treturn false;\n\t}\n\tif (navigation_result.type === \"redirect\") {\n\t\tif (redirect_count < 20) {\n\t\t\tawait navigate({\n\t\t\t\ttype,\n\t\t\t\turl: new URL(navigation_result.location, url),\n\t\t\t\tpopped,\n\t\t\t\tkeepfocus,\n\t\t\t\tnoscroll,\n\t\t\t\treplace_state,\n\t\t\t\tstate,\n\t\t\t\tredirect_count: redirect_count + 1,\n\t\t\t\tnav_token\n\t\t\t});\n\t\t\tnav.fulfil(void 0);\n\t\t\treturn;\n\t\t}\n\t\tnavigation_result = await load_root_error_page({\n\t\t\tstatus: 500,\n\t\t\terror: await handle_error(/* @__PURE__ */ new Error(\"Redirect loop\"), {\n\t\t\t\turl,\n\t\t\t\tparams: {},\n\t\t\t\troute: { id: null }\n\t\t\t}),\n\t\t\turl,\n\t\t\troute: { id: null }\n\t\t});\n\t} else if (navigation_result.props.page.status >= 400) {\n\t\tif (await stores.updated.check()) {\n\t\t\tawait update_service_worker();\n\t\t\tawait native_navigation(url, replace_state);\n\t\t}\n\t}\n\treset_invalidation();\n\tupdate_scroll_positions(previous_history_index);\n\tcapture_snapshot(previous_navigation_index);\n\tif (navigation_result.props.page.url.pathname !== url.pathname) url.pathname = navigation_result.props.page.url.pathname;\n\tstate = popped ? popped.state : state;\n\tif (!popped) {\n\t\tconst change = replace_state ? 0 : 1;\n\t\tconst entry = {\n\t\t\t[HISTORY_INDEX]: current_history_index += change,\n\t\t\t[NAVIGATION_INDEX]: current_navigation_index += change,\n\t\t\t[STATES_KEY]: state\n\t\t};\n\t\t(replace_state ? history.replaceState : history.pushState).call(history, entry, \"\", url);\n\t\tif (!replace_state) clear_onward_history(current_history_index, current_navigation_index);\n\t}\n\tconst load_cache_fork = intent && load_cache?.id === intent.id ? load_cache.fork : null;\n\tif (load_cache?.fork && !load_cache_fork) discard_load_cache();\n\tload_cache = null;\n\tnavigation_result.props.page.state = state;\n\t/**\n\t* @type {Promise<void> | undefined}\n\t*/\n\tlet commit_promise;\n\tif (started) {\n\t\tconst after_navigate = (await Promise.all(Array.from(on_navigate_callbacks, (fn) => fn(nav.navigation)))).filter(\n\t\t\t/** @returns {value is () => void} */\n\t\t\t(value) => typeof value === \"function\"\n\t\t);\n\t\tif (after_navigate.length > 0) {\n\t\t\tfunction cleanup() {\n\t\t\t\tafter_navigate.forEach((fn) => {\n\t\t\t\t\tafter_navigate_callbacks.delete(fn);\n\t\t\t\t});\n\t\t\t}\n\t\t\tafter_navigate.push(cleanup);\n\t\t\tafter_navigate.forEach((fn) => {\n\t\t\t\tafter_navigate_callbacks.add(fn);\n\t\t\t});\n\t\t}\n\t\tconst target = nav.navigation.to;\n\t\tcurrent = {\n\t\t\t...navigation_result.state,\n\t\t\tnav: {\n\t\t\t\tparams: target.params,\n\t\t\t\troute: target.route,\n\t\t\t\turl: target.url\n\t\t\t}\n\t\t};\n\t\tif (navigation_result.props.page) navigation_result.props.page.url = url;\n\t\tconst fork = load_cache_fork && await load_cache_fork;\n\t\tif (fork) commit_promise = fork.commit();\n\t\telse {\n\t\t\trendering_error = null;\n\t\t\troot.$set(navigation_result.props);\n\t\t\tif (rendering_error) Object.assign(navigation_result.props.page, rendering_error);\n\t\t\tupdate(navigation_result.props.page);\n\t\t\tcommit_promise = settled?.();\n\t\t}\n\t} else await initialize(navigation_result, target, false);\n\tconst { activeElement } = document;\n\tawait commit_promise;\n\tawait tick$1();\n\tawait tick$1();\n\tif (token !== nav_token) {\n\t\tnav.reject(/* @__PURE__ */ new Error(\"navigation aborted\"));\n\t\treturn false;\n\t}\n\tif (navigation_result.props.page && rendering_error) Object.assign(navigation_result.props.page, rendering_error);\n\t/** @type {Element | null | ''} */\n\tlet deep_linked = null;\n\tif (autoscroll) {\n\t\tconst scroll = popped ? popped.scroll : noscroll ? scroll_state() : null;\n\t\tif (scroll) scrollTo(scroll.x, scroll.y);\n\t\telse if (deep_linked = url.hash && document.getElementById(get_id(url))) deep_linked.scrollIntoView();\n\t\telse scrollTo(0, 0);\n\t}\n\tconst changed_focus = document.activeElement !== activeElement && document.activeElement !== document.body;\n\tif (!keepfocus && !changed_focus) reset_focus(url, !deep_linked);\n\tautoscroll = true;\n\tis_navigating = false;\n\tif (type === \"popstate\") restore_snapshot(current_navigation_index);\n\tnav.fulfil(void 0);\n\tif (nav.navigation.to) nav.navigation.to.scroll = scroll_state();\n\tafter_navigate_callbacks.forEach((fn) => fn(nav.navigation));\n\tstores.navigating.set(navigating.current = null);\n}\n/**\n* Does a full page reload if it wouldn't result in an endless loop in the SPA case\n* @param {URL} url\n* @param {{ id: string | null }} route\n* @param {App.Error} error\n* @param {number} status\n* @param {boolean} [replace_state]\n* @returns {Promise<import('./types.js').NavigationFinished>}\n*/\nasync function server_fallback(url, route, error, status, replace_state) {\n\tif (url.origin === origin && url.pathname === location.pathname && !hydrated) return await load_root_error_page({\n\t\tstatus,\n\t\terror,\n\t\turl,\n\t\troute\n\t});\n\treturn await native_navigation(url, replace_state);\n}\n/**\n* @param {unknown} error\n* @param {import('@sveltejs/kit').NavigationEvent} event\n* @returns {import('types').MaybePromise<App.Error>}\n*/\nfunction handle_error(error, event) {\n\tif (error instanceof HttpError) return error.body;\n\tconst status = get_status(error);\n\tconst message = get_message(error);\n\treturn app.hooks.handleError({\n\t\terror,\n\t\tevent,\n\t\tstatus,\n\t\tmessage\n\t}) ?? { message };\n}\n/**\n* @template {Function} T\n* @param {Set<T>} callbacks\n* @param {T} callback\n*/\nfunction add_navigation_callback(callbacks, callback) {\n\tonMount(() => {\n\t\tcallbacks.add(callback);\n\t\treturn () => {\n\t\t\tcallbacks.delete(callback);\n\t\t};\n\t});\n}\n/**\n* A lifecycle function that runs the supplied `callback` when the current component mounts, and also whenever we navigate to a URL.\n*\n* `afterNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n* @param {(navigation: import('@sveltejs/kit').AfterNavigate) => void} callback\n* @returns {void}\n*/\nfunction afterNavigate(callback) {\n\tadd_navigation_callback(after_navigate_callbacks, callback);\n}\n/**\n* A navigation interceptor that triggers before we navigate to a URL, whether by clicking a link, calling `goto(...)`, or using the browser back/forward controls.\n*\n* Calling `cancel()` will prevent the navigation from completing. If `navigation.type === 'leave'` — meaning the user is navigating away from the app (or closing the tab) — calling `cancel` will trigger the native browser unload confirmation dialog. In this case, the navigation may or may not be cancelled depending on the user's response.\n*\n* When a navigation isn't to a SvelteKit-owned route (and therefore controlled by SvelteKit's client-side router), `navigation.to.route.id` will be `null`.\n*\n* If the navigation will (if not cancelled) cause the document to unload — in other words `'leave'` navigations and `'link'` navigations where `navigation.to.route === null` — `navigation.willUnload` is `true`.\n*\n* `beforeNavigate` must be called during a component initialization. It remains active as long as the component is mounted.\n* @param {(navigation: import('@sveltejs/kit').BeforeNavigate) => void} callback\n* @returns {void}\n*/\nfunction beforeNavigate(callback) {\n\tadd_navigation_callback(before_navigate_callbacks, callback);\n}\n/**\n* Allows you to navigate programmatically to a given route, with options such as keeping the current element focused.\n* Returns a Promise that resolves when SvelteKit navigates (or fails to navigate, in which case the promise rejects) to the specified `url`.\n*\n* For external URLs, use `window.location = url` instead of calling `goto(url)`.\n*\n* @param {string | URL} url Where to navigate to. Note that if you've set [`config.kit.paths.base`](https://svelte.dev/docs/kit/configuration#paths) and the URL is root-relative, you need to prepend the base path if you want to navigate within the app.\n* @param {Object} [opts] Options related to the navigation\n* @param {boolean} [opts.replaceState] If `true`, will replace the current `history` entry rather than creating a new one with `pushState`\n* @param {boolean} [opts.noScroll] If `true`, the browser will maintain its scroll position rather than scrolling to the top of the page after navigation\n* @param {boolean} [opts.keepFocus] If `true`, the currently focused element will retain focus after navigation. Otherwise, focus will be reset to the body\n* @param {boolean} [opts.invalidateAll] If `true`, all `load` functions of the page will be rerun. See https://svelte.dev/docs/kit/load#rerunning-load-functions for more info on invalidation.\n* @param {Array<string | URL | ((url: URL) => boolean)>} [opts.invalidate] Causes any load functions to re-run if they depend on one of the urls\n* @param {App.PageState} [opts.state] An optional object that will be available as `page.state`\n* @returns {Promise<void>}\n*/\nfunction goto(url, opts = {}) {\n\tthrow new Error(\"Cannot call goto(...) on the server\");\n}\n/**\n* @param {string | URL | ((url: URL) => boolean)} resource The invalidated URL\n*/\nfunction push_invalidated(resource) {\n\tif (typeof resource === \"function\") invalidated.push(resource);\n\telse {\n\t\tconst { href } = new URL(resource, location.href);\n\t\tinvalidated.push((url) => url.href === href);\n\t}\n}\n/**\n* Causes all `load` and `query` functions belonging to the currently active page to re-run. Returns a `Promise` that resolves when the page is subsequently updated.\n* @returns {Promise<void>}\n*/\nfunction invalidateAll() {\n\tthrow new Error(\"Cannot call invalidateAll() on the server\");\n}\n/**\n* This action updates the `form` property of the current page with the given data and updates `page.status`.\n* In case of an error, it redirects to the nearest error page.\n* @template {Record<string, unknown> | undefined} Success\n* @template {Record<string, unknown> | undefined} Failure\n* @param {import('@sveltejs/kit').ActionResult<Success, Failure>} result\n* @returns {Promise<void>}\n*/\nasync function applyAction(result) {\n\tthrow new Error(\"Cannot call applyAction(...) on the server\");\n}\n/**\n* @param {URL} url\n* @param {boolean[]} invalid\n* @returns {Promise<import('types').ServerNodesResponse | import('types').ServerRedirectNode>}\n*/\nasync function load_data(url, invalid) {\n\tconst data_url = new URL(url);\n\tdata_url.pathname = add_data_suffix(url.pathname);\n\tif (url.pathname.endsWith(\"/\")) data_url.searchParams.append(TRAILING_SLASH_PARAM, \"1\");\n\tdata_url.searchParams.append(INVALIDATED_PARAM, invalid.map((i) => i ? \"1\" : \"0\").join(\"\"));\n\tconst res = await (0, window.fetch)(data_url.href, {});\n\tif (!res.ok) {\n\t\t/** @type {string | undefined} */\n\t\tlet message;\n\t\tif (res.headers.get(\"content-type\")?.includes(\"application/json\")) message = await res.json();\n\t\telse if (res.status === 404) message = \"Not Found\";\n\t\telse if (res.status === 500) message = \"Internal Error\";\n\t\tthrow new HttpError(res.status, message);\n\t}\n\treturn new Promise(async (resolve) => {\n\t\t/**\n\t\t* Map of deferred promises that will be resolved by a subsequent chunk of data\n\t\t* @type {Map<string, import('types').Deferred>}\n\t\t*/\n\t\tconst deferreds = /* @__PURE__ */ new Map();\n\t\tconst reader = res.body.getReader();\n\t\t/**\n\t\t* @param {any} data\n\t\t*/\n\t\tfunction deserialize(data) {\n\t\t\treturn unflatten(data, {\n\t\t\t\t...app.decoders,\n\t\t\t\tPromise: (id) => {\n\t\t\t\t\treturn new Promise((fulfil, reject) => {\n\t\t\t\t\t\tdeferreds.set(id, {\n\t\t\t\t\t\t\tfulfil,\n\t\t\t\t\t\t\treject\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tfor await (const node of read_ndjson(reader)) {\n\t\t\tif (node.type === \"redirect\") return resolve(node);\n\t\t\tif (node.type === \"data\") {\n\t\t\t\tnode.nodes?.forEach((node) => {\n\t\t\t\t\tif (node?.type === \"data\") {\n\t\t\t\t\t\tnode.uses = deserialize_uses(node.uses);\n\t\t\t\t\t\tnode.data = deserialize(node.data);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tresolve(node);\n\t\t\t} else if (node.type === \"chunk\") {\n\t\t\t\tconst { id, data, error } = node;\n\t\t\t\tconst deferred = deferreds.get(id);\n\t\t\t\tdeferreds.delete(id);\n\t\t\t\tif (error) deferred.reject(deserialize(error));\n\t\t\t\telse deferred.fulfil(deserialize(data));\n\t\t\t}\n\t\t}\n\t});\n}\n/**\n* @param {any} uses\n* @return {import('types').Uses}\n*/\nfunction deserialize_uses(uses) {\n\treturn {\n\t\tdependencies: new Set(uses?.dependencies ?? []),\n\t\tparams: new Set(uses?.params ?? []),\n\t\tparent: !!uses?.parent,\n\t\troute: !!uses?.route,\n\t\turl: !!uses?.url,\n\t\tsearch_params: new Set(uses?.search_params ?? [])\n\t};\n}\n/**\n* @param {URL} url\n* @param {boolean} [scroll]\n*/\nfunction reset_focus(url, scroll = true) {\n\tconst autofocus = document.querySelector(\"[autofocus]\");\n\tif (autofocus) autofocus.focus();\n\telse {\n\t\tconst id = get_id(url);\n\t\tif (id && document.getElementById(id)) {\n\t\t\tconst { x, y } = scroll_state();\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst history_state = history.state;\n\t\t\t\tlocation.replace(new URL(`#${id}`, location.href));\n\t\t\t\thistory.replaceState(history_state, \"\", url);\n\t\t\t\tif (scroll) scrollTo(x, y);\n\t\t\t});\n\t\t} else {\n\t\t\tconst root = document.body;\n\t\t\tconst tabindex = root.getAttribute(\"tabindex\");\n\t\t\troot.tabIndex = -1;\n\t\t\troot.focus({\n\t\t\t\tpreventScroll: true,\n\t\t\t\tfocusVisible: false\n\t\t\t});\n\t\t\tif (tabindex !== null) root.setAttribute(\"tabindex\", tabindex);\n\t\t\telse root.removeAttribute(\"tabindex\");\n\t\t}\n\t\tconst selection = getSelection();\n\t\tif (selection && selection.type !== \"None\") {\n\t\t\t/** @type {Range[]} */\n\t\t\tconst ranges = [];\n\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) ranges.push(selection.getRangeAt(i));\n\t\t\tsetTimeout(() => {\n\t\t\t\tif (selection.rangeCount !== ranges.length) return;\n\t\t\t\tfor (let i = 0; i < selection.rangeCount; i += 1) {\n\t\t\t\t\tconst a = ranges[i];\n\t\t\t\t\tconst b = selection.getRangeAt(i);\n\t\t\t\t\tif (a.commonAncestorContainer !== b.commonAncestorContainer || a.startContainer !== b.startContainer || a.endContainer !== b.endContainer || a.startOffset !== b.startOffset || a.endOffset !== b.endOffset) return;\n\t\t\t\t}\n\t\t\t\tselection.removeAllRanges();\n\t\t\t});\n\t\t}\n\t}\n}\n/**\n* @template {import('@sveltejs/kit').NavigationType} T\n* @param {import('./types.js').NavigationState} current\n* @param {import('./types.js').NavigationIntent | undefined} intent\n* @param {URL | null} url\n* @param {T} type\n* @param {{ x: number, y: number } | null} [target_scroll] The scroll position for the target (for popstate navigations)\n*/\nfunction create_navigation(current, intent, url, type, target_scroll = null) {\n\t/** @type {(value: any) => void} */\n\tlet fulfil;\n\t/** @type {(error: any) => void} */\n\tlet reject;\n\tconst complete = new Promise((f, r) => {\n\t\tfulfil = f;\n\t\treject = r;\n\t});\n\tcomplete.catch(noop);\n\treturn {\n\t\tnavigation: {\n\t\t\tfrom: {\n\t\t\t\tparams: current.params,\n\t\t\t\troute: { id: current.route?.id ?? null },\n\t\t\t\turl: current.url,\n\t\t\t\tscroll: scroll_state()\n\t\t\t},\n\t\t\tto: url && {\n\t\t\t\tparams: intent?.params ?? null,\n\t\t\t\troute: { id: intent?.route?.id ?? null },\n\t\t\t\turl,\n\t\t\t\tscroll: target_scroll\n\t\t\t},\n\t\t\twillUnload: !intent,\n\t\t\ttype,\n\t\t\tcomplete\n\t\t},\n\t\tfulfil,\n\t\treject\n\t};\n}\n/**\n* TODO: remove this in 3.0 when the page store is also removed\n*\n* We need to assign a new page object so that subscribers are correctly notified.\n* However, spreading `{ ...page }` returns an empty object so we manually\n* assign to each property instead.\n*\n* @param {import('@sveltejs/kit').Page} page\n*/\nfunction clone_page(page) {\n\treturn {\n\t\tdata: page.data,\n\t\terror: page.error,\n\t\tform: page.form,\n\t\tparams: page.params,\n\t\troute: page.route,\n\t\tstate: page.state,\n\t\tstatus: page.status,\n\t\turl: page.url\n\t};\n}\n/**\n* @param {URL} url\n* @returns {string}\n*/\nfunction get_id(url) {\n\tlet id;\n\tif (app.hash) {\n\t\tconst [, , second] = url.hash.split(\"#\", 3);\n\t\tid = second ?? \"\";\n\t} else id = url.hash.slice(1);\n\treturn decodeURIComponent(id);\n}\n//#endregion\nexport { goto as a, navigating as c, beforeNavigate as i, page as l, app as n, invalidateAll as o, applyAction as r, stores as s, afterNavigate as t, updated as u };\n"],"names":["noop$1"],"mappings":";;;AA4FA,IAAI,SAAS,GAAGA,IAAM,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAACA,IAAM,CAAC,QAAQ,EAAE,CAAC;AACnG,IAAI,eAAe,GAAG,IAAI;AAC1B,IAAI,SAAS,EAAE;AACf,EAAQ;AACR,EAAE,IAAI,EAAE,EAAE;AACV,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,KAAK,EAAE,IAAI;AACb,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;AACrB,EAAE,KAAK,EAAE,EAAE;AACX,EAAE,MAAM,EAAE,EAAE;AACZ,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC,eAAe;AAC9B,GAAE;AAGF;AAkIA;AACA;AACA;AACA;AACA;AACA,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,oBAAoB;AA8G5C;AACA,IAAI,wBAAwB,mBAAmB,IAAI,GAAG,EAAE;AA43BxD;AACA;AACA;AACA;AACA;AACA,SAAS,uBAAuB,CAAC,SAAS,EAAE,QAAQ,EAAE;AACtD,CAAC,OAAO,CAAC,MAAM;AACf,EAAE,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC;AACzB,EAAE,OAAO,MAAM;AACf,GAAG,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC;AAC7B,EAAE,CAAC;AACH,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,aAAa,CAAC,QAAQ,EAAE;AACjC,CAAC,uBAAuB,CAAC,wBAAwB,EAAE,QAAQ,CAAC;AAC5D;AA8CA;AACA;AACA;AACA;AACA,SAAS,aAAa,GAAG;AACzB,CAAC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,WAAW,CAAC,MAAM,EAAE;AACnC,CAAC,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC;AAC9D;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { y as noop, G as parse, C as onDestroy, X as tick, S as stringify$1, c as __toESM, _ as __commonJSMin, a as __exportAll } from './internal-
|
|
1
|
+
import { y as noop, G as parse, C as onDestroy, X as tick, S as stringify$1, c as __toESM, _ as __commonJSMin, a as __exportAll } from './internal-Z9Jwi6lX.js';
|
|
2
2
|
import { u as get$1, ad as writable, n as derived$1, Y as readonly, x as getContext } from './dev-yFiAtg5l.js';
|
|
3
|
-
import { i as invalidateAll, b as applyAction, a as afterNavigate } from './client-
|
|
4
|
-
import { a as app } from './app-
|
|
5
|
-
import './index-
|
|
3
|
+
import { i as invalidateAll, b as applyAction, a as afterNavigate } from './client-CF_AG7xO.js';
|
|
4
|
+
import { a as app } from './app-MIcRQ3KA.js';
|
|
5
|
+
import './index-CVekYGHP.js';
|
|
6
6
|
import { toJSONSchema, config, safeParseAsync } from 'zod/v4/core';
|
|
7
7
|
import { z } from 'zod';
|
|
8
8
|
|
|
9
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-
|
|
9
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/app/forms.js
|
|
10
10
|
/**
|
|
11
11
|
* Use this function to deserialize the response from a form submission.
|
|
12
12
|
* Usage:
|
|
@@ -148,7 +148,7 @@ function enhance(form_element, submit = noop) {
|
|
|
148
148
|
} };
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-
|
|
151
|
+
//#region ../../node_modules/.pnpm/@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_svelte@5.55.9_@typescript-eslin_31b35890553a27fb0d8f940d66156f76/node_modules/@sveltejs/kit/src/runtime/app/stores.js
|
|
152
152
|
/**
|
|
153
153
|
* A function that returns all of the contextual stores. On the server, this must be called during component initialization.
|
|
154
154
|
* Only use this if you need to defer store subscription until after the component has mounted, for some reason.
|
|
@@ -191,7 +191,7 @@ var navigating = { subscribe(fn) {
|
|
|
191
191
|
return getStores().navigating.subscribe(fn);
|
|
192
192
|
} };
|
|
193
193
|
//#endregion
|
|
194
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
194
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/traversal.js
|
|
195
195
|
function setPath(parent, key, value) {
|
|
196
196
|
if (key === "__proto__" || key === "prototype") throw new Error("Cannot set an object's `__proto__` or `prototype` property");
|
|
197
197
|
parent[key] = value;
|
|
@@ -308,7 +308,7 @@ function setPaths(obj, paths, value) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
//#endregion
|
|
311
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
311
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/stringPath.js
|
|
312
312
|
function splitPath(path) {
|
|
313
313
|
return path.toString().split(/[[\].]+/).filter((p) => p);
|
|
314
314
|
}
|
|
@@ -322,7 +322,7 @@ function mergePath(path) {
|
|
|
322
322
|
}, "");
|
|
323
323
|
}
|
|
324
324
|
//#endregion
|
|
325
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
325
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/justClone.js
|
|
326
326
|
function clone$1(obj) {
|
|
327
327
|
const type = {}.toString.call(obj).slice(8, -1);
|
|
328
328
|
if (type == "Set") return new Set([...obj].map((value) => clone$1(value)));
|
|
@@ -337,7 +337,7 @@ function clone$1(obj) {
|
|
|
337
337
|
return obj;
|
|
338
338
|
}
|
|
339
339
|
//#endregion
|
|
340
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
340
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/utils.js
|
|
341
341
|
function clone(data) {
|
|
342
342
|
return data && typeof data === "object" ? clone$1(data) : data;
|
|
343
343
|
}
|
|
@@ -386,7 +386,7 @@ merge$1.withOptions = (options, ...objects) => {
|
|
|
386
386
|
return result;
|
|
387
387
|
};
|
|
388
388
|
//#endregion
|
|
389
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
389
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/jsonSchema/schemaInfo.js
|
|
390
390
|
var conversionFormatTypes = [
|
|
391
391
|
"unix-time",
|
|
392
392
|
"bigint",
|
|
@@ -458,7 +458,7 @@ function unionInfo(schema) {
|
|
|
458
458
|
if (schema.anyOf && schema.anyOf.length) return schema.anyOf.filter((s) => typeof s !== "boolean");
|
|
459
459
|
}
|
|
460
460
|
//#endregion
|
|
461
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
461
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/jsonSchema/schemaDefaults.js
|
|
462
462
|
function defaultValues(schema, isOptional = false, path = []) {
|
|
463
463
|
return _defaultValues(schema, isOptional, path);
|
|
464
464
|
}
|
|
@@ -594,7 +594,7 @@ function _defaultTypes(schema, isOptional, path) {
|
|
|
594
594
|
return output;
|
|
595
595
|
}
|
|
596
596
|
//#endregion
|
|
597
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
597
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/errors.js
|
|
598
598
|
var SuperFormError = class SuperFormError extends Error {
|
|
599
599
|
constructor(message) {
|
|
600
600
|
super(message);
|
|
@@ -747,7 +747,7 @@ function replaceInvalidDefaults(Data, Defaults, _schema, Errors, preprocessed) {
|
|
|
747
747
|
return Data_traverse();
|
|
748
748
|
}
|
|
749
749
|
//#endregion
|
|
750
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
750
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/client/flash.js
|
|
751
751
|
function cancelFlash(options) {
|
|
752
752
|
if (!options.flashMessage || true) return;
|
|
753
753
|
}
|
|
@@ -755,7 +755,7 @@ function shouldSyncFlash(options) {
|
|
|
755
755
|
if (!options.flashMessage || true) return false;
|
|
756
756
|
}
|
|
757
757
|
//#endregion
|
|
758
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
758
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/client/customValidity.js
|
|
759
759
|
var noCustomValidityDataAttribute = "noCustomValidity";
|
|
760
760
|
async function updateCustomValidity(validityEl, errors) {
|
|
761
761
|
if ("setCustomValidity" in validityEl) validityEl.setCustomValidity("");
|
|
@@ -778,7 +778,7 @@ function setCustomValidity(el, errors) {
|
|
|
778
778
|
if (message) el.reportValidity();
|
|
779
779
|
}
|
|
780
780
|
//#endregion
|
|
781
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
781
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/client/elements.js
|
|
782
782
|
var isElementInViewport = (el, topOffset = 0) => {
|
|
783
783
|
const rect = el.getBoundingClientRect();
|
|
784
784
|
return rect.top >= topOffset && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
@@ -808,7 +808,7 @@ function inputInfo(el) {
|
|
|
808
808
|
};
|
|
809
809
|
}
|
|
810
810
|
//#endregion
|
|
811
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
811
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/client/form.js
|
|
812
812
|
var FetchStatus;
|
|
813
813
|
(function(FetchStatus) {
|
|
814
814
|
FetchStatus[FetchStatus["Idle"] = 0] = "Idle";
|
|
@@ -933,7 +933,7 @@ var scrollToFirstError = async (Form, options) => {
|
|
|
933
933
|
} catch {}
|
|
934
934
|
};
|
|
935
935
|
//#endregion
|
|
936
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
936
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/client/proxies.js
|
|
937
937
|
function updateProxyField(obj, path, updater) {
|
|
938
938
|
const output = traversePath(obj, path, ({ parent, key, value }) => {
|
|
939
939
|
if (value === void 0) parent[key] = /\D/.test(key) ? {} : [];
|
|
@@ -989,7 +989,7 @@ function fieldProxy(form, path, options) {
|
|
|
989
989
|
};
|
|
990
990
|
}
|
|
991
991
|
//#endregion
|
|
992
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
992
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/jsonSchema/schemaShape.js
|
|
993
993
|
function schemaShape(schema, path = []) {
|
|
994
994
|
const output = _schemaShape(schema, path);
|
|
995
995
|
if (!output) throw new SchemaError("No shape could be created for schema. If using Zod v4, import { zod4 } from \"sveltekit-superforms/adapters\" instead of { zod }.", path);
|
|
@@ -1034,7 +1034,7 @@ function shapeFromObject(obj) {
|
|
|
1034
1034
|
return output;
|
|
1035
1035
|
}
|
|
1036
1036
|
//#endregion
|
|
1037
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
1037
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/client/superForm.js
|
|
1038
1038
|
var formIds = /* @__PURE__ */ new WeakMap();
|
|
1039
1039
|
var initialForms = /* @__PURE__ */ new WeakMap();
|
|
1040
1040
|
var defaultOnError = (event) => {
|
|
@@ -2032,7 +2032,7 @@ function superForm(form, formOptions) {
|
|
|
2032
2032
|
};
|
|
2033
2033
|
}
|
|
2034
2034
|
//#endregion
|
|
2035
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2035
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/jsonSchema/constraints.js
|
|
2036
2036
|
function constraints(schema) {
|
|
2037
2037
|
return _constraints(schemaInfo(schema, false, []), []);
|
|
2038
2038
|
}
|
|
@@ -2093,7 +2093,7 @@ function constraint(info) {
|
|
|
2093
2093
|
return Object.keys(output).length > 0 ? output : void 0;
|
|
2094
2094
|
}
|
|
2095
2095
|
//#endregion
|
|
2096
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2096
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/jsonSchema/schemaHash.js
|
|
2097
2097
|
function schemaHash(schema) {
|
|
2098
2098
|
return hashCode(_schemaHash(schemaInfo(schema, false, []), 0, []));
|
|
2099
2099
|
}
|
|
@@ -2134,7 +2134,7 @@ function hashCode(str) {
|
|
|
2134
2134
|
return hash.toString(36);
|
|
2135
2135
|
}
|
|
2136
2136
|
//#endregion
|
|
2137
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2137
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/adapters/adapters.js
|
|
2138
2138
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2139
2139
|
function createAdapter(adapter, jsonSchema) {
|
|
2140
2140
|
if (!adapter || !("superFormValidationLibrary" in adapter)) throw new SuperFormError("Superforms v2 requires a validation adapter for the schema. Import one of your choice from \"sveltekit-superforms/adapters\" and wrap the schema with it.");
|
|
@@ -2148,7 +2148,7 @@ function createAdapter(adapter, jsonSchema) {
|
|
|
2148
2148
|
};
|
|
2149
2149
|
}
|
|
2150
2150
|
//#endregion
|
|
2151
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2151
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/formData.js
|
|
2152
2152
|
/**
|
|
2153
2153
|
* V1 compatibilty. resetForm = false and taintedMessage = true
|
|
2154
2154
|
*/
|
|
@@ -2343,7 +2343,7 @@ function parseFormDataEntry(key, value, type, info, fromURL = false) {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
}
|
|
2345
2345
|
//#endregion
|
|
2346
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
2346
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/superValidate.js
|
|
2347
2347
|
/**
|
|
2348
2348
|
* Validates a schema for data validation and usage in superForm.
|
|
2349
2349
|
* @param data Data corresponding to a schema, or RequestEvent/FormData/URL. If falsy, the schema's default values will be used.
|
|
@@ -2388,7 +2388,7 @@ async function superValidate(data, adapter, options) {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
return output;
|
|
2390
2390
|
}
|
|
2391
|
-
|
|
2391
|
+
|
|
2392
2392
|
//#region src/lib/form/relation-field-config.ts
|
|
2393
2393
|
/**
|
|
2394
2394
|
* Whether an option can round-trip through the picker contract. A key
|
|
@@ -2448,6 +2448,32 @@ function searchableLabel(target) {
|
|
|
2448
2448
|
searchFields: [labelField]
|
|
2449
2449
|
};
|
|
2450
2450
|
}
|
|
2451
|
+
/**
|
|
2452
|
+
* Build the single-column relation-select config for an RPC function argument
|
|
2453
|
+
* carrying an `@arg: <name> relation(<schema.table.column>)` hint (issue #103).
|
|
2454
|
+
*
|
|
2455
|
+
* The picker can only round-trip when the hint targets the referenced table's
|
|
2456
|
+
* single-column primary key — `searchRelation` projects that key as each
|
|
2457
|
+
* option's id, which is exactly the value the argument receives — and the
|
|
2458
|
+
* target has a text-searchable label. Otherwise (a hint at a non-PK column, a
|
|
2459
|
+
* composite-key target, an absent table, or an unsearchable label) the argument
|
|
2460
|
+
* falls back to a scalar input the operator types, so this returns null. Mirrors
|
|
2461
|
+
* the per-relation acceptance in {@link relationFieldConfigs} for a single
|
|
2462
|
+
* foreign key.
|
|
2463
|
+
*/
|
|
2464
|
+
function buildArgRelationConfig(argName, relation, schema) {
|
|
2465
|
+
const resource = `${relation.schema}.${relation.table}`;
|
|
2466
|
+
const target = schema.tables.find((t) => t.qualifiedName === resource);
|
|
2467
|
+
if (target === void 0) return null;
|
|
2468
|
+
if (target.primaryKey.length !== 1 || target.primaryKey[0] !== relation.column) return null;
|
|
2469
|
+
const label = searchableLabel(target);
|
|
2470
|
+
if (label === null) return null;
|
|
2471
|
+
return {
|
|
2472
|
+
field: argName,
|
|
2473
|
+
resource,
|
|
2474
|
+
...label
|
|
2475
|
+
};
|
|
2476
|
+
}
|
|
2451
2477
|
function relationFieldConfigs(table, schema) {
|
|
2452
2478
|
const configs = [];
|
|
2453
2479
|
for (const relation of table.relations) {
|
|
@@ -6958,7 +6984,7 @@ function Script(...args) {
|
|
|
6958
6984
|
Void: () => Void
|
|
6959
6985
|
})).Base;
|
|
6960
6986
|
//#endregion
|
|
6961
|
-
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.
|
|
6987
|
+
//#region ../../node_modules/.pnpm/sveltekit-superforms@2.30.1_@sveltejs+kit@2.61.1_@sveltejs+vite-plugin-svelte@7.1.2_sve_198860b6cdec2df6730ce09764f30036/node_modules/sveltekit-superforms/dist/adapters/zod4.js
|
|
6962
6988
|
var defaultJSONSchemaOptions = {
|
|
6963
6989
|
unrepresentable: "any",
|
|
6964
6990
|
override: (ctx) => {
|
|
@@ -7116,6 +7142,33 @@ function zodFromTable(table) {
|
|
|
7116
7142
|
}
|
|
7117
7143
|
//#endregion
|
|
7118
7144
|
//#region src/lib/server/composite-form.ts
|
|
7145
|
+
/** A native FormData submission converted to a plain object, with blank
|
|
7146
|
+
* fields omitted so the schema defaults apply (mirroring how superforms
|
|
7147
|
+
* parses blank FormData entries). */
|
|
7148
|
+
function formDataToObject(data) {
|
|
7149
|
+
const fields = {};
|
|
7150
|
+
for (const [key, value] of data.entries()) if (typeof value === "string" && value !== "") fields[key] = value;
|
|
7151
|
+
return fields;
|
|
7152
|
+
}
|
|
7153
|
+
/**
|
|
7154
|
+
* What the RPC action route should hand to `superValidate`. A defaulted
|
|
7155
|
+
* argument carries a `z.union([literal(''), <base>])` schema, and superforms
|
|
7156
|
+
* rejects unions when parsing FormData directly ("Unions are only supported
|
|
7157
|
+
* when the dataType option for superForm is set to 'json'"); parsing a plain
|
|
7158
|
+
* object has no such restriction. So a native (no-JS) submission is converted
|
|
7159
|
+
* to an object — unconditionally, since an action form can carry a defaulted
|
|
7160
|
+
* non-text argument with no relation pickers at all. The enhanced path's
|
|
7161
|
+
* superforms JSON envelope is passed through untouched (superValidate handles
|
|
7162
|
+
* it), as is a non-form (JSON) body. Single-column relation-select arguments
|
|
7163
|
+
* submit as plain fields, so no composite decoding is needed here.
|
|
7164
|
+
*/
|
|
7165
|
+
async function readActionFormSubmission(request) {
|
|
7166
|
+
const contentType = request.headers.get("content-type") ?? "";
|
|
7167
|
+
if (!contentType.includes("application/x-www-form-urlencoded") && !contentType.includes("multipart/form-data")) return request;
|
|
7168
|
+
const data = await request.formData();
|
|
7169
|
+
if (data.has("__superform_json")) return data;
|
|
7170
|
+
return formDataToObject(data);
|
|
7171
|
+
}
|
|
7119
7172
|
/**
|
|
7120
7173
|
* Return what the route action should hand to `superValidate`: the request
|
|
7121
7174
|
* itself when the table has no pickers, the raw FormData when it carries the
|
|
@@ -7133,8 +7186,7 @@ async function readFormWithCompositePicks(request, relations) {
|
|
|
7133
7186
|
if (!contentType.includes("application/x-www-form-urlencoded") && !contentType.includes("multipart/form-data")) return request;
|
|
7134
7187
|
const data = await request.formData();
|
|
7135
7188
|
if (data.has("__superform_json")) return data;
|
|
7136
|
-
const fields =
|
|
7137
|
-
for (const [key, value] of data.entries()) if (typeof value === "string" && value !== "") fields[key] = value;
|
|
7189
|
+
const fields = formDataToObject(data);
|
|
7138
7190
|
for (const config of relations) {
|
|
7139
7191
|
const keyFields = config.keyFields ?? [config.field];
|
|
7140
7192
|
if (keyFields.length < 2) continue;
|
|
@@ -7162,5 +7214,5 @@ async function readFormWithCompositePicks(request, relations) {
|
|
|
7162
7214
|
return fields;
|
|
7163
7215
|
}
|
|
7164
7216
|
|
|
7165
|
-
export { COMPOSITE_CLEAR_VALUE as C,
|
|
7166
|
-
//# sourceMappingURL=composite-form-
|
|
7217
|
+
export { COMPOSITE_CLEAR_VALUE as C, buildMutationPayload as a, buildArgRelationConfig as b, compositeParamName as c, dbCanSupplyColumn as d, demoteUnpickableRelations as e, readFormWithCompositePicks as f, relationFieldConfigs as g, superForm as h, isPickableOption as i, superValidate as j, zodFromTable as k, promoteCompositeMemberWidgets as p, readActionFormSubmission as r, scalarWidgetForDataType as s, zod as z };
|
|
7218
|
+
//# sourceMappingURL=composite-form-Khrcy6Jk.js.map
|