(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();const L={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return Me(this.context.count)},getNextContextId(){return Me(this.context.count++)}};function Me(e){const t=String(e),n=t.length-1;return L.context.id+(n?String.fromCharCode(96+n):"")+t}function ce(e){L.context=e}const pt=(e,t)=>e===t,de=Symbol("solid-proxy"),wt=Symbol("solid-track"),he={equals:pt};let yt=it;const M=1,te=2,Ze={owned:null,cleanups:null,context:null,owner:null},xe={};var b=null;let d=null,bt=null,S=null,j=null,D=null,me=0;function Z(e,t){const n=S,s=b,r=e.length===0,i=t===void 0?s:t,o=r?Ze:{owned:null,cleanups:null,context:i?i.context:null,owner:i},l=r?e:()=>e(()=>V(()=>K(o)));b=o,S=null;try{return U(l,!0)}finally{S=n,b=s}}function N(e,t){t=t?Object.assign({},he,t):he;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},s=r=>(typeof r=="function"&&(d&&d.running&&d.sources.has(n)?r=r(n.tValue):r=r(n.value)),rt(n,r));return[nt.bind(n),s]}function Be(e,t,n){const s=Ne(e,t,!0,M);oe(s)}function B(e,t,n){const s=Ne(e,t,!1,M);oe(s)}function C(e,t,n){n=n?Object.assign({},he,n):he;const s=Ne(e,t,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,oe(s),nt.bind(s)}function xt(e){return e&&typeof e=="object"&&"then"in e}function et(e,t,n){let s,r,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(s=!0,r=e,i={}):(s=e,r=t,i={});let o=null,l=xe,a=null,u=!1,f=!1,c="initialValue"in i,p=typeof s=="function"&&C(s);const g=new Set,[A,h]=(i.storage||N)(i.initialValue),[m,y]=N(void 0),[w,_]=N(void 0,{equals:!1}),[$,R]=N(c?"ready":"unresolved");L.context&&(a=L.getNextContextId(),i.ssrLoadFrom==="initial"?l=i.initialValue:L.load&&L.has(a)&&(l=L.load(a)));function I(P,O,k,x){return o===P&&(o=null,x!==void 0&&(c=!0),(P===l||O===l)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(x,{value:O})),l=xe,d&&P&&u?(d.promises.delete(P),u=!1,U(()=>{d.running=!0,le(O,k)},!1)):le(O,k)),O}function le(P,O){U(()=>{O===void 0&&h(()=>P),R(O!==void 0?"errored":c?"ready":"unresolved"),y(O);for(const k of g.keys())k.decrement();g.clear()},!1)}function J(){const P=ne&&X(ne),O=A(),k=m();if(k!==void 0&&!o)throw k;return S&&!S.user&&P&&Be(()=>{w(),o&&(P.resolved&&d&&u?d.promises.add(o):g.has(P)||(P.increment(),g.add(P)))}),O}function ee(P=!0){if(P!==!1&&f)return;f=!1;const O=p?p():s;if(u=d&&d.running,O==null||O===!1){I(o,V(A));return}d&&o&&d.promises.delete(o);const k=l!==xe?l:V(()=>r(O,{value:A(),refetching:P}));return xt(k)?(o=k,"value"in k?(k.status==="success"?I(o,k.value,void 0,O):I(o,void 0,Ce(k.value),O),k):(f=!0,queueMicrotask(()=>f=!1),U(()=>{R(c?"refreshing":"pending"),_()},!1),k.then(x=>I(k,x,void 0,O),x=>I(k,void 0,Ce(x),O)))):(I(o,k,void 0,O),k)}return Object.defineProperties(J,{state:{get:()=>$()},error:{get:()=>m()},loading:{get(){const P=$();return P==="pending"||P==="refreshing"}},latest:{get(){if(!c)return J();const P=m();if(P&&!o)throw P;return A()}}}),p?Be(()=>ee(!1)):ee(!1),[J,{refetch:ee,mutate:h}]}function vt(e){return U(e,!1)}function V(e){if(S===null)return e();const t=S;S=null;try{return e()}finally{S=t}}function _e(e,t,n){const s=Array.isArray(e);let r,i=n&&n.defer;return o=>{let l;if(s){l=Array(e.length);for(let u=0;ut(l,r,o));return r=l,a}}function pe(e){return b===null||(b.cleanups===null?b.cleanups=[e]:b.cleanups.push(e)),e}function Re(){return b}function tt(e,t){const n=b,s=S;b=e,S=null;try{return U(t,!0)}catch(r){Te(r)}finally{b=n,S=s}}function St(e){if(d&&d.running)return e(),d.done;const t=S,n=b;return Promise.resolve().then(()=>{S=t,b=n;let s;return ne&&(s=d||(d={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),s.done||(s.done=new Promise(r=>s.resolve=r)),s.running=!0),U(e,!1),S=b=null,s?s.done:void 0})}const[lr,Ke]=N(!1);function At(e){D.push.apply(D,e),e.length=0}function ie(e,t){const n=Symbol("context");return{id:n,Provider:Pt(n),defaultValue:e}}function X(e){let t;return b&&b.context&&(t=b.context[e.id])!==void 0?t:e.defaultValue}function je(e){const t=C(e),n=C(()=>$e(t()));return n.toArray=()=>{const s=n();return Array.isArray(s)?s:s!=null?[s]:[]},n}let ne;function Ct(){return ne||(ne=ie())}function nt(){const e=d&&d.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===M)oe(this);else{const t=j;j=null,U(()=>ge(this),!1),j=t}if(S){const t=this.observers?this.observers.length:0;S.sources?(S.sources.push(this),S.sourceSlots.push(t)):(S.sources=[this],S.sourceSlots=[t]),this.observers?(this.observers.push(S),this.observerSlots.push(S.sources.length-1)):(this.observers=[S],this.observerSlots=[S.sources.length-1])}return e&&d.sources.has(this)?this.tValue:this.value}function rt(e,t,n){let s=d&&d.running&&d.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(s,t)){if(d){const r=d.running;(r||!n&&d.sources.has(e))&&(d.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&U(()=>{for(let r=0;r1e6)throw j=[],new Error},!1)}return t}function oe(e){if(!e.fn)return;K(e);const t=me;He(e,d&&d.running&&d.sources.has(e)?e.tValue:e.value,t),d&&!d.running&&d.sources.has(e)&&queueMicrotask(()=>{U(()=>{d&&(d.running=!0),S=b=e,He(e,e.tValue,t),S=b=null},!1)})}function He(e,t,n){let s;const r=b,i=S;S=b=e;try{s=e.fn(t)}catch(o){return e.pure&&(d&&d.running?(e.tState=M,e.tOwned&&e.tOwned.forEach(K),e.tOwned=void 0):(e.state=M,e.owned&&e.owned.forEach(K),e.owned=null)),e.updatedAt=n+1,Te(o)}finally{S=i,b=r}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?rt(e,s,!0):d&&d.running&&e.pure?(d.sources.add(e),e.tValue=s):e.value=s,e.updatedAt=n)}function Ne(e,t,n,s=M,r){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:b,context:b?b.context:null,pure:n};return d&&d.running&&(i.state=0,i.tState=s),b===null||b!==Ze&&(d&&d.running&&b.pure?b.tOwned?b.tOwned.push(i):b.tOwned=[i]:b.owned?b.owned.push(i):b.owned=[i]),i}function st(e){const t=d&&d.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===te)return ge(e);if(e.suspense&&V(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;s--){if(e=n[s],t){let r=e,i=n[s+1];for(;(r=r.owner)&&r!==i;)if(d.disposed.has(r))return}if((t?e.tState:e.state)===M)oe(e);else if((t?e.tState:e.state)===te){const r=j;j=null,U(()=>ge(e,n[0]),!1),j=r}}}function U(e,t){if(j)return e();let n=!1;t||(j=[]),D?n=!0:D=[],me++;try{const s=e();return $t(n),s}catch(s){n||(D=null),j=null,Te(s)}}function $t(e){if(j&&(it(j),j=null),e)return;let t;if(d){if(!d.promises.size&&!d.queue.size){const s=d.sources,r=d.disposed;D.push.apply(D,d.effects),t=d.resolve;for(const i of D)"tState"in i&&(i.state=i.tState),delete i.tState;d=null,U(()=>{for(const i of r)K(i);for(const i of s){if(i.value=i.tValue,i.owned)for(let o=0,l=i.owned.length;oyt(n),!1),t&&t()}function it(e){for(let t=0;t=0;t--)K(e.tOwned[t]);delete e.tOwned}lt(e,!0)}else if(e.owned){for(t=e.owned.length-1;t>=0;t--)K(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}d&&d.running?e.tState=0:e.state=0}function lt(e,t){if(t||(e.tState=0,d.disposed.add(e)),e.owned)for(let n=0;nr=V(()=>(b.context={...b.context,[e]:s.value},je(()=>s.children))),void 0),r}}const Et=Symbol("fallback");function We(e){for(let t=0;t1?[]:null;return pe(()=>We(i)),()=>{let a=e()||[],u=a.length,f,c;return a[wt],V(()=>{let g,A,h,m,y,w,_,$,R;if(u===0)o!==0&&(We(i),i=[],s=[],r=[],o=0,l&&(l=[])),n.fallback&&(s=[Et],r[0]=Z(I=>(i[0]=I,n.fallback())),o=1);else if(o===0){for(r=new Array(u),c=0;c=w&&$>=w&&s[_]===a[$];_--,$--)h[$]=r[_],m[$]=i[_],l&&(y[$]=l[_]);for(g=new Map,A=new Array($+1),c=$;c>=w;c--)R=a[c],f=g.get(R),A[c]=f===void 0?-1:f,g.set(R,c);for(f=w;f<=_;f++)R=s[f],c=g.get(R),c!==void 0&&c!==-1?(h[c]=r[f],m[c]=i[f],l&&(y[c]=l[f]),c=A[c],g.set(R,c)):i[f]();for(c=w;ce(t||{}))}function ue(){return!0}const Pe={get(e,t,n){return t===de?n:e.get(t)},has(e,t){return t===de?!0:e.has(t)},set:ue,deleteProperty:ue,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ue,deleteProperty:ue}},ownKeys(e){return e.keys()}};function ve(e){return(e=typeof e=="function"?e():e)?e:{}}function Ot(){for(let e=0,t=this.length;e=0;l--){const a=ve(e[l])[o];if(a!==void 0)return a}},has(o){for(let l=e.length-1;l>=0;l--)if(o in ve(e[l]))return!0;return!1},keys(){const o=[];for(let l=0;l=0;o--){const l=e[o];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let u=a.length-1;u>=0;u--){const f=a[u];if(f==="__proto__"||f==="constructor")continue;const c=Object.getOwnPropertyDescriptor(l,f);if(!s[f])s[f]=c.get?{enumerable:!0,configurable:!0,get:Ot.bind(n[f]=[c.get.bind(l)])}:c.value!==void 0?c:void 0;else{const p=n[f];p&&(c.get?p.push(c.get.bind(l)):c.value!==void 0&&p.push(()=>c.value))}}}const r={},i=Object.keys(s);for(let o=i.length-1;o>=0;o--){const l=i[o],a=s[l];a&&a.get?Object.defineProperty(r,l,a):r[l]=a?a.value:void 0}return r}function kt(e,...t){if(de in e){const r=new Set(t.length>1?t.flat():t[0]),i=t.map(o=>new Proxy({get(l){return o.includes(l)?e[l]:void 0},has(l){return o.includes(l)&&l in e},keys(){return o.filter(l=>l in e)}},Pe));return i.push(new Proxy({get(o){return r.has(o)?void 0:e[o]},has(o){return r.has(o)?!1:o in e},keys(){return Object.keys(e).filter(o=>!r.has(o))}},Pe)),i}const n={},s=t.map(()=>({}));for(const r of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,r),o=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let l=!1,a=0;for(const u of t)u.includes(r)&&(l=!0,o?s[a][r]=i.value:Object.defineProperty(s[a],r,i)),++a;l||(o?n[r]=i.value:Object.defineProperty(n,r,i))}return[...s,n]}const _t=e=>`Stale read from <${e}>.`;function Rt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return C(Lt(()=>e.each,e.children,t||void 0))}function re(e){const t=e.keyed,n=C(()=>e.when,void 0,{equals:(s,r)=>t?s===r:!s==!r});return C(()=>{const s=n();if(s){const r=e.children;return typeof r=="function"&&r.length>0?V(()=>r(t?s:()=>{if(!V(n))throw _t("Show");return e.when})):r}return e.fallback},void 0,void 0)}const jt=ie();function Nt(e){let t=0,n,s,r,i,o;const[l,a]=N(!1),u=Ct(),f={increment:()=>{++t===1&&a(!0)},decrement:()=>{--t===0&&a(!1)},inFallback:l,effects:[],resolved:!1},c=Re();if(L.context&&L.load){const A=L.getContextId();let h=L.load(A);if(h&&(typeof h!="object"||h.status!=="success"?r=h:L.gather(A)),r&&r!=="$$f"){const[m,y]=N(void 0,{equals:!1});i=m,r.then(()=>{if(L.done)return y();L.gather(A),ce(s),y(),ce()},w=>{o=w,y()})}}const p=X(jt);p&&(n=p.register(f.inFallback));let g;return pe(()=>g&&g()),v(u.Provider,{value:f,get children(){return C(()=>{if(o)throw o;if(s=L.context,i)return i(),i=void 0;s&&r==="$$f"&&ce();const A=C(()=>e.children);return C(h=>{const m=f.inFallback(),{showContent:y=!0,showFallback:w=!0}=n?n():{};if((!m||r&&r!=="$$f")&&y)return f.resolved=!0,g&&g(),g=s=r=void 0,At(f.effects),A();if(w)return g?h:Z(_=>(g=_,s&&(ce({id:s.id+"F",count:0}),s=void 0),e.fallback),c)})})}})}const Tt=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],It=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Tt]),Dt=new Set(["innerHTML","textContent","innerText","children"]),Ft=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Ut=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Vt(e,t){const n=Ut[e];return typeof n=="object"?n[t]?n.$:void 0:n}const qt=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);function Mt(e,t,n){let s=n.length,r=t.length,i=s,o=0,l=0,a=t[r-1].nextSibling,u=null;for(;of-l){const A=t[o];for(;l{r=i,t===document?e():F(t,e(),t.firstChild?null:void 0,n)},s.owner),()=>{r(),t.textContent=""}}function T(e,t,n){let s;const r=()=>{const o=document.createElement("template");return o.innerHTML=e,o.content.firstChild},i=()=>(s||(s=r())).cloneNode(!0);return i.cloneNode=i,i}function Ie(e,t=window.document){const n=t[Ge]||(t[Ge]=new Set);for(let s=0,r=e.length;sr.call(e,n[1],i))}else e.addEventListener(t,n)}function Wt(e,t,n={}){const s=Object.keys(t||{}),r=Object.keys(n);let i,o;for(i=0,o=r.length;ir.children=se(e,t.children,r.children)),B(()=>typeof t.ref=="function"&&Xt(t.ref,e)),B(()=>Jt(e,t,n,!0,r,!0)),r}function Xt(e,t,n){return V(()=>e(t,n))}function F(e,t,n,s){if(n!==void 0&&!s&&(s=[]),typeof t!="function")return se(e,t,s,n);B(r=>se(e,t(),r,n),s)}function Jt(e,t,n,s,r={},i=!1){t||(t={});for(const o in r)if(!(o in t)){if(o==="children")continue;r[o]=Xe(e,o,null,r[o],n,i)}for(const o in t){if(o==="children")continue;const l=t[o];r[o]=Xe(e,o,l,r[o],n,i)}}function we(e){return!!L.context&&!L.done&&(!e||e.isConnected)}function zt(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Qe(e,t,n){const s=t.trim().split(/\s+/);for(let r=0,i=s.length;rr===e))return;const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}}),L.registry&&!L.done&&(L.done=_$HY.done=!0);n;){const s=n[t];if(s&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?s.call(n,r,e):s.call(n,e),e.cancelBubble)return}n=n._$host||n.parentNode||n.host}}function se(e,t,n,s,r){const i=we(e);if(i){!n&&(n=[...e.childNodes]);let a=[];for(let u=0;u{let a=t();for(;typeof a=="function";)a=a();n=se(e,a,n,s)}),()=>n;if(Array.isArray(t)){const a=[],u=n&&Array.isArray(n);if(Oe(a,t,n,r))return B(()=>n=se(e,a,n,s,!0)),()=>n;if(i){if(!a.length)return n;if(s===void 0)return n=[...e.childNodes];let f=a[0];if(f.parentNode!==e)return n;const c=[f];for(;(f=f.nextSibling)!==s;)c.push(f);return n=c}if(a.length===0){if(n=Y(e,n,s),l)return n}else u?n.length===0?Je(e,a,s):Mt(e,n,a):(n&&Y(e),Je(e,a));n=a}else if(t.nodeType){if(i&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)return n=Y(e,n,s,t);Y(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Oe(e,t,n,s){let r=!1;for(let i=0,o=t.length;i=0;o--){const l=t[o];if(r!==l){const a=l.parentNode===e;!i&&!o?a?e.replaceChild(r,l):e.insertBefore(r,n):a&&l.remove()}else i=!0}}else e.insertBefore(r,n);return[r]}const Zt=!1;function at(){let e=new Set;function t(r){return e.add(r),()=>e.delete(r)}let n=!1;function s(r,i){if(n)return!(n=!1);const o={to:r,options:i,defaultPrevented:!1,preventDefault:()=>o.defaultPrevented=!0};for(const l of e)l.listener({...o,from:l.location,retry:a=>{a&&(n=!0),l.navigate(r,{...i,resolve:!1})}});return!o.defaultPrevented}return{subscribe:t,confirm:s}}let ke;function De(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),ke=window.history.state._depth}De();function en(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function tn(e,t){let n=!1;return()=>{const s=ke;De();const r=s==null?null:ke-s;if(n){n=!1;return}r&&t(r)?(n=!0,window.history.go(-r)):e()}}const nn=/^(?:[a-z0-9]+:)?\/\//i,rn=/^\/+|(\/)\/+$/g,ct="http://sr";function Q(e,t=!1){const n=e.replace(rn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function fe(e,t,n){if(nn.test(t))return;const s=Q(e),r=n&&Q(n);let i="";return!r||t.startsWith("/")?i=s:r.toLowerCase().indexOf(s.toLowerCase())!==0?i=s+r:i=r,(i||"/")+Q(t,!i)}function sn(e,t){if(e==null)throw new Error(t);return e}function on(e,t){return Q(e).replace(/\/*(\*.*)?$/g,"")+Q(t)}function ut(e){const t={};return e.searchParams.forEach((n,s)=>{t[s]=n}),t}function ln(e,t,n){const[s,r]=e.split("/*",2),i=s.split("/").filter(Boolean),o=i.length;return l=>{const a=l.split("/").filter(Boolean),u=a.length-o;if(u<0||u>0&&r===void 0&&!t)return null;const f={path:o?"":"/",params:{}},c=p=>n===void 0?void 0:n[p];for(let p=0;ps.localeCompare(e,void 0,{sensitivity:"base"})===0;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function an(e){const[t,n]=e.pattern.split("/*",2),s=t.split("/").filter(Boolean);return s.reduce((r,i)=>r+(i.startsWith(":")?2:3),s.length-(n===void 0?0:1))}function ft(e){const t=new Map,n=Re();return new Proxy({},{get(s,r){return t.has(r)||tt(n,()=>t.set(r,C(()=>e()[r]))),t.get(r)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function dt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),s=e.slice(t.index+t[0].length);const r=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(s);)r.push(n+=t[1]),s=s.slice(t[0].length);return dt(s).reduce((i,o)=>[...i,...r.map(l=>l+o)],[])}const cn=100,ht=ie(),Fe=ie(),Ue=()=>sn(X(ht)," and 'use' router primitives can be only used inside a Route."),un=()=>X(Fe)||Ue().base,fn=e=>{const t=un();return C(()=>t.resolvePath(e()))},dn=e=>{const t=Ue();return C(()=>{const n=e();return n!==void 0?t.renderPath(n):n})},hn=()=>Ue().location;function gn(e,t=""){const{component:n,load:s,children:r,info:i}=e,o=!r||Array.isArray(r)&&!r.length,l={key:e,component:n,load:s,info:i};return gt(e.path).reduce((a,u)=>{for(const f of dt(u)){const c=on(t,f);let p=o?c:c.split("/*",1)[0];p=p.split("/").map(g=>g.startsWith(":")||g.startsWith("*")?g:encodeURIComponent(g)).join("/"),a.push({...l,originalPath:u,pattern:p,matcher:ln(p,!o,e.matchFilters)})}return a},[])}function mn(e,t=0){return{routes:e,score:an(e[e.length-1])*1e4-t,matcher(n){const s=[];for(let r=e.length-1;r>=0;r--){const i=e[r],o=i.matcher(n);if(!o)return null;s.unshift({...o,route:i})}return s}}}function gt(e){return Array.isArray(e)?e:[e]}function mt(e,t="",n=[],s=[]){const r=gt(e);for(let i=0,o=r.length;io.score-i.score)}function Ae(e,t){for(let n=0,s=e.length;n{const u=e();try{return new URL(u,n)}catch{return console.error(`Invalid path ${u}`),a}},n,{equals:(a,u)=>a.href===u.href}),r=C(()=>s().pathname),i=C(()=>s().search,!0),o=C(()=>s().hash),l=()=>"";return{get pathname(){return r()},get search(){return i()},get hash(){return o()},get state(){return t()},get key(){return l()},query:ft(_e(i,()=>ut(s())))}}let W;function wn(){return W}function yn(e,t,n,s={}){const{signal:[r,i],utils:o={}}=e,l=o.parsePath||(x=>x),a=o.renderPath||(x=>x),u=o.beforeLeave||at(),f=fe("",s.base||"");if(f===void 0)throw new Error(`${f} is not a valid base path`);f&&!r().value&&i({value:f,replace:!0,scroll:!1});const[c,p]=N(!1);let g;const A=(x,E)=>{E.value===h()&&E.state===y()||(g===void 0&&p(!0),W=x,g=E,St(()=>{g===E&&(m(g.value),w(g.state),R[1]([]))}).finally(()=>{g===E&&vt(()=>{W=void 0,x==="navigate"&&O(g),p(!1),g=void 0})}))},[h,m]=N(r().value),[y,w]=N(r().state),_=pn(h,y),$=[],R=N([]),I=C(()=>typeof s.transformUrl=="function"?Ae(t(),s.transformUrl(_.pathname)):Ae(t(),_.pathname)),le=ft(()=>{const x=I(),E={};for(let q=0;qf,outlet:()=>null,resolvePath(x){return fe(f,x)}};return B(_e(r,x=>A("native",x),{defer:!0})),{base:J,location:_,params:le,isRouting:c,renderPath:a,parsePath:l,navigatorFactory:P,matches:I,beforeLeave:u,preloadRoute:k,singleFlight:s.singleFlight===void 0?!0:s.singleFlight,submissions:R};function ee(x,E,q){V(()=>{if(typeof E=="number"){E&&(o.go?o.go(E):console.warn("Router integration does not support relative routing"));return}const{replace:ye,resolve:be,scroll:z,state:ae}={replace:!1,resolve:!0,scroll:!0,...q},H=be?x.resolvePath(E):fe("",E);if(H===void 0)throw new Error(`Path '${E}' is not a routable path`);if($.length>=cn)throw new Error("Too many redirects");const qe=h();(H!==qe||ae!==y())&&(Zt||u.confirm(H,q)&&($.push({value:qe,replace:ye,scroll:z,state:y()}),A("navigate",{value:H,state:ae})))})}function P(x){return x=x||X(Fe)||J,(E,q)=>ee(x,E,q)}function O(x){const E=$[0];E&&(i({...x,replace:E.replace,scroll:E.scroll}),$.length=0)}function k(x,E={}){const q=Ae(t(),x.pathname),ye=W;W="preload";for(let be in q){const{route:z,params:ae}=q[be];z.component&&z.component.preload&&z.component.preload();const{load:H}=z;E.preloadData&&H&&tt(n(),()=>H({params:ae,location:{pathname:x.pathname,search:x.search,hash:x.hash,query:ut(x),state:null,key:""},intent:"preload"}))}W=ye}}function bn(e,t,n,s){const{base:r,location:i,params:o}=e,{pattern:l,component:a,load:u}=s().route,f=C(()=>s().path);a&&a.preload&&a.preload();const c=u?u({params:o,location:i,intent:W||"initial"}):void 0;return{parent:t,pattern:l,path:f,outlet:()=>a?v(a,{params:o,location:i,data:c,get children(){return n()}}):n(),resolvePath(g){return fe(r.path(),g,f())}}}const xn=e=>t=>{const{base:n}=t,s=je(()=>t.children),r=C(()=>mt(s(),t.base||""));let i;const o=yn(e,r,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(o),v(ht.Provider,{value:o,get children(){return v(vn,{routerState:o,get root(){return t.root},get load(){return t.rootLoad},get children(){return[C(()=>(i=Re())&&null),v(Sn,{routerState:o,get branches(){return r()}})]}})}})};function vn(e){const t=e.routerState.location,n=e.routerState.params,s=C(()=>e.load&&V(()=>{e.load({params:n,location:t,intent:wn()||"initial"})}));return v(re,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:r=>v(r,{params:n,location:t,get data(){return s()},get children(){return e.children}})})}function Sn(e){const t=[];let n;const s=C(_e(e.routerState.matches,(r,i,o)=>{let l=i&&r.length===i.length;const a=[];for(let u=0,f=r.length;u{t[u]=g,a[u]=bn(e.routerState,a[u-1]||e.routerState.base,ze(()=>s()[u+1]),()=>e.routerState.matches()[u])}))}return t.splice(r.length).forEach(u=>u()),o&&l?o:(n=a[0],a)}));return ze(()=>s()&&n)()}const ze=e=>()=>v(re,{get when(){return e()},keyed:!0,children:t=>v(Fe.Provider,{value:t,get children(){return t.outlet()}})}),Ye=e=>{const t=je(()=>e.children);return Ee(e,{get children(){return t()}})};function An([e,t],n,s){return[e,s?r=>t(s(r)):t]}function Cn(e){if(e==="#")return null;try{return document.querySelector(e)}catch{return null}}function $n(e){let t=!1;const n=r=>typeof r=="string"?{value:r}:r,s=An(N(n(e.get()),{equals:(r,i)=>r.value===i.value&&r.state===i.state}),void 0,r=>(!t&&e.set(r),r));return e.init&&pe(e.init((r=e.get())=>{t=!0,s[1](n(r)),t=!1})),xn({signal:s,create:e.create,utils:e.utils})}function Pn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function En(e,t){const n=Cn(`#${e}`);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Ln=new Map;function On(e=!0,t=!1,n="/_server",s){return r=>{const i=r.base.path(),o=r.navigatorFactory(r.base);let l={};function a(h){return h.namespaceURI==="http://www.w3.org/2000/svg"}function u(h){if(h.defaultPrevented||h.button!==0||h.metaKey||h.altKey||h.ctrlKey||h.shiftKey)return;const m=h.composedPath().find(I=>I instanceof Node&&I.nodeName.toUpperCase()==="A");if(!m||t&&!m.hasAttribute("link"))return;const y=a(m),w=y?m.href.baseVal:m.href;if((y?m.target.baseVal:m.target)||!w&&!m.hasAttribute("state"))return;const $=(m.getAttribute("rel")||"").split(/\s+/);if(m.hasAttribute("download")||$&&$.includes("external"))return;const R=y?new URL(w,document.baseURI):new URL(w);if(!(R.origin!==window.location.origin||i&&R.pathname&&!R.pathname.toLowerCase().startsWith(i.toLowerCase())))return[m,R]}function f(h){const m=u(h);if(!m)return;const[y,w]=m,_=r.parsePath(w.pathname+w.search+w.hash),$=y.getAttribute("state");h.preventDefault(),o(_,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:$&&JSON.parse($)})}function c(h){const m=u(h);if(!m)return;const[y,w]=m;typeof s=="function"&&(w.pathname=s(w.pathname)),l[w.pathname]||r.preloadRoute(w,{preloadData:y.getAttribute("preload")!=="false"})}function p(h){const m=u(h);if(!m)return;const[y,w]=m;typeof s=="function"&&(w.pathname=s(w.pathname)),!l[w.pathname]&&(l[w.pathname]=setTimeout(()=>{r.preloadRoute(w,{preloadData:y.getAttribute("preload")!=="false"}),delete l[w.pathname]},200))}function g(h){const m=u(h);if(!m)return;const[,y]=m;typeof s=="function"&&(y.pathname=s(y.pathname)),l[y.pathname]&&(clearTimeout(l[y.pathname]),delete l[y.pathname])}function A(h){if(h.defaultPrevented)return;let m=h.submitter&&h.submitter.hasAttribute("formaction")?h.submitter.getAttribute("formaction"):h.target.getAttribute("action");if(!m)return;if(!m.startsWith("https://action/")){const w=new URL(m,ct);if(m=r.parsePath(w.pathname+w.search),!m.startsWith(n))return}if(h.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=Ln.get(m);if(y){h.preventDefault();const w=new FormData(h.target);h.submitter&&h.submitter.name&&w.append(h.submitter.name,h.submitter.value),y.call({r,f:h.target},w)}}Ie(["click","submit"]),document.addEventListener("click",f),e&&(document.addEventListener("mouseover",p),document.addEventListener("mouseout",g),document.addEventListener("focusin",c),document.addEventListener("touchstart",c)),document.addEventListener("submit",A),pe(()=>{document.removeEventListener("click",f),e&&(document.removeEventListener("mouseover",p),document.removeEventListener("mouseout",g),document.removeEventListener("focusin",c),document.removeEventListener("touchstart",c)),document.removeEventListener("submit",A)})}}function kn(e){const t=()=>{const s=window.location.pathname+window.location.search;return{value:e.transformUrl?e.transformUrl(s)+window.location.hash:s+window.location.hash,state:window.history.state}},n=at();return $n({get:t,set({value:s,replace:r,scroll:i,state:o}){r?window.history.replaceState(en(o),"",s):window.history.pushState(o,"",s),En(decodeURIComponent(window.location.hash.slice(1)),i),De()},init:s=>Pn(window,"popstate",tn(s,r=>{if(r&&r<0)return!n.confirm(r);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:On(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:s=>window.history.go(s),beforeLeave:n}})(e)}var _n=T("");function G(e){e=Ee({inactiveClass:"inactive",activeClass:"active"},e);const[,t]=kt(e,["href","state","class","activeClass","inactiveClass","end"]),n=fn(()=>e.href),s=dn(n),r=hn(),i=C(()=>{const o=n();if(o===void 0)return[!1,!1];const l=Q(o.split(/[?#]/,1)[0]).toLowerCase(),a=Q(r.pathname).toLowerCase();return[e.end?l===a:a.startsWith(l+"/")||a===l,l===a]});return(()=>{var o=_n();return Qt(o,Ee(t,{get href(){return s()||e.href},get state(){return JSON.stringify(e.state)},get classList(){return{...e.class&&{[e.class]:!0},[e.inactiveClass]:!i()[0],[e.activeClass]:i()[0],...t.classList}},link:"",get"aria-current"(){return i()[1]?"page":void 0}}),!1),o})()}var Rn=T('