Files
RentalManager/web/build/_app/immutable/chunks/6cgBTYw-.js
2026-04-11 12:12:07 +02:00

2 lines
26 KiB
JavaScript

var mt=Object.defineProperty;var _t=(e,t,n)=>t in e?mt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var U=(e,t,n)=>_t(e,typeof t!="symbol"?t+"":t,n);import{o as De,t as ee}from"./DHedsUi_.js";import{w as Ee}from"./oVx0hpG8.js";class Se{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class Re{constructor(t,n){this.status=t,this.location=n}}class xe extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}new URL("sveltekit-internal://");function wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function vt(e){return e.split("%25").map(decodeURI).join("%25")}function yt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function pe({href:e}){return e.split("#")[0]}function bt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}new TextEncoder;new TextDecoder;function kt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}const Et=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&F.delete(Le(e)),Et(e,t));const F=new Map;function St(e,t){const n=Le(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...s}=JSON.parse(r.textContent);const o=r.getAttribute("data-ttl");return o&&F.set(n,{body:a,init:s,ttl:1e3*Number(o)}),r.getAttribute("data-b64")!==null&&(a=kt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Rt(e,t,n){if(F.size>0){const r=Le(e,n),a=F.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);F.delete(r)}}return window.fetch(t,n)}function Le(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${bt(...a)}"]`}return r}const xt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Lt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${At(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const o=r.split(/\[(.+?)\](?!\])/);return"/"+o.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return ge(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return ge(String.fromCharCode(...l.slice(2).split("-").map(m=>parseInt(m,16))));const d=xt.exec(l),[,u,w,p,f]=d;return t.push({name:p,matcher:f,optional:!!u,rest:!!w,chained:w?c===1&&o[0]==="":!1}),w?"([^]*?)":u?"([^/]*)?":"([^/]+?)"}return ge(l)}).join("")}).join("")}/?$`),params:t}}function Ut(e){return e!==""&&!/^\([^)]+\)$/.test(e)}function At(e){return e.slice(1).split("/").filter(Ut)}function Tt(e,t,n){const r={},a=e.slice(1),s=a.filter(i=>i!==void 0);let o=0;for(let i=0;i<t.length;i+=1){const l=t[i];let c=a[i-o];if(l.chained&&l.rest&&o&&(c=a.slice(i-o,i+1).filter(d=>d).join("/"),o=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const d=t[i+1],u=a[i+1];d&&!d.rest&&d.optional&&u&&l.chained&&(o=0),!d&&!u&&Object.keys(r).length===s.length&&(o=0);continue}if(l.optional&&l.chained){o++;continue}return}if(!o)return r}function ge(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function $t({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([i,[l,c,d]])=>{const{pattern:u,params:w}=Lt(i),p={id:i,exec:f=>{const m=u.exec(f);if(m)return Tt(m,w,r)},errors:[1,...d||[]].map(f=>e[f]),layouts:[0,...c||[]].map(o),leaf:s(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function s(i){const l=i<0;return l&&(i=~i),[l,e[i]]}function o(i){return i===void 0?i:[a.has(i),e[i]]}}function He(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function Ve(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}var Ye;const L=((Ye=globalThis.__sveltekit_80oik8)==null?void 0:Ye.base)??"";var ze;const It=((ze=globalThis.__sveltekit_80oik8)==null?void 0:ze.assets)??L??"",Ot="1775902055626",Je="sveltekit:snapshot",Xe="sveltekit:scroll",Qe="sveltekit:states",Pt="sveltekit:pageurl",D="sveltekit:history",W="sveltekit:navigation",P={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},ce=location.origin;function Ue(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function j(){return{x:pageXOffset,y:pageYOffset}}function N(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const qe={...P,"":P.hover};function Ze(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function et(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=Ze(e)}}function we(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||fe(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),o=(r==null?void 0:r.origin)===ce&&e.hasAttribute("download");return{url:r,external:s,target:a,download:o}}function te(e){let t=null,n=null,r=null,a=null,s=null,o=null,i=e;for(;i&&i!==document.documentElement;)r===null&&(r=N(i,"preload-code")),a===null&&(a=N(i,"preload-data")),t===null&&(t=N(i,"keepfocus")),n===null&&(n=N(i,"noscroll")),s===null&&(s=N(i,"reload")),o===null&&(o=N(i,"replacestate")),i=Ze(i);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:qe[r??"off"],preload_data:qe[a??"off"],keepfocus:l(t),noscroll:l(n),reload:l(s),replace_state:l(o)}}function Be(e){const t=Ee(e);let n=!0;function r(){n=!0,t.update(o=>o)}function a(o){n=!1,t.set(o)}function s(o){let i;return t.subscribe(l=>{(i===void 0||n&&l!==i)&&o(i=l)})}return{notify:r,set:a,subscribe:s}}const tt={v:()=>{}};function Ct(){const{set:e,subscribe:t}=Ee(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${It}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const o=(await a.json()).version!==Ot;return o&&(e(!0),tt.v(),clearTimeout(n)),o}catch{return!1}}return{subscribe:t,check:r}}function fe(e,t,n){return e.origin!==ce||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function fn(e){}const nt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...nt];const jt=new Set([...nt]);[...jt];function Nt(e){return e.filter(t=>t!=null)}function Ae(e){return e instanceof Se||e instanceof xe?e.status:500}function Dt(e){return e instanceof xe?e.text:"Internal Error"}let S,Y,me;const Vt=De.toString().includes("$$")||/function \w+\(\) \{\}/.test(De.toString()),Ke="a:";Vt?(S={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ke)},Y={current:null},me={current:!1}):(S=new class{constructor(){U(this,"data",$state.raw({}));U(this,"form",$state.raw(null));U(this,"error",$state.raw(null));U(this,"params",$state.raw({}));U(this,"route",$state.raw({id:null}));U(this,"state",$state.raw({}));U(this,"status",$state.raw(-1));U(this,"url",$state.raw(new URL(Ke)))}},Y=new class{constructor(){U(this,"current",$state.raw(null))}},me=new class{constructor(){U(this,"current",$state.raw(!1))}},tt.v=()=>me.current=!0);function qt(e){Object.assign(S,e)}const Bt=new Set(["icon","shortcut icon","apple-touch-icon"]);let K=null;const I=He(Xe)??{},z=He(Je)??{},$={url:Be({}),page:Be({}),navigating:Ee(null),updated:Ct()};function Te(e){I[e]=j()}function Kt(e,t){let n=e+1;for(;I[n];)delete I[n],n+=1;for(n=t+1;z[n];)delete z[n],n+=1}function H(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(()=>{})}async function at(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(L||"/");e&&await e.update()}}function Me(){}let $e,ve,ne,A,ye,E;const ae=[],re=[];let v=null;function be(){var e;(e=v==null?void 0:v.fork)==null||e.then(t=>t==null?void 0:t.discard()),v=null}const Z=new Map,rt=new Set,Mt=new Set,G=new Set;let _={branch:[],error:null,url:null},ot=!1,oe=!1,Fe=!0,J=!1,M=!1,st=!1,Ie=!1,it,k,x,C;const se=new Set,Ge=new Map;async function pn(e,t,n){var s,o,i,l,c;(s=globalThis.__sveltekit_80oik8)!=null&&s.data&&globalThis.__sveltekit_80oik8.data,document.URL!==location.href&&(location.href=location.href),E=e,await((i=(o=e.hooks).init)==null?void 0:i.call(o)),$e=$t(e),A=document.documentElement,ye=t,ve=e.nodes[0],ne=e.nodes[1],ve(),ne(),k=(l=history.state)==null?void 0:l[D],x=(c=history.state)==null?void 0:c[W],k||(k=x=Date.now(),history.replaceState({...history.state,[D]:k,[W]:x},""));const r=I[k];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await nn(ye,n)):(await V({type:"enter",url:Ue(E.hash?on(new URL(location.href)):location.href),replace_state:!0}),a()),tn()}function Ft(){ae.length=0,Ie=!1}function lt(e){re.some(t=>t==null?void 0:t.snapshot)&&(z[e]=re.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function ct(e){var t;(t=z[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=re[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function We(){Te(k),Ve(Xe,I),lt(x),Ve(Je,z)}async function ft(e,t,n,r){let a;t.invalidateAll&&be(),await V({type:"goto",url:Ue(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ie=!0,a=[...Ge.keys()]),t.invalidate&&t.invalidate.forEach(en)}}),t.invalidateAll&&ee().then(ee).then(()=>{Ge.forEach(({resource:s},o)=>{var i;a!=null&&a.includes(o)&&((i=s.refresh)==null||i.call(s))})})}async function Gt(e){if(e.id!==(v==null?void 0:v.id)){be();const t={};se.add(t),v={id:e.id,token:t,promise:dt({...e,preload:t}).then(n=>(se.delete(t),n.type==="loaded"&&n.state.error&&be(),n)),fork:null}}return v.promise}async function _e(e){var n;const t=(n=await ue(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(r=>r[1]()))}async function ut(e,t,n){var s;const r={params:_.params,route:{id:((s=_.route)==null?void 0:s.id)??null},url:new URL(location.href)};_={...e.state,nav:r};const a=document.querySelector("style[data-sveltekit]");if(a&&a.remove(),Object.assign(S,e.props.page),it=new E.root({target:t,props:{...e.props,stores:$,components:re},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),ct(x),n){const o={from:null,to:{...r,scroll:I[k]??j()},willUnload:!1,type:"enter",complete:Promise.resolve()};G.forEach(i=>i(o))}oe=!0}async function ie({url:e,params:t,branch:n,errors:r,status:a,error:s,route:o,form:i}){let l="never";if(L&&(e.pathname===L||e.pathname===L+"/"))l="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(l=f.slash);e.pathname=wt(e.pathname,l),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:s,route:o},props:{constructors:Nt(n).map(f=>f.node.component),page:Ne(S)}};i!==void 0&&(c.props.form=i);let d={},u=!S,w=0;for(let f=0;f<Math.max(n.length,_.branch.length);f+=1){const m=n[f],h=_.branch[f];(m==null?void 0:m.data)!==(h==null?void 0:h.data)&&(u=!0),m&&(d={...d,...m.data},u&&(c.props[`data_${w}`]=d),w+=1)}return(!_.url||e.href!==_.url.href||_.error!==s||i!==void 0&&i!==S.form||u)&&(c.props.page={error:s,params:t,route:{id:(o==null?void 0:o.id)??null},state:{},status:a,url:new URL(e),form:i??null,data:u?d:S.data}),c}async function Oe({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var c,d;let o=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();return{node:l,loader:e,server:s,universal:(c=l.universal)!=null&&c.load?{type:"data",data:o,uses:i}:null,data:o??(s==null?void 0:s.data)??null,slash:((d=l.universal)==null?void 0:d.trailingSlash)??(s==null?void 0:s.slash)}}function Wt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=oe?Rt(r,a.href,t):St(r,t);return{resolved:a,promise:s}}function Yt(e,t,n,r,a,s){if(Ie)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const o of a.search_params)if(r.has(o))return!0;for(const o of a.params)if(s[o]!==_.params[o])return!0;for(const o of a.dependencies)if(ae.some(i=>i(new URL(o))))return!0;return!1}function Pe(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function zt(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(o=>s.includes(o))&&s.every(o=>a.includes(o))&&n.delete(r)}return n}function Ht({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ne(S),constructors:[]}}}async function dt({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((v==null?void 0:v.id)===e)return se.delete(v.token),v.promise;const{errors:o,layouts:i,leaf:l}=a,c=[...i,l];o.forEach(h=>h==null?void 0:h().catch(()=>{})),c.forEach(h=>h==null?void 0:h[1]().catch(()=>{}));const d=_.url?e!==le(_.url):!1,u=_.route?a.id!==_.route.id:!1,w=zt(_.url,n);let p=!1;const f=c.map(async(h,g)=>{var T;if(!h)return;const y=_.branch[g];return h[1]===(y==null?void 0:y.loader)&&!Yt(p,u,d,w,(T=y.universal)==null?void 0:T.uses,r)?y:(p=!0,Oe({loader:h[1],url:n,params:r,route:a,parent:async()=>{var Q;const O={};for(let b=0;b<g;b+=1)Object.assign(O,(Q=await f[b])==null?void 0:Q.data);return O},server_data_node:Pe(h[0]?{type:"skip"}:null,h[0]?y==null?void 0:y.server:void 0)}))});for(const h of f)h.catch(()=>{});const m=[];for(let h=0;h<c.length;h+=1)if(c[h])try{m.push(await f[h])}catch(g){if(g instanceof Re)return{type:"redirect",location:g.location};if(se.has(s))return Ht({error:await X(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let y=Ae(g),R;if(g instanceof Se)R=g.body;else{if(await $.updated.check())return await at(),await H(n);R=await X(g,{params:r,url:n,route:{id:a.id}})}const T=await Jt(h,m,o);return T?ie({url:n,params:r,branch:m.slice(0,T.idx).concat(T.node),errors:o,status:y,error:R,route:a}):await pt(n,{id:a.id},R,y)}else m.push(void 0);return ie({url:n,params:r,branch:m,errors:o,status:200,error:null,route:a,form:t?void 0:null})}async function Jt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ce({status:e,error:t,url:n,route:r}){const a={};let s=null;try{const o=await Oe({loader:ve,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Pe(s)}),i={node:await ne(),loader:ne,universal:null,server:null,data:null};return ie({url:n,params:a,branch:[o,i],status:e,error:t,errors:[],route:null})}catch(o){if(o instanceof Re)return ft(new URL(o.location,location.href),{},0);throw o}}async function Xt(e){const t=e.href;if(Z.has(t))return Z.get(t);let n;try{const r=(async()=>{let a=await E.hooks.reroute({url:new URL(e),fetch:async(s,o)=>Wt(s,o,e).promise})??e;if(typeof a=="string"){const s=new URL(e);E.hash?s.hash=a:s.pathname=a,a=s}return a})();Z.set(t,r),n=await r}catch{Z.delete(t);return}return n}async function ue(e,t){if(e&&!fe(e,L,E.hash)){const n=await Xt(e);if(!n)return;const r=Qt(n);for(const a of $e){const s=a.exec(r);if(s)return{id:le(e),invalidating:t,route:a,params:yt(s),url:e}}}}function Qt(e){return vt(E.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(L.length))||"/"}function le(e){return(E.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function ht({url:e,type:t,intent:n,delta:r,event:a,scroll:s}){let o=!1;const i=je(_,n,e,t,s??null);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const l={...i.navigation,cancel:()=>{o=!0,i.reject(new Error("navigation cancelled"))}};return J||rt.forEach(c=>c(l)),o?null:i}async function V({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o={},redirect_count:i=0,nav_token:l={},accept:c=Me,block:d=Me,event:u}){const w=C;C=l;const p=await ue(t,!1),f=e==="enter"?je(_,p,t,e):ht({url:t,type:e,delta:n==null?void 0:n.delta,intent:p,scroll:n==null?void 0:n.scroll,event:u});if(!f){d(),C===l&&(C=w);return}const m=k,h=x;c(),J=!0,oe&&f.navigation.type!=="enter"&&$.navigating.set(Y.current=f.navigation);let g=p&&await dt(p);if(!g){if(fe(t,L,E.hash))return await H(t,s);g=await pt(t,{id:null},await X(new xe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404,s)}if(t=(p==null?void 0:p.url)||t,C!==l)return f.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(i<20){await V({type:e,url:new URL(g.location,t),popped:n,keepfocus:r,noscroll:a,replace_state:s,state:o,redirect_count:i+1,nav_token:l}),f.fulfil(void 0);return}g=await Ce({status:500,error:await X(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}})}else g.props.page.status>=400&&await $.updated.check()&&(await at(),await H(t,s));if(Ft(),Te(m),lt(h),g.props.page.url.pathname!==t.pathname&&(t.pathname=g.props.page.url.pathname),o=n?n.state:o,!n){const b=s?0:1,q={[D]:k+=b,[W]:x+=b,[Qe]:o};(s?history.replaceState:history.pushState).call(history,q,"",t),s||Kt(k,x)}const y=p&&(v==null?void 0:v.id)===p.id?v.fork:null;v=null,g.props.page.state=o;let R;if(oe){const b=(await Promise.all(Array.from(Mt,B=>B(f.navigation)))).filter(B=>typeof B=="function");if(b.length>0){let B=function(){b.forEach(he=>{G.delete(he)})};b.push(B),b.forEach(he=>{G.add(he)})}const q=f.navigation.to;_={...g.state,nav:{params:q.params,route:q.route,url:q.url}},g.props.page&&(g.props.page.url=t);const de=y&&await y;de?R=de.commit():(K=null,it.$set(g.props),K&&Object.assign(g.props.page,K),qt(g.props.page),R=void 0),st=!0}else await ut(g,ye,!1);const{activeElement:T}=document;await R,await ee(),await ee();let O=null;if(Fe){const b=n?n.scroll:a?j():null;b?scrollTo(b.x,b.y):(O=t.hash&&document.getElementById(gt(t)))?O.scrollIntoView():scrollTo(0,0)}const Q=document.activeElement!==T&&document.activeElement!==document.body;!r&&!Q&&rn(t,!O),Fe=!0,g.props.page&&(K&&Object.assign(g.props.page,K),Object.assign(S,g.props.page)),J=!1,e==="popstate"&&ct(x),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=j()),G.forEach(b=>b(f.navigation)),$.navigating.set(Y.current=null)}async function pt(e,t,n,r,a){return e.origin===ce&&e.pathname===location.pathname&&!ot?await Ce({status:r,error:n,url:e,route:t}):await H(e,a)}function Zt(){let e,t={element:void 0,href:void 0},n;A.addEventListener("mousemove",i=>{const l=i.target;clearTimeout(e),e=setTimeout(()=>{s(l,P.hover)},20)});function r(i){i.defaultPrevented||s(i.composedPath()[0],P.tap)}A.addEventListener("mousedown",r),A.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const l of i)l.isIntersecting&&(_e(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function s(i,l){const c=et(i,A),d=c===t.element&&(c==null?void 0:c.href)===t.href&&l>=n;if(!c||d)return;const{url:u,external:w,download:p}=we(c,L,E.hash);if(w||p)return;const f=te(c),m=u&&le(_.url)===le(u);if(!(f.reload||m))if(l<=f.preload_data){t={element:c,href:c.href},n=P.tap;const h=await ue(u,!1);if(!h)return;Gt(h)}else l<=f.preload_code&&(t={element:c,href:c.href},n=l,_e(u))}function o(){a.disconnect();for(const i of A.querySelectorAll("a")){const{url:l,external:c,download:d}=we(i,L,E.hash);if(c||d)continue;const u=te(i);u.reload||(u.preload_code===P.viewport&&a.observe(i),u.preload_code===P.eager&&_e(l))}}G.add(o),o()}function X(e,t){if(e instanceof Se)return e.body;const n=Ae(e),r=Dt(e);return E.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function gn(e,t={}){return e=new URL(Ue(e)),e.origin!==ce?Promise.reject(new Error("goto: invalid URL")):ft(e,t,0)}function en(e){if(typeof e=="function")ae.push(e);else{const{href:t}=new URL(e,location.href);ae.push(n=>n.href===t)}}function tn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(We(),!J){const a=je(_,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};rt.forEach(o=>o(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&We()}),(t=navigator.connection)!=null&&t.saveData||Zt(),A.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=et(n.composedPath()[0],A);if(!r)return;const{url:a,external:s,target:o,download:i}=we(r,L,E.hash);if(!a)return;if(o==="_parent"||o==="_top"){if(window.parent!==window)return}else if(o&&o!=="_self")return;const l=te(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||i)return;const[d,u]=(E.hash?a.hash.replace(/^#/,""):a.href).split("#"),w=d===pe(location);if(s||l.reload&&(!w||!u)){ht({url:a,type:"link",event:n})?J=!0:n.preventDefault();return}if(u!==void 0&&w){const[,p]=_.url.href.split("#");if(p===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const f=r.ownerDocument.getElementById(decodeURIComponent(u));f&&(f.scrollIntoView(),f.focus())}return}if(M=!0,Te(k),e(a),!l.replace_state)return;M=!1}n.preventDefault(),await new Promise(p=>{requestAnimationFrame(()=>{setTimeout(p,0)}),setTimeout(p,100)}),await V({type:"link",url:a,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??a.href===location.href,event:n})}),A.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const i=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(fe(i,L,!1))return;const l=n.target,c=te(l);if(c.reload)return;n.preventDefault(),n.stopPropagation();const d=new FormData(l,a);i.search=new URLSearchParams(d).toString(),V({type:"form",url:i,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??i.href===location.href,event:n})}),addEventListener("popstate",async n=>{var r;if(!ke){if((r=n.state)!=null&&r[D]){const a=n.state[D];if(C={},a===k)return;const s=I[a],o=n.state[Qe]??{},i=new URL(n.state[Pt]??location.href),l=n.state[W],c=_.url?pe(location)===pe(_.url):!1;if(l===x&&(st||c)){o!==S.state&&(S.state=o),e(i),I[k]=j(),s&&scrollTo(s.x,s.y),k=a;return}const u=a-k;await V({type:"popstate",url:i,popped:{state:o,scroll:s,delta:u},accept:()=>{k=a,x=l},block:()=>{history.go(-u)},nav_token:C,event:n})}else if(!M){const a=new URL(location.href);e(a),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{M&&(M=!1,history.replaceState({...history.state,[D]:++k,[W]:x},"",location.href))});for(const n of document.querySelectorAll("link"))Bt.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(Y.current=null)});function e(n){_.url=S.url=n,$.page.set(Ne(S)),$.page.notify()}}async function nn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:o,data:i,form:l}){ot=!0;const c=new URL(location.href);let d;({params:a={},route:s={id:null}}=await ue(c,!1)||{}),d=$e.find(({id:p})=>p===s.id);let u,w=!0;try{const p=r.map(async(m,h)=>{const g=i[h];return g!=null&&g.uses&&(g.uses=an(g.uses)),Oe({loader:E.nodes[m],url:c,params:a,route:s,parent:async()=>{const y={};for(let R=0;R<h;R+=1)Object.assign(y,(await p[R]).data);return y},server_data_node:Pe(g)})}),f=await Promise.all(p);if(d){const m=d.layouts;for(let h=0;h<m.length;h++)m[h]||f.splice(h,0,void 0)}u=await ie({url:c,params:a,branch:f,status:t,error:n,errors:d==null?void 0:d.errors,form:l,route:d??null})}catch(p){if(p instanceof Re){await H(new URL(p.location,location.href));return}u=await Ce({status:Ae(p),error:await X(p,{url:c,params:a,route:s}),url:c,route:s}),e.textContent="",w=!1}u.props.page&&(u.props.page.state={}),await ut(u,e,w)}function an(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}let ke=!1;function rn(e,t=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=gt(e);if(r&&document.getElementById(r)){const{x:s,y:o}=j();setTimeout(()=>{const i=history.state;ke=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(i,"",e),t&&scrollTo(s,o),ke=!1})}else{const s=document.body,o=s.getAttribute("tabindex");s.tabIndex=-1,s.focus({preventScroll:!0,focusVisible:!1}),o!==null?s.setAttribute("tabindex",o):s.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const s=[];for(let o=0;o<a.rangeCount;o+=1)s.push(a.getRangeAt(o));setTimeout(()=>{if(a.rangeCount===s.length){for(let o=0;o<a.rangeCount;o+=1){const i=s[o],l=a.getRangeAt(o);if(i.commonAncestorContainer!==l.commonAncestorContainer||i.startContainer!==l.startContainer||i.endContainer!==l.endContainer||i.startOffset!==l.startOffset||i.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function je(e,t,n,r,a=null){var c,d;let s,o;const i=new Promise((u,w)=>{s=u,o=w});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url,scroll:j()},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((d=t==null?void 0:t.route)==null?void 0:d.id)??null},url:n,scroll:a},willUnload:!t,type:r,complete:i},fulfil:s,reject:o}}function Ne(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 on(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function gt(e){let t;if(E.hash){const[,,n]=e.hash.split("#",3);t=n??""}else t=e.hash.slice(1);return decodeURIComponent(t)}export{pn as a,gn as g,fn as l,$ as s};