import{S as Me,i as Xe,s as Ye,a as Qe,e as V,c as Ze,b as z,g as ce,t as B,d as fe,f as J,h as F,j as et,o as be,k as tt,l as nt,m as at,n as we,p as C,q as rt,r as st,u as ot,v as W,w as H,x as Se,y as M,z as X,A as Ve}from"./chunks/index-ba22f6f0.js";import{g as Be,f as Je,s as K,a as ve,b as it,i as lt}from"./chunks/singletons-0120a183.js";const ct=function(){const e=document.createElement("link").relList;return e&&e.supports&&e.supports("modulepreload")?"modulepreload":"preload"}(),ft=function(n,e){return new URL(n,e).href},Fe={},ie=function(e,t,c){return!t||t.length===0?e():Promise.all(t.map(o=>{if(o=ft(o,c),o in Fe)return;Fe[o]=!0;const d=o.endsWith(".css"),r=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${r}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":ct,d||(f.as="script",f.crossOrigin=""),f.href=o,document.head.appendChild(f),d)return new Promise((_,m)=>{f.addEventListener("load",_),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e())};function ut(n,e){return n==="/"||e==="ignore"?n:e==="never"?n.endsWith("/")?n.slice(0,-1):n:e==="always"&&!n.endsWith("/")?n+"/":n}function dt(n){for(const e in n)n[e]=n[e].replace(/%23/g,"#").replace(/%3[Bb]/g,";").replace(/%2[Cc]/g,",").replace(/%2[Ff]/g,"/").replace(/%3[Ff]/g,"?").replace(/%3[Aa]/g,":").replace(/%40/g,"@").replace(/%26/g,"&").replace(/%3[Dd]/g,"=").replace(/%2[Bb]/g,"+").replace(/%24/g,"$");return n}const pt=["href","pathname","search","searchParams","toString","toJSON"];function ht(n,e){const t=new URL(n);for(const c of pt){let o=t[c];Object.defineProperty(t,c,{get(){return e(),o},enumerable:!0,configurable:!0})}return t[Symbol.for("nodejs.util.inspect.custom")]=(c,o,d)=>d(n,o),mt(t),t}function mt(n){Object.defineProperty(n,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}function _t(n){let e=5381,t=n.length;if(typeof n=="string")for(;t;)e=e*33^n.charCodeAt(--t);else for(;t;)e=e*33^n[--t];return(e>>>0).toString(36)}const $e=window.fetch;window.fetch=(n,e)=>{if((n instanceof Request?n.method:(e==null?void 0:e.method)||"GET")!=="GET"){const c=new URL(n instanceof Request?n.url:n.toString(),document.baseURI).href;le.delete(c)}return $e(n,e)};const le=new Map;function gt(n,e,t){let o=`script[data-sveltekit-fetched][data-url=${JSON.stringify(n instanceof Request?n.url:n)}]`;t&&typeof t.body=="string"&&(o+=`[data-hash="${_t(t.body)}"]`);const d=document.querySelector(o);if(d!=null&&d.textContent){const{body:r,...f}=JSON.parse(d.textContent),_=d.getAttribute("data-ttl");return _&&le.set(e,{body:r,init:f,ttl:1e3*Number(_)}),Promise.resolve(new Response(r,f))}return $e(n,t)}function wt(n,e){const t=le.get(n);if(t){if(performance.now(){const _=decodeURIComponent(d),m=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(_);if(m)return e.push(m[1]),t.push(m[2]),"(?:/(.*))?";const y=r===f.length-1;return _&&"/"+_.split(/\[(.+?)\]/).map((L,R)=>{if(R%2){const N=yt.exec(L);if(!N)throw new Error(`Invalid param: ${L}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,D,q,T]=N;return e.push(q),t.push(T),D?"(.*?)":"([^/]+?)"}return y&&L.includes(".")&&(c=!1),L.normalize().replace(/%5[Bb]/g,"[").replace(/%5[Dd]/g,"]").replace(/#/g,"%23").replace(/\?/g,"%3F").replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("")}).join("")}${c?"/?":""}$`),names:e,types:t}}function vt(n){return!/^\([^)]+\)$/.test(n)}function kt(n,e,t,c){const o={};for(let d=0;d{const{pattern:L,names:R,types:N}=bt(f),D={id:f,exec:q=>{const T=L.exec(q);if(T)return kt(T,R,N,c)},errors:[1,...y||[]].map(q=>n[q]),layouts:[0,...m||[]].map(r),leaf:d(_)};return D.errors.length=D.layouts.length=Math.max(D.errors.length,D.layouts.length),D});function d(f){const _=f<0;return _&&(f=~f),[_,n[f]]}function r(f){return f===void 0?f:[o.has(f),n[f]]}}function Rt(n){let e,t,c;var o=n[0][0];function d(r){return{props:{data:r[2],form:r[1]}}}return o&&(e=W(o,d(n))),{c(){e&&H(e.$$.fragment),t=V()},l(r){e&&Se(e.$$.fragment,r),t=V()},m(r,f){e&&M(e,r,f),z(r,t,f),c=!0},p(r,f){const _={};if(f&4&&(_.data=r[2]),f&2&&(_.form=r[1]),o!==(o=r[0][0])){if(e){ce();const m=e;B(m.$$.fragment,1,0,()=>{X(m,1)}),fe()}o?(e=W(o,d(r)),H(e.$$.fragment),J(e.$$.fragment,1),M(e,t.parentNode,t)):e=null}else o&&e.$set(_)},i(r){c||(e&&J(e.$$.fragment,r),c=!0)},o(r){e&&B(e.$$.fragment,r),c=!1},d(r){r&&F(t),e&&X(e,r)}}}function St(n){let e,t,c;var o=n[0][0];function d(r){return{props:{data:r[2],$$slots:{default:[$t]},$$scope:{ctx:r}}}}return o&&(e=W(o,d(n))),{c(){e&&H(e.$$.fragment),t=V()},l(r){e&&Se(e.$$.fragment,r),t=V()},m(r,f){e&&M(e,r,f),z(r,t,f),c=!0},p(r,f){const _={};if(f&4&&(_.data=r[2]),f&523&&(_.$$scope={dirty:f,ctx:r}),o!==(o=r[0][0])){if(e){ce();const m=e;B(m.$$.fragment,1,0,()=>{X(m,1)}),fe()}o?(e=W(o,d(r)),H(e.$$.fragment),J(e.$$.fragment,1),M(e,t.parentNode,t)):e=null}else o&&e.$set(_)},i(r){c||(e&&J(e.$$.fragment,r),c=!0)},o(r){e&&B(e.$$.fragment,r),c=!1},d(r){r&&F(t),e&&X(e,r)}}}function $t(n){let e,t,c;var o=n[0][1];function d(r){return{props:{data:r[3],form:r[1]}}}return o&&(e=W(o,d(n))),{c(){e&&H(e.$$.fragment),t=V()},l(r){e&&Se(e.$$.fragment,r),t=V()},m(r,f){e&&M(e,r,f),z(r,t,f),c=!0},p(r,f){const _={};if(f&8&&(_.data=r[3]),f&2&&(_.form=r[1]),o!==(o=r[0][1])){if(e){ce();const m=e;B(m.$$.fragment,1,0,()=>{X(m,1)}),fe()}o?(e=W(o,d(r)),H(e.$$.fragment),J(e.$$.fragment,1),M(e,t.parentNode,t)):e=null}else o&&e.$set(_)},i(r){c||(e&&J(e.$$.fragment,r),c=!0)},o(r){e&&B(e.$$.fragment,r),c=!1},d(r){r&&F(t),e&&X(e,r)}}}function Ke(n){let e,t=n[5]&&ze(n);return{c(){e=tt("div"),t&&t.c(),this.h()},l(c){e=nt(c,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var o=at(e);t&&t.l(o),o.forEach(F),this.h()},h(){we(e,"id","svelte-announcer"),we(e,"aria-live","assertive"),we(e,"aria-atomic","true"),C(e,"position","absolute"),C(e,"left","0"),C(e,"top","0"),C(e,"clip","rect(0 0 0 0)"),C(e,"clip-path","inset(50%)"),C(e,"overflow","hidden"),C(e,"white-space","nowrap"),C(e,"width","1px"),C(e,"height","1px")},m(c,o){z(c,e,o),t&&t.m(e,null)},p(c,o){c[5]?t?t.p(c,o):(t=ze(c),t.c(),t.m(e,null)):t&&(t.d(1),t=null)},d(c){c&&F(e),t&&t.d()}}}function ze(n){let e;return{c(){e=rt(n[6])},l(t){e=st(t,n[6])},m(t,c){z(t,e,c)},p(t,c){c&64&&ot(e,t[6])},d(t){t&&F(e)}}}function Lt(n){let e,t,c,o,d;const r=[St,Rt],f=[];function _(y,L){return y[0][1]?0:1}e=_(n),t=f[e]=r[e](n);let m=n[4]&&Ke(n);return{c(){t.c(),c=Qe(),m&&m.c(),o=V()},l(y){t.l(y),c=Ze(y),m&&m.l(y),o=V()},m(y,L){f[e].m(y,L),z(y,c,L),m&&m.m(y,L),z(y,o,L),d=!0},p(y,[L]){let R=e;e=_(y),e===R?f[e].p(y,L):(ce(),B(f[R],1,1,()=>{f[R]=null}),fe(),t=f[e],t?t.p(y,L):(t=f[e]=r[e](y),t.c()),J(t,1),t.m(c.parentNode,c)),y[4]?m?m.p(y,L):(m=Ke(y),m.c(),m.m(o.parentNode,o)):m&&(m.d(1),m=null)},i(y){d||(J(t),d=!0)},o(y){B(t),d=!1},d(y){f[e].d(y),y&&F(c),m&&m.d(y),y&&F(o)}}}function Pt(n,e,t){let{stores:c}=e,{page:o}=e,{components:d}=e,{form:r}=e,{data_0:f=null}=e,{data_1:_=null}=e;et(c.page.notify);let m=!1,y=!1,L=null;return be(()=>{const R=c.page.subscribe(()=>{m&&(t(5,y=!0),t(6,L=document.title||"untitled page"))});return t(4,m=!0),R}),n.$$set=R=>{"stores"in R&&t(7,c=R.stores),"page"in R&&t(8,o=R.page),"components"in R&&t(0,d=R.components),"form"in R&&t(1,r=R.form),"data_0"in R&&t(2,f=R.data_0),"data_1"in R&&t(3,_=R.data_1)},n.$$.update=()=>{n.$$.dirty&384&&c.page.set(o)},[d,r,f,_,m,y,L,c,o]}class Ot extends Me{constructor(e){super(),Xe(this,e,Pt,Lt,Ye,{stores:7,page:8,components:0,form:1,data_0:2,data_1:3})}}const Ut={},ue=[()=>ie(()=>import("./chunks/0-e795af3a.js"),["chunks/0-e795af3a.js","components/pages/_layout.svelte-9d5377d3.js","assets/_layout-72676353.css","chunks/index-ba22f6f0.js"],import.meta.url),()=>ie(()=>import("./chunks/1-8480bc94.js"),["chunks/1-8480bc94.js","components/error.svelte-36bce38a.js","chunks/index-ba22f6f0.js","chunks/singletons-0120a183.js","chunks/index-7347060a.js"],import.meta.url),()=>ie(()=>import("./chunks/2-f87c835b.js"),["chunks/2-f87c835b.js","chunks/_page-802cc2a3.js","components/pages/_page.svelte-4566c4b6.js","assets/_page-ff237a95.css","chunks/index-ba22f6f0.js","chunks/index-7347060a.js"],import.meta.url)],It=[],jt={"":[2]},At={handleError:({error:n})=>{console.error(n)}};class ke{constructor(e,t){this.status=e,typeof t=="string"?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Ge{constructor(e,t){this.status=e,this.location=t}}const Nt="/__data.js";async function Tt(n){var e;for(const t in n)if(typeof((e=n[t])==null?void 0:e.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(n).map(async([c,o])=>[c,await o])));return n}const He="sveltekit:scroll",x="sveltekit:index",re=Et(ue,It,jt,Ut),Ee=ue[0],Re=ue[1];Ee();Re();let ee={};try{ee=JSON.parse(sessionStorage[He])}catch{}function ye(n){ee[n]=ve()}function Dt({target:n,base:e,trailing_slash:t}){var qe;const c=[];let o=null;const d={before_navigate:[],after_navigate:[]};let r={branch:[],error:null,url:null},f=!1,_=!1,m=!0,y=!1,L=!1,R,N=(qe=history.state)==null?void 0:qe[x];N||(N=Date.now(),history.replaceState({...history.state,[x]:N},"",location.href));const D=ee[N];D&&(history.scrollRestoration="manual",scrollTo(D.x,D.y));let q=!1,T,Le,te;async function Pe(){te=te||Promise.resolve(),await te,te=null;const a=new URL(location.href),l=me(a,!0);o=null,await Ue(l,a,[])}async function de(a,{noscroll:l=!1,replaceState:u=!1,keepfocus:s=!1,state:i={}},p,h){return typeof a=="string"&&(a=new URL(a,Be(document))),_e({url:a,scroll:l?ve():null,keepfocus:s,redirect_chain:p,details:{state:i,replaceState:u},nav_token:h,accepted:()=>{},blocked:()=>{},type:"goto"})}async function Oe(a){const l=me(a,!1);if(!l)throw new Error("Attempted to prefetch a URL that does not belong to this app");return o={id:l.id,promise:Ae(l)},o.promise}async function Ue(a,l,u,s,i={},p){var k,v;Le=i;let h=a&&await Ae(a);if(h||(h=await De(l,null,Z(new Error(`Not found: ${l.pathname}`),{url:l,params:{},routeId:null}),404)),l=(a==null?void 0:a.url)||l,Le!==i)return!1;if(h.type==="redirect")if(u.length>10||u.includes(l.pathname))h=await ne({status:500,error:Z(new Error("Redirect loop"),{url:l,params:{},routeId:null}),url:l,routeId:null});else return de(new URL(h.location,l).href,{},[...u,l.pathname],i),!1;else((v=(k=h.props)==null?void 0:k.page)==null?void 0:v.status)>=400&&await K.updated.check()&&await ae(l);if(c.length=0,L=!1,y=!0,s&&s.details){const{details:w}=s,b=w.replaceState?0:1;w.state[x]=N+=b,history[w.replaceState?"replaceState":"pushState"](w.state,"",l)}if(o=null,_){r=h.state,h.props.page&&(h.props.page.url=l);const w=oe();R.$set(h.props),w()}else Ie(h);if(s){const{scroll:w,keepfocus:b}=s;if(!b){const S=document.body,P=S.getAttribute("tabindex");S.tabIndex=-1,S.focus({preventScroll:!0}),setTimeout(()=>{var O;(O=getSelection())==null||O.removeAllRanges()}),P!==null?S.setAttribute("tabindex",P):S.removeAttribute("tabindex")}if(await Ve(),m){const S=l.hash&&document.getElementById(l.hash.slice(1));w?scrollTo(w.x,w.y):S?S.scrollIntoView():scrollTo(0,0)}}else await Ve();m=!0,h.props.page&&(T=h.props.page),p&&p(),y=!1}function Ie(a){var i,p;r=a.state;const l=document.querySelector("style[data-sveltekit]");l&&l.remove(),T=a.props.page;const u=oe();R=new Ot({target:n,props:{...a.props,stores:K},hydrate:!0}),u();const s={from:null,to:se("to",{params:r.params,routeId:(p=(i=r.route)==null?void 0:i.id)!=null?p:null,url:new URL(location.href)}),type:"load"};d.after_navigate.forEach(h=>h(s)),_=!0}async function Y({url:a,params:l,branch:u,status:s,error:i,route:p,form:h}){var P;const k=u.filter(Boolean),v={type:"loaded",state:{url:a,params:l,branch:u,error:i,route:p},props:{components:k.map(O=>O.node.component)}};h!==void 0&&(v.props.form=h);let w={},b=!T;for(let O=0;OA===j))&&(v.props[`data_${O}`]=w,b=b||Object.keys((P=j.data)!=null?P:{}).length>0)}if(b||(b=Object.keys(T.data).length!==Object.keys(w).length),!r.url||a.href!==r.url.href||r.error!==i||h!==void 0||b){v.props.page={error:i,params:l,routeId:p&&p.id,status:s,url:a,form:h,data:b?w:T.data};const O=(j,A)=>{Object.defineProperty(v.props.page,j,{get:()=>{throw new Error(`$page.${j} has been replaced by $page.url.${A}`)}})};O("origin","origin"),O("path","pathname"),O("query","searchParams")}return v}async function pe({loader:a,parent:l,url:u,params:s,routeId:i,server_data_node:p}){var w,b,S,P,O;let h=null;const k={dependencies:new Set,params:new Set,parent:!1,url:!1},v=await a();if((w=v.shared)!=null&&w.load){let j=function(...$){for(const g of $){const{href:E}=new URL(g,u);k.dependencies.add(E)}};const A={routeId:i,params:new Proxy(s,{get:($,g)=>(k.params.add(g),$[g])}),data:(b=p==null?void 0:p.data)!=null?b:null,url:ht(u,()=>{k.url=!0}),async fetch($,g){let E;$ instanceof Request?(E=$.url,g={body:$.method==="GET"||$.method==="HEAD"?void 0:await $.blob(),cache:$.cache,credentials:$.credentials,headers:$.headers,integrity:$.integrity,keepalive:$.keepalive,method:$.method,mode:$.mode,redirect:$.redirect,referrer:$.referrer,referrerPolicy:$.referrerPolicy,signal:$.signal,...g}):E=$;const I=new URL(E,u).href;return j(I),_?wt(I,g):gt(E,I,g)},setHeaders:()=>{},depends:j,parent(){return k.parent=!0,l()}};Object.defineProperties(A,{props:{get(){throw new Error("@migration task: Replace `props` with `data` stuff https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292693")},enumerable:!1},session:{get(){throw new Error("session is no longer available. See https://github.com/sveltejs/kit/discussions/5883")},enumerable:!1},stuff:{get(){throw new Error("@migration task: Remove stuff https://github.com/sveltejs/kit/discussions/5774#discussioncomment-3292693")},enumerable:!1}}),h=(S=await v.shared.load.call(null,A))!=null?S:null,h=h?await Tt(h):null}return{node:v,loader:a,server:p,shared:(P=v.shared)!=null&&P.load?{type:"data",data:h,uses:k}:null,data:(O=h!=null?h:p==null?void 0:p.data)!=null?O:null}}function je(a,l,u,s){if(L)return!0;if(!u)return!1;if(u.parent&&l||u.url&&a)return!0;for(const i of u.params)if(s[i]!==r.params[i])return!0;for(const i of u.dependencies)if(c.some(p=>p(new URL(i))))return!0;return!1}function he(a,l){var u,s;return(a==null?void 0:a.type)==="data"?{type:"data",data:a.data,uses:{dependencies:new Set((u=a.uses.dependencies)!=null?u:[]),params:new Set((s=a.uses.params)!=null?s:[]),parent:!!a.uses.parent,url:!!a.uses.url}}:(a==null?void 0:a.type)==="skip"&&l!=null?l:null}async function Ae({id:a,invalidating:l,url:u,params:s,route:i}){var $;if((o==null?void 0:o.id)===a)return o.promise;const{errors:p,layouts:h,leaf:k}=i,v=[...h,k];p.forEach(g=>g==null?void 0:g().catch(()=>{})),v.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let w=null;const b=r.url?a!==r.url.pathname+r.url.search:!1,S=v.reduce((g,E,I)=>{var Q;const U=r.branch[I],G=!!(E!=null&&E[0])&&((U==null?void 0:U.loader)!==E[1]||je(b,g.some(Boolean),(Q=U.server)==null?void 0:Q.uses,s));return g.push(G),g},[]);if(S.some(Boolean)){try{w=await We(u,S)}catch(g){return ne({status:500,error:Z(g,{url:u,params:s,routeId:i.id}),url:u,routeId:i.id})}if(w.type==="redirect")return w}const P=w==null?void 0:w.nodes;let O=!1;const j=v.map(async(g,E)=>{var Q;if(!g)return;const I=r.branch[E],U=P==null?void 0:P[E];if((!U||U.type==="skip")&&g[1]===(I==null?void 0:I.loader)&&!je(b,O,(Q=I.shared)==null?void 0:Q.uses,s))return I;if(O=!0,(U==null?void 0:U.type)==="error")throw U;return pe({loader:g[1],url:u,params:s,routeId:i.id,parent:async()=>{var xe;const Ce={};for(let ge=0;ge{});const A=[];for(let g=0;gPromise.resolve({}),server_data_node:he(h)}),v={node:await Re(),loader:Re,shared:null,server:null,data:null};return await Y({url:u,params:i,branch:[k,v],status:a,error:l,route:null})}function me(a,l){if(Te(a))return;const u=decodeURI(a.pathname.slice(e.length)||"/");for(const s of re){const i=s.exec(u);if(i){const p=new URL(a.origin+ut(a.pathname,t)+a.search+a.hash);return{id:p.pathname+p.search,invalidating:l,route:s,params:dt(i),url:p}}}}function Te(a){return a.origin!==location.origin||!a.pathname.startsWith(e)}async function _e({url:a,scroll:l,keepfocus:u,redirect_chain:s,details:i,type:p,delta:h,nav_token:k,accepted:v,blocked:w}){var j,A,$,g;let b=!1;const S=me(a,!1),P={from:se("from",{params:r.params,routeId:(A=(j=r.route)==null?void 0:j.id)!=null?A:null,url:r.url}),to:se("to",{params:($=S==null?void 0:S.params)!=null?$:null,routeId:(g=S==null?void 0:S.route.id)!=null?g:null,url:a}),type:p};h!==void 0&&(P.delta=h);const O={...P,cancel:()=>{b=!0}};if(d.before_navigate.forEach(E=>E(O)),b){w();return}ye(N),v(),_&&K.navigating.set(P),await Ue(S,a,s,{scroll:l,keepfocus:u,details:i},k,()=>{d.after_navigate.forEach(E=>E(P)),K.navigating.set(null)})}async function De(a,l,u,s){return a.origin===location.origin&&a.pathname===location.pathname&&!f?await ne({status:s,error:u,url:a,routeId:l}):await ae(a)}function ae(a){return location.href=a.href,new Promise(()=>{})}return{after_navigate:a=>{be(()=>(d.after_navigate.push(a),()=>{const l=d.after_navigate.indexOf(a);d.after_navigate.splice(l,1)}))},before_navigate:a=>{be(()=>(d.before_navigate.push(a),()=>{const l=d.before_navigate.indexOf(a);d.before_navigate.splice(l,1)}))},disable_scroll_handling:()=>{(y||!_)&&(m=!1)},goto:(a,l={})=>de(a,l,[]),invalidate:a=>{if(a===void 0)throw new Error("`invalidate()` (with no arguments) has been replaced by `invalidateAll()`");if(typeof a=="function")c.push(a);else{const{href:l}=new URL(a,location.href);c.push(u=>u.href===l)}return Pe()},invalidateAll:()=>(L=!0,Pe()),prefetch:async a=>{const l=new URL(a,Be(document));await Oe(l)},prefetch_routes:async a=>{const u=(a?re.filter(s=>a.some(i=>s.exec(i))):re).map(s=>Promise.all([...s.layouts,s.leaf].map(i=>i==null?void 0:i[1]())));await Promise.all(u)},apply_action:async a=>{if(a.type==="error"){const l=new URL(location.href),{branch:u,route:s}=r;if(!s)return;const i=await Ne(r.branch.length,u,s.errors);if(i){const p=await Y({url:l,params:r.params,branch:u.slice(0,i.idx).concat(i.node),status:500,error:a.error,route:s});r=p.state;const h=oe();R.$set(p.props),h()}}else if(a.type==="redirect")de(a.location,{},[]);else{const l={form:a.data,page:{...T,form:a.data,status:a.status}},u=oe();R.$set(l),u()}},_start_router:()=>{history.scrollRestoration="manual",addEventListener("beforeunload",s=>{var h,k;let i=!1;const p={from:se("from",{params:r.params,routeId:(k=(h=r.route)==null?void 0:h.id)!=null?k:null,url:r.url}),to:null,type:"unload",cancel:()=>i=!0};d.before_navigate.forEach(v=>v(p)),i?(s.preventDefault(),s.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){ye(N);try{sessionStorage[He]=JSON.stringify(ee)}catch{}}});const a=s=>{const{url:i,options:p}=Je(s);if(i&&p.prefetch){if(Te(i))return;Oe(i)}};let l;const u=s=>{clearTimeout(l),l=setTimeout(()=>{var i;(i=s.target)==null||i.dispatchEvent(new CustomEvent("sveltekit:trigger_prefetch",{bubbles:!0}))},20)};addEventListener("touchstart",a),addEventListener("mousemove",u),addEventListener("sveltekit:trigger_prefetch",a),addEventListener("click",s=>{if(s.button||s.which!==1||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.defaultPrevented)return;const{a:i,url:p,options:h}=Je(s);if(!i||!p)return;const k=i instanceof SVGAElement;if(!k&&!(p.protocol==="https:"||p.protocol==="http:"))return;const v=(i.getAttribute("rel")||"").split(/\s+/);if(i.hasAttribute("download")||v.includes("external")||h.reload||(k?i.target.baseVal:i.target))return;const[w,b]=p.href.split("#");if(b!==void 0&&w===location.href.split("#")[0]){q=!0,ye(N),r.url=p,K.page.set({...T,url:p}),K.page.notify();return}_e({url:p,scroll:h.noscroll?ve():null,keepfocus:!1,redirect_chain:[],details:{state:{},replaceState:p.href===location.href},accepted:()=>s.preventDefault(),blocked:()=>s.preventDefault(),type:"link"})}),addEventListener("popstate",s=>{if(s.state){if(s.state[x]===N)return;const i=s.state[x]-N;_e({url:new URL(location.href),scroll:ee[s.state[x]],keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{N=s.state[x]},blocked:()=>{history.go(-i)},type:"popstate",delta:i})}}),addEventListener("hashchange",()=>{q&&(q=!1,history.replaceState({...history.state,[x]:++N},"",location.href))});for(const s of document.querySelectorAll("link"))s.rel==="icon"&&(s.href=s.href);addEventListener("pageshow",s=>{s.persisted&&K.navigating.set(null)})},_hydrate:async({status:a,error:l,node_ids:u,params:s,routeId:i,data:p,form:h})=>{var w;f=!0;const k=new URL(location.href);let v;try{const b=u.map(async(S,P)=>{const O=p[P];return pe({loader:ue[S],url:k,params:s,routeId:i,parent:async()=>{const j={};for(let A=0;AS.id===i))!=null?w:null})}catch(b){if(b instanceof Ge){await ae(new URL(b.location,location.href));return}v=await ne({status:b instanceof ke?b.status:500,error:Z(b,{url:k,params:s,routeId:i}),url:k,routeId:i})}Ie(v)}}}let qt=1;async function We(n,e){const t=new URL(n);t.pathname=n.pathname.replace(/\/$/,"")+Nt,t.searchParams.set("__invalid",e.map(o=>o?"y":"n").join("")),t.searchParams.set("__id",String(qt++)),await ie(()=>import(t.href),[],import.meta.url);const c=window.__sveltekit_data;return delete window.__sveltekit_data,c}function Z(n,e){var t;return n instanceof ke?n.body:(t=At.handleError({error:n,event:e}))!=null?t:{message:e.routeId!=null?"Internal Error":"Not Found"}}const Ct=["hash","href","host","hostname","origin","pathname","port","protocol","search","searchParams","toString","toJSON"];function se(n,e){for(const t of Ct)Object.defineProperty(e,t,{get(){throw new Error(`The navigation shape changed - ${n}.${t} should now be ${n}.url.${t}`)},enumerable:!1});return e}function oe(){return()=>{}}async function Bt({env:n,hydrate:e,paths:t,target:c,trailing_slash:o}){it(t);const d=Dt({target:c,base:t.base,trailing_slash:o});lt({client:d}),e?await d._hydrate(e):d.goto(location.href,{replaceState:!0}),d._start_router()}export{Bt as start};