@ottocode/web-ui 0.1.173
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 +450 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +263 -0
- package/dist/web-assets/assets/JetBrainsMonoNerdFontMono-Bold-CU80ifuM.woff2 +0 -0
- package/dist/web-assets/assets/JetBrainsMonoNerdFontMono-BoldItalic-D8WKzlhG.woff2 +0 -0
- package/dist/web-assets/assets/JetBrainsMonoNerdFontMono-Italic-CO98v9JQ.woff2 +0 -0
- package/dist/web-assets/assets/JetBrainsMonoNerdFontMono-Regular-QVq88ZfU.woff2 +0 -0
- package/dist/web-assets/assets/__vite-browser-external-2447137e-BIHI7g3E.js +1 -0
- package/dist/web-assets/assets/icons-CauB6tyl.js +1 -0
- package/dist/web-assets/assets/index-CJ2AP7LT.js +115 -0
- package/dist/web-assets/assets/index-DqoFZJpB.css +1 -0
- package/dist/web-assets/assets/markdown-DZTI3WvM.js +29 -0
- package/dist/web-assets/assets/react-C7bPzU82.js +9 -0
- package/dist/web-assets/assets/router-BJqKFLBP.js +1 -0
- package/dist/web-assets/assets/syntax-COWumqTl.js +9 -0
- package/dist/web-assets/index.html +32 -0
- package/dist/web-assets/vite.svg +1 -0
- package/package.json +39 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as x,j as _,_ as pn,b as mn,R as Lt,a as Os,c as yn}from"./react-C7bPzU82.js";var vt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},gn={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},vn=class{#t=gn;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,e){return this.#t.setTimeout(t,e)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,e){return this.#t.setInterval(t,e)}clearInterval(t){this.#t.clearInterval(t)}},st=new vn;function Sn(t){setTimeout(t,0)}var at=typeof window>"u"||"Deno"in globalThis;function A(){}function Pn(t,e){return typeof t=="function"?t(e):t}function fe(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ms(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Z(t,e){return typeof t=="function"?t(e):t}function N(t,e){return typeof t=="function"?t(e):t}function Ve(t,e){const{type:s="all",exact:n,fetchStatus:r,predicate:i,queryKey:a,stale:o}=t;if(a){if(n){if(e.queryHash!==we(a,e.options))return!1}else if(!Ot(e.queryKey,a))return!1}if(s!=="all"){const c=e.isActive();if(s==="active"&&!c||s==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||r&&r!==e.state.fetchStatus||i&&!i(e))}function Ge(t,e){const{exact:s,status:n,predicate:r,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(s){if(ct(e.options.mutationKey)!==ct(i))return!1}else if(!Ot(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||r&&!r(e))}function we(t,e){return(e?.queryKeyHashFn||ct)(t)}function ct(t){return JSON.stringify(t,(e,s)=>pe(s)?Object.keys(s).sort().reduce((n,r)=>(n[r]=s[r],n),{}):s)}function Ot(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>Ot(t[s],e[s])):!1}var wn=Object.prototype.hasOwnProperty;function Es(t,e,s=0){if(t===e)return t;if(s>500)return e;const n=Je(t)&&Je(e);if(!n&&!(pe(t)&&pe(e)))return e;const i=(n?t:Object.keys(t)).length,a=n?e:Object.keys(e),o=a.length,c=n?new Array(o):{};let u=0;for(let h=0;h<o;h++){const d=n?h:a[h],l=t[d],f=e[d];if(l===f){c[d]=l,(n?h<i:wn.call(t,d))&&u++;continue}if(l===null||f===null||typeof l!="object"||typeof f!="object"){c[d]=f;continue}const p=Es(l,f,s+1);c[d]=p,p===l&&u++}return i===o&&u===i?t:c}function Nt(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Je(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function pe(t){if(!Ye(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!Ye(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Ye(t){return Object.prototype.toString.call(t)==="[object Object]"}function Rn(t){return new Promise(e=>{st.setTimeout(e,t)})}function me(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?Es(t,e):e}function bn(t,e,s=0){const n=[...t,e];return s&&n.length>s?n.slice(1):n}function xn(t,e,s=0){const n=[e,...t];return s&&n.length>s?n.slice(0,-1):n}var Re=Symbol();function Is(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===Re?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function be(t,e){return typeof t=="function"?t(...e):!!t}function _n(t,e,s){let n=!1,r;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??=e(),n||(n=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),t}var Cn=class extends vt{#t;#e;#s;constructor(){super(),this.#s=t=>{if(!at&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},xe=new Cn;function ye(){let t,e;const s=new Promise((r,i)=>{t=r,e=i});s.status="pending",s.catch(()=>{});function n(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{n({status:"fulfilled",value:r}),t(r)},s.reject=r=>{n({status:"rejected",reason:r}),e(r)},s}var Ln=Sn;function On(){let t=[],e=0,s=o=>{o()},n=o=>{o()},r=Ln;const i=o=>{e?t.push(o):r(()=>{s(o)})},a=()=>{const o=t;t=[],o.length&&r(()=>{n(()=>{o.forEach(c=>{s(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{n=o},setScheduler:o=>{r=o}}}var F=On(),Mn=class extends vt{#t=!0;#e;#s;constructor(){super(),this.#s=t=>{if(!at&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#e||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#s=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#t}},Qt=new Mn;function En(t){return Math.min(1e3*2**t,3e4)}function Ts(t){return(t??"online")==="online"?Qt.isOnline():!0}var ge=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function ks(t){let e=!1,s=0,n;const r=ye(),i=()=>r.status!=="pending",a=m=>{if(!i()){const y=new ge(m);l(y),t.onCancel?.(y)}},o=()=>{e=!0},c=()=>{e=!1},u=()=>xe.isFocused()&&(t.networkMode==="always"||Qt.isOnline())&&t.canRun(),h=()=>Ts(t.networkMode)&&t.canRun(),d=m=>{i()||(n?.(),r.resolve(m))},l=m=>{i()||(n?.(),r.reject(m))},f=()=>new Promise(m=>{n=y=>{(i()||u())&&m(y)},t.onPause?.()}).then(()=>{n=void 0,i()||t.onContinue?.()}),p=()=>{if(i())return;let m;const y=s===0?t.initialPromise:void 0;try{m=y??t.fn()}catch(g){m=Promise.reject(g)}Promise.resolve(m).then(d).catch(g=>{if(i())return;const w=t.retry??(at?0:3),P=t.retryDelay??En,S=typeof P=="function"?P(s,g):P,C=w===!0||typeof w=="number"&&s<w||typeof w=="function"&&w(s,g);if(e||!C){l(g);return}s++,t.onFail?.(s,g),Rn(S).then(()=>u()?void 0:f()).then(()=>{e?l(g):p()})})};return{promise:r,status:()=>r.status,cancel:a,continue:()=>(n?.(),r),cancelRetry:o,continueRetry:c,canStart:h,start:()=>(h()?p():f().then(p),r)}}var Fs=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),fe(this.gcTime)&&(this.#t=st.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(at?1/0:300*1e3))}clearGcTimeout(){this.#t&&(st.clearTimeout(this.#t),this.#t=void 0)}},In=class extends Fs{#t;#e;#s;#r;#n;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#s=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Ze(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#o,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=Ze(this.options);e.data!==void 0&&(this.setState(Xe(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,e){const s=me(this.state.data,t,this.options);return this.#i({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t,e){this.#i({type:"setState",state:t,setStateOptions:e})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(A).catch(A):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>N(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Re||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Z(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ms(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||(this.#n&&(this.#a?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const o=this.observers.find(c=>c.options.queryFn);o&&this.setOptions(o.options)}const s=new AbortController,n=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#a=!0,s.signal)})},r=()=>{const o=Is(this.options,e),u=(()=>{const h={client:this.#r,queryKey:this.queryKey,meta:this.meta};return n(h),h})();return this.#a=!1,this.options.persister?this.options.persister(o,u,this):o(u)},a=(()=>{const o={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return n(o),o})();this.options.behavior?.onFetch(a,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#i({type:"fetch",meta:a.fetchOptions?.meta}),this.#n=ks({initialPromise:e?.initialPromise,fn:a.fetchFn,onCancel:o=>{o instanceof ge&&o.revert&&this.setState({...this.#e,fetchStatus:"idle"}),s.abort()},onFail:(o,c)=>{this.#i({type:"failed",failureCount:o,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const o=await this.#n.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#s.config.onSuccess?.(o,this),this.#s.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof ge){if(o.silent)return this.#n.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#i({type:"error",error:o}),this.#s.config.onError?.(o,this),this.#s.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#i(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...As(s.data,this.options),fetchMeta:t.meta??null};case"success":const n={...s,...Xe(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?n:void 0,n;case"error":const r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),F.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function As(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ts(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Xe(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ze(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,n=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Tn=class extends vt{constructor(t,e){super(),this.options=e,this.#t=t,this.#i=null,this.#a=ye(),this.bindMethods(),this.setOptions(e)}#t;#e=void 0;#s=void 0;#r=void 0;#n;#o;#a;#i;#m;#d;#f;#u;#l;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),ts(this.#e,this.options)?this.#h():this.updateResult(),this.#S())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ve(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ve(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#P(),this.#w(),this.#e.removeObserver(this)}setOptions(t){const e=this.options,s=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof N(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#R(),this.#e.setOptions(this.options),e._defaulted&&!Nt(this.options,e)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const n=this.hasListeners();n&&es(this.#e,s,this.options,e)&&this.#h(),this.updateResult(),n&&(this.#e!==s||N(this.options.enabled,this.#e)!==N(e.enabled,this.#e)||Z(this.options.staleTime,this.#e)!==Z(e.staleTime,this.#e))&&this.#y();const r=this.#g();n&&(this.#e!==s||N(this.options.enabled,this.#e)!==N(e.enabled,this.#e)||r!==this.#c)&&this.#v(r)}getOptimisticResult(t){const e=this.#t.getQueryCache().build(this.#t,t),s=this.createResult(e,t);return Fn(this,s)&&(this.#r=s,this.#o=this.options,this.#n=this.#e.state),s}getCurrentResult(){return this.#r}trackResult(t,e){return new Proxy(t,{get:(s,n)=>(this.trackProp(n),e?.(n),n==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,n))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#t.defaultQueryOptions(t),s=this.#t.getQueryCache().build(this.#t,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(t){this.#R();let e=this.#e.fetch(this.options,t);return t?.throwOnError||(e=e.catch(A)),e}#y(){this.#P();const t=Z(this.options.staleTime,this.#e);if(at||this.#r.isStale||!fe(t))return;const s=Ms(this.#r.dataUpdatedAt,t)+1;this.#u=st.setTimeout(()=>{this.#r.isStale||this.updateResult()},s)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#v(t){this.#w(),this.#c=t,!(at||N(this.options.enabled,this.#e)===!1||!fe(this.#c)||this.#c===0)&&(this.#l=st.setInterval(()=>{(this.options.refetchIntervalInBackground||xe.isFocused())&&this.#h()},this.#c))}#S(){this.#y(),this.#v(this.#g())}#P(){this.#u&&(st.clearTimeout(this.#u),this.#u=void 0)}#w(){this.#l&&(st.clearInterval(this.#l),this.#l=void 0)}createResult(t,e){const s=this.#e,n=this.options,r=this.#r,i=this.#n,a=this.#o,c=t!==s?t.state:this.#s,{state:u}=t;let h={...u},d=!1,l;if(e._optimisticResults){const v=this.hasListeners(),b=!v&&ts(t,e),E=v&&es(t,s,e,n);(b||E)&&(h={...h,...As(u.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:f,errorUpdatedAt:p,status:m}=h;l=h.data;let y=!1;if(e.placeholderData!==void 0&&l===void 0&&m==="pending"){let v;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(v=r.data,y=!0):v=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,v!==void 0&&(m="success",l=me(r?.data,v,e),d=!0)}if(e.select&&l!==void 0&&!y)if(r&&l===i?.data&&e.select===this.#m)l=this.#d;else try{this.#m=e.select,l=e.select(l),l=me(r?.data,l,e),this.#d=l,this.#i=null}catch(v){this.#i=v}this.#i&&(f=this.#i,l=this.#d,p=Date.now(),m="error");const g=h.fetchStatus==="fetching",w=m==="pending",P=m==="error",S=w&&g,C=l!==void 0,R={status:m,fetchStatus:h.fetchStatus,isPending:w,isSuccess:m==="success",isError:P,isInitialLoading:S,isLoading:S,data:l,dataUpdatedAt:h.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:g,isRefetching:g&&!w,isLoadingError:P&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:P&&C,isStale:_e(t,e),refetch:this.refetch,promise:this.#a,isEnabled:N(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const v=R.data!==void 0,b=R.status==="error"&&!v,E=M=>{b?M.reject(R.error):v&&M.resolve(R.data)},O=()=>{const M=this.#a=R.promise=ye();E(M)},I=this.#a;switch(I.status){case"pending":t.queryHash===s.queryHash&&E(I);break;case"fulfilled":(b||R.data!==I.value)&&O();break;case"rejected":(!b||R.error!==I.reason)&&O();break}}return R}updateResult(){const t=this.#r,e=this.createResult(this.#e,this.options);if(this.#n=this.#e.state,this.#o=this.options,this.#n.data!==void 0&&(this.#f=this.#e),Nt(e,t))return;this.#r=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:n}=this.options,r=typeof n=="function"?n():n;if(r==="all"||!r&&!this.#p.size)return!0;const i=new Set(r??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(a=>{const o=a;return this.#r[o]!==t[o]&&i.has(o)})};this.#b({listeners:s()})}#R(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const e=this.#e;this.#e=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#S()}#b(t){F.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function kn(t,e){return N(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function ts(t,e){return kn(t,e)||t.state.data!==void 0&&ve(t,e,e.refetchOnMount)}function ve(t,e,s){if(N(e.enabled,t)!==!1&&Z(e.staleTime,t)!=="static"){const n=typeof s=="function"?s(t):s;return n==="always"||n!==!1&&_e(t,e)}return!1}function es(t,e,s,n){return(t!==e||N(n.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&_e(t,s)}function _e(t,e){return N(e.enabled,t)!==!1&&t.isStaleByTime(Z(e.staleTime,t))}function Fn(t,e){return!Nt(t.getCurrentResult(),e)}function ss(t){return{onFetch:(e,s)=>{const n=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,i=e.state.data?.pages||[],a=e.state.data?.pageParams||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const d=p=>{_n(p,()=>e.signal,()=>h=!0)},l=Is(e.options,e.fetchOptions),f=async(p,m,y)=>{if(h)return Promise.reject();if(m==null&&p.pages.length)return Promise.resolve(p);const w=(()=>{const L={client:e.client,queryKey:e.queryKey,pageParam:m,direction:y?"backward":"forward",meta:e.options.meta};return d(L),L})(),P=await l(w),{maxPages:S}=e.options,C=y?xn:bn;return{pages:C(p.pages,P,S),pageParams:C(p.pageParams,m,S)}};if(r&&i.length){const p=r==="backward",m=p?An:ns,y={pages:i,pageParams:a},g=m(n,y);o=await f(y,g,p)}else{const p=t??i.length;do{const m=c===0?a[0]??n.initialPageParam:ns(n,o);if(c>0&&m==null)break;o=await f(o,m),c++}while(c<p)}return o};e.options.persister?e.fetchFn=()=>e.options.persister?.(u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=u}}}function ns(t,{pages:e,pageParams:s}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,s[n],s):void 0}function An(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}var Dn=class extends Fs{#t;#e;#s;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||Ds(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const e=()=>{this.#n({type:"continue"})},s={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ks({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(i,a)=>{this.#n({type:"failed",failureCount:i,error:a})},onPause:()=>{this.#n({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const n=this.state.status==="pending",r=!this.#r.canStart();try{if(n)e();else{this.#n({type:"pending",variables:t,isPaused:r}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const a=await this.options.onMutate?.(t,s);a!==this.state.context&&this.#n({type:"pending",context:a,variables:t,isPaused:r})}const i=await this.#r.start();return await this.#s.config.onSuccess?.(i,t,this.state.context,this,s),await this.options.onSuccess?.(i,t,this.state.context,s),await this.#s.config.onSettled?.(i,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(i,null,t,this.state.context,s),this.#n({type:"success",data:i}),i}catch(i){try{await this.#s.config.onError?.(i,t,this.state.context,this,s)}catch(a){Promise.reject(a)}try{await this.options.onError?.(i,t,this.state.context,s)}catch(a){Promise.reject(a)}try{await this.#s.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,s)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,i,t,this.state.context,s)}catch(a){Promise.reject(a)}throw this.#n({type:"error",error:i}),i}finally{this.#s.runNext(this)}}#n(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),F.batch(()=>{this.#e.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function Ds(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jn=class extends vt{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#s=0}#t;#e;#s;build(t,e,s){const n=new Dn({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(n),n}add(t){this.#t.add(t);const e=Ft(t);if(typeof e=="string"){const s=this.#e.get(e);s?s.push(t):this.#e.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const e=Ft(t);if(typeof e=="string"){const s=this.#e.get(e);if(s)if(s.length>1){const n=s.indexOf(t);n!==-1&&s.splice(n,1)}else s[0]===t&&this.#e.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=Ft(t);if(typeof e=="string"){const n=this.#e.get(e)?.find(r=>r.state.status==="pending");return!n||n===t}else return!0}runNext(t){const e=Ft(t);return typeof e=="string"?this.#e.get(e)?.find(n=>n!==t&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Ge(e,s))}findAll(t={}){return this.getAll().filter(e=>Ge(t,e))}notify(t){F.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return F.batch(()=>Promise.all(t.map(e=>e.continue().catch(A))))}};function Ft(t){return t.options.scope?.id}var Bn=class extends vt{#t;#e=void 0;#s;#r;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),Nt(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&ct(e.mutationKey)!==ct(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#n(),this.#o(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#n(),this.#o()}mutate(t,e){return this.#r=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#n(){const t=this.#s?.state??Ds();this.#e={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){F.batch(()=>{if(this.#r&&this.hasListeners()){const e=this.#e.variables,s=this.#e.context,n={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,e,s,n)}catch(r){Promise.reject(r)}try{this.#r.onSettled?.(t.data,null,e,s,n)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,e,s,n)}catch(r){Promise.reject(r)}try{this.#r.onSettled?.(void 0,t.error,e,s,n)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#e)})})}},Un=class extends vt{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,e,s){const n=e.queryKey,r=e.queryHash??we(n,e);let i=this.get(r);return i||(i=new In({client:t,queryKey:n,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(n)}),this.add(i)),i}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){F.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>Ve(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>Ve(t,s)):e}notify(t){F.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){F.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ji=class{#t;#e;#s;#r;#n;#o;#a;#i;constructor(t={}){this.#t=t.queryCache||new Un,this.#e=t.mutationCache||new jn,this.#s=t.defaultOptions||{},this.#r=new Map,this.#n=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=xe.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#i=Qt.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#t.build(this,e),n=s.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Z(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:e,state:s})=>{const n=s.data;return[e,n]})}setQueryData(t,e,s){const n=this.defaultQueryOptions({queryKey:t}),i=this.#t.get(n.queryHash)?.state.data,a=Pn(e,i);if(a!==void 0)return this.#t.build(this,n).setData(a,{...s,manual:!0})}setQueriesData(t,e,s){return F.batch(()=>this.#t.findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#t.get(e.queryHash)?.state}removeQueries(t){const e=this.#t;F.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#t;return F.batch(()=>(s.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},n=F.batch(()=>this.#t.findAll(t).map(r=>r.cancel(s)));return Promise.all(n).then(A).catch(A)}invalidateQueries(t,e={}){return F.batch(()=>(this.#t.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},n=F.batch(()=>this.#t.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let i=r.fetch(void 0,s);return s.throwOnError||(i=i.catch(A)),r.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(n).then(A)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#t.build(this,e);return s.isStaleByTime(Z(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(A).catch(A)}fetchInfiniteQuery(t){return t.behavior=ss(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(A).catch(A)}ensureInfiniteQueryData(t){return t.behavior=ss(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Qt.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#r.set(ct(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(n=>{Ot(t,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(t,e){this.#n.set(ct(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#n.values()],s={};return e.forEach(n=>{Ot(t,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=we(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Re&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},js=x.createContext(void 0),Bs=t=>{const e=x.useContext(js);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Bi=({client:t,children:e})=>(x.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),_.jsx(js.Provider,{value:t,children:e})),Us=x.createContext(!1),Nn=()=>x.useContext(Us);Us.Provider;function Qn(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Kn=x.createContext(Qn()),$n=()=>x.useContext(Kn),qn=(t,e,s)=>{const n=s?.state.error&&typeof t.throwOnError=="function"?be(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||n)&&(e.isReset()||(t.retryOnMount=!1))},Hn=t=>{x.useEffect(()=>{t.clearReset()},[t])},Wn=({result:t,errorResetBoundary:e,throwOnError:s,query:n,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&n&&(r&&t.data===void 0||be(s,[t.error,n])),zn=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),n=t.staleTime;t.staleTime=typeof n=="function"?(...r)=>s(n(...r)):s(n),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Vn=(t,e)=>t.isLoading&&t.isFetching&&!e,Gn=(t,e)=>t?.suspense&&e.isPending,rs=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function Jn(t,e,s){const n=Nn(),r=$n(),i=Bs(),a=i.defaultQueryOptions(t);i.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const o=i.getQueryCache().get(a.queryHash);a._optimisticResults=n?"isRestoring":"optimistic",zn(a),qn(a,r,o),Hn(r);const c=!i.getQueryCache().get(a.queryHash),[u]=x.useState(()=>new e(i,a)),h=u.getOptimisticResult(a),d=!n&&t.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(l=>{const f=d?u.subscribe(F.batchCalls(l)):A;return u.updateResult(),f},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),x.useEffect(()=>{u.setOptions(a)},[a,u]),Gn(a,h))throw rs(a,u,r);if(Wn({result:h,errorResetBoundary:r,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(a,h),a.experimental_prefetchInRender&&!at&&Vn(h,n)&&(c?rs(a,u,r):o?.promise)?.catch(A).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?h:u.trackResult(h)}function Ui(t,e){return Jn(t,Tn)}function Ni(t,e){const s=Bs(),[n]=x.useState(()=>new Bn(s,t));x.useEffect(()=>{n.setOptions(t)},[n,t]);const r=x.useSyncExternalStore(x.useCallback(a=>n.subscribe(F.batchCalls(a)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),i=x.useCallback((a,o)=>{n.mutate(a,o).catch(A)},[n]);if(r.error&&be(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:i,mutateAsync:r.mutate}}function Yn(t){return typeof t=="function"}class Xn{constructor(e,s){this.listeners=new Set,this.subscribe=n=>{var r,i;this.listeners.add(n);const a=(i=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:i.call(r,n,this);return()=>{this.listeners.delete(n),a?.()}},this.prevState=e,this.state=e,this.options=s}setState(e){var s,n,r;this.prevState=this.state,(s=this.options)!=null&&s.updateFn?this.state=this.options.updateFn(this.prevState)(e):Yn(e)?this.state=e(this.prevState):this.state=e,(r=(n=this.options)==null?void 0:n.onUpdate)==null||r.call(n),pn(this)}}const tt="__TSR_index",is="popstate",os="beforeunload";function Zn(t){let e=t.getLocation();const s=new Set,n=a=>{e=t.getLocation(),s.forEach(o=>o({location:e,action:a}))},r=a=>{t.notifyOnIndexChange??!0?n(a):e=t.getLocation()},i=async({task:a,navigateOpts:o,...c})=>{if(o?.ignoreBlocker??!1){a();return}const h=t.getBlockers?.()??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&h.length&&d)for(const l of h){const f=Kt(c.path,c.state);if(await l.blockerFn({currentLocation:e,nextLocation:f,action:c.type})){t.onBlocked?.();return}}a()};return{get location(){return e},get length(){return t.getLength()},subscribers:s,subscribe:a=>(s.add(a),()=>{s.delete(a)}),push:(a,o,c)=>{const u=e.state[tt];o=as(u+1,o),i({task:()=>{t.pushState(a,o),n({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=e.state[tt];o=as(u,o),i({task:()=>{t.replaceState(a,o),n({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{t.go(a),r({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{t.back(a?.ignoreBlocker??!1),r({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{t.forward(a?.ignoreBlocker??!1),r({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>e.state[tt]!==0,createHref:a=>t.createHref(a),block:a=>{if(!t.setBlockers)return()=>{};const o=t.getBlockers?.()??[];return t.setBlockers([...o,a]),()=>{const c=t.getBlockers?.()??[];t.setBlockers?.(c.filter(u=>u!==a))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:n}}function as(t,e){e||(e={});const s=Ce();return{...e,key:s,__TSR_key:s,[tt]:t}}function tr(t){const e=typeof document<"u"?window:void 0,s=e.history.pushState,n=e.history.replaceState;let r=[];const i=()=>r,a=v=>r=v,o=(v=>v),c=(()=>Kt(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){const v=Ce();e.history.replaceState({[tt]:0,key:v,__TSR_key:v},"")}let u=c(),h,d=!1,l=!1,f=!1,p=!1;const m=()=>u;let y,g;const w=()=>{y&&(R._ignoreSubscribers=!0,(y.isPush?e.history.pushState:e.history.replaceState)(y.state,"",y.href),R._ignoreSubscribers=!1,y=void 0,g=void 0,h=void 0)},P=(v,b,E)=>{const O=o(b);g||(h=u),u=Kt(b,E),y={href:O,state:E,isPush:y?.isPush||v==="push"},g||(g=Promise.resolve().then(()=>w()))},S=v=>{u=c(),R.notify({type:v})},C=async()=>{if(l){l=!1;return}const v=c(),b=v.state[tt]-u.state[tt],E=b===1,O=b===-1,I=!E&&!O||d;d=!1;const M=I?"GO":O?"BACK":"FORWARD",T=I?{type:"GO",index:b}:{type:O?"BACK":"FORWARD"};if(f)f=!1;else{const D=i();if(typeof document<"u"&&D.length){for(const ht of D)if(await ht.blockerFn({currentLocation:u,nextLocation:v,action:M})){l=!0,e.history.go(1),R.notify(T);return}}}u=c(),R.notify(T)},L=v=>{if(p){p=!1;return}let b=!1;const E=i();if(typeof document<"u"&&E.length)for(const O of E){const I=O.enableBeforeUnload??!0;if(I===!0){b=!0;break}if(typeof I=="function"&&I()===!0){b=!0;break}}if(b)return v.preventDefault(),v.returnValue=""},R=Zn({getLocation:m,getLength:()=>e.history.length,pushState:(v,b)=>P("push",v,b),replaceState:(v,b)=>P("replace",v,b),back:v=>(v&&(f=!0),p=!0,e.history.back()),forward:v=>{v&&(f=!0),p=!0,e.history.forward()},go:v=>{d=!0,e.history.go(v)},createHref:v=>o(v),flush:w,destroy:()=>{e.history.pushState=s,e.history.replaceState=n,e.removeEventListener(os,L,{capture:!0}),e.removeEventListener(is,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return e.addEventListener(os,L,{capture:!0}),e.addEventListener(is,C),e.history.pushState=function(...v){const b=s.apply(e.history,v);return R._ignoreSubscribers||S("PUSH"),b},e.history.replaceState=function(...v){const b=n.apply(e.history,v);return R._ignoreSubscribers||S("REPLACE"),b},R}function er(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}function Kt(t,e){const s=er(t),n=s.indexOf("#"),r=s.indexOf("?"),i=Ce();return{href:s,pathname:s.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:s.length),hash:n>-1?s.substring(n):"",search:r>-1?s.slice(r,n===-1?void 0:n):"",state:e||{[tt]:0,key:i,__TSR_key:i}}}function Ce(){return(Math.random()+1).toString(36).substring(7)}const sr=!1;function Ct(t){let e;return mn(()=>{e=t()}),e}function Mt(t){return t[t.length-1]}function nr(t){return typeof t=="function"}function Y(t,e){return nr(t)?t(e):t}const rr=Object.prototype.hasOwnProperty,cs=Object.prototype.propertyIsEnumerable;function B(t,e,s=0){if(t===e)return t;if(s>500)return e;const n=e,r=hs(t)&&hs(n);if(!r&&!($t(t)&&$t(n)))return n;const i=r?t:us(t);if(!i)return n;const a=r?n:us(n);if(!a)return n;const o=i.length,c=a.length,u=r?new Array(c):{};let h=0;for(let d=0;d<c;d++){const l=r?d:a[d],f=t[l],p=n[l];if(f===p){u[l]=f,(r?d<o:rr.call(t,l))&&h++;continue}if(f===null||p===null||typeof f!="object"||typeof p!="object"){u[l]=p;continue}const m=B(f,p,s+1);u[l]=m,m===f&&h++}return o===c&&h===o?t:u}function us(t){const e=Object.getOwnPropertyNames(t);for(const r of e)if(!cs.call(t,r))return!1;const s=Object.getOwnPropertySymbols(t);if(s.length===0)return e;const n=e;for(const r of s){if(!cs.call(t,r))return!1;n.push(r)}return n}function $t(t){if(!ls(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const s=e.prototype;return!(!ls(s)||!s.hasOwnProperty("isPrototypeOf"))}function ls(t){return Object.prototype.toString.call(t)==="[object Object]"}function hs(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function it(t,e,s){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(!it(t[n],e[n],s))return!1;return!0}if($t(t)&&$t(e)){const n=s?.ignoreUndefined??!0;if(s?.partial){for(const a in e)if((!n||e[a]!==void 0)&&!it(t[a],e[a],s))return!1;return!0}let r=0;if(!n)r=Object.keys(t).length;else for(const a in t)t[a]!==void 0&&r++;let i=0;for(const a in e)if((!n||e[a]!==void 0)&&(i++,i>r||!it(t[a],e[a],s)))return!1;return r===i}return!1}function yt(t){let e,s;const n=new Promise((r,i)=>{e=r,s=i});return n.status="pending",n.resolve=r=>{n.status="resolved",n.value=r,e(r),t?.(r)},n.reject=r=>{n.status="rejected",s(r)},n}function pt(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function ir(t){return t.replace(/[\x00-\x1f\x7f]/g,"")}function ds(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return ir(e)}const Ns=["http:","https:","mailto:","tel:"];function qt(t){if(!t)return!1;try{const e=new URL(t);return!Ns.includes(e.protocol)}catch{return!1}}function wt(t,e){if(!t||!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return t;const s=/%25|%5C/gi;let n=0,r="",i;for(;(i=s.exec(t))!==null;)r+=ds(t.slice(n,i.index))+i[0],n=s.lastIndex;return r=r+ds(n?t.slice(n):t),r.startsWith("//")&&(r="/"+r.replace(/^\/+/,"")),r}function or(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}var ar="Invariant failed";function G(t,e){if(!t)throw new Error(ar)}function Ht(t){const e=new Map;let s,n;const r=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,n&&(n.next=i,i.prev=n)):(i.next.prev=void 0,s=i.next,i.next=void 0,n&&(i.prev=n,n.next=i)),n=i)};return{get(i){const a=e.get(i);if(a)return r(a),a.value},set(i,a){if(e.size>=t&&s){const c=s;e.delete(c.key),c.next&&(s=c.next,c.next.prev=void 0),c===n&&(n=void 0)}const o=e.get(i);if(o)o.value=a,r(o);else{const c={key:i,value:a,prev:n};n&&(n.next=c),n=c,s||(s=c),e.set(i,c)}},clear(){e.clear(),s=void 0,n=void 0}}}const gt=0,ut=1,lt=2,Et=3,nt=4,Qs=5;function cr(t){const e=t.indexOf("{");if(e===-1)return null;const s=t.indexOf("}",e);return s===-1||e+1>=t.length?null:[e,s]}function Le(t,e,s=new Uint16Array(6)){const n=t.indexOf("/",e),r=n===-1?t.length:n,i=t.substring(e,r);if(!i||!i.includes("$"))return s[0]=gt,s[1]=e,s[2]=e,s[3]=r,s[4]=r,s[5]=r,s;if(i==="$"){const o=t.length;return s[0]=lt,s[1]=e,s[2]=e,s[3]=o,s[4]=o,s[5]=o,s}if(i.charCodeAt(0)===36)return s[0]=ut,s[1]=e,s[2]=e+1,s[3]=r,s[4]=r,s[5]=r,s;const a=cr(i);if(a){const[o,c]=a,u=i.charCodeAt(o+1);if(u===45){if(o+2<i.length&&i.charCodeAt(o+2)===36){const h=o+3,d=c;if(h<d)return s[0]=Et,s[1]=e+o,s[2]=e+h,s[3]=e+d,s[4]=e+c+1,s[5]=r,s}}else if(u===36){const h=o+1,d=o+2;return d===c?(s[0]=lt,s[1]=e+o,s[2]=e+h,s[3]=e+d,s[4]=e+c+1,s[5]=t.length,s):(s[0]=ut,s[1]=e+o,s[2]=e+d,s[3]=e+c,s[4]=e+c+1,s[5]=r,s)}}return s[0]=gt,s[1]=e,s[2]=e,s[3]=r,s[4]=r,s[5]=r,s}function Gt(t,e,s,n,r,i,a){a?.(s);let o=n;{const c=s.fullPath??s.from,u=c.length,h=s.options?.caseSensitive??t,d=!!(s.options?.params?.parse&&s.options?.skipRouteOnParseError?.params);for(;o<u;){const f=Le(c,o,e);let p;const m=o,y=f[5];switch(o=y+1,i++,f[0]){case gt:{const w=c.substring(f[2],f[3]);if(h){const P=r.static?.get(w);if(P)p=P;else{r.static??=new Map;const S=rt(s.fullPath??s.from);S.parent=r,S.depth=i,p=S,r.static.set(w,S)}}else{const P=w.toLowerCase(),S=r.staticInsensitive?.get(P);if(S)p=S;else{r.staticInsensitive??=new Map;const C=rt(s.fullPath??s.from);C.parent=r,C.depth=i,p=C,r.staticInsensitive.set(P,C)}}break}case ut:{const w=c.substring(m,f[1]),P=c.substring(f[4],y),S=h&&!!(w||P),C=w?S?w:w.toLowerCase():void 0,L=P?S?P:P.toLowerCase():void 0,R=!d&&r.dynamic?.find(v=>!v.skipOnParamError&&v.caseSensitive===S&&v.prefix===C&&v.suffix===L);if(R)p=R;else{const v=ee(ut,s.fullPath??s.from,S,C,L);p=v,v.depth=i,v.parent=r,r.dynamic??=[],r.dynamic.push(v)}break}case Et:{const w=c.substring(m,f[1]),P=c.substring(f[4],y),S=h&&!!(w||P),C=w?S?w:w.toLowerCase():void 0,L=P?S?P:P.toLowerCase():void 0,R=!d&&r.optional?.find(v=>!v.skipOnParamError&&v.caseSensitive===S&&v.prefix===C&&v.suffix===L);if(R)p=R;else{const v=ee(Et,s.fullPath??s.from,S,C,L);p=v,v.parent=r,v.depth=i,r.optional??=[],r.optional.push(v)}break}case lt:{const w=c.substring(m,f[1]),P=c.substring(f[4],y),S=h&&!!(w||P),C=w?S?w:w.toLowerCase():void 0,L=P?S?P:P.toLowerCase():void 0,R=ee(lt,s.fullPath??s.from,S,C,L);p=R,R.parent=r,R.depth=i,r.wildcard??=[],r.wildcard.push(R)}}r=p}if(d&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const f=rt(s.fullPath??s.from);f.kind=Qs,f.parent=r,i++,f.depth=i,r.pathless??=[],r.pathless.push(f),r=f}const l=(s.path||!s.children)&&!s.isRoot;if(l&&c.endsWith("/")){const f=rt(s.fullPath??s.from);f.kind=nt,f.parent=r,i++,f.depth=i,r.index=f,r=f}r.parse=s.options?.params?.parse??null,r.skipOnParamError=d,r.parsingPriority=s.options?.skipRouteOnParseError?.priority??0,l&&!r.route&&(r.route=s,r.fullPath=s.fullPath??s.from)}if(s.children)for(const c of s.children)Gt(t,e,c,o,r,i,a)}function te(t,e){if(t.skipOnParamError&&!e.skipOnParamError)return-1;if(!t.skipOnParamError&&e.skipOnParamError)return 1;if(t.skipOnParamError&&e.skipOnParamError&&(t.parsingPriority||e.parsingPriority))return e.parsingPriority-t.parsingPriority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function J(t){if(t.pathless)for(const e of t.pathless)J(e);if(t.static)for(const e of t.static.values())J(e);if(t.staticInsensitive)for(const e of t.staticInsensitive.values())J(e);if(t.dynamic?.length){t.dynamic.sort(te);for(const e of t.dynamic)J(e)}if(t.optional?.length){t.optional.sort(te);for(const e of t.optional)J(e)}if(t.wildcard?.length){t.wildcard.sort(te);for(const e of t.wildcard)J(e)}}function rt(t){return{kind:gt,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}}function ee(t,e,s,n,r){return{kind:t,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,caseSensitive:s,prefix:n,suffix:r}}function ur(t,e){const s=rt("/"),n=new Uint16Array(6);for(const r of t)Gt(!1,n,r,1,s,0);J(s),e.masksTree=s,e.flatCache=Ht(1e3)}function lr(t,e){t||="/";const s=e.flatCache.get(t);if(s)return s;const n=Oe(t,e.masksTree);return e.flatCache.set(t,n),n}function hr(t,e,s,n,r){t||="/",n||="/";const i=e?`case\0${t}`:t;let a=r.singleCache.get(i);if(!a){a=rt("/");const o=new Uint16Array(6);Gt(e,o,{from:t},1,a,0),r.singleCache.set(i,a)}return Oe(n,a,s)}function dr(t,e,s=!1){const n=s?t:`nofuzz\0${t}`,r=e.matchCache.get(n);if(r!==void 0)return r;t||="/";let i;try{i=Oe(t,e.segmentTree,s)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=mr(i.route)),e.matchCache.set(n,i),i}function fr(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function pr(t,e=!1,s){const n=rt(t.fullPath),r=new Uint16Array(6),i={},a={};let o=0;return Gt(e,r,t,1,n,0,u=>{if(s?.(u,o),G(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,o!==0&&u.path){const h=fr(u.fullPath);(!a[h]||u.fullPath.endsWith("/"))&&(a[h]=u)}o++}),J(n),{processedTree:{segmentTree:n,singleCache:Ht(1e3),matchCache:Ht(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Oe(t,e,s=!1){const n=t.split("/"),r=gr(t,n,e,s);if(!r)return null;const[i]=Ks(t,n,r);return{route:r.node.route,rawParams:i,parsedParams:r.parsedParams}}function Ks(t,e,s){const n=yr(s.node);let r=null;const i={};let a=s.extract?.part??0,o=s.extract?.node??0,c=s.extract?.path??0,u=s.extract?.segment??0;for(;o<n.length;a++,o++,c++,u++){const h=n[o];if(h.kind===nt)break;if(h.kind===Qs){u--,a--,c--;continue}const d=e[a],l=c;if(d&&(c+=d.length),h.kind===ut){r??=s.node.fullPath.split("/");const f=r[u],p=h.prefix?.length??0;if(f.charCodeAt(p)===123){const y=h.suffix?.length??0,g=f.substring(p+2,f.length-y-1),w=d.substring(p,d.length-y);i[g]=decodeURIComponent(w)}else{const y=f.substring(1);i[y]=decodeURIComponent(d)}}else if(h.kind===Et){if(s.skipped&1<<o){a--,c=l-1;continue}r??=s.node.fullPath.split("/");const f=r[u],p=h.prefix?.length??0,m=h.suffix?.length??0,y=f.substring(p+3,f.length-m-1),g=h.suffix||h.prefix?d.substring(p,d.length-m):d;g&&(i[y]=decodeURIComponent(g))}else if(h.kind===lt){const f=h,p=t.substring(l+(f.prefix?.length??0),t.length-(f.suffix?.length??0)),m=decodeURIComponent(p);i["*"]=m,i._splat=m;break}}return s.rawParams&&Object.assign(i,s.rawParams),[i,{part:a,node:o,path:c,segment:u}]}function mr(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function yr(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function gr(t,e,s,n){if(t==="/"&&s.index)return{node:s.index,skipped:0};const r=!Mt(e),i=r&&t!=="/",a=e.length-(r?1:0),o=[{node:s,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,u=null,h=null;for(;o.length;){const d=o.pop(),{node:l,index:f,skipped:p,depth:m,statics:y,dynamics:g,optionals:w}=d;let{extract:P,rawParams:S,parsedParams:C}=d;if(l.skipOnParamError){if(!se(t,e,d))continue;S=d.rawParams,P=d.extract,C=d.parsedParams}n&&l.route&&l.kind!==nt&&Rt(u,d)&&(u=d);const L=f===a;if(L&&(l.route&&!i&&Rt(h,d)&&(h=d),!l.optional&&!l.wildcard&&!l.index&&!l.pathless))continue;const R=L?void 0:e[f];let v;if(L&&l.index){const b={node:l.index,index:f,skipped:p,depth:m+1,statics:y,dynamics:g,optionals:w,extract:P,rawParams:S,parsedParams:C};let E=!0;if(l.index.skipOnParamError&&(se(t,e,b)||(E=!1)),E){if(y===a&&!g&&!w&&!p)return b;Rt(h,b)&&(h=b)}}if(l.wildcard&&Rt(c,d))for(const b of l.wildcard){const{prefix:E,suffix:O}=b;if(E&&(L||!(b.caseSensitive?R:v??=R.toLowerCase()).startsWith(E)))continue;if(O){if(L)continue;const M=e.slice(f).join("/").slice(-O.length);if((b.caseSensitive?M:M.toLowerCase())!==O)continue}const I={node:b,index:a,skipped:p,depth:m,statics:y,dynamics:g,optionals:w,extract:P,rawParams:S,parsedParams:C};if(!(b.skipOnParamError&&!se(t,e,I))){c=I;break}}if(l.optional){const b=p|1<<m,E=m+1;for(let O=l.optional.length-1;O>=0;O--){const I=l.optional[O];o.push({node:I,index:f,skipped:b,depth:E,statics:y,dynamics:g,optionals:w,extract:P,rawParams:S,parsedParams:C})}if(!L)for(let O=l.optional.length-1;O>=0;O--){const I=l.optional[O],{prefix:M,suffix:T}=I;if(M||T){const D=I.caseSensitive?R:v??=R.toLowerCase();if(M&&!D.startsWith(M)||T&&!D.endsWith(T))continue}o.push({node:I,index:f+1,skipped:p,depth:E,statics:y,dynamics:g,optionals:w+1,extract:P,rawParams:S,parsedParams:C})}}if(!L&&l.dynamic&&R)for(let b=l.dynamic.length-1;b>=0;b--){const E=l.dynamic[b],{prefix:O,suffix:I}=E;if(O||I){const M=E.caseSensitive?R:v??=R.toLowerCase();if(O&&!M.startsWith(O)||I&&!M.endsWith(I))continue}o.push({node:E,index:f+1,skipped:p,depth:m+1,statics:y,dynamics:g+1,optionals:w,extract:P,rawParams:S,parsedParams:C})}if(!L&&l.staticInsensitive){const b=l.staticInsensitive.get(v??=R.toLowerCase());b&&o.push({node:b,index:f+1,skipped:p,depth:m+1,statics:y+1,dynamics:g,optionals:w,extract:P,rawParams:S,parsedParams:C})}if(!L&&l.static){const b=l.static.get(R);b&&o.push({node:b,index:f+1,skipped:p,depth:m+1,statics:y+1,dynamics:g,optionals:w,extract:P,rawParams:S,parsedParams:C})}if(l.pathless){const b=m+1;for(let E=l.pathless.length-1;E>=0;E--){const O=l.pathless[E];o.push({node:O,index:f,skipped:p,depth:b,statics:y,dynamics:g,optionals:w,extract:P,rawParams:S,parsedParams:C})}}}if(h&&c)return Rt(c,h)?h:c;if(h)return h;if(c)return c;if(n&&u){let d=u.index;for(let f=0;f<u.index;f++)d+=e[f].length;const l=d===t.length?"/":t.slice(d);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(l),u}return null}function se(t,e,s){try{const[n,r]=Ks(t,e,s);s.rawParams=n,s.extract=r;const i=s.node.parse(n);return s.parsedParams=Object.assign({},s.parsedParams,i),!0}catch{return null}}function Rt(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===nt)>(t.node.kind===nt)||e.node.kind===nt==(t.node.kind===nt)&&e.depth>t.depth))):!0}function jt(t){return Me(t.filter(e=>e!==void 0).join("/"))}function Me(t){return t.replace(/\/{2,}/g,"/")}function $s(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function V(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function qs(t){return V($s(t))}function Wt(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function vr(t,e,s){return Wt(t,s)===Wt(e,s)}function Sr({base:t,to:e,trailingSlash:s="never",cache:n}){const r=e.startsWith("/"),i=!r&&e===".";let a;if(n){a=r?e:i?t:t+"\0"+e;const d=n.get(a);if(d)return d}let o;if(i)o=t.split("/");else if(r)o=e.split("/");else{for(o=t.split("/");o.length>1&&Mt(o)==="";)o.pop();const d=e.split("/");for(let l=0,f=d.length;l<f;l++){const p=d[l];p===""?l?l===f-1&&o.push(p):o=[p]:p===".."?o.pop():p==="."||o.push(p)}}o.length>1&&(Mt(o)===""?s==="never"&&o.pop():s==="always"&&o.push(""));let c,u="";for(let d=0;d<o.length;d++){d>0&&(u+="/");const l=o[d];if(!l)continue;c=Le(l,0,c);const f=c[0];if(f===gt){u+=l;continue}const p=c[5],m=l.substring(0,c[1]),y=l.substring(c[4],p),g=l.substring(c[2],c[3]);f===ut?u+=m||y?`${m}{$${g}}${y}`:`$${g}`:f===lt?u+=m||y?`${m}{$}${y}`:"$":u+=`${m}{-$${g}}${y}`}u=Me(u);const h=u||"/";return a&&n&&n.set(a,h),h}function Pr(t){const e=new Map(t.map(r=>[encodeURIComponent(r),r])),s=Array.from(e.keys()).map(r=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(s,"g");return r=>r.replace(n,i=>e.get(i)??i)}function ne(t,e,s){const n=e[t];return typeof n!="string"?n:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(r=>fs(r,s)).join("/"):fs(n,s)}function re({path:t,params:e,decoder:s,...n}){let r=!1;const i={};if(!t||t==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:r};if(!t.includes("$"))return{interpolatedPath:t,usedParams:i,isMissingParams:r};const a=t.length;let o=0,c,u="";for(;o<a;){const d=o;c=Le(t,d,c);const l=c[5];if(o=l+1,d===l)continue;const f=c[0];if(f===gt){u+="/"+t.substring(d,l);continue}if(f===lt){const p=e._splat;i._splat=p,i["*"]=p;const m=t.substring(d,c[1]),y=t.substring(c[4],l);if(!p){r=!0,(m||y)&&(u+="/"+m+y);continue}const g=ne("_splat",e,s);u+="/"+m+g+y;continue}if(f===ut){const p=t.substring(c[2],c[3]);!r&&!(p in e)&&(r=!0),i[p]=e[p];const m=t.substring(d,c[1]),y=t.substring(c[4],l),g=ne(p,e,s)??"undefined";u+="/"+m+g+y;continue}if(f===Et){const p=t.substring(c[2],c[3]),m=e[p];if(m==null)continue;i[p]=m;const y=t.substring(d,c[1]),g=t.substring(c[4],l),w=ne(p,e,s)??"";u+="/"+y+w+g;continue}}return t.endsWith("/")&&(u+="/"),{usedParams:i,interpolatedPath:u||"/",isMissingParams:r}}function fs(t,e){const s=encodeURIComponent(t);return e?.(s)??s}function U(t){return!!t?.isNotFound}function wr(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Se="tsr-scroll-restoration-v1_3",Rr=(t,e)=>{let s;return(...n)=>{s||(s=setTimeout(()=>{t(...n),s=null},e))}};function br(){const t=wr();if(!t)return null;const e=t.getItem(Se);let s=e?JSON.parse(e):{};return{state:s,set:n=>{s=Y(n,s)||s;try{t.setItem(Se,JSON.stringify(s))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const At=br(),xr=t=>t.state.__TSR_key||t.href;function _r(t){const e=[];let s;for(;s=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(s.children,t)+1})`),t=s;return`${e.reverse().join(" > ")}`.toLowerCase()}let zt=!1;function Cr({storageKey:t,key:e,behavior:s,shouldScrollRestoration:n,scrollToTopSelectors:r,location:i}){let a;try{a=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(u){console.error(u);return}const o=e||window.history.state?.__TSR_key,c=a[o];zt=!0;t:{if(n&&c&&Object.keys(c).length>0){for(const d in c){const l=c[d];if(d==="window")window.scrollTo({top:l.scrollY,left:l.scrollX,behavior:s});else if(d){const f=document.querySelector(d);f&&(f.scrollLeft=l.scrollX,f.scrollTop=l.scrollY)}}break t}const u=(i??window.location).hash.split("#",2)[1];if(u){const d=window.history.state?.__hashScrollIntoViewOptions??!0;if(d){const l=document.getElementById(u);l&&l.scrollIntoView(d)}break t}const h={top:0,left:0,behavior:s};if(window.scrollTo(h),r)for(const d of r){if(d==="window")continue;const l=typeof d=="function"?d():document.querySelector(d);l&&l.scrollTo(h)}}zt=!1}function Lr(t,e){if(!At||((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isScrollRestorationSetup||!At))return;t.isScrollRestorationSetup=!0,zt=!1;const n=t.options.getScrollRestorationKey||xr;window.history.scrollRestoration="manual";const r=i=>{if(zt||!t.isScrollRestoring)return;let a="";if(i.target===document||i.target===window)a="window";else{const c=i.target.getAttribute("data-scroll-restoration-id");c?a=`[data-scroll-restoration-id="${c}"]`:a=_r(i.target)}const o=n(t.state.location);At.set(c=>{const u=c[o]||={},h=u[a]||={};if(a==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(h.scrollX=d.scrollLeft||0,h.scrollY=d.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",Rr(r,100),!0),t.subscribe("onRendered",i=>{const a=n(i.toLocation);if(!t.resetNextScroll){t.resetNextScroll=!0;return}typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation})||(Cr({storageKey:Se,key:a,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&At.set(o=>(o[a]||={},o)))})}function Or(t){if(typeof document<"u"&&document.querySelector){const e=t.state.location.state.__hashScrollIntoViewOptions??!0;if(e&&t.state.location.hash!==""){const s=document.getElementById(t.state.location.hash);s&&s.scrollIntoView(e)}}}function Mr(t,e=String){const s=new URLSearchParams;for(const n in t){const r=t[n];r!==void 0&&s.set(n,e(r))}return s.toString()}function ie(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function Er(t){const e=new URLSearchParams(t),s={};for(const[n,r]of e.entries()){const i=s[n];i==null?s[n]=ie(r):Array.isArray(i)?i.push(ie(r)):s[n]=[i,ie(r)]}return s}const Ir=kr(JSON.parse),Tr=Fr(JSON.stringify,JSON.parse);function kr(t){return e=>{e[0]==="?"&&(e=e.substring(1));const s=Er(e);for(const n in s){const r=s[n];if(typeof r=="string")try{s[n]=t(r)}catch{}}return s}}function Fr(t,e){const s=typeof e=="function";function n(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(s&&typeof r=="string")try{return e(r),t(r)}catch{}return r}return r=>{const i=Mr(r,n);return i?`?${i}`:""}}const Q="__root__";function Ar(t){if(t.statusCode=t.statusCode||t.code||307,!t._builtLocation&&typeof t.href=="string"&&qt(t.href))throw new Error(`Redirect blocked: unsafe protocol in href "${t.href}". Only ${Ns.join(", ")} protocols are allowed.`);if(!t._builtLocation&&!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:e});if(s.options=t,t.throw)throw s;return s}function K(t){return t instanceof Response&&!!t.options}const Bt=t=>{if(!t.rendered)return t.rendered=!0,t.onReady?.()},Jt=(t,e)=>!!(t.preload&&!t.router.state.matches.some(s=>s.id===e)),mt=(t,e,s=!0)=>{const n={...t.router.options.context??{}},r=s?e:e-1;for(let i=0;i<=r;i++){const a=t.matches[i];if(!a)continue;const o=t.router.getMatch(a.id);o&&Object.assign(n,o.__routeContext,o.__beforeLoadContext)}return n},Hs=(t,e)=>{const s=t.router.routesById[e.routeId??""]??t.router.routeTree;!s.options.notFoundComponent&&t.router.options?.defaultNotFoundComponent&&(s.options.notFoundComponent=t.router.options.defaultNotFoundComponent),G(s.options.notFoundComponent);const n=t.matches.find(r=>r.routeId===s.id);G(n,"Could not find match for route: "+s.id),t.updateMatch(n.id,r=>({...r,status:"notFound",error:e,isFetching:!1})),e.routerCode==="BEFORE_LOAD"&&s.parentRoute&&(e.routeId=s.parentRoute.id,Hs(t,e))},X=(t,e,s)=>{if(!(!K(s)&&!U(s))){if(K(s)&&s.redirectHandled&&!s.options.reloadDocument)throw s;if(e){e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.loaderPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0;const n=K(s)?"redirected":"notFound";e._nonReactive.error=s,t.updateMatch(e.id,r=>({...r,status:n,context:mt(t,e.index),isFetching:!1,error:s})),U(s)&&!s.routeId&&(s.routeId=e.routeId),e._nonReactive.loadPromise?.resolve()}throw K(s)?(t.rendered=!0,s.options._fromLocation=t.location,s.redirectHandled=!0,s=t.router.resolveRedirect(s),s):(Hs(t,s),s)}},Ws=(t,e)=>!!t.router.getMatch(e)._nonReactive.dehydrated,bt=(t,e,s,n)=>{const{id:r,routeId:i}=t.matches[e],a=t.router.looseRoutesById[i];if(s instanceof Promise)throw s;s.routerCode=n,t.firstBadMatchIndex??=e,X(t,t.router.getMatch(r),s);try{a.options.onError?.(s)}catch(o){s=o,X(t,t.router.getMatch(r),s)}t.updateMatch(r,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:s,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},zs=(t,e,s,n)=>{if(n._nonReactive.pendingTimeout!==void 0)return;const r=s.options.pendingMs??t.router.options.defaultPendingMs;if(!!(t.onReady&&!Jt(t,e)&&(s.options.loader||s.options.beforeLoad||Js(s))&&typeof r=="number"&&r!==1/0&&(s.options.pendingComponent??t.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Bt(t)},r);n._nonReactive.pendingTimeout=a}},Dr=(t,e,s)=>{const n=t.router.getMatch(e);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;zs(t,e,s,n);const r=()=>{const i=t.router.getMatch(e);i.preload&&(i.status==="redirected"||i.status==="notFound")&&X(t,i,i.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(r):r()},jr=(t,e,s,n)=>{const r=t.router.getMatch(e),i=r._nonReactive.loadPromise;r._nonReactive.loadPromise=yt(()=>{i?.resolve()});const{paramsError:a,searchError:o}=r;a&&bt(t,s,a,"PARSE_PARAMS"),o&&bt(t,s,o,"VALIDATE_SEARCH"),zs(t,e,n,r);const c=new AbortController;let u=!1;const h=()=>{u||(u=!0,t.updateMatch(e,S=>({...S,isFetching:"beforeLoad",fetchCount:S.fetchCount+1,abortController:c})))},d=()=>{r._nonReactive.beforeLoadPromise?.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,S=>({...S,isFetching:!1}))};if(!n.options.beforeLoad){Ct(()=>{h(),d()});return}r._nonReactive.beforeLoadPromise=yt();const l={...mt(t,s,!1),...r.__routeContext},{search:f,params:p,cause:m}=r,y=Jt(t,e),g={search:f,abortController:c,params:p,preload:y,context:l,location:t.location,navigate:S=>t.router.navigate({...S,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:y?"preload":m,matches:t.matches,routeId:n.id,...t.router.options.additionalContext},w=S=>{if(S===void 0){Ct(()=>{h(),d()});return}(K(S)||U(S))&&(h(),bt(t,s,S,"BEFORE_LOAD")),Ct(()=>{h(),t.updateMatch(e,C=>({...C,__beforeLoadContext:S})),d()})};let P;try{if(P=n.options.beforeLoad(g),pt(P))return h(),P.catch(S=>{bt(t,s,S,"BEFORE_LOAD")}).then(w)}catch(S){h(),bt(t,s,S,"BEFORE_LOAD")}w(P)},Br=(t,e)=>{const{id:s,routeId:n}=t.matches[e],r=t.router.looseRoutesById[n],i=()=>o(),a=()=>jr(t,s,e,r),o=()=>{if(Ws(t,s))return;const c=Dr(t,s,r);return pt(c)?c.then(a):a()};return i()},Ur=(t,e,s)=>{const n=t.router.getMatch(e);if(!n||!s.options.head&&!s.options.scripts&&!s.options.headers)return;const r={ssr:t.router.options.ssr,matches:t.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([s.options.head?.(r),s.options.scripts?.(r),s.options.headers?.(r)]).then(([i,a,o])=>{const c=i?.meta,u=i?.links,h=i?.scripts,d=i?.styles;return{meta:c,links:u,headScripts:h,headers:o,scripts:a,styles:d}})},Vs=(t,e,s,n)=>{const r=t.matchPromises[s-1],{params:i,loaderDeps:a,abortController:o,cause:c}=t.router.getMatch(e),u=mt(t,s),h=Jt(t,e);return{params:i,deps:a,preload:!!h,parentMatchPromise:r,abortController:o,context:u,location:t.location,navigate:d=>t.router.navigate({...d,_fromLocation:t.location}),cause:h?"preload":c,route:n,...t.router.options.additionalContext}},ps=async(t,e,s,n)=>{try{const r=t.router.getMatch(e);try{(!(sr??t.router.isServer)||r.ssr===!0)&&Gs(n);const i=n.options.loader?.(Vs(t,e,s,n)),a=n.options.loader&&pt(i);if((a||n._lazyPromise||n._componentsPromise||n.options.head||n.options.scripts||n.options.headers||r._nonReactive.minPendingPromise)&&t.updateMatch(e,u=>({...u,isFetching:"loader"})),n.options.loader){const u=a?await i:i;X(t,t.router.getMatch(e),u),u!==void 0&&t.updateMatch(e,h=>({...h,loaderData:u}))}n._lazyPromise&&await n._lazyPromise;const c=r._nonReactive.minPendingPromise;c&&await c,n._componentsPromise&&await n._componentsPromise,t.updateMatch(e,u=>({...u,error:void 0,context:mt(t,s),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(i){let a=i;if(a?.name==="AbortError"){t.updateMatch(e,c=>({...c,status:c.status==="pending"?"success":c.status,isFetching:!1,context:mt(t,s)}));return}const o=r._nonReactive.minPendingPromise;o&&await o,U(i)&&await n.options.notFoundComponent?.preload?.(),X(t,t.router.getMatch(e),i);try{n.options.onError?.(i)}catch(c){a=c,X(t,t.router.getMatch(e),c)}t.updateMatch(e,c=>({...c,error:a,context:mt(t,s),status:"error",isFetching:!1}))}}catch(r){const i=t.router.getMatch(e);i&&(i._nonReactive.loaderPromise=void 0),X(t,i,r)}},Nr=async(t,e)=>{const{id:s,routeId:n}=t.matches[e];let r=!1,i=!1;const a=t.router.looseRoutesById[n];if(!Ws(t,s)){const u=t.router.getMatch(s);if(u._nonReactive.loaderPromise){if(u.status==="success"&&!t.sync&&!u.preload)return u;await u._nonReactive.loaderPromise;const h=t.router.getMatch(s),d=h._nonReactive.error||h.error;d&&X(t,h,d)}else{const h=Date.now()-u.updatedAt,d=Jt(t,s),l=d?a.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:a.options.staleTime??t.router.options.defaultStaleTime??0,f=a.options.shouldReload,p=typeof f=="function"?f(Vs(t,s,e,a)):f,m=!!d&&!t.router.state.matches.some(P=>P.id===s),y=t.router.getMatch(s);y._nonReactive.loaderPromise=yt(),m!==y.preload&&t.updateMatch(s,P=>({...P,preload:m}));const{status:g,invalid:w}=y;r=g==="success"&&(w||(p??h>l)),d&&a.options.preload===!1||(r&&!t.sync?(i=!0,(async()=>{try{await ps(t,s,e,a);const P=t.router.getMatch(s);P._nonReactive.loaderPromise?.resolve(),P._nonReactive.loadPromise?.resolve(),P._nonReactive.loaderPromise=void 0}catch(P){K(P)&&await t.router.navigate(P.options)}})()):(g!=="success"||r&&t.sync)&&await ps(t,s,e,a))}}const o=t.router.getMatch(s);i||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0,i||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const c=i?o.isFetching:!1;return c!==o.isFetching||o.invalid!==!1?(t.updateMatch(s,u=>({...u,isFetching:c,invalid:!1})),t.router.getMatch(s)):o};async function ms(t){const e=Object.assign(t,{matchPromises:[]});e.router.state.matches.some(s=>s._forcePending)&&Bt(e);try{for(let o=0;o<e.matches.length;o++){const c=Br(e,o);pt(c)&&await c}const s=e.firstBadMatchIndex??e.matches.length;for(let o=0;o<s;o++)e.matchPromises.push(Nr(e,o));const r=(await Promise.allSettled(e.matchPromises)).filter(o=>o.status==="rejected").map(o=>o.reason);let i;for(const o of r){if(K(o))throw o;!i&&U(o)&&(i=o)}for(const o of e.matches){const{id:c,routeId:u}=o,h=e.router.looseRoutesById[u];try{const d=Ur(e,c,h);if(d){const l=await d;e.updateMatch(c,f=>({...f,...l}))}}catch(d){console.error(`Error executing head for route ${u}:`,d)}}if(i)throw i;const a=Bt(e);pt(a)&&await a}catch(s){if(U(s)&&!e.preload){const n=Bt(e);throw pt(n)&&await n,s}if(K(s))throw s}return e.matches}async function Gs(t){if(!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(e=>{const{id:s,...n}=e.options;Object.assign(t.options,n),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&t._componentsPromise===void 0){const e=()=>{const s=[];for(const n of Ys){const r=t.options[n]?.preload;r&&s.push(r())}if(s.length)return Promise.all(s).then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0});t._componentsLoaded=!0,t._componentsPromise=void 0};t._componentsPromise=t._lazyPromise?t._lazyPromise.then(e):e()}return t._componentsPromise}function Js(t){for(const e of Ys)if(t.options[e]?.preload)return!0;return!1}const Ys=["component","errorComponent","pendingComponent","notFoundComponent"];function Qr(t){return{input:({url:e})=>{for(const s of t)e=Pe(s,e);return e},output:({url:e})=>{for(let s=t.length-1;s>=0;s--)e=Xs(t[s],e);return e}}}function Kr(t){const e=qs(t.basepath),s=`/${e}`,n=`${s}/`,r=t.caseSensitive?s:s.toLowerCase(),i=t.caseSensitive?n:n.toLowerCase();return{input:({url:a})=>{const o=t.caseSensitive?a.pathname:a.pathname.toLowerCase();return o===r?a.pathname="/":o.startsWith(i)&&(a.pathname=a.pathname.slice(s.length)),a},output:({url:a})=>(a.pathname=jt(["/",e,a.pathname]),a)}}function Pe(t,e){const s=t?.input?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function Xs(t,e){const s=t?.output?.({url:e});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return e}function ot(t){const e=t.resolvedLocation,s=t.location,n=e?.pathname!==s.pathname,r=e?.href!==s.href,i=e?.hash!==s.hash;return{fromLocation:e,toLocation:s,pathChanged:n,hrefChanged:r,hashChanged:i}}class $r{constructor(e){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=s=>s(),this.update=s=>{s.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 n=this.options,r=this.basepath??n?.basepath??"/",i=this.basepath===void 0,a=n?.rewrite;if(this.options={...n,...s},this.isServer=this.options.isServer??typeof document>"u",this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Pr(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tr()),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 l;this.resolvePathCache=Ht(1e3),l=this.buildRouteTree(),this.setRoutes(l)}!this.__store&&this.latestLocation&&(this.__store=new Xn(Hr(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(l=>!["redirected"].includes(l.status))}}}),Lr(this));let o=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(i||r!==c||a!==u){this.basepath=c;const l=[],f=qs(c);f&&f!=="/"&&l.push(Kr({basepath:c})),u&&l.push(u),this.rewrite=l.length===0?void 0:l.length===1?l[0]:Qr(l),this.history&&this.updateLatestLocation(),o=!0}o&&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 s=pr(this.routeTree,this.options.caseSensitive,(n,r)=>{n.init({originalIndex:r})});return this.options.routeMasks&&ur(this.options.routeMasks,s.processedTree),s},this.subscribe=(s,n)=>{const r={eventType:s,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=s=>{this.subscribers.forEach(n=>{n.eventType===s.type&&n.fn(s)})},this.parseLocation=(s,n)=>{const r=({pathname:c,search:u,hash:h,href:d,state:l})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const w=this.options.parseSearch(u),P=this.options.stringifySearch(w);return{href:c+P+h,publicHref:d,pathname:wt(c),external:!1,searchStr:P,search:B(n?.search,w),hash:wt(h.slice(1)),state:B(n?.state,l)}}const f=new URL(d,this.origin),p=Pe(this.rewrite,f),m=this.options.parseSearch(p.search),y=this.options.stringifySearch(m);return p.search=y,{href:p.href.replace(p.origin,""),publicHref:d,pathname:wt(p.pathname),external:!!this.rewrite&&p.origin!==this.origin,searchStr:y,search:B(n?.search,m),hash:wt(p.hash.slice(1)),state:B(n?.state,l)}},i=r(s),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=r(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(s,n)=>Sr({base:s,to:Me(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(s,n,r)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},r):this.matchRoutesInternal(s,n),this.getMatchedRoutes=s=>Wr({pathname:s,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=s=>{const n=this.getMatch(s);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const s=this.state.matches.filter(i=>i.status==="pending"),n=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...s,...n]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=s=>{const n=(i={})=>{const a=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o.fullPath,u=this.resolvePathWithBase(c,"."),h=o.search,d={...o.params},l=i.to?this.resolvePathWithBase(u,`${i.to}`):this.resolvePathWithBase(u,"."),f=i.params===!1||i.params===null?{}:(i.params??!0)===!0?d:Object.assign(d,Y(i.params,d)),p=re({path:l,params:f,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath,m=this.getMatchedRoutes(p);let y=m.matchedRoutes;(m.foundRoute?m.foundRoute.path!=="/"&&m.routeParams["**"]:V(p))&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]);let w=!1;if(Object.keys(f).length>0)for(const M of y){const T=M.options.params?.stringify??M.options.stringifyParams;T&&(w=!0,Object.assign(f,T(f)))}const P=s.leaveParams?l:wt(w?re({path:l,params:f,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath:p);let S=h;if(s._includeValidateSearch&&this.options.search?.strict){const M={};y.forEach(T=>{if(T.options.validateSearch)try{Object.assign(M,Ut(T.options.validateSearch,{...M,...S}))}catch{}}),S=M}S=zr({search:S,dest:i,destRoutes:y,_includeValidateSearch:s._includeValidateSearch}),S=B(h,S);const C=this.options.stringifySearch(S),L=i.hash===!0?a.hash:i.hash?Y(i.hash,a.hash):void 0,R=L?`#${L}`:"";let v=i.state===!0?a.state:i.state?Y(i.state,a.state):{};v=B(a.state,v);const b=`${P}${C}${R}`;let E,O,I=!1;if(this.rewrite){const M=new URL(b,this.origin),T=Xs(this.rewrite,M);E=M.href.replace(M.origin,""),T.origin!==this.origin?(O=T.href,I=!0):O=T.pathname+T.search+T.hash}else E=or(b),O=E;return{publicHref:O,href:E,pathname:P,search:S,searchStr:C,state:v,hash:L??"",external:I,unmaskOnReload:i.unmaskOnReload}},r=(i={},a)=>{const o=n(i);let c=a?n(a):void 0;if(!c){const u={};if(this.options.routeMasks){const h=lr(o.pathname,this.processedTree);if(h){Object.assign(u,h.rawParams);const{from:d,params:l,...f}=h.route,p=l===!1||l===null?{}:(l??!0)===!0?u:Object.assign(u,Y(l,u));a={from:s.from,...f,params:p},c=n(a)}}}return c&&(o.maskedLocation=c),o};return s.mask?r(s,{from:s.from,...s.mask}):r(s)},this.commitLocation=async({viewTransition:s,ignoreBlocker:n,...r})=>{const i=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{r.state[h]=this.latestLocation.state[h]});const u=it(r.state,this.latestLocation.state);return c.forEach(h=>{delete r.state[h]}),u},a=V(this.latestLocation.href)===V(r.href),o=this.commitLocationPromise;if(this.commitLocationPromise=yt(()=>{o?.resolve()}),a&&i())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...h}=r;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[r.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:n})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:r,viewTransition:i,ignoreBlocker:a,href:o,...c}={})=>{if(o){const d=this.history.location.state.__TSR_index,l=Kt(o,{__TSR_index:s?d:d+1}),f=new URL(l.pathname,this.origin),p=Pe(this.rewrite,f);c.to=p.pathname,c.search=this.options.parseSearch(l.search),c.hash=l.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const h=this.commitLocation({...u,viewTransition:i,replace:s,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:s,reloadDocument:n,href:r,publicHref:i,...a})=>{let o=!1;if(r)try{new URL(`${r}`),o=!0}catch{}if(o&&!n&&(n=!0),n){if(s!==void 0||!r){const u=this.buildLocation({to:s,...a});r=r??u.publicHref,i=i??u.publicHref}const c=!o&&i?i:r;if(qt(c))return Promise.resolve();if(!a.ignoreBlocker){const h=this.history.getBlockers?.()??[];for(const d of h)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...a,href:r,to:s,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const s=this.matchRoutes(this.latestLocation);this.__store.setState(n=>({...n,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:s,cachedMatches:n.cachedMatches.filter(r=>!s.some(i=>i.id===r.id))}))},this.load=async s=>{let n,r,i;for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...ot({resolvedLocation:u,location:c})}),this.emit({type:"onBeforeLoad",...ot({resolvedLocation:u,location:c})}),await ms({router:this,sync:s?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=[],d=[],l=[];Ct(()=>{this.__store.setState(f=>{const p=f.matches,m=f.pendingMatches||f.matches;return h=p.filter(y=>!m.some(g=>g.id===y.id)),d=m.filter(y=>!p.some(g=>g.id===y.id)),l=m.filter(y=>p.some(g=>g.id===y.id)),{...f,isLoading:!1,loadedAt:Date.now(),matches:m,pendingMatches:void 0,cachedMatches:[...f.cachedMatches,...h.filter(y=>y.status!=="error"&&y.status!=="notFound")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[d,"onEnter"],[l,"onStay"]].forEach(([f,p])=>{f.forEach(m=>{this.looseRoutesById[m.routeId].options[p]?.(m)})})})})}})}catch(c){K(c)?(n=c,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):U(c)&&(r=c),this.__store.setState(u=>({...u,statusCode:n?n.status:r?404:u.matches.some(h=>h.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(o=>o.status==="error")&&(a=500),a!==void 0&&this.__store.setState(o=>({...o,statusCode:a}))},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,a=this.state.resolvedLocation,o=typeof n.types=="function"?n.types(ot({resolvedLocation:a,location:i})):n.types;if(o===!1){s();return}r={update:s,types:o}}else r=s;document.startViewTransition(r)}else s()},this.updateMatch=(s,n)=>{this.startTransition(()=>{const r=this.state.pendingMatches?.some(i=>i.id===s)?"pendingMatches":this.state.matches.some(i=>i.id===s)?"matches":this.state.cachedMatches.some(i=>i.id===s)?"cachedMatches":"";r&&this.__store.setState(i=>({...i,[r]:i[r]?.map(a=>a.id===s?n(a):a)}))})},this.getMatch=s=>{const n=r=>r.id===s;return this.state.cachedMatches.find(n)??this.state.pendingMatches?.find(n)??this.state.matches.find(n)},this.invalidate=s=>{const n=r=>s?.filter?.(r)??!0?{...r,invalid:!0,...s?.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(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:r.pendingMatches?.map(n)})),this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.getParsedLocationHref=s=>s.publicHref||"/",this.resolveRedirect=s=>{const n=s.headers.get("Location");if(!s.options.href||s.options._builtLocation){const r=s.options._builtLocation??this.buildLocation(s.options),i=this.getParsedLocationHref(r);s.options.href=i,s.headers.set("Location",i)}else if(n)try{const r=new URL(n);if(this.origin&&r.origin===this.origin){const i=r.pathname+r.search+r.hash;s.options.href=i,s.headers.set("Location",i)}}catch{}return s.headers.get("Location")||s.headers.set("Location",s.options.href),s},this.clearCache=s=>{const n=s?.filter;n!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(i=>!n(i))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const s=n=>{const r=this.looseRoutesById[n.routeId];if(!r.options.loader)return!0;const i=(n.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:Date.now()-n.updatedAt>=i};this.clearCache({filter:s})},this.loadRouteChunk=Gs,this.preloadRoute=async s=>{const n=this.buildLocation(s);let r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:s});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),a=new Set([...i,...this.state.cachedMatches.map(o=>o.id)]);Ct(()=>{r.forEach(o=>{a.has(o.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,o]}))})});try{return r=await ms({router:this,matches:r,location:n,preload:!0,updateMatch:(o,c)=>{i.has(o)?r=r.map(u=>u.id===o?c(u):u):this.updateMatch(o,c)}}),r}catch(o){if(K(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:n});U(o)||console.error(o);return}},this.matchRoute=(s,n)=>{const r={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},i=this.buildLocation(r);if(n?.pending&&this.state.status!=="pending")return!1;const o=(n?.pending===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=hr(i.pathname,n?.caseSensitive??!1,n?.fuzzy??!1,o.pathname,this.processedTree);return!c||s.params&&!it(c.rawParams,s.params,{partial:!0})?!1:n?.includeSearch??!0?it(o.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(s=>s.status==="notFound"||s.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Tr,parseSearch:e.parseSearch??Ir}),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:e,routesByPath:s,processedTree:n}){this.routesById=e,this.routesByPath=s,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,s){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:a}=n;let{matchedRoutes:o}=n,c=!1;(r?r.path!=="/"&&i["**"]:V(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const u=c?Gr(this.options.notFoundMode,o):void 0,h=new Array(o.length);for(let d=0;d<o.length;d++){const l=o[d],f=h[d-1];let p,m,y;{const M=f?.search??e.search,T=f?._strictSearch??void 0;try{const D=Ut(l.options.validateSearch,{...M})??void 0;p={...M,...D},m={...T,...D},y=void 0}catch(D){let ht=D;if(D instanceof Vt||(ht=new Vt(D.message,{cause:D})),s?.throwOnError)throw ht;p=M,m={},y=ht}}const g=l.options.loaderDeps?.({search:p})??"",w=g?JSON.stringify(g):"",{interpolatedPath:P,usedParams:S}=re({path:l.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),C=l.id+P+w,L=this.getMatch(C),R=this.state.matches.find(M=>M.routeId===l.id),v=L?._strictParams??S;let b;if(!L)try{ys(l,S,a,v)}catch(M){if(U(M)||K(M)?b=M:b=new qr(M.message,{cause:M}),s?.throwOnError)throw b}Object.assign(i,v);const E=R?"stay":"enter";let O;if(L)O={...L,cause:E,params:R?B(R.params,i):i,_strictParams:v,search:B(R?R.search:L.search,p),_strictSearch:m};else{const M=l.options.loader||l.options.beforeLoad||l.lazyFn||Js(l)?"pending":"success";O={id:C,ssr:l.options.ssr,index:d,routeId:l.id,params:R?B(R.params,i):i,_strictParams:v,pathname:P,updatedAt:Date.now(),search:R?B(R.search,p):p,_strictSearch:m,searchError:void 0,status:M,isFetching:!1,error:void 0,paramsError:b,__routeContext:void 0,_nonReactive:{loadPromise:yt()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:E,loaderDeps:R?B(R.loaderDeps,g):g,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:l.options.staticData||{},fullPath:l.fullPath}}s?.preload||(O.globalNotFound=u===l.id),O.searchError=y;const I=this.getParentContext(f);O.context={...I,...O.__routeContext,...O.__beforeLoadContext},h[d]=O}for(let d=0;d<h.length;d++){const l=h[d],f=this.looseRoutesById[l.routeId];if(!this.getMatch(l.id)){const m=h[d-1],y=this.getParentContext(m);if(f.options.context){const g={deps:l.loaderDeps,params:l.params,context:y??{},location:e,navigate:w=>this.navigate({...w,_fromLocation:e}),buildLocation:this.buildLocation,cause:l.cause,abortController:l.abortController,preload:!!l.preload,matches:h,routeId:f.id};l.__routeContext=f.options.context(g)??void 0}l.context={...y,...l.__routeContext,...l.__beforeLoadContext}}}return h}matchRoutesLightweight(e){const{matchedRoutes:s,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=Mt(s),a={...e.search};for(const h of s)try{Object.assign(a,Ut(h.options.validateSearch,a))}catch{}const o=Mt(this.state.matches),c=o&&o.routeId===i.id&&e.pathname===this.state.location.pathname;let u;if(c)u=o.params;else{const h={...n};for(const d of s)try{ys(d,n,r??{},h)}catch{}u=h}return{matchedRoutes:s,fullPath:i.fullPath,search:a,params:u}}}class Vt extends Error{}class qr extends Error{}function Hr(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Ut(t,e){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(e);if(s instanceof Promise)throw new Vt("Async validation not supported");if(s.issues)throw new Vt(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function Wr({pathname:t,routesById:e,processedTree:s}){const n={},r=V(t);let i,a;const o=dr(r,s,!0);return o&&(i=o.route,Object.assign(n,o.rawParams),a=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[e[Q]],routeParams:n,foundRoute:i,parsedParams:a}}function zr({search:t,dest:e,destRoutes:s,_includeValidateSearch:n}){return Vr(s)(t,e,n??!1)}function Vr(t){const e={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const r of t){if("search"in r.options)r.options.search?.middlewares&&e.middlewares.push(...r.options.search.middlewares);else if(r.options.preSearchFilters||r.options.postSearchFilters){const i=({search:a,next:o})=>{let c=a;"preSearchFilters"in r.options&&r.options.preSearchFilters&&(c=r.options.preSearchFilters.reduce((h,d)=>d(h),a));const u=o(c);return"postSearchFilters"in r.options&&r.options.postSearchFilters?r.options.postSearchFilters.reduce((h,d)=>d(h),u):u};e.middlewares.push(i)}if(r.options.validateSearch){const i=({search:a,next:o})=>{const c=o(a);if(!e._includeValidateSearch)return c;try{return{...c,...Ut(r.options.validateSearch,c)??void 0}}catch{return c}};e.middlewares.push(i)}}const s=({search:r})=>{const i=e.dest;return i.search?i.search===!0?r:Y(i.search,r):{}};e.middlewares.push(s);const n=(r,i,a)=>{if(r>=a.length)return i;const o=a[r];return o({search:i,next:u=>n(r+1,u,a)})};return function(i,a,o){return e.dest=a,e._includeValidateSearch=o,n(0,i,e.middlewares)}}function Gr(t,e){if(t!=="root")for(let s=e.length-1;s>=0;s--){const n=e[s];if(n.children)return n.id}return Q}function ys(t,e,s,n){const r=t.options.params?.parse??t.options.parseParams;if(r)if(t.options.skipRouteOnParseError)for(const i in e)i in s&&(n[i]=s[i]);else{const i=r(n);Object.assign(n,i)}}const Jr="Error preloading route! ☝️";class Zs{constructor(e){if(this.init=s=>{this.originalIndex=s.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Q:this.parentRoute||G(!1);let i=r?Q:n?.path;i&&i!=="/"&&(i=$s(i));const a=n?.id||i;let o=r?Q:jt([this.parentRoute.id===Q?"":this.parentRoute.id,a]);i===Q&&(i="/"),o!==Q&&(o=jt(["/",o]));const c=o===Q?"/":jt([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=V(c)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>Ar({from:this.fullPath,...s}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.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 Yr extends Zs{constructor(e){super(e)}}const Dt=typeof window<"u"?x.useLayoutEffect:x.useEffect;function oe(t){const e=x.useRef({value:t,prev:null}),s=e.current.value;return t!==s&&(e.current={value:t,prev:s}),e.current.prev}function Xr(t,e,s={},n={}){x.useEffect(()=>{if(!t.current||n.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([i])=>{e(i)},s);return r.observe(t.current),()=>{r.disconnect()}},[e,s,n.disabled,t])}function Zr(t){const e=x.useRef(null);return x.useImperativeHandle(t,()=>e.current,[]),e}function Ee(t){const e=t.errorComponent??Ie;return _.jsx(ti,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:s,reset:n})=>s?x.createElement(e,{error:s,reset:n}):t.children})}class ti extends x.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,s){s.error&&s.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,s){this.props.onCatch&&this.props.onCatch(e,s)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Ie({error:t}){const[e,s]=x.useState(!1);return _.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[_.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[_.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),_.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(n=>!n),children:e?"Hide Error":"Show Error"})]}),_.jsx("div",{style:{height:".25rem"}}),e?_.jsx("div",{children:_.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?_.jsx("code",{children:t.message}):null})}):null]})}function ei({children:t,fallback:e=null}){return tn()?_.jsx(Lt.Fragment,{children:t}):_.jsx(Lt.Fragment,{children:e})}function tn(){return Lt.useSyncExternalStore(si,()=>!0,()=>!1)}function si(){return()=>{}}var ae={exports:{}},ce={},ue={exports:{}},le={};var gs;function ni(){if(gs)return le;gs=1;var t=Os();function e(d,l){return d===l&&(d!==0||1/d===1/l)||d!==d&&l!==l}var s=typeof Object.is=="function"?Object.is:e,n=t.useState,r=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function o(d,l){var f=l(),p=n({inst:{value:f,getSnapshot:l}}),m=p[0].inst,y=p[1];return i(function(){m.value=f,m.getSnapshot=l,c(m)&&y({inst:m})},[d,f,l]),r(function(){return c(m)&&y({inst:m}),d(function(){c(m)&&y({inst:m})})},[d]),a(f),f}function c(d){var l=d.getSnapshot;d=d.value;try{var f=l();return!s(d,f)}catch{return!0}}function u(d,l){return l()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return le.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:h,le}var vs;function ri(){return vs||(vs=1,ue.exports=ni()),ue.exports}var Ss;function ii(){if(Ss)return ce;Ss=1;var t=Os(),e=ri();function s(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:s,r=e.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,c=t.useDebugValue;return ce.useSyncExternalStoreWithSelector=function(u,h,d,l,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=o(function(){function g(L){if(!w){if(w=!0,P=L,L=l(L),f!==void 0&&m.hasValue){var R=m.value;if(f(R,L))return S=R}return S=L}if(R=S,n(P,L))return R;var v=l(L);return f!==void 0&&f(R,v)?(P=L,R):(P=L,S=v)}var w=!1,P,S,C=d===void 0?null:d;return[function(){return g(h())},C===null?void 0:function(){return g(C())}]},[h,d,l,f]);var y=r(u,p[0],p[1]);return a(function(){m.hasValue=!0,m.value=y},[y]),c(y),y},ce}var Ps;function oi(){return Ps||(Ps=1,ae.exports=ii()),ae.exports}var ai=oi();function ci(t,e=n=>n,s={}){const n=s.equal??ui;return ai.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,e,n)}function ui(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[n,r]of t)if(!e.has(n)||!Object.is(r,e.get(n)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const s=ws(t);if(s.length!==ws(e).length)return!1;for(let n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(e,s[n])||!Object.is(t[s[n]],e[s[n]]))return!1;return!0}function ws(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}const he=x.createContext(null);function en(){return typeof document>"u"?he:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=he,he)}function q(t){const e=x.useContext(en());return t?.warn,e}function $(t){const e=q({warn:t?.router===void 0}),s=t?.router||e,n=x.useRef(void 0);return ci(s.__store,r=>{if(t?.select){if(t.structuralSharing??s.options.defaultStructuralSharing){const i=B(n.current,t.select(r));return n.current=i,i}return t.select(r)}return r})}const Yt=x.createContext(void 0),li=x.createContext(void 0);function z(t){const e=x.useContext(t.from?li:Yt);return $({select:n=>{const r=n.matches.find(i=>t.from?t.from===i.routeId:i.id===e);if(G(!((t.shouldThrow??!0)&&!r),`Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`),r!==void 0)return t.select?t.select(r):r},structuralSharing:t.structuralSharing})}function Te(t){return z({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function ke(t){const{select:e,...s}=t;return z({...s,select:n=>e?e(n.loaderDeps):n.loaderDeps})}function Fe(t){return z({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const s=t.strict===!1?e.params:e._strictParams;return t.select?t.select(s):s}})}function Ae(t){return z({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}function De(t){const e=q();return x.useCallback(s=>e.navigate({...s,from:s.from??t?.from}),[t?.from,e])}function hi(t,e){const s=q(),n=Zr(e),{activeProps:r,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,hashScrollIntoView:h,replace:d,startTransition:l,resetScroll:f,viewTransition:p,children:m,target:y,disabled:g,style:w,className:P,onClick:S,onFocus:C,onMouseEnter:L,onMouseLeave:R,onTouchStart:v,ignoreBlocker:b,params:E,search:O,hash:I,state:M,mask:T,reloadDocument:D,unsafeRelative:ht,from:on,_fromLocation:Ai,...je}=t,Be=tn(),an=$({select:k=>k.location.search,structuralSharing:!0}),Ue=t.from,St=x.useMemo(()=>({...t,from:Ue}),[s,an,Ue,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),W=x.useMemo(()=>s.buildLocation({...St}),[s,St]),Ne=W.maskedLocation?W.maskedLocation.publicHref:W.publicHref,Qe=W.maskedLocation?W.maskedLocation.external:W.external,Pt=x.useMemo(()=>gi(Ne,Qe,s.history,g),[g,Qe,Ne,s.history]),It=x.useMemo(()=>{if(Pt?.external)return qt(Pt.href)?void 0:Pt.href;if(!vi(o)&&!(typeof o!="string"||o.indexOf(":")===-1))try{return new URL(o),qt(o)?void 0:o}catch{}},[o,Pt]),Xt=$({select:k=>{if(It)return!1;if(a?.exact){if(!vr(k.location.pathname,W.pathname,s.basepath))return!1}else{const j=Wt(k.location.pathname,s.basepath),H=Wt(W.pathname,s.basepath);if(!(j.startsWith(H)&&(j.length===H.length||j[H.length]==="/")))return!1}return(a?.includeSearch??!0)&&!it(k.location.search,W.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?Be&&k.location.hash===W.hash:!0}}),Tt=Xt?Y(r,{})??di:de,kt=Xt?de:Y(i,{})??de,Ke=[P,Tt.className,kt.className].filter(Boolean).join(" "),$e=(w||Tt.style||kt.style)&&{...w,...Tt.style,...kt.style},[cn,qe]=x.useState(!1),He=x.useRef(!1),dt=t.reloadDocument||It?!1:c??s.options.defaultPreload,Zt=u??s.options.defaultPreloadDelay??0,et=x.useCallback(()=>{s.preloadRoute({...St}).catch(k=>{console.warn(k),console.warn(Jr)})},[s,St]),un=x.useCallback(k=>{k?.isIntersecting&&et()},[et]);Xr(n,un,yi,{disabled:!!g||dt!=="viewport"}),x.useEffect(()=>{He.current||!g&&dt==="render"&&(et(),He.current=!0)},[g,et,dt]);const ln=k=>{const j=k.currentTarget.getAttribute("target"),H=y!==void 0?y:j;if(!g&&!Si(k)&&!k.defaultPrevented&&(!H||H==="_self")&&k.button===0){k.preventDefault(),yn.flushSync(()=>{qe(!0)});const ze=s.subscribe("onResolved",()=>{ze(),qe(!1)});s.navigate({...St,replace:d,resetScroll:f,hashScrollIntoView:h,startTransition:l,viewTransition:p,ignoreBlocker:b})}};if(It)return{...je,ref:n,href:It,...m&&{children:m},...y&&{target:y},...g&&{disabled:g},...w&&{style:w},...P&&{className:P},...S&&{onClick:S},...C&&{onFocus:C},...L&&{onMouseEnter:L},...R&&{onMouseLeave:R},...v&&{onTouchStart:v}};const We=k=>{g||dt&&et()},hn=We,dn=k=>{if(!(g||!dt))if(!Zt)et();else{const j=k.target;if(xt.has(j))return;const H=setTimeout(()=>{xt.delete(j),et()},Zt);xt.set(j,H)}},fn=k=>{if(g||!dt||!Zt)return;const j=k.target,H=xt.get(j);H&&(clearTimeout(H),xt.delete(j))};return{...je,...Tt,...kt,href:Pt?.href,ref:n,onClick:_t([S,ln]),onFocus:_t([C,We]),onMouseEnter:_t([L,dn]),onMouseLeave:_t([R,fn]),onTouchStart:_t([v,hn]),disabled:!!g,target:y,...$e&&{style:$e},...Ke&&{className:Ke},...g&&fi,...Xt&&pi,...Be&&cn&&mi}}const de={},di={className:"active"},fi={role:"link","aria-disabled":!0},pi={"data-status":"active","aria-current":"page"},mi={"data-transitioning":"transitioning"},xt=new WeakMap,yi={rootMargin:"100px"},_t=t=>e=>{for(const s of t)if(s){if(e.defaultPrevented)return;s(e)}};function gi(t,e,s,n){if(!n)return e?{href:t,external:!0}:{href:s.createHref(t)||"/",external:!1}}function vi(t){if(typeof t!="string")return!1;const e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}const sn=x.forwardRef((t,e)=>{const{_asChild:s,...n}=t,{type:r,...i}=hi(n,e),a=typeof n.children=="function"?n.children({isActive:i["data-status"]==="active"}):n.children;if(!s){const{disabled:o,...c}=i;return x.createElement("a",c,a)}return x.createElement(s,i,a)});function Si(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}class Pi extends Zs{constructor(e){super(e),this.useMatch=s=>z({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>z({...s,from:this.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>Ae({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>Fe({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>ke({...s,from:this.id}),this.useLoaderData=s=>Te({...s,from:this.id}),this.useNavigate=()=>De({from:this.fullPath}),this.Link=Lt.forwardRef((s,n)=>_.jsx(sn,{ref:n,from:this.fullPath,...s})),this.$$typeof=Symbol.for("react.memo")}}function wi(t){return new Pi(t)}class Ri extends Yr{constructor(e){super(e),this.useMatch=s=>z({select:s?.select,from:this.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>z({...s,from:this.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>Ae({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useParams=s=>Fe({select:s?.select,structuralSharing:s?.structuralSharing,from:this.id}),this.useLoaderDeps=s=>ke({...s,from:this.id}),this.useLoaderData=s=>Te({...s,from:this.id}),this.useNavigate=()=>De({from:this.fullPath}),this.Link=Lt.forwardRef((s,n)=>_.jsx(sn,{ref:n,from:this.fullPath,...s})),this.$$typeof=Symbol.for("react.memo")}}function Qi(t){return new Ri(t)}function Rs(t){return typeof t=="object"?new bs(t,{silent:!0}).createRoute(t):new bs(t,{silent:!0}).createRoute}class bs{constructor(e,s){this.path=e,this.createRoute=n=>{this.silent;const r=wi(n);return r.isRoot=!1,r},this.silent=s?.silent}}class xs{constructor(e){this.useMatch=s=>z({select:s?.select,from:this.options.id,structuralSharing:s?.structuralSharing}),this.useRouteContext=s=>z({from:this.options.id,select:n=>s?.select?s.select(n.context):n.context}),this.useSearch=s=>Ae({select:s?.select,structuralSharing:s?.structuralSharing,from:this.options.id}),this.useParams=s=>Fe({select:s?.select,structuralSharing:s?.structuralSharing,from:this.options.id}),this.useLoaderDeps=s=>ke({...s,from:this.options.id}),this.useLoaderData=s=>Te({...s,from:this.options.id}),this.useNavigate=()=>{const s=q();return De({from:s.routesById[this.options.id].fullPath})},this.options=e,this.$$typeof=Symbol.for("react.memo")}}function _s(t){return typeof t=="object"?new xs(t):e=>new xs({id:t,...e})}function bi(){const t=q(),e=x.useRef({router:t,mounted:!1}),[s,n]=x.useState(!1),{hasPendingMatches:r,isLoading:i}=$({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(l=>l.status==="pending")}),structuralSharing:!0}),a=oe(i),o=i||s||r,c=oe(o),u=i||r,h=oe(u);return t.startTransition=d=>{n(!0),x.startTransition(()=>{d(),n(!1)})},x.useEffect(()=>{const d=t.history.subscribe(t.load),l=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return V(t.latestLocation.publicHref)!==V(l.publicHref)&&t.commitLocation({...l,replace:!0}),()=>{d()}},[t,t.history]),Dt(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(l){console.error(l)}})()},[t]),Dt(()=>{a&&!i&&t.emit({type:"onLoad",...ot(t.state)})},[a,t,i]),Dt(()=>{h&&!u&&t.emit({type:"onBeforeRouteMount",...ot(t.state)})},[u,h,t]),Dt(()=>{if(c&&!o){const d=ot(t.state);t.emit({type:"onResolved",...d}),t.__store.setState(l=>({...l,status:"idle",resolvedLocation:l.location})),d.hrefChanged&&Or(t)}},[o,c,t]),null}function xi(t){const e=$({select:s=>`not-found-${s.location.pathname}-${s.status}`});return _.jsx(Ee,{getResetKey:()=>e,onCatch:(s,n)=>{if(U(s))t.onCatch?.(s,n);else throw s},errorComponent:({error:s})=>{if(U(s))return t.fallback?.(s);throw s},children:t.children})}function _i(){return _.jsx("p",{children:"Not Found"})}function ft(t){return _.jsx(_.Fragment,{children:t.children})}function nn(t,e,s){return e.options.notFoundComponent?_.jsx(e.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?_.jsx(t.options.defaultNotFoundComponent,{...s}):_.jsx(_i,{})}function Ci(){return q().isScrollRestoring,null}const rn=x.memo(function({matchId:e}){const s=q(),n=$({select:m=>{const y=m.matches.findIndex(w=>w.id===e),g=m.matches[y];return G(g),{routeId:g.routeId,ssr:g.ssr,_displayPending:g._displayPending,resetKey:m.loadedAt,parentRouteId:m.matches[y-1]?.routeId}},structuralSharing:!0}),r=s.routesById[n.routeId],i=r.options.pendingComponent??s.options.defaultPendingComponent,a=i?_.jsx(i,{}):null,o=r.options.errorComponent??s.options.defaultErrorComponent,c=r.options.onCatch??s.options.defaultOnCatch,u=r.isRoot?r.options.notFoundComponent??s.options.notFoundRoute?.options.component:r.options.notFoundComponent,h=n.ssr===!1||n.ssr==="data-only",d=(!r.isRoot||r.options.wrapInSuspense||h)&&(r.options.wrapInSuspense??i??(r.options.errorComponent?.preload||h))?x.Suspense:ft,l=o?Ee:ft,f=u?xi:ft,p=r.isRoot?r.options.shellComponent??ft:ft;return _.jsxs(p,{children:[_.jsx(Yt.Provider,{value:e,children:_.jsx(d,{fallback:a,children:_.jsx(l,{getResetKey:()=>n.resetKey,errorComponent:o||Ie,onCatch:(m,y)=>{if(U(m))throw m;c?.(m,y)},children:_.jsx(f,{fallback:m=>{if(!u||m.routeId&&m.routeId!==n.routeId||!m.routeId&&!r.isRoot)throw m;return x.createElement(u,m)},children:h||n._displayPending?_.jsx(ei,{fallback:a,children:_.jsx(Cs,{matchId:e})}):_.jsx(Cs,{matchId:e})})})})}),n.parentRouteId===Q&&s.options.scrollRestoration?_.jsxs(_.Fragment,{children:[_.jsx(Li,{}),_.jsx(Ci,{})]}):null]})});function Li(){const t=q(),e=x.useRef(void 0);return _.jsx("script",{suppressHydrationWarning:!0,ref:s=>{s&&(e.current===void 0||e.current.href!==t.latestLocation.href)&&(t.emit({type:"onRendered",...ot(t.state)}),e.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}const Cs=x.memo(function({matchId:e}){const s=q(),{match:n,key:r,routeId:i}=$({select:c=>{const u=c.matches.find(p=>p.id===e),h=u.routeId,l=(s.routesById[h].options.remountDeps??s.options.defaultRemountDeps)?.({routeId:h,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:l?JSON.stringify(l):void 0,routeId:h,match:{id:u.id,status:u.status,error:u.error,invalid:u.invalid,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=s.routesById[i],o=x.useMemo(()=>{const c=a.options.component??s.options.defaultComponent;return c?_.jsx(c,{},r):_.jsx(Oi,{})},[r,a.options.component,s.options.defaultComponent]);if(n._displayPending)throw s.getMatch(n.id)?._nonReactive.displayPendingPromise;if(n._forcePending)throw s.getMatch(n.id)?._nonReactive.minPendingPromise;if(n.status==="pending"){const c=a.options.pendingMinMs??s.options.defaultPendingMinMs;if(c){const u=s.getMatch(n.id);if(u&&!u._nonReactive.minPendingPromise){const h=yt();u._nonReactive.minPendingPromise=h,setTimeout(()=>{h.resolve(),u._nonReactive.minPendingPromise=void 0},c)}}throw s.getMatch(n.id)?._nonReactive.loadPromise}if(n.status==="notFound")return G(U(n.error)),nn(s,a,n.error);if(n.status==="redirected")throw G(K(n.error)),s.getMatch(n.id)?._nonReactive.loadPromise;if(n.status==="error")throw n.error;return o}),Oi=x.memo(function(){const e=q(),s=x.useContext(Yt),n=$({select:u=>u.matches.find(h=>h.id===s)?.routeId}),r=e.routesById[n],i=$({select:u=>{const d=u.matches.find(l=>l.id===s);return G(d),d.globalNotFound}}),a=$({select:u=>{const h=u.matches,d=h.findIndex(l=>l.id===s);return h[d+1]?.id}}),o=e.options.defaultPendingComponent?_.jsx(e.options.defaultPendingComponent,{}):null;if(i)return nn(e,r,void 0);if(!a)return null;const c=_.jsx(rn,{matchId:a});return n===Q?_.jsx(x.Suspense,{fallback:o,children:c}):c});function Mi(){const t=q(),s=t.routesById[Q].options.pendingComponent??t.options.defaultPendingComponent,n=s?_.jsx(s,{}):null,r=typeof document<"u"&&t.ssr?ft:x.Suspense,i=_.jsxs(r,{fallback:n,children:[_.jsx(bi,{}),_.jsx(Ei,{})]});return t.options.InnerWrap?_.jsx(t.options.InnerWrap,{children:i}):i}function Ei(){const t=q(),e=$({select:r=>r.matches[0]?.id}),s=$({select:r=>r.loadedAt}),n=e?_.jsx(rn,{matchId:e}):null;return _.jsx(Yt.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?n:_.jsx(Ee,{getResetKey:()=>s,errorComponent:Ie,onCatch:r=>{r.message||r.toString()},children:n})})}const Ki=t=>new Ii(t);class Ii extends $r{constructor(e){super(e)}}typeof globalThis<"u"?(globalThis.createFileRoute=Rs,globalThis.createLazyFileRoute=_s):typeof window<"u"&&(window.createFileRoute=Rs,window.createLazyFileRoute=_s);function Ti({router:t,children:e,...s}){Object.keys(s).length>0&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const n=en(),r=_.jsx(n.Provider,{value:t,children:e});return t.options.Wrap?_.jsx(t.options.Wrap,{children:r}):r}function $i({router:t,...e}){return _.jsx(Ti,{router:t,...e,children:_.jsx(Mi,{})})}const ki="modulepreload",Fi=function(t){return"/"+t},Ls={},qi=function(e,s,n){let r=Promise.resolve();if(s&&s.length>0){let c=function(u){return Promise.all(u.map(h=>Promise.resolve(h).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=a?.nonce||a?.getAttribute("nonce");r=c(s.map(u=>{if(u=Fi(u),u in Ls)return;Ls[u]=!0;const h=u.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const l=document.createElement("link");if(l.rel=h?"stylesheet":ki,h||(l.as="script"),l.crossOrigin="",l.href=u,o&&l.setAttribute("nonce",o),document.head.appendChild(l),h)return new Promise((f,p)=>{l.addEventListener("load",f),l.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${u}`)))})}))}function i(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return r.then(a=>{for(const o of a||[])o.status==="rejected"&&i(o.reason);return e().catch(i)})};export{Oi as O,ji as Q,$i as R,qi as _,Bs as a,Ni as b,Qi as c,Rs as d,De as e,Ki as f,Bi as g,Ar as r,Ui as u};
|