@toa.io/extensions.introspection 1.0.0-alpha.294 → 1.0.0-alpha.296

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.
Files changed (25) hide show
  1. package/package.json +3 -3
  2. package/ui/dist/_app/immutable/chunks/{DIuPrs6y.js → 2ULodZ5M.js} +1 -1
  3. package/ui/dist/_app/immutable/chunks/{FJXxR1hy.js → Bz7rJ-l2.js} +1 -1
  4. package/ui/dist/_app/immutable/chunks/{BUu1bTY0.js → CCQcU4jR.js} +1 -1
  5. package/ui/dist/_app/immutable/chunks/{C_9U3amZ.js → CIxPcerm.js} +2 -2
  6. package/ui/dist/_app/immutable/chunks/CVZupdzx.js +1 -0
  7. package/ui/dist/_app/immutable/chunks/{BT5Ivpyh.js → CzuYSfbW.js} +1 -1
  8. package/ui/dist/_app/immutable/chunks/{B96dqKj5.js → DuEZUZX1.js} +1 -1
  9. package/ui/dist/_app/immutable/chunks/{bVdyvKuK.js → bvDnceWw.js} +1 -1
  10. package/ui/dist/_app/immutable/chunks/dKGDm1SN.js +1 -0
  11. package/ui/dist/_app/immutable/entry/{app.CDRHLCe_.js → app.CrvBRm58.js} +2 -2
  12. package/ui/dist/_app/immutable/entry/start.DbjM5vD0.js +1 -0
  13. package/ui/dist/_app/immutable/nodes/{0.CpsL4iSg.js → 0.DLh8Va7t.js} +1 -1
  14. package/ui/dist/_app/immutable/nodes/{1.Bvg7VXbs.js → 1.JSgEFUP1.js} +1 -1
  15. package/ui/dist/_app/immutable/nodes/{2.BO9FxsOu.js → 2.CcUfXKMG.js} +1 -1
  16. package/ui/dist/_app/immutable/nodes/3.CcgWTRux.js +1 -0
  17. package/ui/dist/_app/immutable/nodes/4.gwrkr7pk.js +1 -0
  18. package/ui/dist/_app/immutable/nodes/{5.0dXeLKhi.js → 5.C5V43h6W.js} +1 -1
  19. package/ui/dist/_app/version.json +1 -1
  20. package/ui/dist/index.html +12 -12
  21. package/ui/dist/_app/immutable/chunks/BrKAv3Ku.js +0 -1
  22. package/ui/dist/_app/immutable/chunks/DFc4ST-K.js +0 -1
  23. package/ui/dist/_app/immutable/entry/start.UevPJt7y.js +0 -1
  24. package/ui/dist/_app/immutable/nodes/3.DXetBVyM.js +0 -1
  25. package/ui/dist/_app/immutable/nodes/4.DeWdWjia.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toa.io/extensions.introspection",
3
- "version": "1.0.0-alpha.294",
3
+ "version": "1.0.0-alpha.296",
4
4
  "type": "module",
5
5
  "description": "Toa Introspection",
6
6
  "author": "temich <tema.gurtovoy@gmail.com>",
@@ -28,7 +28,7 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@toa.io/core": "1.0.0-alpha.293",
31
- "@toa.io/definitions": "1.0.0-alpha.294",
31
+ "@toa.io/definitions": "1.0.0-alpha.296",
32
32
  "@toa.io/generic": "1.0.0-alpha.292",
33
33
  "@toa.io/schemas": "1.0.0-alpha.293",
34
34
  "openspan": "1.0.0-alpha.293"
@@ -39,5 +39,5 @@
39
39
  "prepack": "npm run build:ui",
40
40
  "features": "TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js --tags 'not @skip and not @samples and not @shutdown' && TOA_INTROSPECTION_SAMPLES=1 TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js --tags 'not @skip and @samples' && TOA_INTROSPECTION_INTERVAL=3600 TSX_TSCONFIG_PATH=features/steps/tsconfig.json NODE_OPTIONS=--import=tsx cucumber-js --tags 'not @skip and @shutdown'"
41
41
  },
42
- "gitHead": "50b2b596a46a4d639d9f198f834d70c190f0a3c6"
42
+ "gitHead": "d0fd4f9d13483f763acd9dd2b3c3eb8cb8856524"
43
43
  }
@@ -1 +1 @@
1
- import{A as e,O as t,Q as n,Tt as r,_t as i,a,d as o,i as s,s as c,vt as l,wt as u,x as d}from"./PUjOYRcs.js";import"./xihTtKlq.js";import{E as f}from"./bVdyvKuK.js";var p=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),m=e(`<kbd><!></kbd>`);function h(e,h){l(h,!0);let g=s(h,`ref`,15,null),_=a(h,p);var v=m();o(v,e=>({"data-slot":`kbd`,class:e,..._}),[()=>f(`h-5 w-fit min-w-5 gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none`,h.class)]);var y=n(v);d(y,()=>h.children??r),u(v),c(v,e=>g(e),()=>g()),t(e,v),i()}export{h as t};
1
+ import{A as e,O as t,Q as n,Tt as r,_t as i,a,d as o,i as s,s as c,vt as l,wt as u,x as d}from"./PUjOYRcs.js";import"./xihTtKlq.js";import{E as f}from"./bvDnceWw.js";var p=new Set([`$$slots`,`$$events`,`$$legacy`,`ref`,`class`,`children`]),m=e(`<kbd><!></kbd>`);function h(e,h){l(h,!0);let g=s(h,`ref`,15,null),_=a(h,p);var v=m();o(v,e=>({"data-slot":`kbd`,class:e,..._}),[()=>f(`h-5 w-fit min-w-5 gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none`,h.class)]);var y=n(v);d(y,()=>h.children??r),u(v),c(v,e=>g(e),()=>g()),t(e,v),i()}export{h as t};
@@ -1 +1 @@
1
- import{$ as e,A as t,C as n,D as r,E as i,J as a,O as o,Q as s,_t as c,a as l,b as u,d,et as f,k as p,lt as m,ot as h,q as g,ut as _,vt as v,wt as y,z as b}from"./PUjOYRcs.js";import"./xihTtKlq.js";import{M as x}from"./C_9U3amZ.js";import{S,T as C,_ as w,at as T,d as E,h as D,l as O,m as k,p as A,rt as j,t as M}from"./bVdyvKuK.js";function N(e){return e!==null&&!(e instanceof Error)}var P=new Set([`$$slots`,`$$events`,`$$legacy`,`class`]),F=t(`<p class="text-muted-foreground py-20 text-center"> </p>`),I=t(`<section class="flex flex-col gap-2"><div class="text-muted-foreground flex items-center gap-3"><span class="text-xs font-medium tracking-wide uppercase"> </span> <!></div> <!></section>`),L=t(`<div></div>`);function R(t,R){v(R,!0);let z=()=>_(j,`$nodes`,H),B=()=>_(k,`$query`,H),V=()=>_(O,`$dict`,H),[H,U]=m(),W=l(R,P),G=new T,K=h(()=>N(z())?z():[]),q=h(()=>b(K).map(e=>({node:e,rank:D(e,B())})).filter(e=>e.rank>0).sort(J));a(()=>{let e=b(q).length===1?E(b(q)[0].node):null;return A.set(e===null?null:()=>G.add(e)),()=>A.set(null)});function J(e,t){return t.rank-e.rank||e.node.namespace.localeCompare(t.node.namespace)||e.node.component.localeCompare(t.node.component)}function Y(e){return[{id:`user`,label:V().space.user,of:e.filter(e=>!w(e.node))},{id:`system`,label:V().space.system,of:e.filter(e=>w(e.node))}].filter(e=>e.of.length>0)}x(t,{get store(){return j},awaited:t=>{var a=p(),c=e(a),l=e=>{var t=F(),n=s(t,!0);y(t),g(()=>r(n,V().nodes.empty)),o(e,t)},m=e=>{var t=F(),n=s(t,!0);y(t),g(()=>r(n,V().nodes.nomatch)),o(e,t)},_=t=>{var i=L();d(i,()=>({class:[`flex flex-col gap-6`,R.class],...W})),n(i,21,()=>Y(b(q)),e=>e.id,(t,i)=>{var a=I(),c=s(a),l=s(c),d=s(l,!0);y(l);var m=f(l,2);C(m,{class:`flex-1`}),y(c);var _=f(c,2);u(_,()=>S,(t,r)=>{r(t,{class:`gap-2`,children:(t,r)=>{var a=p(),s=e(a);n(s,17,()=>b(i).of,e=>e.node.id,(e,t)=>{let n=h(()=>E(b(t).node));var r=()=>G.has(b(n)),i=e=>e?G.add(b(n)):G.delete(b(n));M(e,{get node(){return b(t).node},get open(){return r()},set open(e){i(e)}})}),o(t,a)},$$slots:{default:!0}})}),y(a),g(()=>r(d,b(i).label)),o(t,a)}),y(i),o(t,i)};i(c,e=>{b(K).length===0?e(l):b(q).length===0?e(m,1):e(_,-1)}),o(t,a)},$$slots:{awaited:!0}}),c(),U()}export{R as t};
1
+ import{$ as e,A as t,C as n,D as r,E as i,J as a,O as o,Q as s,_t as c,a as l,b as u,d,et as f,k as p,lt as m,ot as h,q as g,ut as _,vt as v,wt as y,z as b}from"./PUjOYRcs.js";import"./xihTtKlq.js";import{M as x}from"./CIxPcerm.js";import{S,T as C,_ as w,at as T,d as E,h as D,l as O,m as k,p as A,rt as j,t as M}from"./bvDnceWw.js";function N(e){return e!==null&&!(e instanceof Error)}var P=new Set([`$$slots`,`$$events`,`$$legacy`,`class`]),F=t(`<p class="text-muted-foreground py-20 text-center"> </p>`),I=t(`<section class="flex flex-col gap-2"><div class="text-muted-foreground flex items-center gap-3"><span class="text-xs font-medium tracking-wide uppercase"> </span> <!></div> <!></section>`),L=t(`<div></div>`);function R(t,R){v(R,!0);let z=()=>_(j,`$nodes`,H),B=()=>_(k,`$query`,H),V=()=>_(O,`$dict`,H),[H,U]=m(),W=l(R,P),G=new T,K=h(()=>N(z())?z():[]),q=h(()=>b(K).map(e=>({node:e,rank:D(e,B())})).filter(e=>e.rank>0).sort(J));a(()=>{let e=b(q).length===1?E(b(q)[0].node):null;return A.set(e===null?null:()=>G.add(e)),()=>A.set(null)});function J(e,t){return t.rank-e.rank||e.node.namespace.localeCompare(t.node.namespace)||e.node.component.localeCompare(t.node.component)}function Y(e){return[{id:`user`,label:V().space.user,of:e.filter(e=>!w(e.node))},{id:`system`,label:V().space.system,of:e.filter(e=>w(e.node))}].filter(e=>e.of.length>0)}x(t,{get store(){return j},awaited:t=>{var a=p(),c=e(a),l=e=>{var t=F(),n=s(t,!0);y(t),g(()=>r(n,V().nodes.empty)),o(e,t)},m=e=>{var t=F(),n=s(t,!0);y(t),g(()=>r(n,V().nodes.nomatch)),o(e,t)},_=t=>{var i=L();d(i,()=>({class:[`flex flex-col gap-6`,R.class],...W})),n(i,21,()=>Y(b(q)),e=>e.id,(t,i)=>{var a=I(),c=s(a),l=s(c),d=s(l,!0);y(l);var m=f(l,2);C(m,{class:`flex-1`}),y(c);var _=f(c,2);u(_,()=>S,(t,r)=>{r(t,{class:`gap-2`,children:(t,r)=>{var a=p(),s=e(a);n(s,17,()=>b(i).of,e=>e.node.id,(e,t)=>{let n=h(()=>E(b(t).node));var r=()=>G.has(b(n)),i=e=>e?G.add(b(n)):G.delete(b(n));M(e,{get node(){return b(t).node},get open(){return r()},set open(e){i(e)}})}),o(t,a)},$$slots:{default:!0}})}),y(a),g(()=>r(d,b(i).label)),o(t,a)}),y(i),o(t,i)};i(c,e=>{b(K).length===0?e(l):b(q).length===0?e(m,1):e(_,-1)}),o(t,a)},$$slots:{awaited:!0}}),c(),U()}export{R as t};
@@ -1 +1 @@
1
- import{B as e,V as t,at as n,mt as r,n as i,rt as a,t as o,z as s}from"./PUjOYRcs.js";import{t as c}from"./BrKAv3Ku.js";var l=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},u=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},d=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function f(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function p(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function ee(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ue({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function de(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function fe(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_tmeus1?.base??`/.introspection`,pe=globalThis.__sveltekit_tmeus1?.assets??x??``,me=`sveltekit:snapshot`,he=`sveltekit:scroll`,ge=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},_e=location.origin;function ve(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ye={...w,"":w.hover};function be(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function xe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=be(e)}}function Se(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===_e&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=be(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ye[r??`off`],preload_data:ye[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Ce(e){let t=r(e),n=!0;function i(){n=!0,t.update(e=>e)}function a(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:i,set:a,subscribe:o}}var we={v:h};function Te(){let{set:e,subscribe:t}=r(!1),n;async function i(){clearTimeout(n);try{let t=await fetch(`${pe}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==c;return r&&(e(!0),we.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:i}}function O(e,t,n){return e.origin!==_e||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Ee(e){}var De=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...De],[...new Set([...De])];function Oe(e){return e.filter(e=>e!=null)}function k(e,t){return e+`/`+t}function ke(e){return e instanceof l||e instanceof d?e.status:500}function Ae(e){return e instanceof d?e.text:`Internal Error`}var A,j,je,Me=i.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(i.toString()),Ne=`a:`;Me?(A={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ne)},j={current:null},je={current:!1}):(A=new class{#e=n({});get data(){return s(this.#e)}set data(e){a(this.#e,e)}#t=n(null);get form(){return s(this.#t)}set form(e){a(this.#t,e)}#n=n(null);get error(){return s(this.#n)}set error(e){a(this.#n,e)}#r=n({});get params(){return s(this.#r)}set params(e){a(this.#r,e)}#i=n({id:null});get route(){return s(this.#i)}set route(e){a(this.#i,e)}#a=n({});get state(){return s(this.#a)}set state(e){a(this.#a,e)}#o=n(-1);get status(){return s(this.#o)}set status(e){a(this.#o,e)}#s=n(new URL(Ne));get url(){return s(this.#s)}set url(e){a(this.#s,e)}},j=new class{#e=n(null);get current(){return s(this.#e)}set current(e){a(this.#e,e)}},je=new class{#e=n(!1);get current(){return s(this.#e)}set current(e){a(this.#e,e)}},we.v=()=>je.current=!0);function Pe(e){Object.assign(A,e)}var{onMount:Fe,tick:Ie}=o,Le=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=de(`sveltekit:scroll`)??{},P=de(`sveltekit:snapshot`)??{},F={url:Ce({}),page:Ce({}),navigating:r(null),updated:Te()};function Re(e){N[e]=T()}function ze(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Be(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ve,He,L,R,Ue,z,We={},Ge={},B=[],V=[],H=null;function U(){H?.fork?.then(e=>e?.discard()),H=null,Q={element:void 0,href:void 0}}var Ke=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,Xe=!1,Ze=!0,K=!1,q=!1,Qe=!1,$e=!1,et,J,Y,X,tt=new Set,nt=new Map,rt=new Map;async function it(e,t,n){if(globalThis.__sveltekit_tmeus1.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_tmeus1.data;for(let t in e)We[t]=e[t];for(let e in n)We[e]=n[e];for(let e in r)We[e]=r[e];for(let e in t)Ge[e]=t[e]}document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),Ve=ue(e),R=document.documentElement,Ue=t,He=e.nodes[0],L=e.nodes[1],He(),L(),J=history.state?.[S],Y=history.state?.[C],J||(J=Y=Date.now(),history.replaceState({...history.state,[S]:J,[C]:Y},``));let r=N[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Ft(Ue,n)):(await Z({type:`enter`,url:ve(z.hash?Vt(new URL(location.href)):location.href),replace_state:!0}),i()),Pt()}function at(){B.length=0,$e=!1}function ot(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function st(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function ct(){Re(J),fe(he,N),ot(Y),fe(me,P)}async function lt(e,n,r,i){let a,o;n.invalidateAll&&U(),await Z({type:`goto`,url:ve(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){$e=!0,a=new Set;for(let[e,t]of nt)for(let[n,r]of t)r.resource?.reset(),a.add(k(e,n));o=new Set;for(let[e,t]of rt)for(let n of t.keys())o.add(k(e,n))}n.invalidate&&n.invalidate.forEach(Nt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of nt)for(let[n,{resource:r}]of t)a?.has(k(e,n))&&r.start();for(let[e,t]of rt)for(let[n,{resource:r}]of t)o?.has(k(e,n))&&r.reconnect()})}async function ut(e){if(e.id!==H?.id){U();let t={};tt.add(t),H={id:e.id,token:t,promise:bt({...e,preload:t}).then(e=>(tt.delete(t),e.type===`loaded`&&e.state.error&&U(),e)),fork:null}}return H.promise}async function dt(e){let t=(await wt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ft(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Pe(e.props.page),et=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:N[J]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}st(Y),Xe=!0}async function pt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=f(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Oe(n).map(e=>e.node.component),page:Bt(A)}};s!==void 0&&(l.props.form=s);let u={},d=!A,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(d=!0),t&&(u={...u,...t.data},d&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==A.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?u:A.data}),l}async function mt({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:Xe?ne(r,i.href,t):y(r,t)}}function gt(e,t,n,r,i,a){if($e)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(B.some(t=>t(new URL(e))))return!0;return!1}function _t(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function vt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function yt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Bt(A),constructors:[]}}}async function bt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return tt.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:c}=i,d=[...s,c];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Et(G.url):!1,p=G.route?i.id!==G.route.id:!1,ee=vt(G.url,n),m=!1,g=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!gt(m,p,f,ee,a.universal?.uses,r)?a:(m=!0,mt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:_t(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof u)return{type:`redirect`,location:t.location};if(a&&tt.has(a))return yt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=ke(t),c;if(t instanceof l)c=t.body;else{if(await F.updated.check())return await Be(),await I(n);c=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await xt(e,_,o);return d?pt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:c,route:i}):await Ot(n,{id:i.id},c,s)}else _.push(void 0);return pt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function St({status:e,error:t,url:n,route:r}){let i={};try{return pt({url:n,params:i,branch:[await mt({loader:He,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:_t(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof u){await lt(new URL(t.location,location.href),{},0);return}let a=await z.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Ct(e){let t=e.href;if(Ke.has(t))return Ke.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ht(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();Ke.set(t,r),n=await r}catch{Ke.delete(t);return}return n}async function wt(e,t){if(e&&!O(e,x,z.hash)){let n=await Ct(e);if(!n)return;let r=Tt(n);for(let n of Ve){let i=n.exec(r);if(i)return{id:Et(e),invalidating:t,route:n,params:ee(i),url:e}}}}function Tt(e){return p(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Et(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Dt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=zt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||qe.forEach(e=>e(c)),o?null:s}async function Z({type:n,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:u={},accept:f=h,block:p=h,event:ee}){let m=X;X=u;let g=await wt(r,!1),_=n===`enter`?zt(G,g,r,n):Dt({url:r,type:n,delta:i?.delta,intent:g,scroll:i?.scroll,event:ee});if(!_){p(),X===u&&(X=m);return}let te=J,v=Y;f(),K=!0,Xe&&_.navigation.type!==`enter`&&F.navigating.set(j.current=_.navigation);let y=g&&await bt(g);if(!y){if(O(r,x,z.hash))return await I(r,s);y=await Ot(r,{id:null},await $(new d(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,X!==u){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:n,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:u}),_.fulfil(void 0);return}if(y=await St({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await F.updated.check())return await Be(),await I(r,s);if(at(),Re(te),ot(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[S]:J+=e,[C]:Y+=e,[ge]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||ze(J,Y)}let ne=g&&H?.id===g.id?H.fork:null;H?.fork&&!ne?U():(H=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(Xe){let t=(await Promise.all(Array.from(Je,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>{W.delete(e)})}t.push(e),t.forEach(e=>{W.add(e)})}let n=_.navigation.to;G={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=ne&&await ne;i?b=i.commit():(M=null,et.$set(y.props),M&&Object.assign(y.props.page,M),Pe(y.props.page),b=e?.()),Qe=!0}else await ft(y,Ue,!1);let{activeElement:re}=document;if(await b,await t(),await t(),X!==u){_.reject(Error(`navigation aborted`));return}y.props.page&&M&&Object.assign(y.props.page,M);let ie=null;if(Ze){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(ie=r.hash&&document.getElementById(Ht(r)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Rt(r,!ie),Ze=!0,K=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),W.forEach(e=>e(_.navigation)),n===`popstate`&&st(Y),F.navigating.set(j.current=null)}async function Ot(e,t,n,r,i){return e.origin===_e&&e.pathname===location.pathname&&!Ye?await St({status:r,error:n,url:e,route:t}):await I(e,i)}var Q={element:void 0,href:void 0};function kt(){let e,t;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}R.addEventListener(`mousedown`,n),R.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(dt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=xe(e,R),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=Se(r,x,z.hash);if(o||s)return;let c=D(r),l=a&&Et(G.url)===Et(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await wt(a,!1);if(!e)return;ut(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,dt(a))}}function a(){r.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:i}=Se(e,x,z.hash);if(n||i)continue;let a=D(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&dt(t))}}W.add(a),a()}function $(e,t){if(e instanceof l)return e.body;let n=ke(e),r=Ae(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function At(e,t){Fe(()=>(e.add(t),()=>{e.delete(t)}))}function jt(e){At(Je,e)}function Mt(e,t={}){return e=new URL(ve(e)),e.origin===_e?lt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Nt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function Pt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ct(),!K){let e=zt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ct()}),navigator.connection?.saveData||kt(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=xe(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=Se(n,x,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Dt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Re(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,x,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Lt){if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(X={},n===J)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(Qe||s)){i!==A.state&&(A.state=i),e(a),N[J]=T(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),z.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[S]:++J,[C]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Le.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(j.current=null)});function e(e){G.url=A.url=e,F.page.set(Bt(A)),F.page.notify()}}async function Ft(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let l=new URL(location.href),d;({params:i={},route:a={id:null}}=await wt(l,!1)||{}),d=Ve.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=It(r.uses)),mt({loader:z.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:_t(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await pt({url:l,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof u)return await I(new URL(t.location,location.href));f=await St({status:ke(t),error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await ft(f,e,p))}function It(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Lt=!1;function Rt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=Ht(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Lt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Lt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function zt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Bt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Vt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Ht(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{A as a,j as i,jt as n,Ee as o,it as r,x as s,Mt as t};
1
+ import{B as e,V as t,at as n,mt as r,n as i,rt as a,t as o,z as s}from"./PUjOYRcs.js";import{t as c}from"./CVZupdzx.js";var l=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},u=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},d=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function f(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function p(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function ee(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function ue({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function de(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function fe(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_ctwr5r?.base??`/.introspection`,pe=globalThis.__sveltekit_ctwr5r?.assets??x??``,me=`sveltekit:snapshot`,he=`sveltekit:scroll`,ge=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},_e=location.origin;function ve(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var ye={...w,"":w.hover};function be(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function xe(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=be(e)}}function Se(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||O(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===_e&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function D(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=be(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:ye[r??`off`],preload_data:ye[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function Ce(e){let t=r(e),n=!0;function i(){n=!0,t.update(e=>e)}function a(e){n=!1,t.set(e)}function o(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:i,set:a,subscribe:o}}var we={v:h};function Te(){let{set:e,subscribe:t}=r(!1),n;async function i(){clearTimeout(n);try{let t=await fetch(`${pe}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==c;return r&&(e(!0),we.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:i}}function O(e,t,n){return e.origin!==_e||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Ee(e){}var De=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...De],[...new Set([...De])];function Oe(e){return e.filter(e=>e!=null)}function k(e,t){return e+`/`+t}function ke(e){return e instanceof l||e instanceof d?e.status:500}function Ae(e){return e instanceof d?e.text:`Internal Error`}var A,j,je,Me=i.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(i.toString()),Ne=`a:`;Me?(A={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ne)},j={current:null},je={current:!1}):(A=new class{#e=n({});get data(){return s(this.#e)}set data(e){a(this.#e,e)}#t=n(null);get form(){return s(this.#t)}set form(e){a(this.#t,e)}#n=n(null);get error(){return s(this.#n)}set error(e){a(this.#n,e)}#r=n({});get params(){return s(this.#r)}set params(e){a(this.#r,e)}#i=n({id:null});get route(){return s(this.#i)}set route(e){a(this.#i,e)}#a=n({});get state(){return s(this.#a)}set state(e){a(this.#a,e)}#o=n(-1);get status(){return s(this.#o)}set status(e){a(this.#o,e)}#s=n(new URL(Ne));get url(){return s(this.#s)}set url(e){a(this.#s,e)}},j=new class{#e=n(null);get current(){return s(this.#e)}set current(e){a(this.#e,e)}},je=new class{#e=n(!1);get current(){return s(this.#e)}set current(e){a(this.#e,e)}},we.v=()=>je.current=!0);function Pe(e){Object.assign(A,e)}var{onMount:Fe,tick:Ie}=o,Le=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),M=null,N=de(`sveltekit:scroll`)??{},P=de(`sveltekit:snapshot`)??{},F={url:Ce({}),page:Ce({}),navigating:r(null),updated:Te()};function Re(e){N[e]=T()}function ze(e,t){let n=e+1;for(;N[n];)delete N[n],n+=1;for(n=t+1;P[n];)delete P[n],n+=1}function I(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Be(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ve,He,L,R,Ue,z,We={},Ge={},B=[],V=[],H=null;function U(){H?.fork?.then(e=>e?.discard()),H=null,Q={element:void 0,href:void 0}}var Ke=new Map,qe=new Set,Je=new Set,W=new Set,G={branch:[],error:null,url:null,nav:null},Ye=!1,Xe=!1,Ze=!0,K=!1,q=!1,Qe=!1,$e=!1,et,J,Y,X,tt=new Set,nt=new Map,rt=new Map;async function it(e,t,n){if(globalThis.__sveltekit_ctwr5r.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_ctwr5r.data;for(let t in e)We[t]=e[t];for(let e in n)We[e]=n[e];for(let e in r)We[e]=r[e];for(let e in t)Ge[e]=t[e]}document.URL!==location.href&&(location.href=location.href),z=e,await e.hooks.init?.(),Ve=ue(e),R=document.documentElement,Ue=t,He=e.nodes[0],L=e.nodes[1],He(),L(),J=history.state?.[S],Y=history.state?.[C],J||(J=Y=Date.now(),history.replaceState({...history.state,[S]:J,[C]:Y},``));let r=N[J];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Ft(Ue,n)):(await Z({type:`enter`,url:ve(z.hash?Vt(new URL(location.href)):location.href),replace_state:!0}),i()),Pt()}function at(){B.length=0,$e=!1}function ot(e){V.some(e=>e?.snapshot)&&(P[e]=V.map(e=>e?.snapshot?.capture()))}function st(e){P[e]?.forEach((e,t)=>{V[t]?.snapshot?.restore(e)})}function ct(){Re(J),fe(he,N),ot(Y),fe(me,P)}async function lt(e,n,r,i){let a,o;n.invalidateAll&&U(),await Z({type:`goto`,url:ve(e),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){$e=!0,a=new Set;for(let[e,t]of nt)for(let[n,r]of t)r.resource?.reset(),a.add(k(e,n));o=new Set;for(let[e,t]of rt)for(let n of t.keys())o.add(k(e,n))}n.invalidate&&n.invalidate.forEach(Nt)}}),n.invalidateAll&&t().then(t).then(()=>{for(let[e,t]of nt)for(let[n,{resource:r}]of t)a?.has(k(e,n))&&r.start();for(let[e,t]of rt)for(let[n,{resource:r}]of t)o?.has(k(e,n))&&r.reconnect()})}async function ut(e){if(e.id!==H?.id){U();let t={};tt.add(t),H={id:e.id,token:t,promise:bt({...e,preload:t}).then(e=>(tt.delete(t),e.type===`loaded`&&e.state.error&&U(),e)),fork:null}}return H.promise}async function dt(e){let t=(await wt(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function ft(e,t,n){let r={params:G.params,route:{id:G.route?.id??null},url:new URL(location.href)};if(G={...e.state,nav:r},Pe(e.props.page),et=new z.root({target:t,props:{...e.props,stores:F,components:V},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:N[J]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};W.forEach(t=>t(e))}st(Y),Xe=!0}async function pt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=f(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Oe(n).map(e=>e.node.component),page:Bt(A)}};s!==void 0&&(l.props.form=s);let u={},d=!A,p=0;for(let e=0;e<Math.max(n.length,G.branch.length);e+=1){let t=n[e],r=G.branch[e];t?.data!==r?.data&&(d=!0),t&&(u={...u,...t.data},d&&(l.props[`data_${p}`]=u),p+=1)}return(!G.url||e.href!==G.url.href||G.error!==a||s!==void 0&&s!==A.form||d)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:d?u:A.data}),l}async function mt({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function ht(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:Xe?ne(r,i.href,t):y(r,t)}}function gt(e,t,n,r,i,a){if($e)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==G.params[e])return!0;for(let e of i.dependencies)if(B.some(t=>t(new URL(e))))return!0;return!1}function _t(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function vt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function yt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Bt(A),constructors:[]}}}async function bt({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return tt.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:c}=i,d=[...s,c];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=G.url?e!==Et(G.url):!1,p=G.route?i.id!==G.route.id:!1,ee=vt(G.url,n),m=!1,g=d.map(async(e,t)=>{if(!e)return;let a=G.branch[t];return e[1]===a?.loader&&!gt(m,p,f,ee,a.universal?.uses,r)?a:(m=!0,mt({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:_t(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof u)return{type:`redirect`,location:t.location};if(a&&tt.has(a))return yt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=ke(t),c;if(t instanceof l)c=t.body;else{if(await F.updated.check())return await Be(),await I(n);c=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await xt(e,_,o);return d?pt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:c,route:i}):await Ot(n,{id:i.id},c,s)}else _.push(void 0);return pt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function xt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function St({status:e,error:t,url:n,route:r}){let i={};try{return pt({url:n,params:i,branch:[await mt({loader:He,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:_t(null)}),{node:await L(),loader:L,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof u){await lt(new URL(t.location,location.href),{},0);return}let a=await z.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function Ct(e){let t=e.href;if(Ke.has(t))return Ke.get(t);let n;try{let r=(async()=>{let t=await z.hooks.reroute({url:new URL(e),fetch:async(t,n)=>ht(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);z.hash?n.hash=t:n.pathname=t,t=n}return t})();Ke.set(t,r),n=await r}catch{Ke.delete(t);return}return n}async function wt(e,t){if(e&&!O(e,x,z.hash)){let n=await Ct(e);if(!n)return;let r=Tt(n);for(let n of Ve){let i=n.exec(r);if(i)return{id:Et(e),invalidating:t,route:n,params:ee(i),url:e}}}}function Tt(e){return p(z.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Et(e){return(z.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Dt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=zt(G,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return K||qe.forEach(e=>e(c)),o?null:s}async function Z({type:n,url:r,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:u={},accept:f=h,block:p=h,event:ee}){let m=X;X=u;let g=await wt(r,!1),_=n===`enter`?zt(G,g,r,n):Dt({url:r,type:n,delta:i?.delta,intent:g,scroll:i?.scroll,event:ee});if(!_){p(),X===u&&(X=m);return}let te=J,v=Y;f(),K=!0,Xe&&_.navigation.type!==`enter`&&F.navigating.set(j.current=_.navigation);let y=g&&await bt(g);if(!y){if(O(r,x,z.hash))return await I(r,s);y=await Ot(r,{id:null},await $(new d(404,`Not Found`,`Not found: ${r.pathname}`),{url:r,params:{},route:{id:null}}),404,s)}if(r=g?.url||r,X!==u){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:n,url:new URL(y.location,r),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:u}),_.fulfil(void 0);return}if(y=await St({status:500,error:await $(Error(`Redirect loop`),{url:r,params:{},route:{id:null}}),url:r,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await F.updated.check())return await Be(),await I(r,s);if(at(),Re(te),ot(v),y.props.page.url.pathname!==r.pathname&&(r.pathname=y.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[S]:J+=e,[C]:Y+=e,[ge]:c};(s?history.replaceState:history.pushState).call(history,t,``,r),s||ze(J,Y)}let ne=g&&H?.id===g.id?H.fork:null;H?.fork&&!ne?U():(H=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(Xe){let t=(await Promise.all(Array.from(Je,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(t.length>0){function e(){t.forEach(e=>{W.delete(e)})}t.push(e),t.forEach(e=>{W.add(e)})}let n=_.navigation.to;G={...y.state,nav:{params:n.params,route:n.route,url:n.url}},y.props.page&&(y.props.page.url=r),!a&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let i=ne&&await ne;i?b=i.commit():(M=null,et.$set(y.props),M&&Object.assign(y.props.page,M),Pe(y.props.page),b=e?.()),Qe=!0}else await ft(y,Ue,!1);let{activeElement:re}=document;if(await b,await t(),await t(),X!==u){_.reject(Error(`navigation aborted`));return}y.props.page&&M&&Object.assign(y.props.page,M);let ie=null;if(Ze){let e=i?i.scroll:o?T():null;e?scrollTo(e.x,e.y):(ie=r.hash&&document.getElementById(Ht(r)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!a&&!ae&&Rt(r,!ie),Ze=!0,K=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),W.forEach(e=>e(_.navigation)),n===`popstate`&&st(Y),F.navigating.set(j.current=null)}async function Ot(e,t,n,r,i){return e.origin===_e&&e.pathname===location.pathname&&!Ye?await St({status:r,error:n,url:e,route:t}):await I(e,i)}var Q={element:void 0,href:void 0};function kt(){let e,t;R.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}R.addEventListener(`mousedown`,n),R.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(dt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=xe(e,R),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=Se(r,x,z.hash);if(o||s)return;let c=D(r),l=a&&Et(G.url)===Et(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await wt(a,!1);if(!e)return;ut(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,dt(a))}}function a(){r.disconnect();for(let e of R.querySelectorAll(`a`)){let{url:t,external:n,download:i}=Se(e,x,z.hash);if(n||i)continue;let a=D(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&dt(t))}}W.add(a),a()}function $(e,t){if(e instanceof l)return e.body;let n=ke(e),r=Ae(e);return z.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function At(e,t){Fe(()=>(e.add(t),()=>{e.delete(t)}))}function jt(e){At(Je,e)}function Mt(e,t={}){return e=new URL(ve(e)),e.origin===_e?lt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Nt(e){if(typeof e==`function`)B.push(e);else{let{href:t}=new URL(e,location.href);B.push(e=>e.href===t)}}function Pt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(ct(),!K){let e=zt(G,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};qe.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&ct()}),navigator.connection?.saveData||kt(),R.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=xe(t.composedPath()[0],R);if(!n)return;let{url:r,external:i,target:a,download:o}=Se(n,x,z.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=D(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(z.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Dt({url:r,type:`link`,event:t})?K=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=G.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(q=!0,Re(J),e(r),!s.replace_state)return;q=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),R.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(O(r,x,!1))return;let i=e.target,a=D(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Lt){if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(X={},n===J)return;let r=N[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=G.url?m(location)===m(G.url):!1;if(o===Y&&(Qe||s)){i!==A.state&&(A.state=i),e(a),N[J]=T(),r&&scrollTo(r.x,r.y),J=n;return}let c=n-J;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{J=n,Y=o},block:()=>{history.go(-c)},nav_token:X,event:t})}else q||(e(new URL(location.href)),z.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{q&&(q=!1,history.replaceState({...history.state,[S]:++J,[C]:Y},``,location.href))});for(let e of document.querySelectorAll(`link`))Le.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&F.navigating.set(j.current=null)});function e(e){G.url=A.url=e,F.page.set(Bt(A)),F.page.notify()}}async function Ft(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){Ye=!0;let l=new URL(location.href),d;({params:i={},route:a={id:null}}=await wt(l,!1)||{}),d=Ve.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=It(r.uses)),mt({loader:z.nodes[t],url:l,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:_t(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await pt({url:l,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof u)return await I(new URL(t.location,location.href));f=await St({status:ke(t),error:await $(t,{url:l,params:i,route:a}),url:l,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await ft(f,e,p))}function It(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Lt=!1;function Rt(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=Ht(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Lt=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Lt=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function zt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Bt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Vt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function Ht(e){let t;if(z.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{A as a,j as i,jt as n,Ee as o,it as r,x as s,Mt as t};
@@ -1,6 +1,6 @@
1
- import{$ as e,A as t,C as n,Dt as r,E as i,Et as a,F as o,O as s,P as c,Q as l,Tt as u,_t as d,a as f,d as p,et as m,ft as h,ht as g,i as _,j as v,k as y,lt as b,mt as x,o as S,ot as ee,pt as C,ut as w,vt as te,w as ne,wt as T,x as E,y as re,z as D}from"./PUjOYRcs.js";import{t as ie}from"./BrKAv3Ku.js";import"./xihTtKlq.js";var ae=class{store;values;request;revalidate;stale;timestamp=0;constructor(e){this.store=x(null),this.values=e.values,this.request=e.get,this.revalidate=e.revalidate??se.revalidate,this.stale=e.stale??se.stale,e.persist!==void 0&&this.persist(e.persist),e.bind!==void 0&&this.bind(e.bind)}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}add(e){this.values?.set(e.id,e),this.store.update(t=>t===null||t instanceof Error?[e]:t.find(t=>t.id===e.id)===void 0?[e,...t]:t)}get(e,t){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.get(e,t)}extract(e){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.extract(e)}delete(e){this.values?.delete(e),this.store.update(t=>t===null||t instanceof Error?t:t.filter(t=>t.id!==e))}set(e,t){this.store.update(n=>{if(n===null||n instanceof Error)return[e];let r=n.findIndex(t=>t.id===e.id);return r===-1?t?.add===!0?[e,...n]:n:(n[r]=e,n)}),this.values?.set(e.id,e)}update(e,t,n){if(this.values===void 0)throw Error(`Collection: values is not defined`);let r=this.values.extract(e);if(r===null)return;let i=t(r)??r;this.set(i,n)}sync(){return(this.timestamp===0||this.timestamp+this.revalidate<Date.now())&&(this.stale||this.clear(),this.refresh()),this}async fetch(){return await this.refresh(),this}replace(e){let t=e;if(this.store.set(t),this.timestamp=Date.now(),this.values!==void 0)for(let e of t)this.values.set(e.id,e)}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error?this.store.set(e):this.replace(e)}persist(e){if(typeof window>`u`)return;let t=this.load(e);if(t!==null&&(this.store.set(t),this.values?.persistent===!1))for(let e of t)this.values.set(e.id,e);this.store.subscribe(t=>{t instanceof Error||(t===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t)))})}load(e){if(typeof window>`u`)return null;let t=localStorage.getItem(e);if(t===null)return null;try{let n=JSON.parse(t);return Array.isArray(n)?n:(console.error(`Storage value for ${e} is not an array:`,n),null)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}clear(){this.store.set(null),this.values?.clear(),this.timestamp=0}};function oe(e){return new ae(e)}var se={revalidate:3e5,stale:!1},ce=class{persistent;values={};fetch;revalidate;permanent;stale;persist;ready=!1;dumping=null;constructor(e){this.fetch=e.get,this.revalidate=e.revalidate??O.revalidate,this.permanent=e.permanent??O.permanent,this.stale=e.stale??O.stale,this.persist=e.persist,this.persistent=this.persist!==void 0,this.load(),e.bind!==void 0&&this.bind(e.bind)}set(e,t,n){let r=t,i=this.values[e]??(this.values[e]=this.create(r));return n?.stash===!0?this.stash(e):delete i.stash,i.store.set(r),!(r instanceof Error)&&this.ready&&n?.stash!==!0&&this.dump(),this.values[e].store}reset(e){let t=this.values[e]?.stash;return t===void 0?this.extract(e):(t===null?this.delete(e):this.set(e,t),t)}get(e,t){this.ready=!0;let n=this.values[e]??=this.create();return this.fetch===void 0||t?.fetch===!1||(n.timestamp===0||n.timestamp+this.revalidate<Date.now())&&(this.stale||n.store.set(null),n.timestamp=Date.now(),this.fetch(e).then(t=>this.set(e,t))),n.store}extract(e){if(this.values[e]===void 0)return null;let t=C(this.values[e].store);return t instanceof Error?null:t}delete(e){if(!(e in this.values))return;let t=this.values[e];t.store.set(null),t.timestamp=0,delete t.stash,this.dump()}clear(){for(let e of Object.keys(this.values))this.delete(e);this.ready=!1}create(e){return{store:x(e??null),timestamp:this.permanent&&e!==void 0?Date.now():0}}stash(e){let t=this.values[e];if(t.stash!==void 0){console.warn(`Stash overlap, skipping`);return}let n=this.get(e,{fetch:!1});t.stash??=C(n)}dump(e=!0){if(this.persist===void 0||typeof window>`u`)return;if(e){this.dumping??=setTimeout(()=>this.dump(!1),le);return}this.dumping=null;let t={};for(let[e,n]of Object.entries(this.values)){let r=n.stash??C(n.store);r!==null&&!(r instanceof Error)&&(t[e]=r)}Object.keys(t).length===0?localStorage.removeItem(this.persist):localStorage.setItem(this.persist,JSON.stringify(t))}load(){if(this.persist===void 0||typeof window>`u`)return;let e=localStorage.getItem(this.persist);if(e!==null)try{let t=JSON.parse(e);if(typeof t!=`object`||!t){console.error(`Storage value for ${this.persist} is not an object:`,t);return}for(let[e,n]of Object.entries(t))this.set(e,n)}catch(e){console.error(`Invalid storage value for ${this.persist}`,e)}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}},le=100,O={revalidate:3e5,permanent:!1,stale:!1};function ue(e={}){return new ce(e)}var de=class{store;default;request;revalidate;timestamp=0;constructor(e){this.default=e.default??null,this.request=e.get,this.revalidate=e.revalidate??me.revalidate,this.store=e.persist===void 0||typeof window>`u`?x(this.default):fe(e.persist,this.default,e.session),e.bind&&this.bind(e.bind)}set(e){this.store.set(e)}update(e){this.store.update(t=>e(t))}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}extract(){return C(this.store)}sync(){this.request!==void 0&&this.timestamp+this.revalidate<Date.now()&&this.refresh()}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error||this.set(e)}bind(e){e.subscribe(e=>{e===null&&this.store.set(this.default)})}};function k(e={}){return new de(e)}function fe(e,t,n){let r=x(pe(e)??t),i=n?`sessionStorage`:`localStorage`;return r.subscribe(t=>{t===null?window[i].removeItem(e):window[i].setItem(e,JSON.stringify(t))}),r}function pe(e){let t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}var me={revalidate:3e5};function he(e,t){return new Promise(n=>{let r=!1,i=null;i=e.subscribe(e=>{t(e)&&(i?.(),r=!0,n(e))}),r&&i?.()})}function ge(e){return he(e,e=>e!==null&&!(e instanceof Error))}function _e(...e){return h(e,(e,t)=>{let n=e.find(e=>e instanceof Error);n?t(n):e.some(e=>e===null)?t(null):t([...e])})}var ve={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ye=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},be=Symbol(`lucide-context`),xe=()=>g(be),Se=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Ce=v(`<svg><!><!></svg>`);function A(t,r){te(r,!0);let i=xe()??{},o=_(r,`color`,19,()=>i.color??`currentColor`),c=_(r,`size`,19,()=>i.size??24),h=_(r,`strokeWidth`,19,()=>i.strokeWidth??2),g=_(r,`absoluteStrokeWidth`,19,()=>i.absoluteStrokeWidth??!1),v=_(r,`iconNode`,19,()=>[]),b=f(r,Se),x=ee(()=>g()?Number(h())*24/Number(c()):h());var S=Ce();p(S,e=>({...ve,...e,...b,width:c(),height:c(),stroke:o(),"stroke-width":D(x),class:[`lucide-icon lucide`,i.class,r.name&&`lucide-${r.name}`,r.class]}),[()=>!r.children&&!ye(b)&&{"aria-hidden":`true`}]);var C=l(S);n(C,17,v,ne,(t,n)=>{var r=ee(()=>a(D(n),2));let i=()=>D(r)[0],o=()=>D(r)[1];var c=y(),l=e(c);re(l,i,!0,(e,t)=>{p(e,()=>({...o()}))}),s(t,c)});var w=m(C);E(w,()=>r.children??u),T(S),s(t,S),d()}var we=new Set([`$$slots`,`$$events`,`$$legacy`]);function j(e,t){let n=f(t,we),r=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]];A(e,S({name:`loader-circle`},()=>n,{get iconNode(){return r}}))}var Te=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ee(e,t){let n=f(t,Te),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];A(e,S({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var De=t(`<div class="m-auto flex flex-col items-center gap-4"><span class="text-destructive">Something went terribly wrong</span> <button class="p-4 border border-muted-foreground hover:bg-muted cursor-pointer rounded-md flex items-center gap-2"><!></button></div>`);function Oe(t,n){let r=()=>w(n.store,`$store`,a),[a,c]=b(),u=_(n,`silent`,3,!1);var d=y(),f=e(d),p=t=>{var r=y(),a=e(r),o=t=>{var r=y(),i=e(r);E(i,()=>n.waiting),s(t,r)},c=e=>{j(e,{class:`animate-spin m-auto text-muted-foreground`})};i(a,e=>{n.waiting?e(o):u()||e(c,1)}),s(t,r)},h=t=>{var a=y(),c=e(a),d=t=>{var i=y(),a=e(i);E(a,()=>n.error,r),s(t,i)},f=e=>{var t=De(),n=m(l(t),2);Ee(l(n),{size:16}),T(n),T(t),o(`click`,n,()=>window.location.reload()),s(e,t)};i(c,e=>{n.error?e(d):u()||e(f,1)}),s(t,a)},g=t=>{var i=y(),a=e(i);E(a,()=>n.awaited,r),s(t,i)};i(f,e=>{r()===null?e(p):r()instanceof Error?e(h,1):e(g,-1)}),s(t,d),c()}c([`click`]);var M=k({persist:`auth:account`}),N=k({persist:`auth:challenge`,bind:M}),P=k({persist:`auth:method`}),F=x(!1),ke=x(!1),Ae=h([N,M,F],([e,t,n])=>e!==null&&t!==null&&n===!1);function I(e){M.extract()?.id!==e.id&&M.set(null),M.set(e)}function L(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}var R=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Err=void 0,e.Err=class extends Error{code;name=`Error`;message=``;cause;constructor(e,t){super(),this.code=e,delete this.stack,Object.defineProperty(this,"name",{enumerable:!1}),typeof t==`string`?(this.message=t,Object.defineProperty(this,"cause",{enumerable:!1})):(Object.defineProperty(this,"message",{enumerable:!1}),Object.defineProperty(this,"cause",{enumerable:t!==void 0,value:t}))}}}))();async function je(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get(`content-type`);if(!n||!~n.indexOf(`multipart/`))return e;let r=n.indexOf(`boundary=`),i=`-`;if(~r){let e=r+9,t=n.indexOf(`;`,e);i=n.slice(e,t>-1?t:void 0).trim().replace(/"/g,``)}return async function*(e,t,n){let r,i,a,o=new TextDecoder(`utf8`),s=e.getReader(),c=!n||!n.multiple,l=t.length,u=``,d=[];try{let e;e:for(;!(e=await s.read()).done;){let n=o.decode(e.value,{stream:!0});r=u.length,u+=n;let s=n.indexOf(t);for(~s?r+=s:r=u.indexOf(t),d=[];~r;){let e=u.slice(0,r),n=u.slice(r+l);if(i){let t=e.indexOf(`\r
1
+ import{$ as e,A as t,C as n,Dt as r,E as i,Et as a,F as o,O as s,P as c,Q as l,Tt as u,_t as d,a as f,d as p,et as m,ft as h,ht as g,i as _,j as v,k as y,lt as b,mt as x,o as S,ot as ee,pt as C,ut as w,vt as te,w as ne,wt as T,x as E,y as re,z as D}from"./PUjOYRcs.js";import{t as ie}from"./CVZupdzx.js";import"./xihTtKlq.js";var ae=class{store;values;request;revalidate;stale;timestamp=0;constructor(e){this.store=x(null),this.values=e.values,this.request=e.get,this.revalidate=e.revalidate??se.revalidate,this.stale=e.stale??se.stale,e.persist!==void 0&&this.persist(e.persist),e.bind!==void 0&&this.bind(e.bind)}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}add(e){this.values?.set(e.id,e),this.store.update(t=>t===null||t instanceof Error?[e]:t.find(t=>t.id===e.id)===void 0?[e,...t]:t)}get(e,t){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.get(e,t)}extract(e){if(this.values===void 0)throw Error(`Collection: values is not defined`);return this.values.extract(e)}delete(e){this.values?.delete(e),this.store.update(t=>t===null||t instanceof Error?t:t.filter(t=>t.id!==e))}set(e,t){this.store.update(n=>{if(n===null||n instanceof Error)return[e];let r=n.findIndex(t=>t.id===e.id);return r===-1?t?.add===!0?[e,...n]:n:(n[r]=e,n)}),this.values?.set(e.id,e)}update(e,t,n){if(this.values===void 0)throw Error(`Collection: values is not defined`);let r=this.values.extract(e);if(r===null)return;let i=t(r)??r;this.set(i,n)}sync(){return(this.timestamp===0||this.timestamp+this.revalidate<Date.now())&&(this.stale||this.clear(),this.refresh()),this}async fetch(){return await this.refresh(),this}replace(e){let t=e;if(this.store.set(t),this.timestamp=Date.now(),this.values!==void 0)for(let e of t)this.values.set(e.id,e)}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error?this.store.set(e):this.replace(e)}persist(e){if(typeof window>`u`)return;let t=this.load(e);if(t!==null&&(this.store.set(t),this.values?.persistent===!1))for(let e of t)this.values.set(e.id,e);this.store.subscribe(t=>{t instanceof Error||(t===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t)))})}load(e){if(typeof window>`u`)return null;let t=localStorage.getItem(e);if(t===null)return null;try{let n=JSON.parse(t);return Array.isArray(n)?n:(console.error(`Storage value for ${e} is not an array:`,n),null)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}clear(){this.store.set(null),this.values?.clear(),this.timestamp=0}};function oe(e){return new ae(e)}var se={revalidate:3e5,stale:!1},ce=class{persistent;values={};fetch;revalidate;permanent;stale;persist;ready=!1;dumping=null;constructor(e){this.fetch=e.get,this.revalidate=e.revalidate??O.revalidate,this.permanent=e.permanent??O.permanent,this.stale=e.stale??O.stale,this.persist=e.persist,this.persistent=this.persist!==void 0,this.load(),e.bind!==void 0&&this.bind(e.bind)}set(e,t,n){let r=t,i=this.values[e]??(this.values[e]=this.create(r));return n?.stash===!0?this.stash(e):delete i.stash,i.store.set(r),!(r instanceof Error)&&this.ready&&n?.stash!==!0&&this.dump(),this.values[e].store}reset(e){let t=this.values[e]?.stash;return t===void 0?this.extract(e):(t===null?this.delete(e):this.set(e,t),t)}get(e,t){this.ready=!0;let n=this.values[e]??=this.create();return this.fetch===void 0||t?.fetch===!1||(n.timestamp===0||n.timestamp+this.revalidate<Date.now())&&(this.stale||n.store.set(null),n.timestamp=Date.now(),this.fetch(e).then(t=>this.set(e,t))),n.store}extract(e){if(this.values[e]===void 0)return null;let t=C(this.values[e].store);return t instanceof Error?null:t}delete(e){if(!(e in this.values))return;let t=this.values[e];t.store.set(null),t.timestamp=0,delete t.stash,this.dump()}clear(){for(let e of Object.keys(this.values))this.delete(e);this.ready=!1}create(e){return{store:x(e??null),timestamp:this.permanent&&e!==void 0?Date.now():0}}stash(e){let t=this.values[e];if(t.stash!==void 0){console.warn(`Stash overlap, skipping`);return}let n=this.get(e,{fetch:!1});t.stash??=C(n)}dump(e=!0){if(this.persist===void 0||typeof window>`u`)return;if(e){this.dumping??=setTimeout(()=>this.dump(!1),le);return}this.dumping=null;let t={};for(let[e,n]of Object.entries(this.values)){let r=n.stash??C(n.store);r!==null&&!(r instanceof Error)&&(t[e]=r)}Object.keys(t).length===0?localStorage.removeItem(this.persist):localStorage.setItem(this.persist,JSON.stringify(t))}load(){if(this.persist===void 0||typeof window>`u`)return;let e=localStorage.getItem(this.persist);if(e!==null)try{let t=JSON.parse(e);if(typeof t!=`object`||!t){console.error(`Storage value for ${this.persist} is not an object:`,t);return}for(let[e,n]of Object.entries(t))this.set(e,n)}catch(e){console.error(`Invalid storage value for ${this.persist}`,e)}}bind(e){e.subscribe(e=>{e===null&&this.clear()})}},le=100,O={revalidate:3e5,permanent:!1,stale:!1};function ue(e={}){return new ce(e)}var de=class{store;default;request;revalidate;timestamp=0;constructor(e){this.default=e.default??null,this.request=e.get,this.revalidate=e.revalidate??me.revalidate,this.store=e.persist===void 0||typeof window>`u`?x(this.default):fe(e.persist,this.default,e.session),e.bind&&this.bind(e.bind)}set(e){this.store.set(e)}update(e){this.store.update(t=>e(t))}subscribe(e,t){return this.sync(),this.store.subscribe(e,t)}extract(){return C(this.store)}sync(){this.request!==void 0&&this.timestamp+this.revalidate<Date.now()&&this.refresh()}async refresh(){if(this.request===void 0)return;this.timestamp=Date.now();let e=await this.request();e instanceof Error||this.set(e)}bind(e){e.subscribe(e=>{e===null&&this.store.set(this.default)})}};function k(e={}){return new de(e)}function fe(e,t,n){let r=x(pe(e)??t),i=n?`sessionStorage`:`localStorage`;return r.subscribe(t=>{t===null?window[i].removeItem(e):window[i].setItem(e,JSON.stringify(t))}),r}function pe(e){let t=window.localStorage.getItem(e);if(t===null)return null;try{return JSON.parse(t)}catch(t){return console.error(`Invalid storage value for ${e}`,t),null}}var me={revalidate:3e5};function he(e,t){return new Promise(n=>{let r=!1,i=null;i=e.subscribe(e=>{t(e)&&(i?.(),r=!0,n(e))}),r&&i?.()})}function ge(e){return he(e,e=>e!==null&&!(e instanceof Error))}function _e(...e){return h(e,(e,t)=>{let n=e.find(e=>e instanceof Error);n?t(n):e.some(e=>e===null)?t(null):t([...e])})}var ve={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},ye=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},be=Symbol(`lucide-context`),xe=()=>g(be),Se=new Set([`$$slots`,`$$events`,`$$legacy`,`name`,`color`,`size`,`strokeWidth`,`absoluteStrokeWidth`,`iconNode`,`children`]),Ce=v(`<svg><!><!></svg>`);function A(t,r){te(r,!0);let i=xe()??{},o=_(r,`color`,19,()=>i.color??`currentColor`),c=_(r,`size`,19,()=>i.size??24),h=_(r,`strokeWidth`,19,()=>i.strokeWidth??2),g=_(r,`absoluteStrokeWidth`,19,()=>i.absoluteStrokeWidth??!1),v=_(r,`iconNode`,19,()=>[]),b=f(r,Se),x=ee(()=>g()?Number(h())*24/Number(c()):h());var S=Ce();p(S,e=>({...ve,...e,...b,width:c(),height:c(),stroke:o(),"stroke-width":D(x),class:[`lucide-icon lucide`,i.class,r.name&&`lucide-${r.name}`,r.class]}),[()=>!r.children&&!ye(b)&&{"aria-hidden":`true`}]);var C=l(S);n(C,17,v,ne,(t,n)=>{var r=ee(()=>a(D(n),2));let i=()=>D(r)[0],o=()=>D(r)[1];var c=y(),l=e(c);re(l,i,!0,(e,t)=>{p(e,()=>({...o()}))}),s(t,c)});var w=m(C);E(w,()=>r.children??u),T(S),s(t,S),d()}var we=new Set([`$$slots`,`$$events`,`$$legacy`]);function j(e,t){let n=f(t,we),r=[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]];A(e,S({name:`loader-circle`},()=>n,{get iconNode(){return r}}))}var Te=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ee(e,t){let n=f(t,Te),r=[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]];A(e,S({name:`rotate-ccw`},()=>n,{get iconNode(){return r}}))}var De=t(`<div class="m-auto flex flex-col items-center gap-4"><span class="text-destructive">Something went terribly wrong</span> <button class="p-4 border border-muted-foreground hover:bg-muted cursor-pointer rounded-md flex items-center gap-2"><!></button></div>`);function Oe(t,n){let r=()=>w(n.store,`$store`,a),[a,c]=b(),u=_(n,`silent`,3,!1);var d=y(),f=e(d),p=t=>{var r=y(),a=e(r),o=t=>{var r=y(),i=e(r);E(i,()=>n.waiting),s(t,r)},c=e=>{j(e,{class:`animate-spin m-auto text-muted-foreground`})};i(a,e=>{n.waiting?e(o):u()||e(c,1)}),s(t,r)},h=t=>{var a=y(),c=e(a),d=t=>{var i=y(),a=e(i);E(a,()=>n.error,r),s(t,i)},f=e=>{var t=De(),n=m(l(t),2);Ee(l(n),{size:16}),T(n),T(t),o(`click`,n,()=>window.location.reload()),s(e,t)};i(c,e=>{n.error?e(d):u()||e(f,1)}),s(t,a)},g=t=>{var i=y(),a=e(i);E(a,()=>n.awaited,r),s(t,i)};i(f,e=>{r()===null?e(p):r()instanceof Error?e(h,1):e(g,-1)}),s(t,d),c()}c([`click`]);var M=k({persist:`auth:account`}),N=k({persist:`auth:challenge`,bind:M}),P=k({persist:`auth:method`}),F=x(!1),ke=x(!1),Ae=h([N,M,F],([e,t,n])=>e!==null&&t!==null&&n===!1);function I(e){M.extract()?.id!==e.id&&M.set(null),M.set(e)}function L(e){return{all:e||=new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(e){e(n)}),(r=e.get(`*`))&&r.slice().map(function(e){e(t,n)})}}}var R=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Err=void 0,e.Err=class extends Error{code;name=`Error`;message=``;cause;constructor(e,t){super(),this.code=e,delete this.stack,Object.defineProperty(this,"name",{enumerable:!1}),typeof t==`string`?(this.message=t,Object.defineProperty(this,"cause",{enumerable:!1})):(Object.defineProperty(this,"message",{enumerable:!1}),Object.defineProperty(this,"cause",{enumerable:t!==void 0,value:t}))}}}))();async function je(e,t){if(!e.ok||!e.body||e.bodyUsed)return e;let n=e.headers.get(`content-type`);if(!n||!~n.indexOf(`multipart/`))return e;let r=n.indexOf(`boundary=`),i=`-`;if(~r){let e=r+9,t=n.indexOf(`;`,e);i=n.slice(e,t>-1?t:void 0).trim().replace(/"/g,``)}return async function*(e,t,n){let r,i,a,o=new TextDecoder(`utf8`),s=e.getReader(),c=!n||!n.multiple,l=t.length,u=``,d=[];try{let e;e:for(;!(e=await s.read()).done;){let n=o.decode(e.value,{stream:!0});r=u.length,u+=n;let s=n.indexOf(t);for(~s?r+=s:r=u.indexOf(t),d=[];~r;){let e=u.slice(0,r),n=u.slice(r+l);if(i){let t=e.indexOf(`\r
2
2
  \r
3
3
  `)+4,r=e.lastIndexOf(`\r
4
4
  `,t),i=!1,o=e.slice(t,r>-1?void 0:r),s=String(e.slice(0,t)).trim().split(`\r
5
5
  `),l={},u=s.length;for(;a=s[--u];a=a.split(`: `),l[a.shift().toLowerCase()]=a.join(`: `));if(a=l[`content-type`],a&&~a.indexOf(`application/json`))try{o=JSON.parse(o),i=!0}catch{}if(a={headers:l,body:o,json:i},c?yield a:d.push(a),n.slice(0,2)===`--`)break e}else t=`\r
6
- `+t,i=l+=2;u=n,r=u.indexOf(t)}d.length&&(yield d)}}finally{d.length&&(yield d),await s.cancel()}}(e.body,`--${i}`,t)}var Me=Object.defineProperty,Ne=(e,t)=>{for(var n in t)Me(e,n,{get:t[n],enumerable:!0})},Pe=Symbol(`meta`);function Fe(e){return e[Pe]??null}function Ie(e,t){Object.defineProperty(e,Pe,{value:t,writable:!1,enumerable:!1,configurable:!1})}var Le=class{origin;events;sleep;fetch=fetch.bind(globalThis);challenge=null;constructor(e){this.origin=e.origin,this.events=e.events,e.sleep!==void 0&&(this.sleep=JSON.stringify(e.sleep))}async json(e,t){let n=this.setup(t),r=await this.request(e,n),i=r.headers.get(`content-type`)===`application/json`?await r.json():await r.text();return typeof i==`object`&&i&&Ie(i,{status:r.status,headers:r.headers}),r.ok?(this.events.emit(`response`,{status:r.status,headers:r.headers}),i):(this.events.emit(`error`,{code:r.status,body:i}),new R.Err(r.status,i))}async multipart(e,t){let n=this.setup(t),r=await this.request(e,n);if(!r.ok)return new R.Err(r.status,{body:await r.text()});let i=await je(r),a=await i.next();if(n.debug&&console.debug(`Multipart ACK`,{path:e,body:a.value.body}),JSON.parse(a.value.body)!==`ACK`)throw Error(`No ACK`);return(async function*(){for await(let t of i){n.debug&&console.debug(`Multipart chunk`,{path:e,body:t.body});let r=JSON.parse(t.body);if(r===`FIN`)return;yield r}})()}async octets(e,t){let n=await this.multipart(e,t);if(n instanceof Error)return n;let r=(await n.next()).value,i=L();return(async()=>{await new Promise(e=>setTimeout(e,0));for await(let r of n){let n=r.status===`completed`?r.error?new R.Err(r.error.code??`UNKNOWN`,r.error.message):r.output:new R.Err(`EXCEPTION`);t?.debug&&console.debug(`Emitting octets step`,{path:e,step:r.step,payload:n}),i.emit(r.step,n)}i.off(`*`)})(),[r,i]}authenticate(e){this.challenge=e}use(e){this.fetch=e}setup(e){if(e??={},e.headers??={},e.headers.accept??=`application/json`,this.sleep!==void 0&&(e.headers.sleep=this.sleep),e.credentials===`include`&&e.headers.authorization===void 0){if(this.challenge===null)throw Error(`Credentials must be set before sending authenticated request`);e.headers.authorization=this.challenge,delete e.credentials}return e.body!==void 0&&(e.method??=`POST`,e.body instanceof File||e.body instanceof ReadableStream?(e.duplex=`half`,e.headers[`content-type`]??=e.body.type??`application/octet-stream`):(e.body=JSON.stringify(e.body),e.headers[`content-type`]??=`application/json`)),e}async request(e,t){let n=new URL(e,this.origin),r=await this.fetch(n.href,t),i=r.headers.get(`authorization`);return i!==null&&(this.challenge=i,this.events.emit(`challenge`,i)),r}},Re=class{agent;path;init;constructor(e){this.agent=e.agent,this.path=e.path,this.init=e.init}async json(e,t){return await this.request(`json`,e,t)}async octets(e,t){return await this.request(`octets`,e,t)}async multipart(e,t){return await this.request(`multipart`,e,t)}async request(e,t,n){let r=typeof t==`string`?t:``;n=typeof t==`string`?n:t;let i=this.abs(r),a=Object.assign({},this.init,n);if(e===`json`)return await this.agent.json(i,a);if(e===`octets`)return await this.agent.octets(i,a);if(e===`multipart`)return await this.agent.multipart(i,a);throw Error(`Invalid method: ${e}`)}abs(e){let t=new URL(this.path,`https://void`),n=new URL(e,t);return n.pathname.endsWith(`/`)||(n.pathname+=`/`),n.pathname+n.search}},ze=class{events;agent;constructor(e){this.events=L(),this.agent=new Le({origin:e.origin,events:this.events,sleep:e.sleep})}resource(e,t){return new Re({agent:this.agent,path:e,init:t})}authenticate(e){this.agent.authenticate(e)}use(e){this.agent.use(e)}};function Be(e){return typeof e==`string`&&(e={origin:e}),new ze(e)}Ne({},{format:()=>He,test:()=>Ve});function Ve(e){return/^[[(]\d+\.\.\d+[\])]{1}$/.test(e)}function He(e,t){let[n,r]=t.slice(1,-1).split(`..`);return[`${e}${t.startsWith(`(`)?`>`:`>=`}${n}`,`${e}${t.endsWith(`)`)?`<`:`<=`}${r}`]}var Ue={title:`Introspection`,description:`The map of a Toa application`},We=8e3,Ge=(()=>{if(typeof window>`u`)return``;let{protocol:e,hostname:t,origin:n}=window.location;return Je(t)?`${e}//${t}:${We}`:n})(),Ke=8003;function qe(e){if(typeof window>`u`)return``;let{protocol:t,hostname:n}=window.location;return`${Je(n)?`${t}//${n}:${Ke}`:``}/.configuration/${e}/`}function Je(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.startsWith(`192.168.`)||e.startsWith(`172.16.`)||e.startsWith(`10.`)}var Ye=`1`;(()=>{let e=new Date(Number.parseInt(ie)),t=e.getFullYear(),n=new Date(t,0,1).getTime(),r=new Date(t+1,0,1).getTime();return`${Ye}.${(t+(e.getTime()-n)/(r-n)).toFixed(4)}`})();var z=Be({origin:Ge,sleep:void 0});console.info(`Origin connected`,Ge,`no sleep`);var Xe=z.resource(`/accounts/echo/`);async function B(e){let t={method:`GET`};return e!==void 0&&(t.headers={authorization:e},t.credentials=`include`),Xe.json(t)}var Ze=z.resource(`/identity/basic/`,{credentials:`include`});async function Qe(e,t){return await Ze.json(e,{method:`POST`,body:t})}var $e=z.resource(`/accounts/otp/`);async function et(e,t){return typeof e==`string`?await $e.json(e,{method:`POST`,body:t,credentials:`include`}):await $e.json({method:`POST`,body:e})}var tt=z.resource(`/accounts/passkeys/`);async function nt(e,t){return typeof e==`string`?await tt.json(e,{method:`POST`,body:t,credentials:`include`}):await tt.json({method:`POST`,body:e})}var rt=z.resource(`/identity/federation/`,{credentials:`include`});async function it(e,t){return await rt.json(e,{method:`POST`,body:t})}async function V(){let e=N.extract();if(e===null)return;let t=await B(e);if(t instanceof Error)return t;I(t)}function H(e,t){return e instanceof Error?e:(I(e),P.set(t),e)}var at=k({persist:`auth:oidc:nonce`});function ot(e,t){let{client:n,endpoint:r,type:i,scope:a}=e;if(n===void 0||n===``)throw Error(`Client ID is required`);let o=st(),s=new URLSearchParams({client_id:n,redirect_uri:window.location.origin+`/`,response_type:i,response_mode:`fragment`,scope:a,state:btoa(JSON.stringify({idp:t})),nonce:o});at.set(o),window.location.href=r+`?`+s}function st(){return window.crypto?.randomUUID?.()??Math.random().toString(16).slice(2)}var ct=globalThis.__sveltekit_tmeus1.env,lt={apple:{iss:`https://appleid.apple.com`,endpoint:`https://appleid.apple.com/auth/authorize`,type:`code`,scope:`openid`,client:ct.PUBLIC_APPLE_CLIENT_ID},google:{iss:`https://accounts.google.com`,endpoint:`https://accounts.google.com/o/oauth2/v2/auth`,type:`id_token`,scope:`openid profile`,client:ct.PUBLIC_GOOGLE_CLIENT_ID}};async function ut(e){await dt();let t=await new Promise(t=>{window.google.accounts.oauth2.initCodeClient({client_id:e.client,scope:e.scope,ux_mode:`popup`,state:btoa(JSON.stringify({idp:`google`})),redirect_uri:window.location.origin+`/`,callback:async e=>{t(e)}}).requestCode()});return t?.code===void 0?Error(`NO_RESPONSE`,{cause:t}):t.code}function dt(){return new Promise((e,t)=>{if(window.google?.accounts?.oauth2!==void 0)return e(void 0);let n=document.createElement(`script`);n.src=`https://accounts.google.com/gsi/client`,n.async=!0,n.onload=()=>e(void 0),n.onerror=t,document.head.appendChild(n)})}var U=typeof window<`u`&&window;async function ft(e){await pt(e);let t=await U.AppleID.auth.signIn().catch(e=>e);return t instanceof Error?t:t?.authorization===void 0?Error(`No authentication response received`,{cause:t}):t.authorization.code}function pt(e){if(U.AppleID===void 0)return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,r.async=!0,r.onload=()=>{U.AppleID.auth.init({clientId:e.client,scope:e.scope,redirectURI:window.location.origin,state:btoa(JSON.stringify({idp:`apple`})),usePopup:!0}),t(void 0)},r.onerror=n,document.head.appendChild(r)})}var mt={apple:ft,google:ut};async function ht(e,t){let n=await gt(e);return n instanceof Error?n:t===void 0?vt(e,n):_t(t,n)}async function gt(e){let t=mt[e]??ot,n=lt[e],r=await t(n,e);if(r instanceof Error)return console.error(`Authentication failed`,r),r;if(r===void 0)throw Error(`No authentication code received, redirect flow is not supported`);let i={code:r,iss:n.iss,for:window.location.origin};return btoa(JSON.stringify(i))}async function _t(e,t){let n=await it(e,{scheme:`code`,credentials:t});if(n instanceof Error)return n;V()}async function vt(e,t){return H(await B(`Code `+t),e)}function yt(){M.set(null)}async function bt(e,t){return H(await B(`Basic `+btoa(`${e}:${t}`)),`password`)}async function xt(e,t){return await Qe(e,t)}async function St(e,t){let n=await xt(e,t);if(n instanceof Error)return n;V()}async function Ct(e){return et({email:e})}async function wt(e,t){return await et(e,{email:t})}async function Tt(e,t){return H(await B(`OTP `+btoa(`${e}:${t}`)),`password`)}var Et=z.resource(`/identity/passkeys/challenges/`);async function Dt(e,t){let n={type:e};return t===void 0?await Et.json(`.`,{method:`POST`,body:n}):await Et.json(t,{method:`POST`,body:n})}var Ot=z.resource(`/identity/passkeys/`);async function kt(e){return await Ot.json(e,{credentials:`include`})}async function At(){return await kt((await ge(M)).id)}oe({get:At,persist:`identity:passkeys`,bind:M,stale:!0});function W(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}function jt(e){return new TextEncoder().encode(e).buffer}function G(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Mt({id:e,transports:t}){return{id:W(e),type:`public-key`,transports:t}}async function Nt(e,t){let n={challenge:W(t.challenge),timeout:t.timeout,authenticatorSelection:t.authenticatorSelection,pubKeyCredParams:t.pubKeyCredParams,rp:{name:`app`},user:{id:jt(e.id),name:e.name,displayName:e.name},excludeCredentials:t.excludeCredentials.map(Mt)};return await navigator.credentials.create({publicKey:n}).catch(e=>e)}async function Pt(e){let t={timeout:e.timeout,challenge:W(e.challenge),allowCredentials:e.allowCredentials.map(Mt),userVerification:e.userVerification};return await navigator.credentials.get({publicKey:t})}async function Ft(e,t){let n=await Dt(`creation`,t);if(n instanceof Error)return n;let r=await Nt({id:n.identity,name:e},n);if(r instanceof Error)return r;if(r===null)throw Error(`No credential is created`);return{key:It(r,e),identity:n.identity}}function It(e,t){let n=e.response,r=n.getAuthenticatorData(),i=n.getTransports(),a=n.getPublicKeyAlgorithm(),o=n.getPublicKey(),s=e.getClientExtensionResults();if(o===null)throw Error(`No public key is created`);return{id:e.id,type:e.type,response:{attestationObject:G(n.attestationObject),clientDataJSON:G(n.clientDataJSON),authenticatorData:G(r),transports:i,publicKeyAlgorithm:a,publicKey:G(o)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:s,label:t}}async function Lt(e){let t=await Dt(`request`,e);if(t instanceof Error)return t;let n=Date.now(),r=await Pt(t).catch(e=>e);return r instanceof Error?r.name===`NotAllowedError`&&Date.now()-n<50?new zt:r:r===null?Error(`No credential given`):Rt(r)}function Rt(e){let t=e.response;return{id:e.id,type:e.type,response:{authenticatorData:G(t.authenticatorData),clientDataJSON:G(t.clientDataJSON),signature:G(t.signature),userHandle:t.userHandle===null?null:G(t.userHandle)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:e.getClientExtensionResults()}}var zt=class extends Error{constructor(){super(),this.name=this.constructor.name}},Bt=typeof window>`u`||window.PublicKeyCredential!==void 0;async function Vt(e,t){let n=await Ft(e,t);if(n instanceof Error)return console.error(`Credential creation failed`,n),n;let r=await nt(n.identity,n.key);return r instanceof Error&&console.error(`Credential registration failed`,r),H(r,`passkey`)}async function Ht(e){let t=await Lt(e);if(t instanceof Error)return console.error(`Credential request failed`,t),t;let n=await nt(t);return n instanceof Error&&console.error(`Credential verification failed`,n),H(n,`passkey`)}function Ut(e){if(document.startViewTransition===void 0)return Promise.resolve(e?.());let t=e!==void 0;return t&&Yt(),new Promise(n=>{let r=document.startViewTransition(async()=>{q(),n(await e?.())});r.finished.then(i,i),r.ready.catch(Wt);function i(){t&&Xt(),J()}})}function Wt(){}function Gt(e){if(!(e.type===`popstate`&&e.event.hasUAVisualTransition)&&document.startViewTransition!==void 0)return new Promise(t=>{let n=document.startViewTransition({types:[`route`],update:async()=>{q(),t(),await e.complete}});n.finished.then(J,J),n.ready.catch(Wt)})}var K=null;function q(){if(K===null)return;let e=K.el.style.viewTransitionName===K.name;K.el.style.viewTransitionName=e?``:K.name,K.el.style.viewTransitionClass=e?``:K.classes??``}function J(){K!==null&&K.el.style.viewTransitionName===K.name&&(Kt(K),K=null)}function Kt(e){e.el.style.viewTransitionName=``,e.el.style.viewTransitionClass=``}var qt=x(!1),Y=new Set;function Jt(e,t){let n={node:e,options:t,original:{name:e.style.viewTransitionName,classes:e.style.viewTransitionClass}};return Y.add(n),{destroy:()=>Y.delete(n)}}function Yt(){qt.set(!0);for(let e of Y)e.original={name:e.node.style.viewTransitionName,classes:e.node.style.viewTransitionClass},e.node.style.viewTransitionName=e.options.name,e.options.classes!==void 0&&(e.node.style.viewTransitionClass=e.options.classes)}function Xt(){for(let e of Y)e.original!==void 0&&(e.node.style.viewTransitionName=e.original.name,e.node.style.viewTransitionClass=e.original.classes);qt.set(!1)}navigator.userAgent.toLowerCase().includes(`windows`);var Zt=/mac ?os|ios|ipad ?os/i.test(navigator.userAgentData?.platform??``)||/(Mac|iPhone|iPad|iPod)/.test(navigator.userAgent);/android/i.test(navigator.userAgent),/(iPhone|iPad|iPod)/.test(navigator.userAgent),/^((?!chrome|android).)*safari/i.test(navigator.userAgent),`ontouchstart`in window,window.matchMedia(`(display-mode: standalone)`).matches,/PWAShell/i.test(navigator.userAgent),navigator.userAgent.match(/PWAShell\/(\S+)/)?.[1];var Qt=!(`ontouchstart`in window);[`en-US`,`en-LR`,`en-MM`].includes(navigator.language),[`en-US`,`en-GB`,`en-CA`,`en-AU`,`en-NZ`,`en-IE`,`en-IN`,`en-LR`,`en-MM`].includes(navigator.language);function $t(e=navigator.userAgent){return[/FBAN|FBAV|FB_IAB/i,/Instagram/i,/Twitter/i,/Line/i,/LinkedIn/i,/Snapchat/i,/WhatsApp/i,/WeChat/i,/Messenger/i,/QQ/i,/Reddit/i,/Puffin/i,/TikTok/i,/musical.ly/i,/YouTube/i,/Pinterest/i,/Discord/i,/Telegram/i,/Viber/i,/Slack/i,/Signal/i,/KakaoTalk/i,/Baidu/i].some(t=>t.test(e))||(()=>{let t=RegExp(`(${[`WebView`,`(iPhone|iPod|iPad)(?!.*Safari/)`,`Android.*(wv)`,`(AppleWebKit)(?!.*Safari)`].join(`|`)})`,`ig`);return e.match(t)!==null})()||`TelegramWebviewProxy`in window||`TelegramWebviewProxyProto`in window||`TelegramWebview`in window}$t(navigator.userAgent);var en=new URLSearchParams;new URLSearchParams;function tn(e){return en.get(e)}var nn={"en-US":{native:`English`,locale:`en-US`,dir:`ltr`,nav:{list:`List`,map:`Map`,signout:`Sign out`,filter:`Filter components`}}},rn=[`en-US`];function an(e){return rn.some(t=>t.startsWith(e))}function X(e){return rn.find(t=>t.startsWith(e))??`en-US`}var Z=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.format=o,e.parse=s;var t=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/[\\"]/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function o(e){let{type:t,parameters:r}=e;if(!t||!i.test(t))throw TypeError(`Invalid type: ${t}`);let a=t;if(r)for(let e of Object.keys(r)){if(!n.test(e))throw TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${y(r[e])}`}return a}function s(e,t){let n=t?.comma===!0?m:65536,r=e.length,i=_(e,t?.start??0,r),o=i;i=g(e,i,r,n);let s=v(e,o,i),c=e.slice(o,s).toLowerCase();return t?.parameters===!1?{type:c,index:i,parameters:new a}:h(e,c,i,r,n)}var c=32,l=9,u=59,d=61,f=34,p=92,m=44;function h(e,t,n,r,i){let o=new a;parameter:for(;n<r&&e.charCodeAt(n)!==i;){n=_(e,n+1,r);let t=n;for(;n<r;){let a=e.charCodeAt(n);if(a===i)break parameter;if(a===u)continue parameter;if(a===d){let a=v(e,t,n),s=e.slice(t,a).toLowerCase();if(n=_(e,n+1,r),n<r&&e.charCodeAt(n)===f){n++;let t=``;for(;n<r;){let a=e.charCodeAt(n++);if(a===f){n=g(e,n,r,i),o[s]===void 0&&(o[s]=t);break}if(a===p&&n<r){t+=e[n++];continue}t+=String.fromCharCode(a)}continue parameter}let c=n;if(n=g(e,n,r,i),o[s]===void 0){let t=v(e,c,n);o[s]=e.slice(c,t)}continue parameter}n++}}return{type:t,index:n,parameters:o}}function g(e,t,n,r){for(;t<n;){let n=e.charCodeAt(t);if(n===u||n===r)break;t++}return t}function _(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==c&&n!==l)break;t++}return t}function v(e,t,n){for(;n>t;){let t=e.charCodeAt(n-1);if(t!==c&&t!==l)break;n--}return n}function y(e){if(n.test(e))return e;if(t.test(e))return`"${e.replace(r,`\\$&`)}"`;throw TypeError(`Invalid parameter value: ${e}`)}})),Q=r(((e,t)=>{var n=Z();t.exports=r;function r(e){for(var t=[],r=0;r<e.length;){var a=i(e,r),o=n.parse(e,{comma:!0,start:a});o.type=e.slice(a,a+o.type.length),t.push(o),r=o.index+1}return t}function i(e,t){for(var n=t;e.charCodeAt(n)===32||e.charCodeAt(n)===9;)n++;return n}})),on=r(((e,t)=>{var n=Q();t.exports=s,t.exports.preferredCharsets=s;function r(e){for(var t=n(e),r=0,a=0;r<t.length;r++){var o=i(t[r],r);o&&(t[a++]=o)}return t.length=a,t}function i(e,t){return e.type?{charset:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.charset.toLowerCase()===e.toLowerCase())r|=1;else if(t.charset!==`*`)return null;return{i:n,o:t.i,q:t.q,s:r}}function s(e,t){var n=r(e===void 0?`*`:e||``);if(!t)return n.filter(u).sort(c).map(l);var i=t.map(function(e,t){return a(e,n,t)});return i.filter(u).sort(c).map(function(e){return t[i.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function l(e){return e.charset}function u(e){return e.q>0}})),sn=r(((e,t)=>{var n=Q();t.exports=s,t.exports.preferredEncodings=s;function r(e){for(var t=n(e),r=!1,a=1,s=0,c=0;s<t.length;s++){var l=i(t[s],s);l&&(t[c++]=l,r||=o(`identity`,l),a=Math.min(a,l.q||1))}return r||(t[c++]={encoding:`identity`,q:a,i:s}),t.length=c,t}function i(e,t){return e.type?{encoding:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={encoding:e,o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.encoding.toLowerCase()===e.toLowerCase())r|=1;else if(t.encoding!==`*`)return null;return{encoding:e,i:n,o:t.i,q:t.q,s:r}}function s(e,t,n){var i=r(e||``),o=n?function(e,t){if(e.q!==t.q)return t.q-e.q;var r=n.indexOf(e.encoding),i=n.indexOf(t.encoding);return r===-1&&i===-1?t.s-e.s||e.o-t.o||e.i-t.i:r!==-1&&i!==-1?r-i:r===-1?1:-1}:c;if(!t)return i.filter(u).sort(o).map(l);var s=t.map(function(e,t){return a(e,i,t)});return s.filter(u).sort(o).map(function(e){return t[s.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i}function l(e){return e.encoding}function u(e){return e.q>0}})),cn=r(((e,t)=>{var n=Z(),r=Q();t.exports=c,t.exports.preferredLanguages=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){if(!e.type)return null;var n=e.type.indexOf(`-`);return{prefix:n===-1?e.type:e.type.slice(0,n),suffix:n===-1?void 0:e.type.slice(n+1),q:e.parameters.q?parseFloat(e.parameters.q):1,i:t,full:e.type}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0);if(!i)return null;var o=0;if(t.full.toLowerCase()===i.full.toLowerCase())o|=4;else if(t.prefix.toLowerCase()===i.full.toLowerCase())o|=2;else if(t.full.toLowerCase()===i.prefix.toLowerCase())o|=1;else if(t.full!==`*`)return null;return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.full}function d(e){return e.q>0}})),ln=r(((e,t)=>{var n=Z(),r=Q();t.exports=c,t.exports.preferredMediaTypes=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){var n=e.type.indexOf(`/`);if(n===-1)return null;var r=e.parameters.q?parseFloat(e.parameters.q):1;return delete e.parameters.q,{type:e.type.slice(0,n),subtype:e.type.slice(n+1),params:e.parameters,q:r,i:t}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0),o=0;if(!i)return null;if(t.type.toLowerCase()==i.type.toLowerCase())o|=4;else if(t.type!=`*`)return null;if(t.subtype.toLowerCase()==i.subtype.toLowerCase())o|=2;else if(t.subtype!=`*`)return null;var s=Object.keys(t.params);if(s.length>0){if(s.every(function(e){return t.params[e]==`*`||(t.params[e]||``).toLowerCase()==(i.params[e]||``).toLowerCase()}))o|=1;else return null}return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*/*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.type+`/`+e.subtype}function d(e){return e.q>0}}));r(((e,t)=>{var n=on(),r=sn(),i=cn(),a=ln();t.exports=o,t.exports.Negotiator=o;function o(e){if(!(this instanceof o))return new o(e);this.request=e}o.prototype.charset=function(e){var t=this.charsets(e);return t&&t[0]},o.prototype.charsets=function(e){return n(this.request.headers[`accept-charset`],e)},o.prototype.encoding=function(e,t){var n=this.encodings(e,t);return n&&n[0]},o.prototype.encodings=function(e,t){var n=t||{};return r(this.request.headers[`accept-encoding`],e,n.preferred)},o.prototype.language=function(e){var t=this.languages(e);return t&&t[0]},o.prototype.languages=function(e){return i(this.request.headers[`accept-language`],e)},o.prototype.mediaType=function(e){var t=this.mediaTypes(e);return t&&t[0]},o.prototype.mediaTypes=function(e){return a(this.request.headers.accept,e)},o.prototype.preferredCharset=o.prototype.charset,o.prototype.preferredCharsets=o.prototype.charsets,o.prototype.preferredEncoding=o.prototype.encoding,o.prototype.preferredEncodings=o.prototype.encodings,o.prototype.preferredLanguage=o.prototype.language,o.prototype.preferredLanguages=o.prototype.languages,o.prototype.preferredMediaType=o.prototype.mediaType,o.prototype.preferredMediaTypes=o.prototype.mediaTypes}))();var un=`en-US`,dn=k({persist:`intl:selected`}),$=h([M,dn],([e,t])=>t?X(t):fn()||(e?.locale!==void 0&&an(e.locale)?X(e.locale):un));h(M,e=>e?.grammar??`none`);function fn(){if(typeof navigator<`u`){for(let e of navigator.languages)if(an(e))return X(e)}return null}var pn=h($,e=>nn[e]);export{P as A,Ue as C,Ae as D,M as E,_e as F,ue as I,oe as L,Oe as M,j as N,N as O,A as P,qe as S,L as T,yt as _,Qt as a,V as b,Jt as c,Bt as d,wt as f,bt as g,St as h,Zt as i,F as j,ke as k,Ht as l,Tt as m,$ as n,Gt as o,Ct as p,tn as r,Ut as s,pn as t,Vt as u,ht as v,Fe as w,z as x,lt as y};
6
+ `+t,i=l+=2;u=n,r=u.indexOf(t)}d.length&&(yield d)}}finally{d.length&&(yield d),await s.cancel()}}(e.body,`--${i}`,t)}var Me=Object.defineProperty,Ne=(e,t)=>{for(var n in t)Me(e,n,{get:t[n],enumerable:!0})},Pe=Symbol(`meta`);function Fe(e){return e[Pe]??null}function Ie(e,t){Object.defineProperty(e,Pe,{value:t,writable:!1,enumerable:!1,configurable:!1})}var Le=class{origin;events;sleep;fetch=fetch.bind(globalThis);challenge=null;constructor(e){this.origin=e.origin,this.events=e.events,e.sleep!==void 0&&(this.sleep=JSON.stringify(e.sleep))}async json(e,t){let n=this.setup(t),r=await this.request(e,n),i=r.headers.get(`content-type`)===`application/json`?await r.json():await r.text();return typeof i==`object`&&i&&Ie(i,{status:r.status,headers:r.headers}),r.ok?(this.events.emit(`response`,{status:r.status,headers:r.headers}),i):(this.events.emit(`error`,{code:r.status,body:i}),new R.Err(r.status,i))}async multipart(e,t){let n=this.setup(t),r=await this.request(e,n);if(!r.ok)return new R.Err(r.status,{body:await r.text()});let i=await je(r),a=await i.next();if(n.debug&&console.debug(`Multipart ACK`,{path:e,body:a.value.body}),JSON.parse(a.value.body)!==`ACK`)throw Error(`No ACK`);return(async function*(){for await(let t of i){n.debug&&console.debug(`Multipart chunk`,{path:e,body:t.body});let r=JSON.parse(t.body);if(r===`FIN`)return;yield r}})()}async octets(e,t){let n=await this.multipart(e,t);if(n instanceof Error)return n;let r=(await n.next()).value,i=L();return(async()=>{await new Promise(e=>setTimeout(e,0));for await(let r of n){let n=r.status===`completed`?r.error?new R.Err(r.error.code??`UNKNOWN`,r.error.message):r.output:new R.Err(`EXCEPTION`);t?.debug&&console.debug(`Emitting octets step`,{path:e,step:r.step,payload:n}),i.emit(r.step,n)}i.off(`*`)})(),[r,i]}authenticate(e){this.challenge=e}use(e){this.fetch=e}setup(e){if(e??={},e.headers??={},e.headers.accept??=`application/json`,this.sleep!==void 0&&(e.headers.sleep=this.sleep),e.credentials===`include`&&e.headers.authorization===void 0){if(this.challenge===null)throw Error(`Credentials must be set before sending authenticated request`);e.headers.authorization=this.challenge,delete e.credentials}return e.body!==void 0&&(e.method??=`POST`,e.body instanceof File||e.body instanceof ReadableStream?(e.duplex=`half`,e.headers[`content-type`]??=e.body.type??`application/octet-stream`):(e.body=JSON.stringify(e.body),e.headers[`content-type`]??=`application/json`)),e}async request(e,t){let n=new URL(e,this.origin),r=await this.fetch(n.href,t),i=r.headers.get(`authorization`);return i!==null&&(this.challenge=i,this.events.emit(`challenge`,i)),r}},Re=class{agent;path;init;constructor(e){this.agent=e.agent,this.path=e.path,this.init=e.init}async json(e,t){return await this.request(`json`,e,t)}async octets(e,t){return await this.request(`octets`,e,t)}async multipart(e,t){return await this.request(`multipart`,e,t)}async request(e,t,n){let r=typeof t==`string`?t:``;n=typeof t==`string`?n:t;let i=this.abs(r),a=Object.assign({},this.init,n);if(e===`json`)return await this.agent.json(i,a);if(e===`octets`)return await this.agent.octets(i,a);if(e===`multipart`)return await this.agent.multipart(i,a);throw Error(`Invalid method: ${e}`)}abs(e){let t=new URL(this.path,`https://void`),n=new URL(e,t);return n.pathname.endsWith(`/`)||(n.pathname+=`/`),n.pathname+n.search}},ze=class{events;agent;constructor(e){this.events=L(),this.agent=new Le({origin:e.origin,events:this.events,sleep:e.sleep})}resource(e,t){return new Re({agent:this.agent,path:e,init:t})}authenticate(e){this.agent.authenticate(e)}use(e){this.agent.use(e)}};function Be(e){return typeof e==`string`&&(e={origin:e}),new ze(e)}Ne({},{format:()=>He,test:()=>Ve});function Ve(e){return/^[[(]\d+\.\.\d+[\])]{1}$/.test(e)}function He(e,t){let[n,r]=t.slice(1,-1).split(`..`);return[`${e}${t.startsWith(`(`)?`>`:`>=`}${n}`,`${e}${t.endsWith(`)`)?`<`:`<=`}${r}`]}var Ue={title:`Introspection`,description:`The map of a Toa application`},We=8e3,Ge=(()=>{if(typeof window>`u`)return``;let{protocol:e,hostname:t,origin:n}=window.location;return Je(t)?`${e}//${t}:${We}`:n})(),Ke=8003;function qe(e){if(typeof window>`u`)return``;let{protocol:t,hostname:n}=window.location;return`${Je(n)?`${t}//${n}:${Ke}`:``}/.configuration/${e}/`}function Je(e){return e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.startsWith(`192.168.`)||e.startsWith(`172.16.`)||e.startsWith(`10.`)}var Ye=`1`;(()=>{let e=new Date(Number.parseInt(ie)),t=e.getFullYear(),n=new Date(t,0,1).getTime(),r=new Date(t+1,0,1).getTime();return`${Ye}.${(t+(e.getTime()-n)/(r-n)).toFixed(4)}`})();var z=Be({origin:Ge,sleep:void 0});console.info(`Origin connected`,Ge,`no sleep`);var Xe=z.resource(`/accounts/echo/`);async function B(e){let t={method:`GET`};return e!==void 0&&(t.headers={authorization:e},t.credentials=`include`),Xe.json(t)}var Ze=z.resource(`/identity/basic/`,{credentials:`include`});async function Qe(e,t){return await Ze.json(e,{method:`POST`,body:t})}var $e=z.resource(`/accounts/otp/`);async function et(e,t){return typeof e==`string`?await $e.json(e,{method:`POST`,body:t,credentials:`include`}):await $e.json({method:`POST`,body:e})}var tt=z.resource(`/accounts/passkeys/`);async function nt(e,t){return typeof e==`string`?await tt.json(e,{method:`POST`,body:t,credentials:`include`}):await tt.json({method:`POST`,body:e})}var rt=z.resource(`/identity/federation/`,{credentials:`include`});async function it(e,t){return await rt.json(e,{method:`POST`,body:t})}async function V(){let e=N.extract();if(e===null)return;let t=await B(e);if(t instanceof Error)return t;I(t)}function H(e,t){return e instanceof Error?e:(I(e),P.set(t),e)}var at=k({persist:`auth:oidc:nonce`});function ot(e,t){let{client:n,endpoint:r,type:i,scope:a}=e;if(n===void 0||n===``)throw Error(`Client ID is required`);let o=st(),s=new URLSearchParams({client_id:n,redirect_uri:window.location.origin+`/`,response_type:i,response_mode:`fragment`,scope:a,state:btoa(JSON.stringify({idp:t})),nonce:o});at.set(o),window.location.href=r+`?`+s}function st(){return window.crypto?.randomUUID?.()??Math.random().toString(16).slice(2)}var ct=globalThis.__sveltekit_ctwr5r.env,lt={apple:{iss:`https://appleid.apple.com`,endpoint:`https://appleid.apple.com/auth/authorize`,type:`code`,scope:`openid`,client:ct.PUBLIC_APPLE_CLIENT_ID},google:{iss:`https://accounts.google.com`,endpoint:`https://accounts.google.com/o/oauth2/v2/auth`,type:`id_token`,scope:`openid profile`,client:ct.PUBLIC_GOOGLE_CLIENT_ID}};async function ut(e){await dt();let t=await new Promise(t=>{window.google.accounts.oauth2.initCodeClient({client_id:e.client,scope:e.scope,ux_mode:`popup`,state:btoa(JSON.stringify({idp:`google`})),redirect_uri:window.location.origin+`/`,callback:async e=>{t(e)}}).requestCode()});return t?.code===void 0?Error(`NO_RESPONSE`,{cause:t}):t.code}function dt(){return new Promise((e,t)=>{if(window.google?.accounts?.oauth2!==void 0)return e(void 0);let n=document.createElement(`script`);n.src=`https://accounts.google.com/gsi/client`,n.async=!0,n.onload=()=>e(void 0),n.onerror=t,document.head.appendChild(n)})}var U=typeof window<`u`&&window;async function ft(e){await pt(e);let t=await U.AppleID.auth.signIn().catch(e=>e);return t instanceof Error?t:t?.authorization===void 0?Error(`No authentication response received`,{cause:t}):t.authorization.code}function pt(e){if(U.AppleID===void 0)return new Promise((t,n)=>{let r=document.createElement(`script`);r.src=`https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js`,r.async=!0,r.onload=()=>{U.AppleID.auth.init({clientId:e.client,scope:e.scope,redirectURI:window.location.origin,state:btoa(JSON.stringify({idp:`apple`})),usePopup:!0}),t(void 0)},r.onerror=n,document.head.appendChild(r)})}var mt={apple:ft,google:ut};async function ht(e,t){let n=await gt(e);return n instanceof Error?n:t===void 0?vt(e,n):_t(t,n)}async function gt(e){let t=mt[e]??ot,n=lt[e],r=await t(n,e);if(r instanceof Error)return console.error(`Authentication failed`,r),r;if(r===void 0)throw Error(`No authentication code received, redirect flow is not supported`);let i={code:r,iss:n.iss,for:window.location.origin};return btoa(JSON.stringify(i))}async function _t(e,t){let n=await it(e,{scheme:`code`,credentials:t});if(n instanceof Error)return n;V()}async function vt(e,t){return H(await B(`Code `+t),e)}function yt(){M.set(null)}async function bt(e,t){return H(await B(`Basic `+btoa(`${e}:${t}`)),`password`)}async function xt(e,t){return await Qe(e,t)}async function St(e,t){let n=await xt(e,t);if(n instanceof Error)return n;V()}async function Ct(e){return et({email:e})}async function wt(e,t){return await et(e,{email:t})}async function Tt(e,t){return H(await B(`OTP `+btoa(`${e}:${t}`)),`password`)}var Et=z.resource(`/identity/passkeys/challenges/`);async function Dt(e,t){let n={type:e};return t===void 0?await Et.json(`.`,{method:`POST`,body:n}):await Et.json(t,{method:`POST`,body:n})}var Ot=z.resource(`/identity/passkeys/`);async function kt(e){return await Ot.json(e,{credentials:`include`})}async function At(){return await kt((await ge(M)).id)}oe({get:At,persist:`identity:passkeys`,bind:M,stale:!0});function W(e){let t=(e+`=`.repeat((4-e.length%4)%4)).replace(/-/g,`+`).replace(/_/g,`/`),n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);return r.buffer}function jt(e){return new TextEncoder().encode(e).buffer}function G(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}function Mt({id:e,transports:t}){return{id:W(e),type:`public-key`,transports:t}}async function Nt(e,t){let n={challenge:W(t.challenge),timeout:t.timeout,authenticatorSelection:t.authenticatorSelection,pubKeyCredParams:t.pubKeyCredParams,rp:{name:`app`},user:{id:jt(e.id),name:e.name,displayName:e.name},excludeCredentials:t.excludeCredentials.map(Mt)};return await navigator.credentials.create({publicKey:n}).catch(e=>e)}async function Pt(e){let t={timeout:e.timeout,challenge:W(e.challenge),allowCredentials:e.allowCredentials.map(Mt),userVerification:e.userVerification};return await navigator.credentials.get({publicKey:t})}async function Ft(e,t){let n=await Dt(`creation`,t);if(n instanceof Error)return n;let r=await Nt({id:n.identity,name:e},n);if(r instanceof Error)return r;if(r===null)throw Error(`No credential is created`);return{key:It(r,e),identity:n.identity}}function It(e,t){let n=e.response,r=n.getAuthenticatorData(),i=n.getTransports(),a=n.getPublicKeyAlgorithm(),o=n.getPublicKey(),s=e.getClientExtensionResults();if(o===null)throw Error(`No public key is created`);return{id:e.id,type:e.type,response:{attestationObject:G(n.attestationObject),clientDataJSON:G(n.clientDataJSON),authenticatorData:G(r),transports:i,publicKeyAlgorithm:a,publicKey:G(o)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:s,label:t}}async function Lt(e){let t=await Dt(`request`,e);if(t instanceof Error)return t;let n=Date.now(),r=await Pt(t).catch(e=>e);return r instanceof Error?r.name===`NotAllowedError`&&Date.now()-n<50?new zt:r:r===null?Error(`No credential given`):Rt(r)}function Rt(e){let t=e.response;return{id:e.id,type:e.type,response:{authenticatorData:G(t.authenticatorData),clientDataJSON:G(t.clientDataJSON),signature:G(t.signature),userHandle:t.userHandle===null?null:G(t.userHandle)},authenticatorAttachment:e.authenticatorAttachment,clientExtensionResults:e.getClientExtensionResults()}}var zt=class extends Error{constructor(){super(),this.name=this.constructor.name}},Bt=typeof window>`u`||window.PublicKeyCredential!==void 0;async function Vt(e,t){let n=await Ft(e,t);if(n instanceof Error)return console.error(`Credential creation failed`,n),n;let r=await nt(n.identity,n.key);return r instanceof Error&&console.error(`Credential registration failed`,r),H(r,`passkey`)}async function Ht(e){let t=await Lt(e);if(t instanceof Error)return console.error(`Credential request failed`,t),t;let n=await nt(t);return n instanceof Error&&console.error(`Credential verification failed`,n),H(n,`passkey`)}function Ut(e){if(document.startViewTransition===void 0)return Promise.resolve(e?.());let t=e!==void 0;return t&&Yt(),new Promise(n=>{let r=document.startViewTransition(async()=>{q(),n(await e?.())});r.finished.then(i,i),r.ready.catch(Wt);function i(){t&&Xt(),J()}})}function Wt(){}function Gt(e){if(!(e.type===`popstate`&&e.event.hasUAVisualTransition)&&document.startViewTransition!==void 0)return new Promise(t=>{let n=document.startViewTransition({types:[`route`],update:async()=>{q(),t(),await e.complete}});n.finished.then(J,J),n.ready.catch(Wt)})}var K=null;function q(){if(K===null)return;let e=K.el.style.viewTransitionName===K.name;K.el.style.viewTransitionName=e?``:K.name,K.el.style.viewTransitionClass=e?``:K.classes??``}function J(){K!==null&&K.el.style.viewTransitionName===K.name&&(Kt(K),K=null)}function Kt(e){e.el.style.viewTransitionName=``,e.el.style.viewTransitionClass=``}var qt=x(!1),Y=new Set;function Jt(e,t){let n={node:e,options:t,original:{name:e.style.viewTransitionName,classes:e.style.viewTransitionClass}};return Y.add(n),{destroy:()=>Y.delete(n)}}function Yt(){qt.set(!0);for(let e of Y)e.original={name:e.node.style.viewTransitionName,classes:e.node.style.viewTransitionClass},e.node.style.viewTransitionName=e.options.name,e.options.classes!==void 0&&(e.node.style.viewTransitionClass=e.options.classes)}function Xt(){for(let e of Y)e.original!==void 0&&(e.node.style.viewTransitionName=e.original.name,e.node.style.viewTransitionClass=e.original.classes);qt.set(!1)}navigator.userAgent.toLowerCase().includes(`windows`);var Zt=/mac ?os|ios|ipad ?os/i.test(navigator.userAgentData?.platform??``)||/(Mac|iPhone|iPad|iPod)/.test(navigator.userAgent);/android/i.test(navigator.userAgent),/(iPhone|iPad|iPod)/.test(navigator.userAgent),/^((?!chrome|android).)*safari/i.test(navigator.userAgent),`ontouchstart`in window,window.matchMedia(`(display-mode: standalone)`).matches,/PWAShell/i.test(navigator.userAgent),navigator.userAgent.match(/PWAShell\/(\S+)/)?.[1];var Qt=!(`ontouchstart`in window);[`en-US`,`en-LR`,`en-MM`].includes(navigator.language),[`en-US`,`en-GB`,`en-CA`,`en-AU`,`en-NZ`,`en-IE`,`en-IN`,`en-LR`,`en-MM`].includes(navigator.language);function $t(e=navigator.userAgent){return[/FBAN|FBAV|FB_IAB/i,/Instagram/i,/Twitter/i,/Line/i,/LinkedIn/i,/Snapchat/i,/WhatsApp/i,/WeChat/i,/Messenger/i,/QQ/i,/Reddit/i,/Puffin/i,/TikTok/i,/musical.ly/i,/YouTube/i,/Pinterest/i,/Discord/i,/Telegram/i,/Viber/i,/Slack/i,/Signal/i,/KakaoTalk/i,/Baidu/i].some(t=>t.test(e))||(()=>{let t=RegExp(`(${[`WebView`,`(iPhone|iPod|iPad)(?!.*Safari/)`,`Android.*(wv)`,`(AppleWebKit)(?!.*Safari)`].join(`|`)})`,`ig`);return e.match(t)!==null})()||`TelegramWebviewProxy`in window||`TelegramWebviewProxyProto`in window||`TelegramWebview`in window}$t(navigator.userAgent);var en=new URLSearchParams;new URLSearchParams;function tn(e){return en.get(e)}var nn={"en-US":{native:`English`,locale:`en-US`,dir:`ltr`,nav:{list:`List`,map:`Map`,signout:`Sign out`,filter:`Filter components`}}},rn=[`en-US`];function an(e){return rn.some(t=>t.startsWith(e))}function X(e){return rn.find(t=>t.startsWith(e))??`en-US`}var Z=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.format=o,e.parse=s;var t=/^[\u0009\u0020-\u007e\u0080-\u00ff]*$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/[\\"]/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,a=(()=>{let e=function(){};return e.prototype=Object.create(null),e})();function o(e){let{type:t,parameters:r}=e;if(!t||!i.test(t))throw TypeError(`Invalid type: ${t}`);let a=t;if(r)for(let e of Object.keys(r)){if(!n.test(e))throw TypeError(`Invalid parameter name: ${e}`);a+=`; ${e}=${y(r[e])}`}return a}function s(e,t){let n=t?.comma===!0?m:65536,r=e.length,i=_(e,t?.start??0,r),o=i;i=g(e,i,r,n);let s=v(e,o,i),c=e.slice(o,s).toLowerCase();return t?.parameters===!1?{type:c,index:i,parameters:new a}:h(e,c,i,r,n)}var c=32,l=9,u=59,d=61,f=34,p=92,m=44;function h(e,t,n,r,i){let o=new a;parameter:for(;n<r&&e.charCodeAt(n)!==i;){n=_(e,n+1,r);let t=n;for(;n<r;){let a=e.charCodeAt(n);if(a===i)break parameter;if(a===u)continue parameter;if(a===d){let a=v(e,t,n),s=e.slice(t,a).toLowerCase();if(n=_(e,n+1,r),n<r&&e.charCodeAt(n)===f){n++;let t=``;for(;n<r;){let a=e.charCodeAt(n++);if(a===f){n=g(e,n,r,i),o[s]===void 0&&(o[s]=t);break}if(a===p&&n<r){t+=e[n++];continue}t+=String.fromCharCode(a)}continue parameter}let c=n;if(n=g(e,n,r,i),o[s]===void 0){let t=v(e,c,n);o[s]=e.slice(c,t)}continue parameter}n++}}return{type:t,index:n,parameters:o}}function g(e,t,n,r){for(;t<n;){let n=e.charCodeAt(t);if(n===u||n===r)break;t++}return t}function _(e,t,n){for(;t<n;){let n=e.charCodeAt(t);if(n!==c&&n!==l)break;t++}return t}function v(e,t,n){for(;n>t;){let t=e.charCodeAt(n-1);if(t!==c&&t!==l)break;n--}return n}function y(e){if(n.test(e))return e;if(t.test(e))return`"${e.replace(r,`\\$&`)}"`;throw TypeError(`Invalid parameter value: ${e}`)}})),Q=r(((e,t)=>{var n=Z();t.exports=r;function r(e){for(var t=[],r=0;r<e.length;){var a=i(e,r),o=n.parse(e,{comma:!0,start:a});o.type=e.slice(a,a+o.type.length),t.push(o),r=o.index+1}return t}function i(e,t){for(var n=t;e.charCodeAt(n)===32||e.charCodeAt(n)===9;)n++;return n}})),on=r(((e,t)=>{var n=Q();t.exports=s,t.exports.preferredCharsets=s;function r(e){for(var t=n(e),r=0,a=0;r<t.length;r++){var o=i(t[r],r);o&&(t[a++]=o)}return t.length=a,t}function i(e,t){return e.type?{charset:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.charset.toLowerCase()===e.toLowerCase())r|=1;else if(t.charset!==`*`)return null;return{i:n,o:t.i,q:t.q,s:r}}function s(e,t){var n=r(e===void 0?`*`:e||``);if(!t)return n.filter(u).sort(c).map(l);var i=t.map(function(e,t){return a(e,n,t)});return i.filter(u).sort(c).map(function(e){return t[i.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function l(e){return e.charset}function u(e){return e.q>0}})),sn=r(((e,t)=>{var n=Q();t.exports=s,t.exports.preferredEncodings=s;function r(e){for(var t=n(e),r=!1,a=1,s=0,c=0;s<t.length;s++){var l=i(t[s],s);l&&(t[c++]=l,r||=o(`identity`,l),a=Math.min(a,l.q||1))}return r||(t[c++]={encoding:`identity`,q:a,i:s}),t.length=c,t}function i(e,t){return e.type?{encoding:e.type,q:e.parameters.q?parseFloat(e.parameters.q):1,i:t}:null}function a(e,t,n){for(var r={encoding:e,o:-1,q:0,s:0},i=0;i<t.length;i++){var a=o(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function o(e,t,n){var r=0;if(t.encoding.toLowerCase()===e.toLowerCase())r|=1;else if(t.encoding!==`*`)return null;return{encoding:e,i:n,o:t.i,q:t.q,s:r}}function s(e,t,n){var i=r(e||``),o=n?function(e,t){if(e.q!==t.q)return t.q-e.q;var r=n.indexOf(e.encoding),i=n.indexOf(t.encoding);return r===-1&&i===-1?t.s-e.s||e.o-t.o||e.i-t.i:r!==-1&&i!==-1?r-i:r===-1?1:-1}:c;if(!t)return i.filter(u).sort(o).map(l);var s=t.map(function(e,t){return a(e,i,t)});return s.filter(u).sort(o).map(function(e){return t[s.indexOf(e)]})}function c(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i}function l(e){return e.encoding}function u(e){return e.q>0}})),cn=r(((e,t)=>{var n=Z(),r=Q();t.exports=c,t.exports.preferredLanguages=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){if(!e.type)return null;var n=e.type.indexOf(`-`);return{prefix:n===-1?e.type:e.type.slice(0,n),suffix:n===-1?void 0:e.type.slice(n+1),q:e.parameters.q?parseFloat(e.parameters.q):1,i:t,full:e.type}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0);if(!i)return null;var o=0;if(t.full.toLowerCase()===i.full.toLowerCase())o|=4;else if(t.prefix.toLowerCase()===i.full.toLowerCase())o|=2;else if(t.full.toLowerCase()===i.prefix.toLowerCase())o|=1;else if(t.full!==`*`)return null;return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.full}function d(e){return e.q>0}})),ln=r(((e,t)=>{var n=Z(),r=Q();t.exports=c,t.exports.preferredMediaTypes=c;function i(e){for(var t=r(e),n=0,i=0;n<t.length;n++){var o=a(t[n],n);o&&(t[i++]=o)}return t.length=i,t}function a(e,t){var n=e.type.indexOf(`/`);if(n===-1)return null;var r=e.parameters.q?parseFloat(e.parameters.q):1;return delete e.parameters.q,{type:e.type.slice(0,n),subtype:e.type.slice(n+1),params:e.parameters,q:r,i:t}}function o(e,t,n){for(var r={o:-1,q:0,s:0},i=0;i<t.length;i++){var a=s(e,t[i],n);a&&(r.s-a.s||r.q-a.q||r.o-a.o)<0&&(r=a)}return r}function s(e,t,r){var i=a(n.parse(e),0),o=0;if(!i)return null;if(t.type.toLowerCase()==i.type.toLowerCase())o|=4;else if(t.type!=`*`)return null;if(t.subtype.toLowerCase()==i.subtype.toLowerCase())o|=2;else if(t.subtype!=`*`)return null;var s=Object.keys(t.params);if(s.length>0){if(s.every(function(e){return t.params[e]==`*`||(t.params[e]||``).toLowerCase()==(i.params[e]||``).toLowerCase()}))o|=1;else return null}return{i:r,o:t.i,q:t.q,s:o}}function c(e,t){var n=i(e===void 0?`*/*`:e||``);if(!t)return n.filter(d).sort(l).map(u);var r=t.map(function(e,t){return o(e,n,t)});return r.filter(d).sort(l).map(function(e){return t[r.indexOf(e)]})}function l(e,t){return t.q-e.q||t.s-e.s||e.o-t.o||e.i-t.i||0}function u(e){return e.type+`/`+e.subtype}function d(e){return e.q>0}}));r(((e,t)=>{var n=on(),r=sn(),i=cn(),a=ln();t.exports=o,t.exports.Negotiator=o;function o(e){if(!(this instanceof o))return new o(e);this.request=e}o.prototype.charset=function(e){var t=this.charsets(e);return t&&t[0]},o.prototype.charsets=function(e){return n(this.request.headers[`accept-charset`],e)},o.prototype.encoding=function(e,t){var n=this.encodings(e,t);return n&&n[0]},o.prototype.encodings=function(e,t){var n=t||{};return r(this.request.headers[`accept-encoding`],e,n.preferred)},o.prototype.language=function(e){var t=this.languages(e);return t&&t[0]},o.prototype.languages=function(e){return i(this.request.headers[`accept-language`],e)},o.prototype.mediaType=function(e){var t=this.mediaTypes(e);return t&&t[0]},o.prototype.mediaTypes=function(e){return a(this.request.headers.accept,e)},o.prototype.preferredCharset=o.prototype.charset,o.prototype.preferredCharsets=o.prototype.charsets,o.prototype.preferredEncoding=o.prototype.encoding,o.prototype.preferredEncodings=o.prototype.encodings,o.prototype.preferredLanguage=o.prototype.language,o.prototype.preferredLanguages=o.prototype.languages,o.prototype.preferredMediaType=o.prototype.mediaType,o.prototype.preferredMediaTypes=o.prototype.mediaTypes}))();var un=`en-US`,dn=k({persist:`intl:selected`}),$=h([M,dn],([e,t])=>t?X(t):fn()||(e?.locale!==void 0&&an(e.locale)?X(e.locale):un));h(M,e=>e?.grammar??`none`);function fn(){if(typeof navigator<`u`){for(let e of navigator.languages)if(an(e))return X(e)}return null}var pn=h($,e=>nn[e]);export{P as A,Ue as C,Ae as D,M as E,_e as F,ue as I,oe as L,Oe as M,j as N,N as O,A as P,qe as S,L as T,yt as _,Qt as a,V as b,Jt as c,Bt as d,wt as f,bt as g,St as h,Zt as i,F as j,ke as k,Ht as l,Tt as m,$ as n,Gt as o,Ct as p,tn as r,Ut as s,pn as t,Vt as u,ht as v,Fe as w,z as x,lt as y};
@@ -0,0 +1 @@
1
+ import"./PUjOYRcs.js";var e=`1788825828427`;export{e as t};
@@ -1 +1 @@
1
- import"./PUjOYRcs.js";import{a as e}from"./BUu1bTY0.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};
1
+ import"./PUjOYRcs.js";import{a as e}from"./CCQcU4jR.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};