1import{o as e}from"./rolldown-runtime-CMxvf4Kt.js";import{T as t,w as n}from"./tanstack-query-ge42pLoc.js";import{n as r,r as i}from"./createLucideIcon-91f8ip0O.js";import{c as a,d as o,m as s,p as c,t as ee}from"./useStore-fEZMUbNE.js";import{t as l}from"./invariant-DEEwAagU.js";import{c as u,f as d,l as te,n as ne,o as re,p as f,r as p}from"./ClientOnly-BQa9wC6j.js";import{r as m}from"./redirect-DCb_aIiF.js";import{a as h,o as ie,r as ae,s as oe}from"./with-selector-Cpfi5LnW.js";import{n as g,t as _}from"./useSearch-CAVPon2V.js";var se=`Error preloading route! âï¸`,v=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}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=p:this.parentRoute||l();let r=n?p:t?.path;r&&r!==`/`&&(r=d(r));let i=t?.id||r,a=n?p:u([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=u([`/`,a]));let o=a===`__root__`?`/`:u([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=f(o)},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=>m({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.`)}},y=class extends v{constructor(e){super(e)}};function b(e){return g({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function x(e){let{select:t,...n}=e;return g({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function S(e){return g({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 C(e){return g({...e,select:t=>e.select?e.select(t.context):t.context})}var w=e(t(),1),T=n(),ce=e(i(),1);
1function E(e,t){let n=ae(),r=ie(t),{activeProps:i,inactiveProps:s,activeOptions:l,to:u,preload:d,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:m,replace:h,startTransition:g,resetScroll:_,viewTransition:v,children:y,target:b,disabled:x,style:S,className:C,onClick:T,onBlur:E,onFocus:A,onMouseEnter:j,onMouseLeave:M,onTouchStart:N,ignoreBlocker:P,params:_e,search:ve,hash:ye,state:be,mask:xe,reloadDocument:Se,unsafeRelative:Ce,from:we,_fromLocation:Te,...F}=e,I=ne(),L=w.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),R=ee(n.stores.location,e=>e,(e,t)=>e.href===t.href),z=w.useMemo(()=>{let e={_fromLocation:R,...L};return n.buildLocation(e)},[n,R,L]),B=z.maskedLocation?z.maskedLocation.publicHref:z.publicHref,V=z.maskedLocation?z.maskedLocation.external:z.external,H=w.useMemo(()=>me(B,V,n.history,x),[x,V,B,n.history]),U=w.useMemo(()=>{if(H?.external)return c(H.href,n.protocolAllowlist)?void 0:H.href;if(!he(u)&&!(typeof u!=`string`||u.indexOf(`:`)===-1))try{return new URL(u),c(u,n.protocolAllowlist)?void 0:u}catch{}},[u,H,n.protocolAllowlist]),W=w.useMemo(()=>{if(U)return!1;if(l?.exact){if(!re(R.pathname,z.pathname,n.basepath))return!1}else{let e=te(R.pathname,n.basepath),t=te(z.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(l?.includeSearch??!0)&&!a(R.search,z.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?I&&R.hash===z.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,R,U,I,z.hash,z.pathname,z.search,n.basepath]),G=W?o(i,{})??le:D,K=W?D:o(s,{})??D,q=[C,G.className,K.className].filter(Boolean).join(` `),J=(S||G.style||K.style)&&{...S,...G.style,...K.style},[Ee,De]=w.useState(!1),Y=w.useRef(!1),X=e.reloadDocument||U?!1:d??n.options.defaultPreload,Z=f??n.options.defaultPreloadDelay??0,Q=w.useCallback(()=>{n.preloadRoute({...L,_builtLocation:z}).catch(e=>{console.warn(e),console.warn(se)})},[n,L,z]);oe(r,w.useCallback(e=>{e?.isIntersecting&&Q()},[Q]),pe,{disabled:!!x||X!==`viewport`}),w.useEffect(()=>{Y.current||!x&&X===`render`&&(Q(),Y.current=!0)},[x,Q,X]);let Oe=e=>{let t=e.currentTarget.getAttribute(`target`),r=b===void 0?t:b;if(!x&&!ge(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,ce.flushSync)(()=>{De(!0)});let t=n.subscribe(`onResolved`,()=>{t(),De(!1)});n.navigate({...L,replace:h,resetScroll:_,hashScrollIntoView:m,startTransition:g,viewTransition:v,ignoreBlocker:P})}};if(U)return{...F,ref:r,href:U,...y&&{children:y},...b&&{target:b},...x&&{disabled:x},...S&&{style:S},...C&&{className:C},...T&&{onClick:T},...E&&{onBlur:E},...A&&{onFocus:A},...j&&{onMouseEnter:j},...M&&{onMouseLeave:M},...N&&{onTouchStart:N}};let ke=e=>{if(x||X!==`intent`)return;if(!Z){Q();return}let t=e.currentTarget;if(O.has(t))return;let n=setTimeout(()=>{O.delete(t),Q()},Z);O.set(t,n)},Ae=e=>{x||X!==`intent`||Q()},$=e=>{if(x||!X||!Z)return;let t=e.currentTarget,n=O.get(t);n&&(clearTimeout(n),O.delete(t))};return{...F,...G,...K,href:H?.href,ref:r,onClick:k([T,Oe]),onBlur:k([E,$]),onFocus:k([A,ke]),onMouseEnter:k([j,ke]),onMouseLeave:k([M,$]),onTouchStart:k([N,Ae]),disabled:!!x,target:b,...J&&{style:J},...q&&{className:q},...x&&ue,...W&&de,...I&&Ee&&fe}}var D={},le={className:`active`},ue={role:`link`,"aria-disabled":!0},de={"data-status":`active`,"aria-current":`page`},fe={"data-transitioning":`transitioning`},O=new WeakMap,pe={rootMargin:`100px`},k=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function me(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function he(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var A=w.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=E(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return w.createElement(`a`,t,o)}return w.createElement(n,a,o)});function ge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var j=class extends v{constructor(e){super(e),this.useMatch=e=>g({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>C({...e,from:this.id}),this.useSearch=e=>_({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>S({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>x({...e,from:this.id}),this.useLoaderData=e=>b({...e,from:this.id}),this.useNavigate=()=>r({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>
1(0,T.jsx)(A,{ref:t,from:this.fullPath,...e}))}};function M(e){return new j(e)}function N(){return e=>_e(e)}var P=class extends y{constructor(e){super(e),this.useMatch=e=>g({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>C({...e,from:this.id}),this.useSearch=e=>_({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>S({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>x({...e,from:this.id}),this.useLoaderData=e=>b({...e,from:this.id}),this.useNavigate=()=>r({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,T.jsx)(A,{ref:t,from:this.fullPath,...e}))}};function _e(e){return new P(e)}function ve(e){return new ye(e,{silent:!0}).createRoute}var ye=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=M(e);return t.isRoot=!1,t},this.silent=t?.silent}};function be(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,s(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),c=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(h)h(o());else throw o();return w.createElement(r,e)};return c.preload=o,c}export{A as i,ve as n,N as r,be 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.