@kimuson/claude-code-viewer 0.6.0-beta.3 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -12
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/dist/static/assets/{ProtectedRoute-edQHkSob.js → ProtectedRoute-KMCDjFpr.js} +1 -1
- package/dist/static/assets/{eye-9sEkIEDN.js → eye-DsqhY3YQ.js} +1 -1
- package/dist/static/assets/{index-mNk1AK9F.js → index-BU5VCG8M.js} +1 -1
- package/dist/static/assets/{index-C6F_DxvV.js → index-BUy-hZ_L.js} +1 -1
- package/dist/static/assets/{index-DwUYpLCb.js → index-DhqtKAUx.js} +2 -2
- package/dist/static/assets/{label-CkiWXRUG.js → label-Bx75JYJV.js} +1 -1
- package/dist/static/assets/{login-DJTmdJXo.js → login-CIKB0Oew.js} +1 -1
- package/dist/static/assets/{session-Cb2uALII.js → session-D50bOHyT.js} +25 -25
- package/dist/static/assets/{session-CdGXKJhs.js → session-WhX_gGJt.js} +1 -1
- package/dist/static/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,r as c,X as T,j as s,W as D,P,S as $,M as j,V as N,K,a7 as W,u as X,a as G}from"./index-
|
|
1
|
+
import{c as y,r as c,X as T,j as s,W as D,P,S as $,M as j,V as N,K,a7 as W,u as X,a as G}from"./index-DhqtKAUx.js";const U=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],V=y("check",U);const Z=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ce=y("chevron-right",Z);const J=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],ae=y("folder",J);const Q=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ie=y("plus",Q);function Y(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function ee(e){const[t,o]=c.useState(void 0);return T(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});const d=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const r=n[0];let u,l;if("borderBoxSize"in r){const a=r.borderBoxSize,f=Array.isArray(a)?a[0]:a;u=f.inlineSize,l=f.blockSize}else u=e.offsetWidth,l=e.offsetHeight;o({width:u,height:l})});return d.observe(e,{box:"border-box"}),()=>d.unobserve(e)}else o(void 0)},[e]),t}var _="Checkbox",[te]=K(_),[re,S]=te(_);function oe(e){const{__scopeCheckbox:t,checked:o,children:d,defaultChecked:n,disabled:r,form:u,name:l,onCheckedChange:a,required:f,value:x="on",internal_do_not_use_render:p}=e,[b,m]=$({prop:o,defaultProp:n??!1,onChange:a,caller:_}),[v,C]=c.useState(null),[g,i]=c.useState(null),h=c.useRef(!1),E=v?!!u||!!v.closest("form"):!0,R={checked:b,disabled:r,setChecked:m,control:v,setControl:C,name:l,form:u,value:x,hasConsumerStoppedPropagationRef:h,required:f,defaultChecked:k(n)?!1:n,isFormControl:E,bubbleInput:g,setBubbleInput:i};return s.jsx(re,{scope:t,...R,children:ne(p)?p(R):d})}var w="CheckboxTrigger",z=c.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...d},n)=>{const{control:r,value:u,disabled:l,checked:a,required:f,setControl:x,setChecked:p,hasConsumerStoppedPropagationRef:b,isFormControl:m,bubbleInput:v}=S(w,e),C=j(n,x),g=c.useRef(a);return c.useEffect(()=>{const i=r?.form;if(i){const h=()=>p(g.current);return i.addEventListener("reset",h),()=>i.removeEventListener("reset",h)}},[r,p]),s.jsx(P.button,{type:"button",role:"checkbox","aria-checked":k(a)?"mixed":a,"aria-required":f,"data-state":q(a),"data-disabled":l?"":void 0,disabled:l,value:u,...d,ref:C,onKeyDown:N(t,i=>{i.key==="Enter"&&i.preventDefault()}),onClick:N(o,i=>{p(h=>k(h)?!0:!h),v&&m&&(b.current=i.isPropagationStopped(),b.current||i.stopPropagation())})})});z.displayName=w;var A=c.forwardRef((e,t)=>{const{__scopeCheckbox:o,name:d,checked:n,defaultChecked:r,required:u,disabled:l,value:a,onCheckedChange:f,form:x,...p}=e;return s.jsx(oe,{__scopeCheckbox:o,checked:n,defaultChecked:r,disabled:l,required:u,onCheckedChange:f,name:d,form:x,value:a,internal_do_not_use_render:({isFormControl:b})=>s.jsxs(s.Fragment,{children:[s.jsx(z,{...p,ref:t,__scopeCheckbox:o}),b&&s.jsx(L,{__scopeCheckbox:o})]})})});A.displayName=_;var M="CheckboxIndicator",B=c.forwardRef((e,t)=>{const{__scopeCheckbox:o,forceMount:d,...n}=e,r=S(M,o);return s.jsx(D,{present:d||k(r.checked)||r.checked===!0,children:s.jsx(P.span,{"data-state":q(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});B.displayName=M;var F="CheckboxBubbleInput",L=c.forwardRef(({__scopeCheckbox:e,...t},o)=>{const{control:d,hasConsumerStoppedPropagationRef:n,checked:r,defaultChecked:u,required:l,disabled:a,name:f,value:x,form:p,bubbleInput:b,setBubbleInput:m}=S(F,e),v=j(o,m),C=Y(r),g=ee(d);c.useEffect(()=>{const h=b;if(!h)return;const E=window.HTMLInputElement.prototype,I=Object.getOwnPropertyDescriptor(E,"checked").set,H=!n.current;if(C!==r&&I){const O=new Event("click",{bubbles:H});h.indeterminate=k(r),I.call(h,k(r)?!1:r),h.dispatchEvent(O)}},[b,C,r,n]);const i=c.useRef(k(r)?!1:r);return s.jsx(P.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??i.current,required:l,disabled:a,name:f,value:x,form:p,...t,tabIndex:-1,ref:v,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});L.displayName=F;function ne(e){return typeof e=="function"}function k(e){return e==="indeterminate"}function q(e){return k(e)?"indeterminate":e?"checked":"unchecked"}function de({className:e,...t}){return s.jsx(A,{"data-slot":"checkbox",className:W("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(B,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:s.jsx(V,{className:"size-3.5"})})})}function ue({children:e}){const{isAuthenticated:t}=X(),o=G();return c.useEffect(()=>{t||o({to:"/login"})},[t,o]),t?s.jsx(s.Fragment,{children:e}):null}export{de as C,ae as F,ie as P,ce as a,ue as b,Y as c,V as d,ee as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c}from"./index-
|
|
1
|
+
import{c}from"./index-DhqtKAUx.js";const e=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r=c("eye",e);export{r as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n,u as a,r as o,j as s,L as r}from"./index-
|
|
1
|
+
import{a as n,u as a,r as o,j as s,L as r}from"./index-DhqtKAUx.js";function c(){const e=n(),{isAuthenticated:t}=a();return o.useEffect(()=>{e(t?{to:"/projects"}:{to:"/login"})},[t,e]),s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:s.jsx(r,{className:"h-8 w-8 animate-spin text-muted-foreground"})})}export{c as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g,p as j,h as N,j as e,C as v,b as w,d as y,e as P,f as h,T as s,i as C,B as l,k as b,r as o,l as k,m as D,a as _,n as F,t as u,o as L,D as S,q as I,s as E,v as q,w as T,x as H,y as M,L as Q}from"./index-
|
|
1
|
+
import{g,p as j,h as N,j as e,C as v,b as w,d as y,e as P,f as h,T as s,i as C,B as l,k as b,r as o,l as k,m as D,a as _,n as F,t as u,o as L,D as S,q as I,s as E,v as q,w as T,x as H,y as M,L as Q}from"./index-DhqtKAUx.js";import{F as p,C as R,a as $,P as A,b as B}from"./ProtectedRoute-KMCDjFpr.js";import{L as K}from"./label-Bx75JYJV.js";const O=()=>g({queryKey:j.queryKey,queryFn:j.queryFn}),W=()=>{const{data:{projects:n}}=O(),{config:c}=N();return n.length,e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(t=>e.jsxs(v,{className:"hover:shadow-md transition-shadow",children:[e.jsxs(w,{children:[e.jsxs(y,{className:"flex items-center gap-2 justify-start items-start",children:[e.jsx(p,{className:"w-5 h-5 flex-shrink-0"}),e.jsx("span",{className:"text-wrap flex-1",children:t.meta.projectName??t.claudeProjectPath})]}),t.meta.projectPath?e.jsx(P,{children:t.meta.projectPath}):null]}),e.jsxs(h,{className:"space-y-2",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx(s,{id:"project_list.last_modified"})," ",t.lastModifiedAt?C(t.lastModifiedAt,{locale:c.locale,target:"time"}):""]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[e.jsx(s,{id:"project_list.messages"})," ",t.meta.sessionCount]})]}),e.jsx(h,{className:"pt-0",children:e.jsx(l,{asChild:!0,className:"w-full",children:e.jsx(b,{to:"/projects/$projectId/session",params:{projectId:t.id},children:e.jsx(s,{id:"project_list.view_conversations"})})})})]},t.id))})},z=({onPathChange:n})=>{const[c,t]=o.useState(void 0),[d,x]=o.useState(!1),{data:r,isLoading:i}=k(D(c,d));o.useEffect(()=>{r?.currentPath&&n(r.currentPath)},[r?.currentPath,n]);const m=a=>{if(a===""){t(void 0);return}const f=`/${a}`;t(f)};return e.jsxs("div",{className:"border rounded-md",children:[e.jsx("div",{className:"p-3 border-b bg-muted/50",children:e.jsxs("p",{className:"text-sm font-medium",children:[e.jsx(s,{id:"directory_picker.current"})," ",e.jsx("span",{className:"font-mono",children:r?.currentPath||"~"})]})}),e.jsxs("div",{className:"p-3 border-b flex items-center gap-2",children:[e.jsx(R,{id:"show-hidden",checked:d,onCheckedChange:a=>x(a===!0)}),e.jsx(K,{htmlFor:"show-hidden",className:"text-sm cursor-pointer",children:e.jsx(s,{id:"directory_picker.show_hidden"})})]}),e.jsx("div",{className:"max-h-96 overflow-auto",children:i?e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:e.jsx(s,{id:"directory_picker.loading"})}):r?.entries&&r.entries.length>0?e.jsx("div",{className:"divide-y",children:r.entries.filter(a=>a.type==="directory").filter(a=>d||a.name===".."||!a.name.startsWith(".")).map(a=>e.jsxs("button",{type:"button",onClick:()=>m(a.path),className:"w-full px-3 py-2 flex items-center gap-2 hover:bg-muted/50 transition-colors text-left",children:[a.name===".."?e.jsx($,{className:"w-4 h-4 rotate-180"}):e.jsx(p,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm",children:a.name})]},a.path))}):e.jsx("div",{className:"p-8 text-center text-sm text-muted-foreground",children:e.jsx(s,{id:"directory_picker.no_directories"})})})]})},G=()=>{const[n,c]=o.useState(!1),[t,d]=o.useState(""),x=_(),r=F({mutationFn:async()=>{const i=await L.api.projects.$post({json:{projectPath:t}});if(!i.ok)throw new Error("Failed to set up project");return await i.json()},onSuccess:i=>{u.success("Project set up successfully"),c(!1),x({to:"/projects/$projectId/session",params:{projectId:i.projectId},search:m=>({...m,sessionId:i.sessionId})})},onError:i=>{u.error(i instanceof Error?i.message:"Failed to set up project")}});return e.jsxs(S,{open:n,onOpenChange:c,children:[e.jsx(I,{asChild:!0,children:e.jsxs(l,{"data-testid":"new-project-button",children:[e.jsx(A,{className:"w-4 h-4 mr-2"}),e.jsx(s,{id:"project.new"})]})}),e.jsxs(E,{className:"max-w-2xl","data-testid":"new-project-modal",children:[e.jsxs(q,{children:[e.jsx(T,{children:e.jsx(s,{id:"project.setup.title"})}),e.jsx(H,{children:e.jsx(s,{id:"project.setup.description",components:{0:e.jsx("code",{className:"text-sm bg-muted px-1 py-0.5 rounded"})}})})]}),e.jsx("div",{className:"py-4",children:e.jsx(z,{onPathChange:d})}),e.jsxs(M,{children:[e.jsx(l,{variant:"outline",onClick:()=>c(!1),children:e.jsx(s,{id:"common.action.cancel"})}),e.jsx(l,{onClick:async()=>await r.mutateAsync(),disabled:!t||r.isPending,children:r.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Q,{className:"w-4 h-4 mr-2 animate-spin"}),e.jsx(s,{id:"project.setup.action.setting_up"})]}):e.jsx(s,{id:"project.setup.action.setup"})})]})]})]})},J=()=>e.jsx("div",{className:"flex h-screen max-h-screen overflow-hidden",children:e.jsx("div",{className:"flex-1 overflow-auto",children:e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsx("header",{className:"mb-8",children:e.jsx("p",{className:"text-muted-foreground",children:e.jsx(s,{id:"projects.page.description"})})}),e.jsx("main",{children:e.jsxs("section",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h2",{className:"text-xl font-semibold",children:e.jsx(s,{id:"projects.page.title"})}),e.jsx(G,{})]}),e.jsx(o.Suspense,{fallback:e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx("div",{className:"text-muted-foreground",children:e.jsx(s,{id:"projects.page.loading"})})}),children:e.jsx(W,{})})]})})]})})});function Y(){return e.jsx(B,{children:e.jsx(J,{})})}export{Y as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-CIKB0Oew.js","assets/label-Bx75JYJV.js","assets/eye-DsqhY3YQ.js","assets/index-BUy-hZ_L.js","assets/ProtectedRoute-KMCDjFpr.js","assets/session-D50bOHyT.js","assets/session-DDGTF8rc.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
function CD(e,t){for(var i=0;i<t.length;i++){const o=t[i];if(typeof o!="string"&&!Array.isArray(o)){for(const r in o)if(r!=="default"&&!(r in e)){const s=Object.getOwnPropertyDescriptor(o,r);s&&Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>o[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const u of s.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&o(u)}).observe(document,{childList:!0,subtree:!0});function i(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(r){if(r.ep)return;r.ep=!0;const s=i(r);fetch(r.href,s)}})();function tp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hm={exports:{}},xs={};var g0;function jD(){if(g0)return xs;g0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(o,r,s){var u=null;if(s!==void 0&&(u=""+s),r.key!==void 0&&(u=""+r.key),"key"in r){s={};for(var d in r)d!=="key"&&(s[d]=r[d])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:u,ref:r!==void 0?r:null,props:s}}return xs.Fragment=t,xs.jsx=i,xs.jsxs=i,xs}var v0;function RD(){return v0||(v0=1,Hm.exports=jD()),Hm.exports}var E=RD();const uo=new WeakMap,Jc=new WeakMap,iu={current:[]};let Vm=!1,Ms=0;const Rs=new Set,Nc=new Map;function uw(e){const t=Array.from(e).sort((i,o)=>i instanceof fo&&i.options.deps.includes(o)?1:o instanceof fo&&o.options.deps.includes(i)?-1:0);for(const i of t){if(iu.current.includes(i))continue;iu.current.push(i),i.recompute();const o=Jc.get(i);if(o)for(const r of o){const s=uo.get(r);s&&uw(s)}}}function AD(e){const t={prevVal:e.prevState,currentVal:e.state};for(const i of e.listeners)i(t)}function ND(e){const t={prevVal:e.prevState,currentVal:e.state};for(const i of e.listeners)i(t)}function dw(e){if(Ms>0&&!Nc.has(e)&&Nc.set(e,e.prevState),Rs.add(e),!(Ms>0)&&!Vm)try{for(Vm=!0;Rs.size>0;){const t=Array.from(Rs);Rs.clear();for(const i of t){const o=Nc.get(i)??i.prevState;i.prevState=o,AD(i)}for(const i of t){const o=uo.get(i);o&&(iu.current.push(i),uw(o))}for(const i of t){const o=uo.get(i);if(o)for(const r of o)ND(r)}}}finally{Vm=!1,iu.current=[],Nc.clear()}}function MD(e){Ms++;try{e()}finally{if(Ms--,Ms===0){const t=Rs.values().next().value;t&&dw(t)}}}function UD(e){return typeof e=="function"}class kh{constructor(t,i){this.listeners=new Set,this.subscribe=o=>{var r,s;this.listeners.add(o);const u=(s=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:s.call(r,o,this);return()=>{this.listeners.delete(o),u?.()}},this.prevState=t,this.state=t,this.options=i}setState(t){var i,o,r;this.prevState=this.state,(i=this.options)!=null&&i.updateFn?this.state=this.options.updateFn(this.prevState)(t):UD(t)?this.state=t(this.prevState):this.state=t,(r=(o=this.options)==null?void 0:o.onUpdate)==null||r.call(o),dw(this)}}class fo{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const i=this.options.deps.length,o=new Array(i),r=new Array(i);for(let s=0;s<i;s++){const u=this.options.deps[s];o[s]=u.prevState,r[s]=u.state}return this.lastSeenDepValues=r,{prevDepVals:o,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=>{var i,o;this.prevState=this.state;const r=this.getDepVals();this.state=this.options.fn(r),(o=(i=this.options).onUpdate)==null||o.call(i)},this.checkIfRecalculationNeededDeeply=()=>{for(const s of this.options.deps)s instanceof fo&&s.checkIfRecalculationNeededDeeply();let i=!1;const o=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let s=0;s<r.length;s++)if(r[s]!==o[s]){i=!0;break}i&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const i of this._subscriptions)i()}),this.subscribe=i=>{var o,r;this.listeners.add(i);const s=(r=(o=this.options).onSubscribe)==null?void 0:r.call(o,i,this);return()=>{this.listeners.delete(i),s?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const i of t)if(i instanceof fo)i.registerOnGraph(),this.registerOnGraph(i.options.deps);else if(i instanceof kh){let o=uo.get(i);o||(o=new Set,uo.set(i,o)),o.add(this);let r=Jc.get(this);r||(r=new Set,Jc.set(this,r)),r.add(i)}}unregisterFromGraph(t=this.options.deps){for(const i of t)if(i instanceof fo)this.unregisterFromGraph(i.options.deps);else if(i instanceof kh){const o=uo.get(i);o&&o.delete(this);const r=Jc.get(this);r&&r.delete(i)}}}const mi="__TSR_index",y0="popstate",b0="beforeunload";function ID(e){let t=e.getLocation();const i=new Set,o=u=>{t=e.getLocation(),i.forEach(d=>d({location:t,action:u}))},r=u=>{e.notifyOnIndexChange??!0?o(u):t=e.getLocation()},s=async({task:u,navigateOpts:d,...p})=>{if(d?.ignoreBlocker??!1){u();return}const v=e.getBlockers?.()??[],g=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&v.length&&g)for(const b of v){const _=au(p.path,p.state);if(await b.blockerFn({currentLocation:t,nextLocation:_,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:i,subscribe:u=>(i.add(u),()=>{i.delete(u)}),push:(u,d,p)=>{const h=t.state[mi];d=_0(h+1,d),s({task:()=>{e.pushState(u,d),o({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:d})},replace:(u,d,p)=>{const h=t.state[mi];d=_0(h,d),s({task:()=>{e.replaceState(u,d),o({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:d})},go:(u,d)=>{s({task:()=>{e.go(u),r({type:"GO",index:u})},navigateOpts:d,type:"GO"})},back:u=>{s({task:()=>{e.back(u?.ignoreBlocker??!1),r({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{s({task:()=>{e.forward(u?.ignoreBlocker??!1),r({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[mi]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const d=e.getBlockers?.()??[];return e.setBlockers([...d,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:o}}function _0(e,t){t||(t={});const i=np();return{...t,key:i,__TSR_key:i,[mi]:e}}function PD(e){const t=typeof document<"u"?window:void 0,i=t.history.pushState,o=t.history.replaceState;let r=[];const s=()=>r,u=A=>r=A,d=(A=>A),p=(()=>au(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const A=np();t.history.replaceState({[mi]:0,key:A,__TSR_key:A},"")}let h=p(),v,g=!1,b=!1,_=!1,x=!1;const w=()=>h;let z,T;const N=()=>{z&&(B._ignoreSubscribers=!0,(z.isPush?t.history.pushState:t.history.replaceState)(z.state,"",z.href),B._ignoreSubscribers=!1,z=void 0,T=void 0,v=void 0)},P=(A,Y,se)=>{const oe=d(Y);T||(v=h),h=au(Y,se),z={href:oe,state:se,isPush:z?.isPush||A==="push"},T||(T=Promise.resolve().then(()=>N()))},M=A=>{h=p(),B.notify({type:A})},K=async()=>{if(b){b=!1;return}const A=p(),Y=A.state[mi]-h.state[mi],se=Y===1,oe=Y===-1,ae=!se&&!oe||g;g=!1;const pe=ae?"GO":oe?"BACK":"FORWARD",ge=ae?{type:"GO",index:Y}:{type:oe?"BACK":"FORWARD"};if(_)_=!1;else{const Ue=s();if(typeof document<"u"&&Ue.length){for(const R of Ue)if(await R.blockerFn({currentLocation:h,nextLocation:A,action:pe})){b=!0,t.history.go(1),B.notify(ge);return}}}h=p(),B.notify(ge)},ee=A=>{if(x){x=!1;return}let Y=!1;const se=s();if(typeof document<"u"&&se.length)for(const oe of se){const ae=oe.enableBeforeUnload??!0;if(ae===!0){Y=!0;break}if(typeof ae=="function"&&ae()===!0){Y=!0;break}}if(Y)return A.preventDefault(),A.returnValue=""},B=ID({getLocation:w,getLength:()=>t.history.length,pushState:(A,Y)=>P("push",A,Y),replaceState:(A,Y)=>P("replace",A,Y),back:A=>(A&&(_=!0),x=!0,t.history.back()),forward:A=>{A&&(_=!0),x=!0,t.history.forward()},go:A=>{g=!0,t.history.go(A)},createHref:A=>d(A),flush:N,destroy:()=>{t.history.pushState=i,t.history.replaceState=o,t.removeEventListener(b0,ee,{capture:!0}),t.removeEventListener(y0,K)},onBlocked:()=>{v&&h!==v&&(h=v)},getBlockers:s,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(b0,ee,{capture:!0}),t.addEventListener(y0,K),t.history.pushState=function(...A){const Y=i.apply(t.history,A);return B._ignoreSubscribers||M("PUSH"),Y},t.history.replaceState=function(...A){const Y=o.apply(t.history,A);return B._ignoreSubscribers||M("REPLACE"),Y},B}function LD(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function au(e,t){const i=LD(e),o=i.indexOf("#"),r=i.indexOf("?"),s=np();return{href:i,pathname:i.substring(0,o>0?r>0?Math.min(o,r):o:r>0?r:i.length),hash:o>-1?i.substring(o):"",search:r>-1?i.slice(r,o===-1?void 0:o):"",state:t||{[mi]:0,key:s,__TSR_key:s}}}function np(){return(Math.random()+1).toString(36).substring(7)}const ZD=!1;function Us(e){let t;return MD(()=>{t=e()}),t}function Is(e){return e[e.length-1]}function BD(e){return typeof e=="function"}function ui(e,t){return BD(e)?e(t):e}const qD=Object.prototype.hasOwnProperty,S0=Object.prototype.propertyIsEnumerable;function mn(e,t,i=0){if(e===t)return e;if(i>500)return t;const o=t,r=$0(e)&&$0(o);if(!r&&!(ou(e)&&ou(o)))return o;const s=r?e:w0(e);if(!s)return o;const u=r?o:w0(o);if(!u)return o;const d=s.length,p=u.length,h=r?new Array(p):{};let v=0;for(let g=0;g<p;g++){const b=r?g:u[g],_=e[b],x=o[b];if(_===x){h[b]=_,(r?g<d:qD.call(e,b))&&v++;continue}if(_===null||x===null||typeof _!="object"||typeof x!="object"){h[b]=x;continue}const w=mn(_,x,i+1);h[b]=w,w===_&&v++}return d===p&&v===d?e:h}function w0(e){const t=Object.getOwnPropertyNames(e);for(const r of t)if(!S0.call(e,r))return!1;const i=Object.getOwnPropertySymbols(e);if(i.length===0)return t;const o=t;for(const r of i){if(!S0.call(e,r))return!1;o.push(r)}return o}function ou(e){if(!x0(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const i=t.prototype;return!(!x0(i)||!i.hasOwnProperty("isPrototypeOf"))}function x0(e){return Object.prototype.toString.call(e)==="[object Object]"}function $0(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ea(e,t,i){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let o=0,r=e.length;o<r;o++)if(!ea(e[o],t[o],i))return!1;return!0}if(ou(e)&&ou(t)){const o=i?.ignoreUndefined??!0;if(i?.partial){for(const u in t)if((!o||t[u]!==void 0)&&!ea(e[u],t[u],i))return!1;return!0}let r=0;if(!o)r=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&r++;let s=0;for(const u in t)if((!o||t[u]!==void 0)&&(s++,s>r||!ea(e[u],t[u],i)))return!1;return r===s}return!1}function go(e){let t,i;const o=new Promise((r,s)=>{t=r,i=s});return o.status="pending",o.resolve=r=>{o.status="resolved",o.value=r,t(r),e?.(r)},o.reject=r=>{o.status="rejected",i(r)},o}function FD(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function mo(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function HD(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function k0(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return HD(t)}const VD=["http:","https:","mailto:","tel:"];function su(e,t){if(!e)return!1;try{const i=new URL(e);return!t.has(i.protocol)}catch{return!1}}function $s(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let i=0,o="",r;for(;(r=t.exec(e))!==null;)o+=k0(e.slice(i,r.index))+r[0],i=t.lastIndex;o=o+k0(i?e.slice(i):e);let s=!1;return o.startsWith("//")&&(s=!0,o="/"+o.replace(/^\/+/,"")),{path:o,handledProtocolRelativeURL:s}}function GD(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var YD="Invariant failed";function Or(e,t){if(!e)throw new Error(YD)}function lu(e){const t=new Map;let i,o;const r=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,o&&(o.next=s,s.prev=o)):(s.next.prev=void 0,i=s.next,s.next=void 0,o&&(s.prev=o,o.next=s)),o=s)};return{get(s){const u=t.get(s);if(u)return r(u),u.value},set(s,u){if(t.size>=e&&i){const p=i;t.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===o&&(o=void 0)}const d=t.get(s);if(d)d.value=u,r(d);else{const p={key:s,value:u,prev:o};o&&(o.next=p),o=p,i||(i=p),t.set(s,p)}},clear(){t.clear(),i=void 0,o=void 0}}}const vo=0,ra=1,ia=2,Ps=3,Qi=4,fw=5;function KD(e){const t=e.indexOf("{");if(t===-1)return null;const i=e.indexOf("}",t);return i===-1||t+1>=e.length?null:[t,i]}function rp(e,t,i=new Uint16Array(6)){const o=e.indexOf("/",t),r=o===-1?e.length:o,s=e.substring(t,r);if(!s||!s.includes("$"))return i[0]=vo,i[1]=t,i[2]=t,i[3]=r,i[4]=r,i[5]=r,i;if(s==="$"){const d=e.length;return i[0]=ia,i[1]=t,i[2]=t,i[3]=d,i[4]=d,i[5]=d,i}if(s.charCodeAt(0)===36)return i[0]=ra,i[1]=t,i[2]=t+1,i[3]=r,i[4]=r,i[5]=r,i;const u=KD(s);if(u){const[d,p]=u,h=s.charCodeAt(d+1);if(h===45){if(d+2<s.length&&s.charCodeAt(d+2)===36){const v=d+3,g=p;if(v<g)return i[0]=Ps,i[1]=t+d,i[2]=t+v,i[3]=t+g,i[4]=t+p+1,i[5]=r,i}}else if(h===36){const v=d+1,g=d+2;return g===p?(i[0]=ia,i[1]=t+d,i[2]=t+v,i[3]=t+g,i[4]=t+p+1,i[5]=e.length,i):(i[0]=ra,i[1]=t+d,i[2]=t+g,i[3]=t+p,i[4]=t+p+1,i[5]=r,i)}}return i[0]=vo,i[1]=t,i[2]=t,i[3]=r,i[4]=r,i[5]=r,i}function ju(e,t,i,o,r,s,u){u?.(i);let d=o;{const p=i.fullPath??i.from,h=p.length,v=i.options?.caseSensitive??e,g=!!(i.options?.params?.parse&&i.options?.skipRouteOnParseError?.params);for(;d<h;){const _=rp(p,d,t);let x;const w=d,z=_[5];switch(d=z+1,s++,_[0]){case vo:{const N=p.substring(_[2],_[3]);if(v){const P=r.static?.get(N);if(P)x=P;else{r.static??=new Map;const M=Xi(i.fullPath??i.from);M.parent=r,M.depth=s,x=M,r.static.set(N,M)}}else{const P=N.toLowerCase(),M=r.staticInsensitive?.get(P);if(M)x=M;else{r.staticInsensitive??=new Map;const K=Xi(i.fullPath??i.from);K.parent=r,K.depth=s,x=K,r.staticInsensitive.set(P,K)}}break}case ra:{const N=p.substring(w,_[1]),P=p.substring(_[4],z),M=v&&!!(N||P),K=N?M?N:N.toLowerCase():void 0,ee=P?M?P:P.toLowerCase():void 0,B=!g&&r.dynamic?.find(A=>!A.skipOnParamError&&A.caseSensitive===M&&A.prefix===K&&A.suffix===ee);if(B)x=B;else{const A=Ym(ra,i.fullPath??i.from,M,K,ee);x=A,A.depth=s,A.parent=r,r.dynamic??=[],r.dynamic.push(A)}break}case Ps:{const N=p.substring(w,_[1]),P=p.substring(_[4],z),M=v&&!!(N||P),K=N?M?N:N.toLowerCase():void 0,ee=P?M?P:P.toLowerCase():void 0,B=!g&&r.optional?.find(A=>!A.skipOnParamError&&A.caseSensitive===M&&A.prefix===K&&A.suffix===ee);if(B)x=B;else{const A=Ym(Ps,i.fullPath??i.from,M,K,ee);x=A,A.parent=r,A.depth=s,r.optional??=[],r.optional.push(A)}break}case ia:{const N=p.substring(w,_[1]),P=p.substring(_[4],z),M=v&&!!(N||P),K=N?M?N:N.toLowerCase():void 0,ee=P?M?P:P.toLowerCase():void 0,B=Ym(ia,i.fullPath??i.from,M,K,ee);x=B,B.parent=r,B.depth=s,r.wildcard??=[],r.wildcard.push(B)}}r=x}if(g&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const _=Xi(i.fullPath??i.from);_.kind=fw,_.parent=r,s++,_.depth=s,r.pathless??=[],r.pathless.push(_),r=_}const b=(i.path||!i.children)&&!i.isRoot;if(b&&p.endsWith("/")){const _=Xi(i.fullPath??i.from);_.kind=Qi,_.parent=r,s++,_.depth=s,r.index=_,r=_}r.parse=i.options?.params?.parse??null,r.skipOnParamError=g,r.parsingPriority=i.options?.skipRouteOnParseError?.priority??0,b&&!r.route&&(r.route=i,r.fullPath=i.fullPath??i.from)}if(i.children)for(const p of i.children)ju(e,t,p,d,r,s,u)}function Gm(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ci(e){if(e.pathless)for(const t of e.pathless)ci(t);if(e.static)for(const t of e.static.values())ci(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ci(t);if(e.dynamic?.length){e.dynamic.sort(Gm);for(const t of e.dynamic)ci(t)}if(e.optional?.length){e.optional.sort(Gm);for(const t of e.optional)ci(t)}if(e.wildcard?.length){e.wildcard.sort(Gm);for(const t of e.wildcard)ci(t)}}function Xi(e){return{kind:vo,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Ym(e,t,i,o,r){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:i,prefix:o,suffix:r}}function QD(e,t){const i=Xi("/"),o=new Uint16Array(6);for(const r of e)ju(!1,o,r,1,i,0);ci(i),t.masksTree=i,t.flatCache=lu(1e3)}function XD(e,t){e||="/";const i=t.flatCache.get(e);if(i)return i;const o=ip(e,t.masksTree);return t.flatCache.set(e,o),o}function JD(e,t,i,o,r){e||="/",o||="/";const s=t?`case\0${e}`:e;let u=r.singleCache.get(s);if(!u){u=Xi("/");const d=new Uint16Array(6);ju(t,d,{from:e},1,u,0),r.singleCache.set(s,u)}return ip(o,u,i)}function WD(e,t,i=!1){const o=i?e:`nofuzz\0${e}`,r=t.matchCache.get(o);if(r!==void 0)return r;e||="/";let s;try{s=ip(e,t.segmentTree,i)}catch(u){if(u instanceof URIError)s=null;else throw u}return s&&(s.branch=n2(s.route)),t.matchCache.set(o,s),s}function e2(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function t2(e,t=!1,i){const o=Xi(e.fullPath),r=new Uint16Array(6),s={},u={};let d=0;return ju(t,r,e,1,o,0,h=>{if(i?.(h,d),Or(!(h.id in s),`Duplicate routes found with id: ${String(h.id)}`),s[h.id]=h,d!==0&&h.path){const v=e2(h.fullPath);(!u[v]||h.fullPath.endsWith("/"))&&(u[v]=h)}d++}),ci(o),{processedTree:{segmentTree:o,singleCache:lu(1e3),matchCache:lu(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:u}}function ip(e,t,i=!1){const o=e.split("/"),r=i2(e,o,t,i);if(!r)return null;const[s]=mw(e,o,r);return{route:r.node.route,rawParams:s,parsedParams:r.parsedParams}}function mw(e,t,i){const o=r2(i.node);let r=null;const s={};let u=i.extract?.part??0,d=i.extract?.node??0,p=i.extract?.path??0,h=i.extract?.segment??0;for(;d<o.length;u++,d++,p++,h++){const v=o[d];if(v.kind===Qi)break;if(v.kind===fw){h--,u--,p--;continue}const g=t[u],b=p;if(g&&(p+=g.length),v.kind===ra){r??=i.node.fullPath.split("/");const _=r[h],x=v.prefix?.length??0;if(_.charCodeAt(x)===123){const z=v.suffix?.length??0,T=_.substring(x+2,_.length-z-1),N=g.substring(x,g.length-z);s[T]=decodeURIComponent(N)}else{const z=_.substring(1);s[z]=decodeURIComponent(g)}}else if(v.kind===Ps){if(i.skipped&1<<d){u--,p=b-1;continue}r??=i.node.fullPath.split("/");const _=r[h],x=v.prefix?.length??0,w=v.suffix?.length??0,z=_.substring(x+3,_.length-w-1),T=v.suffix||v.prefix?g.substring(x,g.length-w):g;T&&(s[z]=decodeURIComponent(T))}else if(v.kind===ia){const _=v,x=e.substring(b+(_.prefix?.length??0),e.length-(_.suffix?.length??0)),w=decodeURIComponent(x);s["*"]=w,s._splat=w;break}}return i.rawParams&&Object.assign(s,i.rawParams),[s,{part:u,node:d,path:p,segment:h}]}function n2(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function r2(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function i2(e,t,i,o){if(e==="/"&&i.index)return{node:i.index,skipped:0};const r=!Is(t),s=r&&e!=="/",u=t.length-(r?1:0),d=[{node:i,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let p=null,h=null,v=null;for(;d.length;){const g=d.pop(),{node:b,index:_,skipped:x,depth:w,statics:z,dynamics:T,optionals:N}=g;let{extract:P,rawParams:M,parsedParams:K}=g;if(b.skipOnParamError){if(!Km(e,t,g))continue;M=g.rawParams,P=g.extract,K=g.parsedParams}o&&b.route&&b.kind!==Qi&&ks(h,g)&&(h=g);const ee=_===u;if(ee&&(b.route&&!s&&ks(v,g)&&(v=g),!b.optional&&!b.wildcard&&!b.index&&!b.pathless))continue;const B=ee?void 0:t[_];let A;if(ee&&b.index){const Y={node:b.index,index:_,skipped:x,depth:w+1,statics:z,dynamics:T,optionals:N,extract:P,rawParams:M,parsedParams:K};let se=!0;if(b.index.skipOnParamError&&(Km(e,t,Y)||(se=!1)),se){if(z===u&&!T&&!N&&!x)return Y;ks(v,Y)&&(v=Y)}}if(b.wildcard&&ks(p,g))for(const Y of b.wildcard){const{prefix:se,suffix:oe}=Y;if(se&&(ee||!(Y.caseSensitive?B:A??=B.toLowerCase()).startsWith(se)))continue;if(oe){if(ee)continue;const pe=t.slice(_).join("/").slice(-oe.length);if((Y.caseSensitive?pe:pe.toLowerCase())!==oe)continue}const ae={node:Y,index:u,skipped:x,depth:w,statics:z,dynamics:T,optionals:N,extract:P,rawParams:M,parsedParams:K};if(!(Y.skipOnParamError&&!Km(e,t,ae))){p=ae;break}}if(b.optional){const Y=x|1<<w,se=w+1;for(let oe=b.optional.length-1;oe>=0;oe--){const ae=b.optional[oe];d.push({node:ae,index:_,skipped:Y,depth:se,statics:z,dynamics:T,optionals:N,extract:P,rawParams:M,parsedParams:K})}if(!ee)for(let oe=b.optional.length-1;oe>=0;oe--){const ae=b.optional[oe],{prefix:pe,suffix:ge}=ae;if(pe||ge){const Ue=ae.caseSensitive?B:A??=B.toLowerCase();if(pe&&!Ue.startsWith(pe)||ge&&!Ue.endsWith(ge))continue}d.push({node:ae,index:_+1,skipped:x,depth:se,statics:z,dynamics:T,optionals:N+1,extract:P,rawParams:M,parsedParams:K})}}if(!ee&&b.dynamic&&B)for(let Y=b.dynamic.length-1;Y>=0;Y--){const se=b.dynamic[Y],{prefix:oe,suffix:ae}=se;if(oe||ae){const pe=se.caseSensitive?B:A??=B.toLowerCase();if(oe&&!pe.startsWith(oe)||ae&&!pe.endsWith(ae))continue}d.push({node:se,index:_+1,skipped:x,depth:w+1,statics:z,dynamics:T+1,optionals:N,extract:P,rawParams:M,parsedParams:K})}if(!ee&&b.staticInsensitive){const Y=b.staticInsensitive.get(A??=B.toLowerCase());Y&&d.push({node:Y,index:_+1,skipped:x,depth:w+1,statics:z+1,dynamics:T,optionals:N,extract:P,rawParams:M,parsedParams:K})}if(!ee&&b.static){const Y=b.static.get(B);Y&&d.push({node:Y,index:_+1,skipped:x,depth:w+1,statics:z+1,dynamics:T,optionals:N,extract:P,rawParams:M,parsedParams:K})}if(b.pathless){const Y=w+1;for(let se=b.pathless.length-1;se>=0;se--){const oe=b.pathless[se];d.push({node:oe,index:_,skipped:x,depth:Y,statics:z,dynamics:T,optionals:N,extract:P,rawParams:M,parsedParams:K})}}}if(v&&p)return ks(p,v)?v:p;if(v)return v;if(p)return p;if(o&&h){let g=h.index;for(let _=0;_<h.index;_++)g+=t[_].length;const b=g===e.length?"/":e.slice(g);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(b),h}return null}function Km(e,t,i){try{const[o,r]=mw(e,t,i);i.rawParams=o,i.extract=r;const s=i.node.parse(o);return i.parsedParams=Object.assign({},i.parsedParams,s),!0}catch{return null}}function ks(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Qi)>(e.node.kind===Qi)||t.node.kind===Qi==(e.node.kind===Qi)&&t.depth>e.depth))):!0}function Wc(e){return ap(e.filter(t=>t!==void 0).join("/"))}function ap(e){return e.replace(/\/{2,}/g,"/")}function hw(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Er(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function pw(e){return Er(hw(e))}function cu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function a2(e,t,i){return cu(e,i)===cu(t,i)}function o2({base:e,to:t,trailingSlash:i="never",cache:o}){const r=t.startsWith("/"),s=!r&&t===".";let u;if(o){u=r?t:s?e:e+"\0"+t;const g=o.get(u);if(g)return g}let d;if(s)d=e.split("/");else if(r)d=t.split("/");else{for(d=e.split("/");d.length>1&&Is(d)==="";)d.pop();const g=t.split("/");for(let b=0,_=g.length;b<_;b++){const x=g[b];x===""?b?b===_-1&&d.push(x):d=[x]:x===".."?d.pop():x==="."||d.push(x)}}d.length>1&&(Is(d)===""?i==="never"&&d.pop():i==="always"&&d.push(""));let p,h="";for(let g=0;g<d.length;g++){g>0&&(h+="/");const b=d[g];if(!b)continue;p=rp(b,0,p);const _=p[0];if(_===vo){h+=b;continue}const x=p[5],w=b.substring(0,p[1]),z=b.substring(p[4],x),T=b.substring(p[2],p[3]);_===ra?h+=w||z?`${w}{$${T}}${z}`:`$${T}`:_===ia?h+=w||z?`${w}{$}${z}`:"$":h+=`${w}{-$${T}}${z}`}h=ap(h);const v=h||"/";return u&&o&&o.set(u,v),v}function s2(e){const t=new Map(e.map(r=>[encodeURIComponent(r),r])),i=Array.from(t.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),o=new RegExp(i,"g");return r=>r.replace(o,s=>t.get(s)??s)}function Qm(e,t,i){const o=t[e];return typeof o!="string"?o:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(o)?o:o.split("/").map(r=>E0(r,i)).join("/"):E0(o,i)}function Xm({path:e,params:t,decoder:i,...o}){let r=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:r};const u=e.length;let d=0,p,h="";for(;d<u;){const g=d;p=rp(e,g,p);const b=p[5];if(d=b+1,g===b)continue;const _=p[0];if(_===vo){h+="/"+e.substring(g,b);continue}if(_===ia){const x=t._splat;s._splat=x,s["*"]=x;const w=e.substring(g,p[1]),z=e.substring(p[4],b);if(!x){r=!0,(w||z)&&(h+="/"+w+z);continue}const T=Qm("_splat",t,i);h+="/"+w+T+z;continue}if(_===ra){const x=e.substring(p[2],p[3]);!r&&!(x in t)&&(r=!0),s[x]=t[x];const w=e.substring(g,p[1]),z=e.substring(p[4],b),T=Qm(x,t,i)??"undefined";h+="/"+w+T+z;continue}if(_===Ps){const x=e.substring(p[2],p[3]),w=t[x];if(w==null)continue;s[x]=w;const z=e.substring(g,p[1]),T=e.substring(p[4],b),N=Qm(x,t,i)??"";h+="/"+z+N+T;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:s,interpolatedPath:h||"/",isMissingParams:r}}function E0(e,t){const i=encodeURIComponent(e);return t?.(i)??i}function hn(e){return!!e?.isNotFound}function l2(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Eh="tsr-scroll-restoration-v1_3",c2=(e,t)=>{let i;return(...o)=>{i||(i=setTimeout(()=>{e(...o),i=null},t))}};function u2(){const e=l2();if(!e)return null;const t=e.getItem(Eh);let i=t?JSON.parse(t):{};return{state:i,set:o=>{i=ui(o,i)||i;try{e.setItem(Eh,JSON.stringify(i))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Mc=u2(),d2=e=>e.state.__TSR_key||e.href;function f2(e){const t=[];let i;for(;i=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(i.children,e)+1})`),e=i;return`${t.reverse().join(" > ")}`.toLowerCase()}let uu=!1;function m2({storageKey:e,key:t,behavior:i,shouldScrollRestoration:o,scrollToTopSelectors:r,location:s}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const d=t||window.history.state?.__TSR_key,p=u[d];uu=!0;e:{if(o&&p&&Object.keys(p).length>0){for(const g in p){const b=p[g];if(g==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:i});else if(g){const _=document.querySelector(g);_&&(_.scrollLeft=b.scrollX,_.scrollTop=b.scrollY)}}break e}const h=(s??window.location).hash.split("#",2)[1];if(h){const g=window.history.state?.__hashScrollIntoViewOptions??!0;if(g){const b=document.getElementById(h);b&&b.scrollIntoView(g)}break e}const v={top:0,left:0,behavior:i};if(window.scrollTo(v),r)for(const g of r){if(g==="window")continue;const b=typeof g=="function"?g():document.querySelector(g);b&&b.scrollTo(v)}}uu=!1}function h2(e,t){if(!Mc||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Mc))return;e.isScrollRestorationSetup=!0,uu=!1;const o=e.options.getScrollRestorationKey||d2;window.history.scrollRestoration="manual";const r=s=>{if(uu||!e.isScrollRestoring)return;let u="";if(s.target===document||s.target===window)u="window";else{const p=s.target.getAttribute("data-scroll-restoration-id");p?u=`[data-scroll-restoration-id="${p}"]`:u=f2(s.target)}const d=o(e.state.location);Mc.set(p=>{const h=p[d]||={},v=h[u]||={};if(u==="window")v.scrollX=window.scrollX||0,v.scrollY=window.scrollY||0;else if(u){const g=document.querySelector(u);g&&(v.scrollX=g.scrollLeft||0,v.scrollY=g.scrollTop||0)}return p})};typeof document<"u"&&document.addEventListener("scroll",c2(r,100),!0),e.subscribe("onRendered",s=>{const u=o(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(m2({storageKey:Eh,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Mc.set(d=>(d[u]||={},d)))})}function p2(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const i=document.getElementById(e.state.location.hash);i&&i.scrollIntoView(t)}}}function g2(e,t=String){const i=new URLSearchParams;for(const o in e){const r=e[o];r!==void 0&&i.set(o,t(r))}return i.toString()}function Jm(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function v2(e){const t=new URLSearchParams(e),i={};for(const[o,r]of t.entries()){const s=i[o];s==null?i[o]=Jm(r):Array.isArray(s)?s.push(Jm(r)):i[o]=[s,Jm(r)]}return i}const y2=_2(JSON.parse),b2=S2(JSON.stringify,JSON.parse);function _2(e){return t=>{t[0]==="?"&&(t=t.substring(1));const i=v2(t);for(const o in i){const r=i[o];if(typeof r=="string")try{i[o]=e(r)}catch{}}return i}}function S2(e,t){const i=typeof t=="function";function o(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(i&&typeof r=="string")try{return t(r),e(r)}catch{}return r}return r=>{const s=g2(r,o);return s?`?${s}`:""}}const On="__root__";function w2(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const i=new Response(null,{status:e.statusCode,headers:t});if(i.options=e,e.throw)throw i;return i}function Dn(e){return e instanceof Response&&!!e.options}const eu=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ru=(e,t)=>!!(e.preload&&!e.router.state.matches.some(i=>i.id===t)),ho=(e,t,i=!0)=>{const o={...e.router.options.context??{}},r=i?t:t-1;for(let s=0;s<=r;s++){const u=e.matches[s];if(!u)continue;const d=e.router.getMatch(u.id);d&&Object.assign(o,d.__routeContext,d.__beforeLoadContext)}return o},gw=(e,t,i)=>{const o=e.router.routesById[t.routeId??""]??e.router.routeTree;!o.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(o.options.notFoundComponent=e.router.options.defaultNotFoundComponent);const r=i==="BEFORE_LOAD"&&o.parentRoute;r||Or(o.options.notFoundComponent);const s=e.matches.find(u=>u.routeId===o.id);Or(s,"Could not find match for route: "+o.id),e.updateMatch(s.id,u=>({...u,status:"notFound",error:t,isFetching:!1})),r&&(t.routeId=o.parentRoute.id,gw(e,t,i))},di=(e,t,i,o)=>{if(!(!Dn(i)&&!hn(i))){if(Dn(i)&&i.redirectHandled&&!i.options.reloadDocument)throw i;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=Dn(i)?"redirected":"notFound";t._nonReactive.error=i,e.updateMatch(t.id,s=>({...s,status:r,context:ho(e,t.index),isFetching:!1,error:i})),hn(i)&&!i.routeId&&(i.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Dn(i)?(e.rendered=!0,i.options._fromLocation=e.location,i.redirectHandled=!0,i=e.router.resolveRedirect(i),i):(gw(e,i,o),i)}},vw=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,Es=(e,t,i,o)=>{const{id:r,routeId:s}=e.matches[t],u=e.router.looseRoutesById[s];if(i instanceof Promise)throw i;i.routerCode=o,e.firstBadMatchIndex??=t,di(e,e.router.getMatch(r),i,o);try{u.options.onError?.(i)}catch(d){i=d,di(e,e.router.getMatch(r),i,o)}e.updateMatch(r,d=>(d._nonReactive.beforeLoadPromise?.resolve(),d._nonReactive.beforeLoadPromise=void 0,d._nonReactive.loadPromise?.resolve(),{...d,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},yw=(e,t,i,o)=>{if(o._nonReactive.pendingTimeout!==void 0)return;const r=i.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Ru(e,t)&&(i.options.loader||i.options.beforeLoad||Sw(i))&&typeof r=="number"&&r!==1/0&&(i.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{eu(e)},r);o._nonReactive.pendingTimeout=u}},x2=(e,t,i)=>{const o=e.router.getMatch(t);if(!o._nonReactive.beforeLoadPromise&&!o._nonReactive.loaderPromise)return;yw(e,t,i,o);const r=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&di(e,s,s.error)};return o._nonReactive.beforeLoadPromise?o._nonReactive.beforeLoadPromise.then(r):r()},$2=(e,t,i,o)=>{const r=e.router.getMatch(t),s=r._nonReactive.loadPromise;r._nonReactive.loadPromise=go(()=>{s?.resolve()});const{paramsError:u,searchError:d}=r;u&&Es(e,i,u,"PARSE_PARAMS"),d&&Es(e,i,d,"VALIDATE_SEARCH"),yw(e,t,o,r);const p=new AbortController;let h=!1;const v=()=>{h||(h=!0,e.updateMatch(t,M=>({...M,isFetching:"beforeLoad",fetchCount:M.fetchCount+1,abortController:p})))},g=()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,M=>({...M,isFetching:!1}))};if(!o.options.beforeLoad){Us(()=>{v(),g()});return}r._nonReactive.beforeLoadPromise=go();const b={...ho(e,i,!1),...r.__routeContext},{search:_,params:x,cause:w}=r,z=Ru(e,t),T={search:_,abortController:p,params:x,preload:z,context:b,location:e.location,navigate:M=>e.router.navigate({...M,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:z?"preload":w,matches:e.matches,routeId:o.id,...e.router.options.additionalContext},N=M=>{if(M===void 0){Us(()=>{v(),g()});return}(Dn(M)||hn(M))&&(v(),Es(e,i,M,"BEFORE_LOAD")),Us(()=>{v(),e.updateMatch(t,K=>({...K,__beforeLoadContext:M})),g()})};let P;try{if(P=o.options.beforeLoad(T),mo(P))return v(),P.catch(M=>{Es(e,i,M,"BEFORE_LOAD")}).then(N)}catch(M){v(),Es(e,i,M,"BEFORE_LOAD")}N(P)},k2=(e,t)=>{const{id:i,routeId:o}=e.matches[t],r=e.router.looseRoutesById[o],s=()=>d(),u=()=>$2(e,i,t,r),d=()=>{if(vw(e,i))return;const p=x2(e,i,r);return mo(p)?p.then(u):u()};return s()},E2=(e,t,i)=>{const o=e.router.getMatch(t);if(!o||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const r={ssr:e.router.options.ssr,matches:e.matches,match:o,params:o.params,loaderData:o.loaderData};return Promise.all([i.options.head?.(r),i.options.scripts?.(r),i.options.headers?.(r)]).then(([s,u,d])=>{const p=s?.meta,h=s?.links,v=s?.scripts,g=s?.styles;return{meta:p,links:h,headScripts:v,headers:d,scripts:u,styles:g}})},bw=(e,t,i,o)=>{const r=e.matchPromises[i-1],{params:s,loaderDeps:u,abortController:d,cause:p}=e.router.getMatch(t),h=ho(e,i),v=Ru(e,t);return{params:s,deps:u,preload:!!v,parentMatchPromise:r,abortController:d,context:h,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:v?"preload":p,route:o,...e.router.options.additionalContext}},z0=async(e,t,i,o)=>{try{const r=e.router.getMatch(t);try{(!(ZD??e.router.isServer)||r.ssr===!0)&&_w(o);const s=o.options.loader?.(bw(e,t,i,o)),u=o.options.loader&&mo(s);if((u||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||r._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),o.options.loader){const h=u?await s:s;di(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,v=>({...v,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const p=r._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:ho(e,i),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(s){let u=s;if(u?.name==="AbortError"){if(r.abortController.signal.aborted){r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loaderPromise=void 0;return}e.updateMatch(t,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:ho(e,i)}));return}const d=r._nonReactive.minPendingPromise;d&&await d,hn(s)&&await o.options.notFoundComponent?.preload?.(),di(e,e.router.getMatch(t),s);try{o.options.onError?.(s)}catch(p){u=p,di(e,e.router.getMatch(t),p)}e.updateMatch(t,p=>({...p,error:u,context:ho(e,i),status:"error",isFetching:!1}))}}catch(r){const s=e.router.getMatch(t);s&&(s._nonReactive.loaderPromise=void 0),di(e,s,r)}},z2=async(e,t)=>{async function i(v,g,b,_){const x=Date.now()-g.updatedAt,w=v?_.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:_.options.staleTime??e.router.options.defaultStaleTime??0,z=_.options.shouldReload,T=typeof z=="function"?z(bw(e,o,t,_)):z,{status:N,invalid:P}=b;s=N==="success"&&(P||(T??x>w)),v&&_.options.preload===!1||(s&&!e.sync?(u=!0,(async()=>{try{await z0(e,o,t,_);const M=e.router.getMatch(o);M._nonReactive.loaderPromise?.resolve(),M._nonReactive.loadPromise?.resolve(),M._nonReactive.loaderPromise=void 0}catch(M){Dn(M)&&await e.router.navigate(M.options)}})()):(N!=="success"||s&&e.sync)&&await z0(e,o,t,_))}const{id:o,routeId:r}=e.matches[t];let s=!1,u=!1;const d=e.router.looseRoutesById[r];if(!vw(e,o)){const v=e.router.getMatch(o),g=Ru(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload)return v;await v._nonReactive.loaderPromise;const b=e.router.getMatch(o),_=b._nonReactive.error||b.error;_&&di(e,b,_),b.status==="pending"&&await i(g,v,b,d)}else{const b=g&&!e.router.state.matches.some(x=>x.id===o),_=e.router.getMatch(o);_._nonReactive.loaderPromise=go(),b!==_.preload&&e.updateMatch(o,x=>({...x,preload:b})),await i(g,v,_,d)}}const p=e.router.getMatch(o);u||(p._nonReactive.loaderPromise?.resolve(),p._nonReactive.loadPromise?.resolve()),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,u||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const h=u?p.isFetching:!1;return h!==p.isFetching||p.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:h,invalid:!1})),e.router.getMatch(o)):p};async function O0(e){const t=Object.assign(e,{matchPromises:[]});t.router.state.matches.some(i=>i._forcePending)&&eu(t);try{for(let d=0;d<t.matches.length;d++){const p=k2(t,d);mo(p)&&await p}const i=t.firstBadMatchIndex??t.matches.length;for(let d=0;d<i;d++)t.matchPromises.push(z2(t,d));const r=(await Promise.allSettled(t.matchPromises)).filter(d=>d.status==="rejected").map(d=>d.reason);let s;for(const d of r){if(Dn(d))throw d;!s&&hn(d)&&(s=d)}for(const d of t.matches){const{id:p,routeId:h}=d,v=t.router.looseRoutesById[h];try{const g=E2(t,p,v);if(g){const b=await g;t.updateMatch(p,_=>({..._,...b}))}}catch(g){console.error(`Error executing head for route ${h}:`,g)}}if(s)throw s;const u=eu(t);mo(u)&&await u}catch(i){if(hn(i)&&!t.preload){const o=eu(t);throw mo(o)&&await o,i}if(Dn(i))throw i}return t.matches}async function _w(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:i,...o}=t.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const i=[];for(const o of ww){const r=e.options[o]?.preload;r&&i.push(r())}if(i.length)return Promise.all(i).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Sw(e){for(const t of ww)if(e.options[t]?.preload)return!0;return!1}const ww=["component","errorComponent","pendingComponent","notFoundComponent"];function O2(e){return{input:({url:t})=>{for(const i of e)t=zh(i,t);return t},output:({url:t})=>{for(let i=e.length-1;i>=0;i--)t=xw(e[i],t);return t}}}function T2(e){const t=pw(e.basepath),i=`/${t}`,o=`${i}/`,r=e.caseSensitive?i:i.toLowerCase(),s=e.caseSensitive?o:o.toLowerCase();return{input:({url:u})=>{const d=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return d===r?u.pathname="/":d.startsWith(s)&&(u.pathname=u.pathname.slice(i.length)),u},output:({url:u})=>(u.pathname=Wc(["/",t,u.pathname]),u)}}function zh(e,t){const i=e?.input?.({url:t});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return t}function xw(e,t){const i=e?.output?.({url:t});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return t}function ta(e){const t=e.resolvedLocation,i=e.location,o=t?.pathname!==i.pathname,r=t?.href!==i.href,s=t?.hash!==i.hash;return{fromLocation:t,toLocation:i,pathChanged:o,hrefChanged:r,hashChanged:s}}class D2{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=i=>i(),this.update=i=>{i.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const o=this.options,r=this.basepath??o?.basepath??"/",s=this.basepath===void 0,u=o?.rewrite;if(this.options={...o,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=s2(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=PD()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let b;this.resolvePathCache=lu(1e3),b=this.buildRouteTree(),this.setRoutes(b)}!this.__store&&this.latestLocation&&(this.__store=new kh(j2(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),h2(this));let d=!1;const p=this.options.basepath??"/",h=this.options.rewrite;if(s||r!==p||u!==h){this.basepath=p;const b=[],_=pw(p);_&&_!=="/"&&b.push(T2({basepath:p})),h&&b.push(h),this.rewrite=b.length===0?void 0:b.length===1?b[0]:O2(b),this.history&&this.updateLatestLocation(),d=!0}d&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=t2(this.routeTree,this.options.caseSensitive,(o,r)=>{o.init({originalIndex:r})});return this.options.routeMasks&&QD(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,o)=>{const r={eventType:i,fn:o};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=i=>{this.subscribers.forEach(o=>{o.eventType===i.type&&o.fn(i)})},this.parseLocation=(i,o)=>{const r=({pathname:p,search:h,hash:v,href:g,state:b})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const N=this.options.parseSearch(h),P=this.options.stringifySearch(N);return{href:p+P+v,publicHref:g,pathname:$s(p).path,external:!1,searchStr:P,search:mn(o?.search,N),hash:$s(v.slice(1)).path,state:mn(o?.state,b)}}const _=new URL(g,this.origin),x=zh(this.rewrite,_),w=this.options.parseSearch(x.search),z=this.options.stringifySearch(w);return x.search=z,{href:x.href.replace(x.origin,""),publicHref:g,pathname:$s(x.pathname).path,external:!!this.rewrite&&x.origin!==this.origin,searchStr:z,search:mn(o?.search,w),hash:$s(x.hash.slice(1)).path,state:mn(o?.state,b)}},s=r(i),{__tempLocation:u,__tempKey:d}=s.state;if(u&&(!d||d===this.tempLocationKey)){const p=r(u);return p.state.key=s.state.key,p.state.__TSR_key=s.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:s}}return s},this.resolvePathWithBase=(i,o)=>o2({base:i,to:ap(o),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,o,r)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:o},r):this.matchRoutesInternal(i,o),this.getMatchedRoutes=i=>R2({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const o=this.getMatch(i);o&&(o.abortController.abort(),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const i=this.state.matches.filter(s=>s.status==="pending"),o=this.state.matches.filter(s=>s.isFetching==="loader");new Set([...this.state.pendingMatches??[],...i,...o]).forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=i=>{const o=(s={})=>{const u=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,d=this.matchRoutesLightweight(u);s.from;const p=s.unsafeRelative==="path"?u.pathname:s.from??d.fullPath,h=this.resolvePathWithBase(p,"."),v=d.search,g={...d.params},b=s.to?this.resolvePathWithBase(h,`${s.to}`):this.resolvePathWithBase(h,"."),_=s.params===!1||s.params===null?{}:(s.params??!0)===!0?g:Object.assign(g,ui(s.params,g)),x=Xm({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,w=this.getMatchedRoutes(x);let z=w.matchedRoutes;(w.foundRoute?w.foundRoute.path!=="/"&&w.routeParams["**"]:Er(x))&&this.options.notFoundRoute&&(z=[...z,this.options.notFoundRoute]);let N=!1;if(Object.keys(_).length>0)for(const pe of z){const ge=pe.options.params?.stringify??pe.options.stringifyParams;ge&&(N=!0,Object.assign(_,ge(_)))}const P=i.leaveParams?b:$s(N?Xm({path:b,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:x).path;let M=v;if(i._includeValidateSearch&&this.options.search?.strict){const pe={};z.forEach(ge=>{if(ge.options.validateSearch)try{Object.assign(pe,tu(ge.options.validateSearch,{...pe,...M}))}catch{}}),M=pe}M=A2({search:M,dest:s,destRoutes:z,_includeValidateSearch:i._includeValidateSearch}),M=mn(v,M);const K=this.options.stringifySearch(M),ee=s.hash===!0?u.hash:s.hash?ui(s.hash,u.hash):void 0,B=ee?`#${ee}`:"";let A=s.state===!0?u.state:s.state?ui(s.state,u.state):{};A=mn(u.state,A);const Y=`${P}${K}${B}`;let se,oe,ae=!1;if(this.rewrite){const pe=new URL(Y,this.origin),ge=xw(this.rewrite,pe);se=pe.href.replace(pe.origin,""),ge.origin!==this.origin?(oe=ge.href,ae=!0):oe=ge.pathname+ge.search+ge.hash}else se=GD(Y),oe=se;return{publicHref:oe,href:se,pathname:P,search:M,searchStr:K,state:A,hash:ee??"",external:ae,unmaskOnReload:s.unmaskOnReload}},r=(s={},u)=>{const d=o(s);let p=u?o(u):void 0;if(!p){const h={};if(this.options.routeMasks){const v=XD(d.pathname,this.processedTree);if(v){Object.assign(h,v.rawParams);const{from:g,params:b,..._}=v.route,x=b===!1||b===null?{}:(b??!0)===!0?h:Object.assign(h,ui(b,h));u={from:i.from,..._,params:x},p=o(u)}}}return p&&(d.maskedLocation=p),d};return i.mask?r(i,{from:i.from,...i.mask}):r(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:o,...r})=>{const s=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(v=>{r.state[v]=this.latestLocation.state[v]});const h=ea(r.state,this.latestLocation.state);return p.forEach(v=>{delete r.state[v]}),h},u=Er(this.latestLocation.href)===Er(r.href),d=this.commitLocationPromise;if(this.commitLocationPromise=go(()=>{d?.resolve()}),u&&s())this.load();else{let{maskedLocation:p,hashScrollIntoView:h,...v}=r;p&&(v={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,this.history[r.replace?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:o})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:o,hashScrollIntoView:r,viewTransition:s,ignoreBlocker:u,href:d,...p}={})=>{if(d){const g=this.history.location.state.__TSR_index,b=au(d,{__TSR_index:i?g:g+1}),_=new URL(b.pathname,this.origin),x=zh(this.rewrite,_);p.to=x.pathname,p.search=this.options.parseSearch(b.search),p.hash=b.hash.slice(1)}const h=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const v=this.commitLocation({...h,viewTransition:s,replace:i,resetScroll:o,hashScrollIntoView:r,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),v},this.navigate=async({to:i,reloadDocument:o,href:r,publicHref:s,...u})=>{let d=!1;if(r)try{new URL(`${r}`),d=!0}catch{}if(d&&!o&&(o=!0),o){if(i!==void 0||!r){const h=this.buildLocation({to:i,...u});r=r??h.publicHref,s=s??h.publicHref}const p=!d&&s?s:r;if(su(p,this.protocolAllowlist))return Promise.resolve();if(!u.ignoreBlocker){const v=this.history.getBlockers?.()??[];for(const g of v)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...u,href:r,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation);this.__store.setState(o=>({...o,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:i,cachedMatches:o.cachedMatches.filter(r=>!i.some(s=>s.id===r.id))}))},this.load=async i=>{let o,r,s;for(s=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const p=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ta({resolvedLocation:h,location:p})}),this.emit({type:"onBeforeLoad",...ta({resolvedLocation:h,location:p})}),await O0({router:this,sync:i?.sync,matches:this.state.pendingMatches,location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let v=[],g=[],b=[];Us(()=>{this.__store.setState(_=>{const x=_.matches,w=_.pendingMatches||_.matches;return v=x.filter(z=>!w.some(T=>T.id===z.id)),g=w.filter(z=>!x.some(T=>T.id===z.id)),b=w.filter(z=>x.some(T=>T.id===z.id)),{..._,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[..._.cachedMatches,...v.filter(z=>z.status!=="error"&&z.status!=="notFound")]}}),this.clearExpiredCache()}),[[v,"onLeave"],[g,"onEnter"],[b,"onStay"]].forEach(([_,x])=>{_.forEach(w=>{this.looseRoutesById[w.routeId].options[x]?.(w)})})})})}})}catch(p){Dn(p)?(o=p,this.navigate({...o.options,replace:!0,ignoreBlocker:!0})):hn(p)&&(r=p),this.__store.setState(h=>({...h,statusCode:o?o.status:r?404:h.matches.some(v=>v.status==="error")?500:200,redirect:o}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(d=>d.status==="error")&&(u=500),u!==void 0&&this.__store.setState(d=>({...d,statusCode:u}))},this.startViewTransition=i=>{const o=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,o&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof o=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,u=this.state.resolvedLocation,d=typeof o.types=="function"?o.types(ta({resolvedLocation:u,location:s})):o.types;if(d===!1){i();return}r={update:i,types:d}}else r=i;document.startViewTransition(r)}else i()},this.updateMatch=(i,o)=>{this.startTransition(()=>{const r=this.state.pendingMatches?.some(s=>s.id===i)?"pendingMatches":this.state.matches.some(s=>s.id===i)?"matches":this.state.cachedMatches.some(s=>s.id===i)?"cachedMatches":"";r&&this.__store.setState(s=>({...s,[r]:s[r]?.map(u=>u.id===i?o(u):u)}))})},this.getMatch=i=>{const o=r=>r.id===i;return this.state.cachedMatches.find(o)??this.state.pendingMatches?.find(o)??this.state.matches.find(o)},this.invalidate=i=>{const o=r=>i?.filter?.(r)??!0?{...r,invalid:!0,...i?.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r;return this.__store.setState(r=>({...r,matches:r.matches.map(o),cachedMatches:r.cachedMatches.map(o),pendingMatches:r.pendingMatches?.map(o)})),this.shouldViewTransition=!1,this.load({sync:i?.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const o=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const r=i.options._builtLocation??this.buildLocation(i.options),s=this.getParsedLocationHref(r);i.options.href=s,i.headers.set("Location",s)}else if(o)try{const r=new URL(o);if(this.origin&&r.origin===this.origin){const s=r.pathname+r.search+r.hash;i.options.href=s,i.headers.set("Location",s)}}catch{}if(i.options.href&&!i.options._builtLocation&&su(i.options.href,this.protocolAllowlist))throw new Error(`Redirect blocked: unsafe protocol in href "${i.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`);return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const o=i?.filter;o!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(s=>!o(s))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const i=o=>{const r=this.looseRoutesById[o.routeId];if(!r.options.loader)return!0;const s=(o.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:Date.now()-o.updatedAt>=s};this.clearCache({filter:i})},this.loadRouteChunk=_w,this.preloadRoute=async i=>{const o=this.buildLocation(i);let r=this.matchRoutes(o,{throwOnError:!0,preload:!0,dest:i});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(d=>d.id)),u=new Set([...s,...this.state.cachedMatches.map(d=>d.id)]);Us(()=>{r.forEach(d=>{u.has(d.id)||this.__store.setState(p=>({...p,cachedMatches:[...p.cachedMatches,d]}))})});try{return r=await O0({router:this,matches:r,location:o,preload:!0,updateMatch:(d,p)=>{s.has(d)?r=r.map(h=>h.id===d?p(h):h):this.updateMatch(d,p)}}),r}catch(d){if(Dn(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:o});hn(d)||console.error(d);return}},this.matchRoute=(i,o)=>{const r={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},s=this.buildLocation(r);if(o?.pending&&this.state.status!=="pending")return!1;const d=(o?.pending===void 0?!this.state.isLoading:o.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,p=JD(s.pathname,o?.caseSensitive??!1,o?.fuzzy??!1,d.pathname,this.processedTree);return!p||i.params&&!ea(p.rawParams,i.params,{partial:!0})?!1:o?.includeSearch??!0?ea(d.search,s.search,{partial:!0})?p.rawParams:!1:p.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(i=>i.status==="notFound"||i.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??b2,parseSearch:t.parseSearch??y2,protocolAllowlist:t.protocolAllowlist??VD}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:i,processedTree:o}){this.routesById=t,this.routesByPath=i,this.processedTree=o;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,i){const o=this.getMatchedRoutes(t.pathname),{foundRoute:r,routeParams:s,parsedParams:u}=o;let{matchedRoutes:d}=o,p=!1;(r?r.path!=="/"&&s["**"]:Er(t.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:p=!0);const h=p?M2(this.options.notFoundMode,d):void 0,v=new Array(d.length),g=new Map(this.state.matches.map(b=>[b.routeId,b]));for(let b=0;b<d.length;b++){const _=d[b],x=v[b-1];let w,z,T;{const ge=x?.search??t.search,Ue=x?._strictSearch??void 0;try{const R=tu(_.options.validateSearch,{...ge})??void 0;w={...ge,...R},z={...Ue,...R},T=void 0}catch(R){let J=R;if(R instanceof du||(J=new du(R.message,{cause:R})),i?.throwOnError)throw J;w=ge,z={},T=J}}const N=_.options.loaderDeps?.({search:w})??"",P=N?JSON.stringify(N):"",{interpolatedPath:M,usedParams:K}=Xm({path:_.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),ee=_.id+M+P,B=this.getMatch(ee),A=g.get(_.id),Y=B?._strictParams??K;let se;if(!B)try{T0(_,K,u,Y)}catch(ge){if(hn(ge)||Dn(ge)?se=ge:se=new C2(ge.message,{cause:ge}),i?.throwOnError)throw se}Object.assign(s,Y);const oe=A?"stay":"enter";let ae;if(B)ae={...B,cause:oe,params:A?.params??s,_strictParams:Y,search:mn(A?A.search:B.search,w),_strictSearch:z};else{const ge=_.options.loader||_.options.beforeLoad||_.lazyFn||Sw(_)?"pending":"success";ae={id:ee,ssr:_.options.ssr,index:b,routeId:_.id,params:A?.params??s,_strictParams:Y,pathname:M,updatedAt:Date.now(),search:A?mn(A.search,w):w,_strictSearch:z,searchError:void 0,status:ge,isFetching:!1,error:void 0,paramsError:se,__routeContext:void 0,_nonReactive:{loadPromise:go()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:oe,loaderDeps:A?mn(A.loaderDeps,N):N,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:_.options.staticData||{},fullPath:_.fullPath}}i?.preload||(ae.globalNotFound=h===_.id),ae.searchError=T;const pe=this.getParentContext(x);ae.context={...pe,...ae.__routeContext,...ae.__beforeLoadContext},v[b]=ae}for(let b=0;b<v.length;b++){const _=v[b],x=this.looseRoutesById[_.routeId],w=this.getMatch(_.id),z=g.get(_.routeId);if(_.params=z?mn(z.params,s):s,!w){const T=v[b-1],N=this.getParentContext(T);if(x.options.context){const P={deps:_.loaderDeps,params:_.params,context:N??{},location:t,navigate:M=>this.navigate({...M,_fromLocation:t}),buildLocation:this.buildLocation,cause:_.cause,abortController:_.abortController,preload:!!_.preload,matches:v,routeId:x.id};_.__routeContext=x.options.context(P)??void 0}_.context={...N,..._.__routeContext,..._.__beforeLoadContext}}}return v}matchRoutesLightweight(t){const{matchedRoutes:i,routeParams:o,parsedParams:r}=this.getMatchedRoutes(t.pathname),s=Is(i),u={...t.search};for(const v of i)try{Object.assign(u,tu(v.options.validateSearch,u))}catch{}const d=Is(this.state.matches),p=d&&d.routeId===s.id&&t.pathname===this.state.location.pathname;let h;if(p)h=d.params;else{const v={...o};for(const g of i)try{T0(g,o,r??{},v)}catch{}h=v}return{matchedRoutes:i,fullPath:s.fullPath,search:u,params:h}}}class du extends Error{}class C2 extends Error{}function j2(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function tu(e,t){if(e==null)return{};if("~standard"in e){const i=e["~standard"].validate(t);if(i instanceof Promise)throw new du("Async validation not supported");if(i.issues)throw new du(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function R2({pathname:e,routesById:t,processedTree:i}){const o={},r=Er(e);let s,u;const d=WD(r,i,!0);return d&&(s=d.route,Object.assign(o,d.rawParams),u=Object.assign({},d.parsedParams)),{matchedRoutes:d?.branch||[t[On]],routeParams:o,foundRoute:s,parsedParams:u}}function A2({search:e,dest:t,destRoutes:i,_includeValidateSearch:o}){return N2(i)(e,t,o??!1)}function N2(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const r of e){if("search"in r.options)r.options.search?.middlewares&&t.middlewares.push(...r.options.search.middlewares);else if(r.options.preSearchFilters||r.options.postSearchFilters){const s=({search:u,next:d})=>{let p=u;"preSearchFilters"in r.options&&r.options.preSearchFilters&&(p=r.options.preSearchFilters.reduce((v,g)=>g(v),u));const h=d(p);return"postSearchFilters"in r.options&&r.options.postSearchFilters?r.options.postSearchFilters.reduce((v,g)=>g(v),h):h};t.middlewares.push(s)}if(r.options.validateSearch){const s=({search:u,next:d})=>{const p=d(u);if(!t._includeValidateSearch)return p;try{return{...p,...tu(r.options.validateSearch,p)??void 0}}catch{return p}};t.middlewares.push(s)}}const i=({search:r})=>{const s=t.dest;return s.search?s.search===!0?r:ui(s.search,r):{}};t.middlewares.push(i);const o=(r,s,u)=>{if(r>=u.length)return s;const d=u[r];return d({search:s,next:h=>o(r+1,h,u)})};return function(s,u,d){return t.dest=u,t._includeValidateSearch=d,o(0,s,t.middlewares)}}function M2(e,t){if(e!=="root")for(let i=t.length-1;i>=0;i--){const o=t[i];if(o.children)return o.id}return On}function T0(e,t,i,o){const r=e.options.params?.parse??e.options.parseParams;if(r)if(e.options.skipRouteOnParseError)for(const s in t)s in i&&(o[s]=i[s]);else{const s=r(o);Object.assign(o,s)}}const U2="Error preloading route! ☝️";class $w{constructor(t){if(this.init=i=>{this.originalIndex=i.originalIndex;const o=this.options,r=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=On:this.parentRoute||Or(!1);let s=r?On:o?.path;s&&s!=="/"&&(s=hw(s));const u=o?.id||s;let d=r?On:Wc([this.parentRoute.id===On?"":this.parentRoute.id,u]);s===On&&(s="/"),d!==On&&(d=Wc(["/",d]));const p=d===On?"/":Wc([this.parentRoute.fullPath,s]);this._path=s,this._id=d,this._fullPath=p,this._to=Er(p)},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.redirect=i=>w2({from:this.fullPath,...i}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class I2 extends $w{constructor(t){super(t)}}var Wm={exports:{}},xe={};var D0;function P2(){if(D0)return xe;D0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function _(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,z={};function T(O,H,q){this.props=O,this.context=H,this.refs=z,this.updater=q||x}T.prototype.isReactComponent={},T.prototype.setState=function(O,H){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,H,"setState")},T.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function N(){}N.prototype=T.prototype;function P(O,H,q){this.props=O,this.context=H,this.refs=z,this.updater=q||x}var M=P.prototype=new N;M.constructor=P,w(M,T.prototype),M.isPureReactComponent=!0;var K=Array.isArray;function ee(){}var B={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function Y(O,H,q){var X=q.ref;return{$$typeof:e,type:O,key:H,ref:X!==void 0?X:null,props:q}}function se(O,H){return Y(O.type,H,O.props)}function oe(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function ae(O){var H={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(q){return H[q]})}var pe=/\/+/g;function ge(O,H){return typeof O=="object"&&O!==null&&O.key!=null?ae(""+O.key):H.toString(36)}function Ue(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(ee,ee):(O.status="pending",O.then(function(H){O.status==="pending"&&(O.status="fulfilled",O.value=H)},function(H){O.status==="pending"&&(O.status="rejected",O.reason=H)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function R(O,H,q,X,ie){var me=typeof O;(me==="undefined"||me==="boolean")&&(O=null);var de=!1;if(O===null)de=!0;else switch(me){case"bigint":case"string":case"number":de=!0;break;case"object":switch(O.$$typeof){case e:case t:de=!0;break;case v:return de=O._init,R(de(O._payload),H,q,X,ie)}}if(de)return ie=ie(O),de=X===""?"."+ge(O,0):X,K(ie)?(q="",de!=null&&(q=de.replace(pe,"$&/")+"/"),R(ie,H,q,"",function(ut){return ut})):ie!=null&&(oe(ie)&&(ie=se(ie,q+(ie.key==null||O&&O.key===ie.key?"":(""+ie.key).replace(pe,"$&/")+"/")+de)),H.push(ie)),1;de=0;var be=X===""?".":X+":";if(K(O))for(var Ce=0;Ce<O.length;Ce++)X=O[Ce],me=be+ge(X,Ce),de+=R(X,H,q,me,ie);else if(Ce=_(O),typeof Ce=="function")for(O=Ce.call(O),Ce=0;!(X=O.next()).done;)X=X.value,me=be+ge(X,Ce++),de+=R(X,H,q,me,ie);else if(me==="object"){if(typeof O.then=="function")return R(Ue(O),H,q,X,ie);throw H=String(O),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return de}function J(O,H,q){if(O==null)return O;var X=[],ie=0;return R(O,X,"","",function(me){return H.call(q,me,ie++)}),X}function W(O){if(O._status===-1){var H=O._result;H=H(),H.then(function(q){(O._status===0||O._status===-1)&&(O._status=1,O._result=q)},function(q){(O._status===0||O._status===-1)&&(O._status=2,O._result=q)}),O._status===-1&&(O._status=0,O._result=H)}if(O._status===1)return O._result.default;throw O._result}var ke=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},we={map:J,forEach:function(O,H,q){J(O,function(){H.apply(this,arguments)},q)},count:function(O){var H=0;return J(O,function(){H++}),H},toArray:function(O){return J(O,function(H){return H})||[]},only:function(O){if(!oe(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return xe.Activity=g,xe.Children=we,xe.Component=T,xe.Fragment=i,xe.Profiler=r,xe.PureComponent=P,xe.StrictMode=o,xe.Suspense=p,xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,xe.__COMPILER_RUNTIME={__proto__:null,c:function(O){return B.H.useMemoCache(O)}},xe.cache=function(O){return function(){return O.apply(null,arguments)}},xe.cacheSignal=function(){return null},xe.cloneElement=function(O,H,q){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var X=w({},O.props),ie=O.key;if(H!=null)for(me in H.key!==void 0&&(ie=""+H.key),H)!A.call(H,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&H.ref===void 0||(X[me]=H[me]);var me=arguments.length-2;if(me===1)X.children=q;else if(1<me){for(var de=Array(me),be=0;be<me;be++)de[be]=arguments[be+2];X.children=de}return Y(O.type,ie,X)},xe.createContext=function(O){return O={$$typeof:u,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},xe.createElement=function(O,H,q){var X,ie={},me=null;if(H!=null)for(X in H.key!==void 0&&(me=""+H.key),H)A.call(H,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(ie[X]=H[X]);var de=arguments.length-2;if(de===1)ie.children=q;else if(1<de){for(var be=Array(de),Ce=0;Ce<de;Ce++)be[Ce]=arguments[Ce+2];ie.children=be}if(O&&O.defaultProps)for(X in de=O.defaultProps,de)ie[X]===void 0&&(ie[X]=de[X]);return Y(O,me,ie)},xe.createRef=function(){return{current:null}},xe.forwardRef=function(O){return{$$typeof:d,render:O}},xe.isValidElement=oe,xe.lazy=function(O){return{$$typeof:v,_payload:{_status:-1,_result:O},_init:W}},xe.memo=function(O,H){return{$$typeof:h,type:O,compare:H===void 0?null:H}},xe.startTransition=function(O){var H=B.T,q={};B.T=q;try{var X=O(),ie=B.S;ie!==null&&ie(q,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then(ee,ke)}catch(me){ke(me)}finally{H!==null&&q.types!==null&&(H.types=q.types),B.T=H}},xe.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},xe.use=function(O){return B.H.use(O)},xe.useActionState=function(O,H,q){return B.H.useActionState(O,H,q)},xe.useCallback=function(O,H){return B.H.useCallback(O,H)},xe.useContext=function(O){return B.H.useContext(O)},xe.useDebugValue=function(){},xe.useDeferredValue=function(O,H){return B.H.useDeferredValue(O,H)},xe.useEffect=function(O,H){return B.H.useEffect(O,H)},xe.useEffectEvent=function(O){return B.H.useEffectEvent(O)},xe.useId=function(){return B.H.useId()},xe.useImperativeHandle=function(O,H,q){return B.H.useImperativeHandle(O,H,q)},xe.useInsertionEffect=function(O,H){return B.H.useInsertionEffect(O,H)},xe.useLayoutEffect=function(O,H){return B.H.useLayoutEffect(O,H)},xe.useMemo=function(O,H){return B.H.useMemo(O,H)},xe.useOptimistic=function(O,H){return B.H.useOptimistic(O,H)},xe.useReducer=function(O,H,q){return B.H.useReducer(O,H,q)},xe.useRef=function(O){return B.H.useRef(O)},xe.useState=function(O){return B.H.useState(O)},xe.useSyncExternalStore=function(O,H,q){return B.H.useSyncExternalStore(O,H,q)},xe.useTransition=function(){return B.H.useTransition()},xe.version="19.2.4",xe}var C0;function Qs(){return C0||(C0=1,Wm.exports=P2()),Wm.exports}var $=Qs();const ne=tp($),Au=CD({__proto__:null,default:ne},[$]),L2="use",j0=Au[L2],Uc=typeof window<"u"?$.useLayoutEffect:$.useEffect;function eh(e){const t=$.useRef({value:e,prev:null}),i=t.current.value;return e!==i&&(t.current={value:e,prev:i}),t.current.prev}function Z2(e,t,i={},o={}){$.useEffect(()=>{if(!e.current||o.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([s])=>{t(s)},i);return r.observe(e.current),()=>{r.disconnect()}},[t,i,o.disabled,e])}function B2(e){const t=$.useRef(null);return $.useImperativeHandle(e,()=>t.current,[]),t}function op(e){const t=e.errorComponent??sp;return E.jsx(q2,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:i,reset:o})=>i?$.createElement(t,{error:i,reset:o}):e.children})}class q2 extends $.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,i){i.error&&i.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,i){this.props.onCatch&&this.props.onCatch(t,i)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function sp({error:e}){const[t,i]=$.useState(!1);return E.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[E.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),E.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(o=>!o),children:t?"Hide Error":"Show Error"})]}),E.jsx("div",{style:{height:".25rem"}}),t?E.jsx("div",{children:E.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?E.jsx("code",{children:e.message}):null})}):null]})}function F2({children:e,fallback:t=null}){return kw()?E.jsx(ne.Fragment,{children:e}):E.jsx(ne.Fragment,{children:t})}function kw(){return ne.useSyncExternalStore(H2,()=>!0,()=>!1)}function H2(){return()=>{}}var th={exports:{}},nh={},rh={exports:{}},ih={};var R0;function V2(){if(R0)return ih;R0=1;var e=Qs();function t(g,b){return g===b&&(g!==0||1/g===1/b)||g!==g&&b!==b}var i=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,u=e.useDebugValue;function d(g,b){var _=b(),x=o({inst:{value:_,getSnapshot:b}}),w=x[0].inst,z=x[1];return s(function(){w.value=_,w.getSnapshot=b,p(w)&&z({inst:w})},[g,_,b]),r(function(){return p(w)&&z({inst:w}),g(function(){p(w)&&z({inst:w})})},[g]),u(_),_}function p(g){var b=g.getSnapshot;g=g.value;try{var _=b();return!i(g,_)}catch{return!0}}function h(g,b){return b()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return ih.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,ih}var A0;function G2(){return A0||(A0=1,rh.exports=V2()),rh.exports}var N0;function Y2(){if(N0)return nh;N0=1;var e=Qs(),t=G2();function i(h,v){return h===v&&(h!==0||1/h===1/v)||h!==h&&v!==v}var o=typeof Object.is=="function"?Object.is:i,r=t.useSyncExternalStore,s=e.useRef,u=e.useEffect,d=e.useMemo,p=e.useDebugValue;return nh.useSyncExternalStoreWithSelector=function(h,v,g,b,_){var x=s(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=d(function(){function T(ee){if(!N){if(N=!0,P=ee,ee=b(ee),_!==void 0&&w.hasValue){var B=w.value;if(_(B,ee))return M=B}return M=ee}if(B=M,o(P,ee))return B;var A=b(ee);return _!==void 0&&_(B,A)?(P=ee,B):(P=ee,M=A)}var N=!1,P,M,K=g===void 0?null:g;return[function(){return T(v())},K===null?void 0:function(){return T(K())}]},[v,g,b,_]);var z=r(h,x[0],x[1]);return u(function(){w.hasValue=!0,w.value=z},[z]),p(z),z},nh}var M0;function K2(){return M0||(M0=1,th.exports=Y2()),th.exports}var Q2=K2();function X2(e,t=o=>o,i={}){const o=i.equal??J2;return Q2.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,o)}function J2(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,r]of e)if(!t.has(o)||!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const i=U0(e);if(i.length!==U0(t).length)return!1;for(let o=0;o<i.length;o++)if(!Object.prototype.hasOwnProperty.call(t,i[o])||!Object.is(e[i[o]],t[i[o]]))return!1;return!0}function U0(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const ah=$.createContext(null);function Ew(){return typeof document>"u"?ah:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ah,ah)}function An(e){const t=$.useContext(Ew());return e?.warn,t}function pn(e){const t=An({warn:e?.router===void 0}),i=e?.router||t,o=$.useRef(void 0);return X2(i.__store,r=>{if(e?.select){if(e.structuralSharing??i.options.defaultStructuralSharing){const s=mn(o.current,e.select(r));return o.current=s,s}return e.select(r)}return r})}const Nu=$.createContext(void 0),W2=$.createContext(void 0);function tr(e){const t=$.useContext(e.from?W2:Nu);return pn({select:o=>{const r=o.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(Or(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function lp(e){return tr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function cp(e){const{select:t,...i}=e;return tr({...i,select:o=>t?t(o.loaderDeps):o.loaderDeps})}function up(e){return tr({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const i=e.strict===!1?t.params:t._strictParams;return e.select?e.select(i):i}})}function dp(e){return tr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Xs(e){const t=An();return $.useCallback(i=>t.navigate({...i,from:i.from??e?.from}),[e?.from,t])}var oh={exports:{}},At={};var I0;function e6(){if(I0)return At;I0=1;var e=Qs();function t(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(t(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},r=Symbol.for("react.portal");function s(p,h,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:g==null?null:""+g,children:p,containerInfo:h,implementation:v}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,At.createPortal=function(p,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(p,h,null,v)},At.flushSync=function(p){var h=u.T,v=o.p;try{if(u.T=null,o.p=2,p)return p()}finally{u.T=h,o.p=v,o.d.f()}},At.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,o.d.C(p,h))},At.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},At.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var v=h.as,g=d(v,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,_=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?o.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:_}):v==="script"&&o.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:_,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},At.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=d(h.as,h.crossOrigin);o.d.M(p,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&o.d.M(p)},At.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,g=d(v,h.crossOrigin);o.d.L(p,v,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},At.preloadModule=function(p,h){if(typeof p=="string")if(h){var v=d(h.as,h.crossOrigin);o.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else o.d.m(p)},At.requestFormReset=function(p){o.d.r(p)},At.unstable_batchedUpdates=function(p,h){return p(h)},At.useFormState=function(p,h,v){return u.H.useFormState(p,h,v)},At.useFormStatus=function(){return u.H.useHostTransitionStatus()},At.version="19.2.4",At}var P0;function zw(){if(P0)return oh.exports;P0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),oh.exports=e6(),oh.exports}var fp=zw();const Ow=tp(fp);function t6(e,t){const i=An(),o=B2(t),{activeProps:r,inactiveProps:s,activeOptions:u,to:d,preload:p,preloadDelay:h,hashScrollIntoView:v,replace:g,startTransition:b,resetScroll:_,viewTransition:x,children:w,target:z,disabled:T,style:N,className:P,onClick:M,onFocus:K,onMouseEnter:ee,onMouseLeave:B,onTouchStart:A,ignoreBlocker:Y,params:se,search:oe,hash:ae,state:pe,mask:ge,reloadDocument:Ue,unsafeRelative:R,from:J,_fromLocation:W,...ke}=e,we=kw(),O=pn({select:Ze=>Ze.location.search,structuralSharing:!0}),H=e.from,q=$.useMemo(()=>({...e,from:H}),[i,O,H,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=$.useMemo(()=>i.buildLocation({...q}),[i,q]),ie=X.maskedLocation?X.maskedLocation.publicHref:X.publicHref,me=X.maskedLocation?X.maskedLocation.external:X.external,de=$.useMemo(()=>s6(ie,me,i.history,T),[T,me,ie,i.history]),be=$.useMemo(()=>{if(de?.external)return su(de.href,i.protocolAllowlist)?void 0:de.href;if(!l6(d)&&!(typeof d!="string"||d.indexOf(":")===-1))try{return new URL(d),su(d,i.protocolAllowlist)?void 0:d}catch{}},[d,de,i.protocolAllowlist]),Ce=pn({select:Ze=>{if(be)return!1;if(u?.exact){if(!a2(Ze.location.pathname,X.pathname,i.basepath))return!1}else{const pt=cu(Ze.location.pathname,i.basepath),gt=cu(X.pathname,i.basepath);if(!(pt.startsWith(gt)&&(pt.length===gt.length||pt[gt.length]==="/")))return!1}return(u?.includeSearch??!0)&&!ea(Ze.location.search,X.search,{partial:!u?.exact,ignoreUndefined:!u?.explicitUndefined})?!1:u?.includeHash?we&&Ze.location.hash===X.hash:!0}}),ut=Ce?ui(r,{})??n6:sh,_t=Ce?sh:ui(s,{})??sh,St=[P,ut.className,_t.className].filter(Boolean).join(" "),$i=(N||ut.style||_t.style)&&{...N,...ut.style,..._t.style},[an,jr]=$.useState(!1),rr=$.useRef(!1),Ht=e.reloadDocument||be?!1:p??i.options.defaultPreload,ir=h??i.options.defaultPreloadDelay??0,st=$.useCallback(()=>{i.preloadRoute({...q}).catch(Ze=>{console.warn(Ze),console.warn(U2)})},[i,q]),ki=$.useCallback(Ze=>{Ze?.isIntersecting&&st()},[st]);Z2(o,ki,o6,{disabled:!!T||Ht!=="viewport"}),$.useEffect(()=>{rr.current||!T&&Ht==="render"&&(st(),rr.current=!0)},[T,st,Ht]);const Ei=Ze=>{const pt=Ze.currentTarget.getAttribute("target"),gt=z!==void 0?z:pt;if(!T&&!c6(Ze)&&!Ze.defaultPrevented&&(!gt||gt==="_self")&&Ze.button===0){Ze.preventDefault(),fp.flushSync(()=>{jr(!0)});const Rr=i.subscribe("onResolved",()=>{Rr(),jr(!1)});i.navigate({...q,replace:g,resetScroll:_,hashScrollIntoView:v,startTransition:b,viewTransition:x,ignoreBlocker:Y})}};if(be)return{...ke,ref:o,href:be,...w&&{children:w},...z&&{target:z},...T&&{disabled:T},...N&&{style:N},...P&&{className:P},...M&&{onClick:M},...K&&{onFocus:K},...ee&&{onMouseEnter:ee},...B&&{onMouseLeave:B},...A&&{onTouchStart:A}};const wt=Ze=>{T||Ht&&st()},Fn=wt,Et=Ze=>{if(!(T||!Ht))if(!ir)st();else{const pt=Ze.target;if(zs.has(pt))return;const gt=setTimeout(()=>{zs.delete(pt),st()},ir);zs.set(pt,gt)}},jo=Ze=>{if(T||!Ht||!ir)return;const pt=Ze.target,gt=zs.get(pt);gt&&(clearTimeout(gt),zs.delete(pt))};return{...ke,...ut,..._t,href:de?.href,ref:o,onClick:Os([M,Ei]),onFocus:Os([K,wt]),onMouseEnter:Os([ee,Et]),onMouseLeave:Os([B,jo]),onTouchStart:Os([A,Fn]),disabled:!!T,target:z,...$i&&{style:$i},...St&&{className:St},...T&&r6,...Ce&&i6,...we&&an&&a6}}const sh={},n6={className:"active"},r6={role:"link","aria-disabled":!0},i6={"data-status":"active","aria-current":"page"},a6={"data-transitioning":"transitioning"},zs=new WeakMap,o6={rootMargin:"100px"},Os=e=>t=>{for(const i of e)if(i){if(t.defaultPrevented)return;i(t)}};function s6(e,t,i,o){if(!o)return t?{href:e,external:!0}:{href:i.createHref(e)||"/",external:!1}}function l6(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Tw=$.forwardRef((e,t)=>{const{_asChild:i,...o}=e,{type:r,...s}=t6(o,t),u=typeof o.children=="function"?o.children({isActive:s["data-status"]==="active"}):o.children;if(!i){const{disabled:d,...p}=s;return $.createElement("a",p,u)}return $.createElement(i,s,u)});function c6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let u6=class extends $w{constructor(t){super(t),this.useMatch=i=>tr({select:i?.select,from:this.id,structuralSharing:i?.structuralSharing}),this.useRouteContext=i=>tr({...i,from:this.id,select:o=>i?.select?i.select(o.context):o.context}),this.useSearch=i=>dp({select:i?.select,structuralSharing:i?.structuralSharing,from:this.id}),this.useParams=i=>up({select:i?.select,structuralSharing:i?.structuralSharing,from:this.id}),this.useLoaderDeps=i=>cp({...i,from:this.id}),this.useLoaderData=i=>lp({...i,from:this.id}),this.useNavigate=()=>Xs({from:this.fullPath}),this.Link=ne.forwardRef((i,o)=>E.jsx(Tw,{ref:o,from:this.fullPath,...i})),this.$$typeof=Symbol.for("react.memo")}};function d6(e){return new u6(e)}class f6 extends I2{constructor(t){super(t),this.useMatch=i=>tr({select:i?.select,from:this.id,structuralSharing:i?.structuralSharing}),this.useRouteContext=i=>tr({...i,from:this.id,select:o=>i?.select?i.select(o.context):o.context}),this.useSearch=i=>dp({select:i?.select,structuralSharing:i?.structuralSharing,from:this.id}),this.useParams=i=>up({select:i?.select,structuralSharing:i?.structuralSharing,from:this.id}),this.useLoaderDeps=i=>cp({...i,from:this.id}),this.useLoaderData=i=>lp({...i,from:this.id}),this.useNavigate=()=>Xs({from:this.fullPath}),this.Link=ne.forwardRef((i,o)=>E.jsx(Tw,{ref:o,from:this.fullPath,...i})),this.$$typeof=Symbol.for("react.memo")}}function m6(e){return new f6(e)}function yo(e){return typeof e=="object"?new L0(e,{silent:!0}).createRoute(e):new L0(e,{silent:!0}).createRoute}class L0{constructor(t,i){this.path=t,this.createRoute=o=>{this.silent;const r=d6(o);return r.isRoot=!1,r},this.silent=i?.silent}}class Z0{constructor(t){this.useMatch=i=>tr({select:i?.select,from:this.options.id,structuralSharing:i?.structuralSharing}),this.useRouteContext=i=>tr({from:this.options.id,select:o=>i?.select?i.select(o.context):o.context}),this.useSearch=i=>dp({select:i?.select,structuralSharing:i?.structuralSharing,from:this.options.id}),this.useParams=i=>up({select:i?.select,structuralSharing:i?.structuralSharing,from:this.options.id}),this.useLoaderDeps=i=>cp({...i,from:this.options.id}),this.useLoaderData=i=>lp({...i,from:this.options.id}),this.useNavigate=()=>{const i=An();return Xs({from:i.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function B0(e){return typeof e=="object"?new Z0(e):t=>new Z0({id:e,...t})}function Ls(e,t){let i,o,r,s;const u=()=>(i||(i=e().then(p=>{i=void 0,o=p[t??"default"]}).catch(p=>{if(r=p,FD(r)&&r instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const h=`tanstack_router_reload:${r.message}`;sessionStorage.getItem(h)||(sessionStorage.setItem(h,"1"),s=!0)}})),i),d=function(h){if(s)throw window.location.reload(),new Promise(()=>{});if(r)throw r;if(!o)if(j0)j0(u());else throw u();return $.createElement(o,h)};return d.preload=u,d}function h6(){const e=An(),t=$.useRef({router:e,mounted:!1}),[i,o]=$.useState(!1),{hasPendingMatches:r,isLoading:s}=pn({select:g=>({isLoading:g.isLoading,hasPendingMatches:g.matches.some(b=>b.status==="pending")}),structuralSharing:!0}),u=eh(s),d=s||i||r,p=eh(d),h=s||r,v=eh(h);return e.startTransition=g=>{o(!0),$.startTransition(()=>{g(),o(!1)})},$.useEffect(()=>{const g=e.history.subscribe(e.load),b=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Er(e.latestLocation.publicHref)!==Er(b.publicHref)&&e.commitLocation({...b,replace:!0}),()=>{g()}},[e,e.history]),Uc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(b){console.error(b)}})()},[e]),Uc(()=>{u&&!s&&e.emit({type:"onLoad",...ta(e.state)})},[u,e,s]),Uc(()=>{v&&!h&&e.emit({type:"onBeforeRouteMount",...ta(e.state)})},[h,v,e]),Uc(()=>{if(p&&!d){const g=ta(e.state);e.emit({type:"onResolved",...g}),e.__store.setState(b=>({...b,status:"idle",resolvedLocation:b.location})),g.hrefChanged&&p2(e)}},[d,p,e]),null}function p6(e){const t=pn({select:i=>`not-found-${i.location.pathname}-${i.status}`});return E.jsx(op,{getResetKey:()=>t,onCatch:(i,o)=>{if(hn(i))e.onCatch?.(i,o);else throw i},errorComponent:({error:i})=>{if(hn(i))return e.fallback?.(i);throw i},children:e.children})}function g6(){return E.jsx("p",{children:"Not Found"})}function co(e){return E.jsx(E.Fragment,{children:e.children})}function Dw(e,t,i){return t.options.notFoundComponent?E.jsx(t.options.notFoundComponent,{...i}):e.options.defaultNotFoundComponent?E.jsx(e.options.defaultNotFoundComponent,{...i}):E.jsx(g6,{})}function v6(){return An().isScrollRestoring,null}const Cw=$.memo(function({matchId:t}){const i=An(),o=pn({select:w=>{const z=w.matches.findIndex(N=>N.id===t),T=w.matches[z];return Or(T),{routeId:T.routeId,ssr:T.ssr,_displayPending:T._displayPending,resetKey:w.loadedAt,parentRouteId:w.matches[z-1]?.routeId}},structuralSharing:!0}),r=i.routesById[o.routeId],s=r.options.pendingComponent??i.options.defaultPendingComponent,u=s?E.jsx(s,{}):null,d=r.options.errorComponent??i.options.defaultErrorComponent,p=r.options.onCatch??i.options.defaultOnCatch,h=r.isRoot?r.options.notFoundComponent??i.options.notFoundRoute?.options.component:r.options.notFoundComponent,v=o.ssr===!1||o.ssr==="data-only",g=(!r.isRoot||r.options.wrapInSuspense||v)&&(r.options.wrapInSuspense??s??(r.options.errorComponent?.preload||v))?$.Suspense:co,b=d?op:co,_=h?p6:co,x=r.isRoot?r.options.shellComponent??co:co;return E.jsxs(x,{children:[E.jsx(Nu.Provider,{value:t,children:E.jsx(g,{fallback:u,children:E.jsx(b,{getResetKey:()=>o.resetKey,errorComponent:d||sp,onCatch:(w,z)=>{if(hn(w))throw w;p?.(w,z)},children:E.jsx(_,{fallback:w=>{if(!h||w.routeId&&w.routeId!==o.routeId||!w.routeId&&!r.isRoot)throw w;return $.createElement(h,w)},children:v||o._displayPending?E.jsx(F2,{fallback:u,children:E.jsx(q0,{matchId:t})}):E.jsx(q0,{matchId:t})})})})}),o.parentRouteId===On&&i.options.scrollRestoration?E.jsxs(E.Fragment,{children:[E.jsx(y6,{}),E.jsx(v6,{})]}):null]})});function y6(){const e=An(),t=$.useRef(void 0);return E.jsx("script",{suppressHydrationWarning:!0,ref:i=>{i&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...ta(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const q0=$.memo(function({matchId:t}){const i=An(),{match:o,key:r,routeId:s}=pn({select:p=>{const h=p.matches.find(x=>x.id===t),v=h.routeId,b=(i.routesById[v].options.remountDeps??i.options.defaultRemountDeps)?.({routeId:v,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:b?JSON.stringify(b):void 0,routeId:v,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=i.routesById[s],d=$.useMemo(()=>{const p=u.options.component??i.options.defaultComponent;return p?E.jsx(p,{},r):E.jsx(jw,{})},[r,u.options.component,i.options.defaultComponent]);if(o._displayPending)throw i.getMatch(o.id)?._nonReactive.displayPendingPromise;if(o._forcePending)throw i.getMatch(o.id)?._nonReactive.minPendingPromise;if(o.status==="pending"){const p=u.options.pendingMinMs??i.options.defaultPendingMinMs;if(p){const h=i.getMatch(o.id);if(h&&!h._nonReactive.minPendingPromise){const v=go();h._nonReactive.minPendingPromise=v,setTimeout(()=>{v.resolve(),h._nonReactive.minPendingPromise=void 0},p)}}throw i.getMatch(o.id)?._nonReactive.loadPromise}if(o.status==="notFound")return Or(hn(o.error)),Dw(i,u,o.error);if(o.status==="redirected")throw Or(Dn(o.error)),i.getMatch(o.id)?._nonReactive.loadPromise;if(o.status==="error")throw o.error;return d}),jw=$.memo(function(){const t=An(),i=$.useContext(Nu),o=pn({select:h=>h.matches.find(v=>v.id===i)?.routeId}),r=t.routesById[o],s=pn({select:h=>{const g=h.matches.find(b=>b.id===i);return Or(g),g.globalNotFound}}),u=pn({select:h=>{const v=h.matches,g=v.findIndex(b=>b.id===i);return v[g+1]?.id}}),d=t.options.defaultPendingComponent?E.jsx(t.options.defaultPendingComponent,{}):null;if(s)return Dw(t,r,void 0);if(!u)return null;const p=E.jsx(Cw,{matchId:u});return o===On?E.jsx($.Suspense,{fallback:d,children:p}):p});function b6(){const e=An(),i=e.routesById[On].options.pendingComponent??e.options.defaultPendingComponent,o=i?E.jsx(i,{}):null,r=typeof document<"u"&&e.ssr?co:$.Suspense,s=E.jsxs(r,{fallback:o,children:[E.jsx(h6,{}),E.jsx(_6,{})]});return e.options.InnerWrap?E.jsx(e.options.InnerWrap,{children:s}):s}function _6(){const e=An(),t=pn({select:r=>r.matches[0]?.id}),i=pn({select:r=>r.loadedAt}),o=t?E.jsx(Cw,{matchId:t}):null;return E.jsx(Nu.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?o:E.jsx(op,{getResetKey:()=>i,errorComponent:sp,onCatch:r=>{r.message||r.toString()},children:o})})}const S6=e=>new w6(e);class w6 extends D2{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=yo,globalThis.createLazyFileRoute=B0):typeof window<"u"&&(window.createFileRoute=yo,window.createLazyFileRoute=B0);function x6({router:e,children:t,...i}){Object.keys(i).length>0&&e.update({...e.options,...i,context:{...e.options.context,...i.context}});const o=Ew(),r=E.jsx(o.Provider,{value:e,children:t});return e.options.Wrap?E.jsx(e.options.Wrap,{children:r}):r}function $6({router:e,...t}){return E.jsx(x6,{router:e,...t,children:E.jsx(b6,{})})}var lh={exports:{}},Ts={},ch={exports:{}},uh={};var F0;function k6(){return F0||(F0=1,(function(e){function t(R,J){var W=R.length;R.push(J);e:for(;0<W;){var ke=W-1>>>1,we=R[ke];if(0<r(we,J))R[ke]=J,R[W]=we,W=ke;else break e}}function i(R){return R.length===0?null:R[0]}function o(R){if(R.length===0)return null;var J=R[0],W=R.pop();if(W!==J){R[0]=W;e:for(var ke=0,we=R.length,O=we>>>1;ke<O;){var H=2*(ke+1)-1,q=R[H],X=H+1,ie=R[X];if(0>r(q,W))X<we&&0>r(ie,q)?(R[ke]=ie,R[X]=W,ke=X):(R[ke]=q,R[H]=W,ke=H);else if(X<we&&0>r(ie,W))R[ke]=ie,R[X]=W,ke=X;else break e}}return J}function r(R,J){var W=R.sortIndex-J.sortIndex;return W!==0?W:R.id-J.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var p=[],h=[],v=1,g=null,b=3,_=!1,x=!1,w=!1,z=!1,T=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function M(R){for(var J=i(h);J!==null;){if(J.callback===null)o(h);else if(J.startTime<=R)o(h),J.sortIndex=J.expirationTime,t(p,J);else break;J=i(h)}}function K(R){if(w=!1,M(R),!x)if(i(p)!==null)x=!0,ee||(ee=!0,ae());else{var J=i(h);J!==null&&Ue(K,J.startTime-R)}}var ee=!1,B=-1,A=5,Y=-1;function se(){return z?!0:!(e.unstable_now()-Y<A)}function oe(){if(z=!1,ee){var R=e.unstable_now();Y=R;var J=!0;try{e:{x=!1,w&&(w=!1,N(B),B=-1),_=!0;var W=b;try{t:{for(M(R),g=i(p);g!==null&&!(g.expirationTime>R&&se());){var ke=g.callback;if(typeof ke=="function"){g.callback=null,b=g.priorityLevel;var we=ke(g.expirationTime<=R);if(R=e.unstable_now(),typeof we=="function"){g.callback=we,M(R),J=!0;break t}g===i(p)&&o(p),M(R)}else o(p);g=i(p)}if(g!==null)J=!0;else{var O=i(h);O!==null&&Ue(K,O.startTime-R),J=!1}}break e}finally{g=null,b=W,_=!1}J=void 0}}finally{J?ae():ee=!1}}}var ae;if(typeof P=="function")ae=function(){P(oe)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ge=pe.port2;pe.port1.onmessage=oe,ae=function(){ge.postMessage(null)}}else ae=function(){T(oe,0)};function Ue(R,J){B=T(function(){R(e.unstable_now())},J)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(R){switch(b){case 1:case 2:case 3:var J=3;break;default:J=b}var W=b;b=J;try{return R()}finally{b=W}},e.unstable_requestPaint=function(){z=!0},e.unstable_runWithPriority=function(R,J){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var W=b;b=R;try{return J()}finally{b=W}},e.unstable_scheduleCallback=function(R,J,W){var ke=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ke+W:ke):W=ke,R){case 1:var we=-1;break;case 2:we=250;break;case 5:we=1073741823;break;case 4:we=1e4;break;default:we=5e3}return we=W+we,R={id:v++,callback:J,priorityLevel:R,startTime:W,expirationTime:we,sortIndex:-1},W>ke?(R.sortIndex=W,t(h,R),i(p)===null&&R===i(h)&&(w?(N(B),B=-1):w=!0,Ue(K,W-ke))):(R.sortIndex=we,t(p,R),x||_||(x=!0,ee||(ee=!0,ae()))),R},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(R){var J=b;return function(){var W=b;b=J;try{return R.apply(this,arguments)}finally{b=W}}}})(uh)),uh}var H0;function E6(){return H0||(H0=1,ch.exports=k6()),ch.exports}var V0;function z6(){if(V0)return Ts;V0=1;var e=E6(),t=Qs(),i=zw();function o(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function s(n){var a=n,l=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(l=a.return),n=a.return;while(n)}return a.tag===3?l:null}function u(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function d(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function p(n){if(s(n)!==n)throw Error(o(188))}function h(n){var a=n.alternate;if(!a){if(a=s(n),a===null)throw Error(o(188));return a!==n?null:n}for(var l=n,c=a;;){var f=l.return;if(f===null)break;var m=f.alternate;if(m===null){if(c=f.return,c!==null){l=c;continue}break}if(f.child===m.child){for(m=f.child;m;){if(m===l)return p(f),n;if(m===c)return p(f),a;m=m.sibling}throw Error(o(188))}if(l.return!==c.return)l=f,c=m;else{for(var y=!1,S=f.child;S;){if(S===l){y=!0,l=f,c=m;break}if(S===c){y=!0,c=f,l=m;break}S=S.sibling}if(!y){for(S=m.child;S;){if(S===l){y=!0,l=m,c=f;break}if(S===c){y=!0,c=m,l=f;break}S=S.sibling}if(!y)throw Error(o(189))}}if(l.alternate!==c)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?n:a}function v(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=v(n),a!==null)return a;n=n.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),_=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),P=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ae(n){return n===null||typeof n!="object"?null:(n=oe&&n[oe]||n["@@iterator"],typeof n=="function"?n:null)}var pe=Symbol.for("react.client.reference");function ge(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===pe?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case w:return"Fragment";case T:return"Profiler";case z:return"StrictMode";case K:return"Suspense";case ee:return"SuspenseList";case Y:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case x:return"Portal";case P:return n.displayName||"Context";case N:return(n._context.displayName||"Context")+".Consumer";case M:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case B:return a=n.displayName||null,a!==null?a:ge(n.type)||"Memo";case A:a=n._payload,n=n._init;try{return ge(n(a))}catch{}}return null}var Ue=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ke=[],we=-1;function O(n){return{current:n}}function H(n){0>we||(n.current=ke[we],ke[we]=null,we--)}function q(n,a){we++,ke[we]=n.current,n.current=a}var X=O(null),ie=O(null),me=O(null),de=O(null);function be(n,a){switch(q(me,a),q(ie,n),q(X,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?P_(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=P_(a),n=L_(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(X),q(X,n)}function Ce(){H(X),H(ie),H(me)}function ut(n){n.memoizedState!==null&&q(de,n);var a=X.current,l=L_(a,n.type);a!==l&&(q(ie,n),q(X,l))}function _t(n){ie.current===n&&(H(X),H(ie)),de.current===n&&(H(de),bs._currentValue=W)}var St,$i;function an(n){if(St===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);St=a&&a[1]||"",$i=-1<l.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+St+n+$i}var jr=!1;function rr(n,a){if(!n||jr)return"";jr=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(Z){var L=Z}Reflect.construct(n,[],G)}else{try{G.call()}catch(Z){L=Z}n.call(G.prototype)}}else{try{throw Error()}catch(Z){L=Z}(G=n())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(Z){if(Z&&L&&typeof Z.stack=="string")return[Z.stack,L.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),y=m[0],S=m[1];if(y&&S){var k=y.split(`
|
|
@@ -98,4 +98,4 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
98
98
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
99
99
|
|
|
100
100
|
Please compile your catalog first.
|
|
101
|
-
`)),fi(p)&&vT.test(p)?yT(p):fi(p)?p:i5(p,this._locale,this._locales)(i,o?.formats)}date(t,i){return $v(this._locales||this._locale,t,i)}number(t,i){return Wh(this._locales||this._locale,t,i)}}function f5(e={}){return new d5(e)}const ep=f5(),m5="modulepreload",h5=function(e){return"/"+e},lw={},gi=function(t,i,o){let r=Promise.resolve();if(i&&i.length>0){let p=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");r=p(i.map(h=>{if(h=h5(h),h in lw)return;lw[h]=!0;const v=h.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":m5,v||(b.as="script"),b.crossOrigin="",b.href=h,d&&b.setAttribute("nonce",d),document.head.appendChild(b),v)return new Promise((_,x)=>{b.addEventListener("load",_),b.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return r.then(u=>{for(const d of u||[])d.status==="rejected"&&s(d.reason);return t().catch(s)})},p5=async e=>{switch(e){case"ja":return gi(()=>import("./messages-lrmcxVGh.js"),[]);case"en":return gi(()=>import("./messages-m0e3n_U5.js"),[]);case"zh_CN":return gi(()=>import("./messages-D_2afeYc.js"),[]);default:throw new Error(`Unsupported locale: ${e}`)}},cw=[],g5=async e=>{if(!cw.includes(e)){const{messages:t}=await p5(e);ep.load(e,t),cw.push(e)}ep.activate(e)},v5=({children:e})=>{const{config:t}=Od();return $.useEffect(()=>{g5(t.locale)},[t.locale]),E.jsx(U6,{i18n:ep,children:e})},Sl=m6({component:()=>E.jsxs(nR,{children:[E.jsx(k3,{children:E.jsx(BR,{children:E.jsx(v5,{children:E.jsx($3,{children:E.jsx(Pj,{children:E.jsx(jw,{})})})})})}),E.jsx(W3,{position:"top-right"})]})}),y5=()=>gi(()=>import("./login-
|
|
101
|
+
`)),fi(p)&&vT.test(p)?yT(p):fi(p)?p:i5(p,this._locale,this._locales)(i,o?.formats)}date(t,i){return $v(this._locales||this._locale,t,i)}number(t,i){return Wh(this._locales||this._locale,t,i)}}function f5(e={}){return new d5(e)}const ep=f5(),m5="modulepreload",h5=function(e){return"/"+e},lw={},gi=function(t,i,o){let r=Promise.resolve();if(i&&i.length>0){let p=function(h){return Promise.all(h.map(v=>Promise.resolve(v).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");r=p(i.map(h=>{if(h=h5(h),h in lw)return;lw[h]=!0;const v=h.endsWith(".css"),g=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const b=document.createElement("link");if(b.rel=v?"stylesheet":m5,v||(b.as="script"),b.crossOrigin="",b.href=h,d&&b.setAttribute("nonce",d),document.head.appendChild(b),v)return new Promise((_,x)=>{b.addEventListener("load",_),b.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(u){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=u,window.dispatchEvent(d),!d.defaultPrevented)throw u}return r.then(u=>{for(const d of u||[])d.status==="rejected"&&s(d.reason);return t().catch(s)})},p5=async e=>{switch(e){case"ja":return gi(()=>import("./messages-lrmcxVGh.js"),[]);case"en":return gi(()=>import("./messages-m0e3n_U5.js"),[]);case"zh_CN":return gi(()=>import("./messages-D_2afeYc.js"),[]);default:throw new Error(`Unsupported locale: ${e}`)}},cw=[],g5=async e=>{if(!cw.includes(e)){const{messages:t}=await p5(e);ep.load(e,t),cw.push(e)}ep.activate(e)},v5=({children:e})=>{const{config:t}=Od();return $.useEffect(()=>{g5(t.locale)},[t.locale]),E.jsx(U6,{i18n:ep,children:e})},Sl=m6({component:()=>E.jsxs(nR,{children:[E.jsx(k3,{children:E.jsx(BR,{children:E.jsx(v5,{children:E.jsx($3,{children:E.jsx(Pj,{children:E.jsx(jw,{})})})})})}),E.jsx(W3,{position:"top-right"})]})}),y5=()=>gi(()=>import("./login-CIKB0Oew.js"),__vite__mapDeps([0,1,2])),b5=yo("/login")({component:Ls(y5,"component")}),_5=()=>gi(()=>import("./index-BU5VCG8M.js"),[]),S5=yo("/")({component:Ls(_5,"component")}),w5=()=>gi(()=>import("./index-BUy-hZ_L.js"),__vite__mapDeps([3,4,1])),x5=yo("/projects/")({component:Ls(w5,"component")}),$5=Co(["sessions","mcp","tasks","scheduler","settings","system-info"]),k5=()=>gi(()=>import("./session-WhX_gGJt.js"),[]),E5=()=>gi(()=>import("./session-D50bOHyT.js"),__vite__mapDeps([5,4,2,1,6])),z5=Co(["git","files-tools","review","browser"]),O5=Pg({sessionId:qs().optional(),tab:$5.optional().default("sessions"),rightPanel:yd().optional().default(!0),rightPanelTab:z5.optional().default("git")}),T5=yo("/projects/$projectId/session")({validateSearch:O5,component:Ls(E5,"component"),notFoundComponent:Ls(k5,"notFoundComponent")}),D5=b5.update({id:"/login",path:"/login",getParentRoute:()=>Sl}),C5=S5.update({id:"/",path:"/",getParentRoute:()=>Sl}),j5=x5.update({id:"/projects/",path:"/projects/",getParentRoute:()=>Sl}),R5=T5.update({id:"/projects/$projectId/session",path:"/projects/$projectId/session",getParentRoute:()=>Sl}),A5={IndexRoute:C5,LoginRoute:D5,ProjectsIndexRoute:j5,ProjectsProjectIdSessionRoute:R5},N5=Sl._addFileChildren(A5)._addFileTypes(),M5=S6({routeTree:N5,context:{},defaultPreload:"intent",scrollRestoration:!0,defaultStructuralSharing:!0,defaultPreloadStaleTime:0,defaultNotFoundComponent:()=>E.jsx(nj,{})}),$h=document.getElementById("app");$h&&!$h.innerHTML&&D6.createRoot($h).render(E.jsx($.StrictMode,{children:E.jsx(Ij,{children:E.jsx($6,{router:M5})})}));export{XL as $,L5 as A,hu as B,rx as C,h3 as D,P5 as E,_x as F,Rj as G,Oo as H,_3 as I,bt as J,IP as K,Y6 as L,fa as M,nj as N,AO as O,Cr as P,px as Q,ne as R,ZP as S,dh as T,gh as U,pi as V,Dd as W,Ys as X,fp as Y,Ks as Z,ZO as _,Xs as a,KO as a0,dL as a1,PO as a2,UO as a3,tZ as a4,iR as a5,oC as a6,It as a7,Bw as a8,Sp as a9,d3 as aA,mp as aB,eC as aC,F5 as aD,H5 as aE,V5 as aF,T5 as aG,As as aH,MR as aI,Fh as aJ,Hh as aK,zp as aL,Tg as aM,gl as aN,Co as aO,Vg as aP,yd as aQ,q5 as aR,Y5 as aS,NR as aT,X5 as aU,K5 as aV,Q5 as aW,oZ as aX,G5 as aY,dp as aZ,wp as aa,Ax as ab,xp as ac,nC as ad,J6 as ae,Pg as af,qs as ag,wd as ah,fO as ai,tp as aj,pT as ak,K0 as al,eZ as am,Q6 as an,W5 as ao,kr as ap,I5 as aq,Fj as ar,Hj as as,Vj as at,pS as au,J5 as av,aC as aw,s3 as ax,c3 as ay,u3 as az,ix as b,Si as c,ax as d,ox as e,sx as f,wx as g,Od as h,DP as i,E as j,Tw as k,Sx as l,B5 as m,Mh as n,it as o,rR as p,rZ as q,$ as r,v3 as s,sZ as t,qR as u,y3 as v,b3 as w,aZ as x,iZ as y,mS as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as t,a7 as l}from"./index-
|
|
1
|
+
import{r,j as t,a7 as l}from"./index-DhqtKAUx.js";const d=r.forwardRef(({className:e,children:a,...s},o)=>t.jsx("label",{ref:o,className:l("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...s,children:a}));d.displayName="Label";export{d as L};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as x,r as s,u as y,a as g,j as e,C as j,b as w,d as v,e as N,f as k,I as C,B as E,L as S}from"./index-
|
|
1
|
+
import{c as x,r as s,u as y,a as g,j as e,C as j,b as w,d as v,e as N,f as k,I as C,B as E,L as S}from"./index-DhqtKAUx.js";import{L as I}from"./label-Bx75JYJV.js";import{E as L}from"./eye-DsqhY3YQ.js";const P=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],M=x("eye-off",P);const _=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],A=x("key-round",_);function D(){const[a,p]=s.useState(""),[t,h]=s.useState(!1),[i,d]=s.useState(""),[r,l]=s.useState(!1),{authEnabled:c,isAuthenticated:m,login:f}=y(),o=g();s.useEffect(()=>{c?m&&o({to:"/projects"}):o({to:"/projects"})},[c,m,o]);const b=async n=>{n.preventDefault(),d(""),l(!0);try{await f(a)}catch(u){d(u instanceof Error?u.message:"Invalid password. Please try again.")}finally{l(!1)}};return e.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background via-background to-muted/30 p-4",children:[e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-primary/5 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-primary/5 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] bg-gradient-to-r from-primary/3 to-transparent rounded-full blur-3xl"})]}),e.jsxs(j,{className:"w-full max-w-md relative backdrop-blur-sm bg-card/95 border-border/50 shadow-xl animate-in fade-in-0 zoom-in-95 duration-300",children:[e.jsxs(w,{className:"space-y-4 text-center pb-2",children:[e.jsx("div",{className:"mx-auto w-16 h-16 rounded-2xl bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center border border-primary/10 shadow-inner",children:e.jsx(A,{className:"w-8 h-8 text-primary"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{className:"text-2xl font-bold tracking-tight",children:"Claude Code Viewer"}),e.jsx(N,{className:"text-muted-foreground",children:"Enter your password to continue"})]})]}),e.jsx(k,{className:"pt-4",children:e.jsxs("form",{onSubmit:b,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(I,{htmlFor:"password",className:"text-sm font-medium",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(C,{id:"password",type:t?"text":"password",value:a,onChange:n=>p(n.target.value),placeholder:"Enter your password",className:"pr-10 h-11 text-base",autoFocus:!0,disabled:r}),e.jsx("button",{type:"button",onClick:()=>h(!t),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors",tabIndex:-1,children:t?e.jsx(M,{className:"h-4 w-4"}):e.jsx(L,{className:"h-4 w-4"})})]})]}),i&&e.jsx("div",{className:"text-sm text-destructive bg-destructive/10 border border-destructive/20 rounded-lg px-4 py-3 animate-in slide-in-from-top-1 duration-200",children:i}),e.jsx(E,{type:"submit",className:"w-full h-11 text-base font-medium",disabled:!a||r,children:r?e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):"Sign in"})]})})]})]})}export{D as component};
|