1import{r as e}from"./chunk-DECur_0Z.js";import{n as t,t as n}from"./jsx-runtime-CP2iHdEU.js";import{E as r,F as i,h as a,l as o,n as s,r as c,t as l,v as u,y as d}from"./link-BvvuVq0V.js";import{t as f}from"./useNavigate-lXWwhhBd.js";function p(e){return!!e?.isNotFound}var m=`__root__`;function h(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{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function g(e){return e instanceof Response&&!!e.options}var _=class{constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=m:this.parentRoute||r(!1,`Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.`);let i=n?m:t?.path;i&&i!==`/`&&(i=u(i));let o=t?.id||i,s=n?m:a([this.parentRoute.id===`__root__`?``:this.parentRoute.id,o]);i===`__root__`&&(i=`/`),s!==`__root__`&&(s=a([`/`,s]));let c=s===`__root__`?`/`:a([this.parentRoute.fullPath,i]);this._path=i,this._id=s,this._fullPath=c,this._to=d(c)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>h({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw 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}},v=class extends _{constructor(e){super(e)}},y=e(t(),1),b=y.createContext(void 0),x=y.createContext(void 0);function S(e){let t=y.useContext(e.from?x:b);return s({select:n=>{let i=n.matches.find(n=>e.from?e.from===n.routeId:n.id===t);if(r(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:`a nearest match!`}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function C(e){return S({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function w(e){let{select:t,...n}=e;return S({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function T(e){return S({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function E(e){return S({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}var D=n(),O=class extends _{constructor(e){super(e),this.useMatch=e=>S({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>E({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>w({...e,from:this.id}),this.useLoaderData=e=>C({...e,from:this.id}),this.useNavigate=()=>f({from:this.fullPath}),this.Link=y.forwardRef((e,t)=>(0,D.jsx)(l,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function k(e){return new O(e)}var A=class extends v{constructor(e){super(e),this.useMatch=e=>S({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S({...e,from:this.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>E({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>w({...e,from:this.id}),this.useLoaderData=e=>C({...e,from:this.id}),this.useNavigate=()=>f({from:this.fullPath}),this.Link=y.forwardRef((e,t)=>
1(0,D.jsx)(l,{ref:t,from:this.fullPath,...e})),this.$$typeof=Symbol.for(`react.memo`)}};function j(e){return new A(e)}function M(e){return typeof e==`object`?new N(e,{silent:!0}).createRoute(e):new N(e,{silent:!0}).createRoute}var N=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=k(e);return t.isRoot=!1,t},this.silent=t?.silent}},P=class{constructor(e){this.useMatch=e=>S({select:e?.select,from:this.options.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>S({from:this.options.id,select:t=>e?.select?e.select(t.context):t.context}),this.useSearch=e=>E({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useParams=e=>T({select:e?.select,structuralSharing:e?.structuralSharing,from:this.options.id}),this.useLoaderDeps=e=>w({...e,from:this.options.id}),this.useLoaderData=e=>C({...e,from:this.options.id}),this.useNavigate=()=>f({from:c().routesById[this.options.id].fullPath}),this.options=e,this.$$typeof=Symbol.for(`react.memo`)}};function F(e){return typeof e==`object`?new P(e):t=>new P({id:e,...t})}function I(e,t){let n,r,a,s,c=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(a=e,i(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),s=!0)}}),n),l=function(e){if(s)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)if(o)o(c());else throw c();return y.createElement(r,e)};return l.preload=c,l}export{b as a,m as c,j as i,p as l,M as n,g as o,F as r,h as s,I as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.