@atproto/oauth-provider-ui 0.8.0 → 0.8.2
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/dist/{account-page-BG82oyjp.js → account-page-BX2GZBEw.js} +2 -2
- package/dist/{account-page-BG82oyjp.js.map → account-page-BX2GZBEw.js.map} +1 -1
- package/dist/{admonition-DjgUmks3.js → admonition-DyZGyzv9.js} +8 -8
- package/dist/admonition-DyZGyzv9.js.map +1 -0
- package/dist/{authorization-page-DfxoC93f.js → authorization-page-DL7RUpCx.js} +2 -2
- package/dist/{authorization-page-DfxoC93f.js.map → authorization-page-DL7RUpCx.js.map} +1 -1
- package/dist/bundle-manifest.json +51 -35
- package/dist/{cookie-error-page-D338lcpA.js → cookie-error-page-Cx1SIpeB.js} +2 -2
- package/dist/{cookie-error-page-D338lcpA.js.map → cookie-error-page-Cx1SIpeB.js.map} +1 -1
- package/dist/{error-page-HTZtfhkN.js → error-page-BKbFLHAo.js} +2 -2
- package/dist/{error-page-HTZtfhkN.js.map → error-page-BKbFLHAo.js.map} +1 -1
- package/dist/{error-view-BFuIFXNS.js → error-view-DyR04KA3.js} +2 -2
- package/dist/{error-view-BFuIFXNS.js.map → error-view-DyR04KA3.js.map} +1 -1
- package/dist/{index-CmemEDtM.js → index-BGzCQjcN.js} +2 -2
- package/dist/{index-CmemEDtM.js.map → index-BGzCQjcN.js.map} +1 -1
- package/dist/messages-BO47dnxt.js +2 -0
- package/dist/messages-BO47dnxt.js.map +1 -0
- package/package.json +3 -3
- package/dist/admonition-DjgUmks3.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Tl=Object.defineProperty;var bo=e=>{throw TypeError(e)};var Dl=(e,t,n)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>Dl(e,typeof t!="symbol"?t+"":t,n),kr=(e,t,n)=>t.has(e)||bo("Cannot "+n);var y=(e,t,n)=>(kr(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?bo("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,s)=>(kr(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),W=(e,t,n)=>(kr(e,t,"access private method"),n);var Is=(e,t,n,s)=>({set _(r){V(e,t,r,n)},get _(){return y(e,t,s)}});import{r as p,j as a,a as Pa,p as Et,u as Ie,B as je,T as M,L as Vl,c as Kn,b as Ii,d as qt,A as bt,e as ka,f as Zl,C as Ul,g as $l}from"./admonition-DjgUmks3.js";import{r as Ma,P as ks,u as oi,c as Oa,a as fr,b as ql,d as Bl,e as zl,f as Ha,g as Kl,h as Wl,R as Ql,i as Gl,j as Jl,F as Yl,D as Xl,k as eu,l as Ni,A as tu,m as La,n as Ia,o as lt,p as nu,q as Ce,s as Ne,z as f,Z as ge,t as su,C as Na,v as ru,T as iu,w as ou,O as au,x as cu,y as lu,B as uu,E as du,S as St,G as jt,I as pr,H as hu,J as fu,K as ai,L as Fi,M as Fa,N as pu,Q as mu,U as Ta,V as gu,W as Da,X as vu,Y as yu,_ as bu,$ as wu,a0 as wo,a1 as xu,a2 as _u,a3 as Su,a4 as ju,a5 as Cu,a6 as Au,a7 as Ru,a8 as Eu,a9 as Pu}from"./index-CmemEDtM.js";import{c as Cn,E as Ti}from"./error-view-BFuIFXNS.js";var ts=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vn=typeof window>"u"||"Deno"in globalThis;function Ue(){}function ku(e,t){return typeof e=="function"?e(t):e}function ci(e){return typeof e=="number"&&e>=0&&e!==1/0}function Va(e,t){return Math.max(e+(t||0)-Date.now(),0)}function An(e,t){return typeof e=="function"?e(t):e}function Qe(e,t){return typeof e=="function"?e(t):e}function xo(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:o,queryKey:i,stale:c}=e;if(i){if(s){if(t.queryHash!==Di(i,t.options))return!1}else if(!ws(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||r&&r!==t.state.fetchStatus||o&&!o(t))}function _o(e,t){const{exact:n,status:s,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(yn(t.options.mutationKey)!==yn(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function Di(e,t){return((t==null?void 0:t.queryKeyHashFn)||yn)(e)}function yn(e){return JSON.stringify(e,(t,n)=>li(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function ws(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ws(e[n],t[n])):!1}function Za(e,t){if(e===t)return e;const n=So(e)&&So(t);if(n||li(e)&&li(t)){const s=n?e:Object.keys(e),r=s.length,o=n?t:Object.keys(t),i=o.length,c=n?[]:{};let l=0;for(let u=0;u<i;u++){const d=n?u:o[u];(!n&&s.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(c[d]=void 0,l++):(c[d]=Za(e[d],t[d]),c[d]===e[d]&&e[d]!==void 0&&l++)}return r===i&&l===r?e:c}return t}function Gs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function So(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function li(e){if(!jo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mu(e){return new Promise(t=>{setTimeout(t,e)})}function ui(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Za(e,t):t}function Ou(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Hu(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Vi=Symbol();function Ua(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ln,It,Ln,va,Lu=(va=class extends ts{constructor(){super();U(this,ln);U(this,It);U(this,Ln);V(this,Ln,t=>{if(!vn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){y(this,It)||this.setEventListener(y(this,Ln))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,It))==null||t.call(this),V(this,It,void 0))}setEventListener(t){var n;V(this,Ln,t),(n=y(this,It))==null||n.call(this),V(this,It,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){y(this,ln)!==t&&(V(this,ln,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof y(this,ln)=="boolean"?y(this,ln):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ln=new WeakMap,It=new WeakMap,Ln=new WeakMap,va),Zi=new Lu,In,Nt,Nn,ya,Iu=(ya=class extends ts{constructor(){super();U(this,In,!0);U(this,Nt);U(this,Nn);V(this,Nn,t=>{if(!vn&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){y(this,Nt)||this.setEventListener(y(this,Nn))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Nt))==null||t.call(this),V(this,Nt,void 0))}setEventListener(t){var n;V(this,Nn,t),(n=y(this,Nt))==null||n.call(this),V(this,Nt,t(this.setOnline.bind(this)))}setOnline(t){y(this,In)!==t&&(V(this,In,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return y(this,In)}},In=new WeakMap,Nt=new WeakMap,Nn=new WeakMap,ya),Js=new Iu;function di(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}function Nu(e){return Math.min(1e3*2**e,3e4)}function $a(e){return(e??"online")==="online"?Js.isOnline():!0}var qa=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Mr(e){return e instanceof qa}function Ba(e){let t=!1,n=0,s=!1,r;const o=di(),i=b=>{var w;s||(m(new qa(b)),(w=e.abort)==null||w.call(e))},c=()=>{t=!0},l=()=>{t=!1},u=()=>Zi.isFocused()&&(e.networkMode==="always"||Js.isOnline())&&e.canRun(),d=()=>$a(e.networkMode)&&e.canRun(),h=b=>{var w;s||(s=!0,(w=e.onSuccess)==null||w.call(e,b),r==null||r(),o.resolve(b))},m=b=>{var w;s||(s=!0,(w=e.onError)==null||w.call(e,b),r==null||r(),o.reject(b))},g=()=>new Promise(b=>{var w;r=x=>{(s||u())&&b(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var b;r=void 0,s||(b=e.onContinue)==null||b.call(e)}),v=()=>{if(s)return;let b;const w=n===0?e.initialPromise:void 0;try{b=w??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(h).catch(x=>{var E;if(s)return;const j=e.retry??(vn?0:3),A=e.retryDelay??Nu,H=typeof A=="function"?A(n,x):A,I=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,x);if(t||!I){m(x);return}n++,(E=e.onFail)==null||E.call(e,n,x),Mu(H).then(()=>u()?void 0:g()).then(()=>{t?m(x):v()})})};return{promise:o,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?v():g().then(v),o)}}var Fu=e=>setTimeout(e,0);function Tu(){let e=[],t=0,n=c=>{c()},s=c=>{c()},r=Fu;const o=c=>{t?e.push(c):r(()=>{n(c)})},i=()=>{const c=e;e=[],c.length&&r(()=>{s(()=>{c.forEach(l=>{n(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{o(()=>{c(...l)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{r=c}}}var me=Tu(),un,ba,za=(ba=class{constructor(){U(this,un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ci(this.gcTime)&&V(this,un,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vn?1/0:5*60*1e3))}clearGcTimeout(){y(this,un)&&(clearTimeout(y(this,un)),V(this,un,void 0))}},un=new WeakMap,ba),Fn,Tn,Ze,dn,we,As,hn,ze,ht,wa,Du=(wa=class extends za{constructor(t){super();U(this,ze);U(this,Fn);U(this,Tn);U(this,Ze);U(this,dn);U(this,we);U(this,As);U(this,hn);V(this,hn,!1),V(this,As,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,dn,t.client),V(this,Ze,y(this,dn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Fn,Vu(this.options)),this.state=t.state??y(this,Fn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=y(this,we))==null?void 0:t.promise}setOptions(t){this.options={...y(this,As),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Ze).remove(this)}setData(t,n){const s=ui(this.state.data,t,this.options);return W(this,ze,ht).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){W(this,ze,ht).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,r;const n=(s=y(this,we))==null?void 0:s.promise;return(r=y(this,we))==null||r.cancel(t),n?n.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(y(this,Fn))}isActive(){return this.observers.some(t=>Qe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vi||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Va(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,we))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,we))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,Ze).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(y(this,we)&&(y(this,hn)?y(this,we).cancel({revert:!0}):y(this,we).cancelRetry()),this.scheduleGc()),y(this,Ze).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||W(this,ze,ht).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(y(this,we))return y(this,we).continueRetry(),y(this,we).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,r=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(V(this,hn,!0),s.signal)})},o=()=>{const h=Ua(this.options,n),m={client:y(this,dn),queryKey:this.queryKey,meta:this.meta};return r(m),V(this,hn,!1),this.options.persister?this.options.persister(h,m,this):h(m)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:y(this,dn),state:this.state,fetchFn:o};r(i),(l=this.options.behavior)==null||l.onFetch(i,this),V(this,Tn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&W(this,ze,ht).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta});const c=h=>{var m,g,v,b;Mr(h)&&h.silent||W(this,ze,ht).call(this,{type:"error",error:h}),Mr(h)||((g=(m=y(this,Ze).config).onError)==null||g.call(m,h,this),(b=(v=y(this,Ze).config).onSettled)==null||b.call(v,this.state.data,h,this)),this.scheduleGc()};return V(this,we,Ba({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:s.abort.bind(s),onSuccess:h=>{var m,g,v,b;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){c(w);return}(g=(m=y(this,Ze).config).onSuccess)==null||g.call(m,h,this),(b=(v=y(this,Ze).config).onSettled)==null||b.call(v,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{W(this,ze,ht).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{W(this,ze,ht).call(this,{type:"pause"})},onContinue:()=>{W(this,ze,ht).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),y(this,we).start()}},Fn=new WeakMap,Tn=new WeakMap,Ze=new WeakMap,dn=new WeakMap,we=new WeakMap,As=new WeakMap,hn=new WeakMap,ze=new WeakSet,ht=function(t){const n=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,...Ka(s.data,this.options),fetchMeta:t.meta??null};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Mr(r)&&r.revert&&y(this,Tn)?{...y(this,Tn),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),me.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),y(this,Ze).notify({query:this,type:"updated",action:t})})},wa);function Ka(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$a(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nt,xa,Zu=(xa=class extends ts{constructor(t={}){super();U(this,nt);this.config=t,V(this,nt,new Map)}build(t,n,s){const r=n.queryKey,o=n.queryHash??Di(r,n);let i=this.get(o);return i||(i=new Du({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){y(this,nt).has(t.queryHash)||(y(this,nt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=y(this,nt).get(t.queryHash);n&&(t.destroy(),n===t&&y(this,nt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,nt).get(t)}getAll(){return[...y(this,nt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>xo(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>xo(t,s)):n}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nt=new WeakMap,xa),st,_e,fn,rt,Mt,_a,Uu=(_a=class extends za{constructor(t){super();U(this,rt);U(this,st);U(this,_e);U(this,fn);this.mutationId=t.mutationId,V(this,_e,t.mutationCache),V(this,st,[]),this.state=t.state||Wa(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,st).includes(t)||(y(this,st).push(t),this.clearGcTimeout(),y(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,st,y(this,st).filter(n=>n!==t)),this.scheduleGc(),y(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,st).length||(this.state.status==="pending"?this.scheduleGc():y(this,_e).remove(this))}continue(){var t;return((t=y(this,fn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,o,i,c,l,u,d,h,m,g,v,b,w,x,j,A,H,I,E,L;V(this,fn,Ba({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,_)=>{W(this,rt,Mt).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{W(this,rt,Mt).call(this,{type:"pause"})},onContinue:()=>{W(this,rt,Mt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,_e).canRun(this)}));const n=this.state.status==="pending",s=!y(this,fn).canStart();try{if(!n){W(this,rt,Mt).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(r=y(this,_e).config).onMutate)==null?void 0:o.call(r,t,this));const _=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,t));_!==this.state.context&&W(this,rt,Mt).call(this,{type:"pending",context:_,variables:t,isPaused:s})}const S=await y(this,fn).start();return await((u=(l=y(this,_e).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,S,t,this.state.context)),await((g=(m=y(this,_e).config).onSettled)==null?void 0:g.call(m,S,null,this.state.variables,this.state.context,this)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,S,null,t,this.state.context)),W(this,rt,Mt).call(this,{type:"success",data:S}),S}catch(S){try{throw await((x=(w=y(this,_e).config).onError)==null?void 0:x.call(w,S,t,this.state.context,this)),await((A=(j=this.options).onError)==null?void 0:A.call(j,S,t,this.state.context)),await((I=(H=y(this,_e).config).onSettled)==null?void 0:I.call(H,void 0,S,this.state.variables,this.state.context,this)),await((L=(E=this.options).onSettled)==null?void 0:L.call(E,void 0,S,t,this.state.context)),S}finally{W(this,rt,Mt).call(this,{type:"error",error:S})}}finally{y(this,_e).runNext(this)}}},st=new WeakMap,_e=new WeakMap,fn=new WeakMap,rt=new WeakSet,Mt=function(t){const n=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=n(this.state),me.batch(()=>{y(this,st).forEach(s=>{s.onMutationUpdate(t)}),y(this,_e).notify({mutation:this,type:"updated",action:t})})},_a);function Wa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ft,Ke,Rs,Sa,$u=(Sa=class extends ts{constructor(t={}){super();U(this,ft);U(this,Ke);U(this,Rs);this.config=t,V(this,ft,new Set),V(this,Ke,new Map),V(this,Rs,0)}build(t,n,s){const r=new Uu({mutationCache:this,mutationId:++Is(this,Rs)._,options:t.defaultMutationOptions(n),state:s});return this.add(r),r}add(t){y(this,ft).add(t);const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n);s?s.push(t):y(this,Ke).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,ft).delete(t)){const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&y(this,Ke).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n),r=s==null?void 0:s.find(o=>o.state.status==="pending");return!r||r===t}else return!0}runNext(t){var s;const n=Ns(t);if(typeof n=="string"){const r=(s=y(this,Ke).get(n))==null?void 0:s.find(o=>o!==t&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{y(this,ft).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,ft).clear(),y(this,Ke).clear()})}getAll(){return Array.from(y(this,ft))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>_o(n,s))}findAll(t={}){return this.getAll().filter(n=>_o(t,n))}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return me.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ue))))}},ft=new WeakMap,Ke=new WeakMap,Rs=new WeakMap,Sa);function Ns(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Co(e){return{onFetch:(t,n)=>{var d,h,m,g,v;const s=t.options,r=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],i=((v=t.state.data)==null?void 0:v.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let b=!1;const w=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},x=Ua(t.options,t.fetchOptions),j=async(A,H,I)=>{if(b)return Promise.reject();if(H==null&&A.pages.length)return Promise.resolve(A);const E={client:t.client,queryKey:t.queryKey,pageParam:H,direction:I?"backward":"forward",meta:t.options.meta};w(E);const L=await x(E),{maxPages:S}=t.options,_=I?Hu:Ou;return{pages:_(A.pages,L,S),pageParams:_(A.pageParams,H,S)}};if(r&&o.length){const A=r==="backward",H=A?qu:Ao,I={pages:o,pageParams:i},E=H(s,I);c=await j(I,E,A)}else{const A=e??o.length;do{const H=l===0?i[0]??s.initialPageParam:Ao(s,c);if(l>0&&H==null)break;c=await j(c,H),l++}while(l<A)}return c};t.options.persister?t.fetchFn=()=>{var b,w;return(w=(b=t.options).persister)==null?void 0:w.call(b,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ao(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function qu(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var ue,Ft,Tt,Dn,Vn,Dt,Zn,Un,ja,Bu=(ja=class{constructor(e={}){U(this,ue);U(this,Ft);U(this,Tt);U(this,Dn);U(this,Vn);U(this,Dt);U(this,Zn);U(this,Un);V(this,ue,e.queryCache||new Zu),V(this,Ft,e.mutationCache||new $u),V(this,Tt,e.defaultOptions||{}),V(this,Dn,new Map),V(this,Vn,new Map),V(this,Dt,0)}mount(){Is(this,Dt)._++,y(this,Dt)===1&&(V(this,Zn,Zi.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onFocus())})),V(this,Un,Js.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onOnline())})))}unmount(){var e,t;Is(this,Dt)._--,y(this,Dt)===0&&((e=y(this,Zn))==null||e.call(this),V(this,Zn,void 0),(t=y(this,Un))==null||t.call(this),V(this,Un,void 0))}isFetching(e){return y(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,Ft).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ue).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=y(this,ue).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(An(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return y(this,ue).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),r=y(this,ue).get(s.queryHash),o=r==null?void 0:r.state.data,i=ku(t,o);if(i!==void 0)return y(this,ue).build(this,s).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return me.batch(()=>y(this,ue).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ue).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=y(this,ue);me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=y(this,ue);return me.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=me.batch(()=>y(this,ue).findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(Ue).catch(Ue)}invalidateQueries(e,t={}){return me.batch(()=>(y(this,ue).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=me.batch(()=>y(this,ue).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let o=r.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ue)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(Ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=y(this,ue).build(this,t);return n.isStaleByTime(An(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ue).catch(Ue)}fetchInfiniteQuery(e){return e.behavior=Co(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ue).catch(Ue)}ensureInfiniteQueryData(e){return e.behavior=Co(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Js.isOnline()?y(this,Ft).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,ue)}getMutationCache(){return y(this,Ft)}getDefaultOptions(){return y(this,Tt)}setDefaultOptions(e){V(this,Tt,e)}setQueryDefaults(e,t){y(this,Dn).set(yn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,Dn).values()],n={};return t.forEach(s=>{ws(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){y(this,Vn).set(yn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Vn).values()],n={};return t.forEach(s=>{ws(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,Tt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Di(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vi&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,Tt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,ue).clear(),y(this,Ft).clear()}},ue=new WeakMap,Ft=new WeakMap,Tt=new WeakMap,Dn=new WeakMap,Vn=new WeakMap,Dt=new WeakMap,Zn=new WeakMap,Un=new WeakMap,ja),Ae,Q,Es,Se,pn,$n,Vt,it,Ps,qn,Bn,mn,gn,Zt,zn,ee,fs,hi,fi,pi,mi,gi,vi,yi,Qa,Ca,zu=(Ca=class extends ts{constructor(t,n){super();U(this,ee);U(this,Ae);U(this,Q);U(this,Es);U(this,Se);U(this,pn);U(this,$n);U(this,Vt);U(this,it);U(this,Ps);U(this,qn);U(this,Bn);U(this,mn);U(this,gn);U(this,Zt);U(this,zn,new Set);this.options=n,V(this,Ae,t),V(this,it,null),V(this,Vt,di()),this.options.experimental_prefetchInRender||y(this,Vt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,Q).addObserver(this),Ro(y(this,Q),this.options)?W(this,ee,fs).call(this):this.updateResult(),W(this,ee,mi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bi(y(this,Q),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bi(y(this,Q),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,ee,gi).call(this),W(this,ee,vi).call(this),y(this,Q).removeObserver(this)}setOptions(t){const n=this.options,s=y(this,Q);if(this.options=y(this,Ae).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qe(this.options.enabled,y(this,Q))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");W(this,ee,yi).call(this),y(this,Q).setOptions(this.options),n._defaulted&&!Gs(this.options,n)&&y(this,Ae).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,Q),observer:this});const r=this.hasListeners();r&&Eo(y(this,Q),s,this.options,n)&&W(this,ee,fs).call(this),this.updateResult(),r&&(y(this,Q)!==s||Qe(this.options.enabled,y(this,Q))!==Qe(n.enabled,y(this,Q))||An(this.options.staleTime,y(this,Q))!==An(n.staleTime,y(this,Q)))&&W(this,ee,hi).call(this);const o=W(this,ee,fi).call(this);r&&(y(this,Q)!==s||Qe(this.options.enabled,y(this,Q))!==Qe(n.enabled,y(this,Q))||o!==y(this,Zt))&&W(this,ee,pi).call(this,o)}getOptimisticResult(t){const n=y(this,Ae).getQueryCache().build(y(this,Ae),t),s=this.createResult(n,t);return Wu(this,s)&&(V(this,Se,s),V(this,$n,this.options),V(this,pn,y(this,Q).state)),s}getCurrentResult(){return y(this,Se)}trackResult(t,n){const s={};return Object.keys(t).forEach(r=>{Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),s}trackProp(t){y(this,zn).add(t)}getCurrentQuery(){return y(this,Q)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=y(this,Ae).defaultQueryOptions(t),s=y(this,Ae).getQueryCache().build(y(this,Ae),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return W(this,ee,fs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Se)))}createResult(t,n){var S;const s=y(this,Q),r=this.options,o=y(this,Se),i=y(this,pn),c=y(this,$n),u=t!==s?t.state:y(this,Es),{state:d}=t;let h={...d},m=!1,g;if(n._optimisticResults){const _=this.hasListeners(),F=!_&&Ro(t,n),D=_&&Eo(t,s,n,r);(F||D)&&(h={...h,...Ka(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:w}=h;if(n.select&&h.data!==void 0)if(o&&h.data===(i==null?void 0:i.data)&&n.select===y(this,Ps))g=y(this,qn);else try{V(this,Ps,n.select),g=n.select(h.data),g=ui(o==null?void 0:o.data,g,n),V(this,qn,g),V(this,it,null)}catch(_){V(this,it,_)}else g=h.data;if(n.placeholderData!==void 0&&g===void 0&&w==="pending"){let _;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))_=o.data;else if(_=typeof n.placeholderData=="function"?n.placeholderData((S=y(this,Bn))==null?void 0:S.state.data,y(this,Bn)):n.placeholderData,n.select&&_!==void 0)try{_=n.select(_),V(this,it,null)}catch(F){V(this,it,F)}_!==void 0&&(w="success",g=ui(o==null?void 0:o.data,_,n),m=!0)}y(this,it)&&(v=y(this,it),g=y(this,qn),b=Date.now(),w="error");const x=h.fetchStatus==="fetching",j=w==="pending",A=w==="error",H=j&&x,I=g!==void 0,L={status:w,fetchStatus:h.fetchStatus,isPending:j,isSuccess:w==="success",isError:A,isInitialLoading:H,isLoading:H,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!j,isLoadingError:A&&!I,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&I,isStale:Ui(t,n),refetch:this.refetch,promise:y(this,Vt)};if(this.options.experimental_prefetchInRender){const _=N=>{L.status==="error"?N.reject(L.error):L.data!==void 0&&N.resolve(L.data)},F=()=>{const N=V(this,Vt,L.promise=di());_(N)},D=y(this,Vt);switch(D.status){case"pending":t.queryHash===s.queryHash&&_(D);break;case"fulfilled":(L.status==="error"||L.data!==D.value)&&F();break;case"rejected":(L.status!=="error"||L.error!==D.reason)&&F();break}}return L}updateResult(){const t=y(this,Se),n=this.createResult(y(this,Q),this.options);if(V(this,pn,y(this,Q).state),V(this,$n,this.options),y(this,pn).data!==void 0&&V(this,Bn,y(this,Q)),Gs(n,t))return;V(this,Se,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!y(this,zn).size)return!0;const i=new Set(o??y(this,zn));return this.options.throwOnError&&i.add("error"),Object.keys(y(this,Se)).some(c=>{const l=c;return y(this,Se)[l]!==t[l]&&i.has(l)})};W(this,ee,Qa).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,ee,mi).call(this)}},Ae=new WeakMap,Q=new WeakMap,Es=new WeakMap,Se=new WeakMap,pn=new WeakMap,$n=new WeakMap,Vt=new WeakMap,it=new WeakMap,Ps=new WeakMap,qn=new WeakMap,Bn=new WeakMap,mn=new WeakMap,gn=new WeakMap,Zt=new WeakMap,zn=new WeakMap,ee=new WeakSet,fs=function(t){W(this,ee,yi).call(this);let n=y(this,Q).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ue)),n},hi=function(){W(this,ee,gi).call(this);const t=An(this.options.staleTime,y(this,Q));if(vn||y(this,Se).isStale||!ci(t))return;const s=Va(y(this,Se).dataUpdatedAt,t)+1;V(this,mn,setTimeout(()=>{y(this,Se).isStale||this.updateResult()},s))},fi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,Q)):this.options.refetchInterval)??!1},pi=function(t){W(this,ee,vi).call(this),V(this,Zt,t),!(vn||Qe(this.options.enabled,y(this,Q))===!1||!ci(y(this,Zt))||y(this,Zt)===0)&&V(this,gn,setInterval(()=>{(this.options.refetchIntervalInBackground||Zi.isFocused())&&W(this,ee,fs).call(this)},y(this,Zt)))},mi=function(){W(this,ee,hi).call(this),W(this,ee,pi).call(this,W(this,ee,fi).call(this))},gi=function(){y(this,mn)&&(clearTimeout(y(this,mn)),V(this,mn,void 0))},vi=function(){y(this,gn)&&(clearInterval(y(this,gn)),V(this,gn,void 0))},yi=function(){const t=y(this,Ae).getQueryCache().build(y(this,Ae),this.options);if(t===y(this,Q))return;const n=y(this,Q);V(this,Q,t),V(this,Es,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Qa=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(y(this,Se))}),y(this,Ae).getQueryCache().notify({query:y(this,Q),type:"observerResultsUpdated"})})},Ca);function Ku(e,t){return Qe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ro(e,t){return Ku(e,t)||e.state.data!==void 0&&bi(e,t,t.refetchOnMount)}function bi(e,t,n){if(Qe(t.enabled,e)!==!1){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Ui(e,t)}return!1}function Eo(e,t,n,s){return(e!==t||Qe(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ui(e,n)}function Ui(e,t){return Qe(t.enabled,e)!==!1&&e.isStaleByTime(An(t.staleTime,e))}function Wu(e,t){return!Gs(e.getCurrentResult(),t)}var Ut,$t,Re,pt,_t,zs,wi,Aa,Qu=(Aa=class extends ts{constructor(t,n){super();U(this,_t);U(this,Ut);U(this,$t);U(this,Re);U(this,pt);V(this,Ut,t),this.setOptions(n),this.bindMethods(),W(this,_t,zs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=y(this,Ut).defaultMutationOptions(t),Gs(this.options,n)||y(this,Ut).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,Re),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&yn(n.mutationKey)!==yn(this.options.mutationKey)?this.reset():((s=y(this,Re))==null?void 0:s.state.status)==="pending"&&y(this,Re).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=y(this,Re))==null||t.removeObserver(this)}onMutationUpdate(t){W(this,_t,zs).call(this),W(this,_t,wi).call(this,t)}getCurrentResult(){return y(this,$t)}reset(){var t;(t=y(this,Re))==null||t.removeObserver(this),V(this,Re,void 0),W(this,_t,zs).call(this),W(this,_t,wi).call(this)}mutate(t,n){var s;return V(this,pt,n),(s=y(this,Re))==null||s.removeObserver(this),V(this,Re,y(this,Ut).getMutationCache().build(y(this,Ut),this.options)),y(this,Re).addObserver(this),y(this,Re).execute(t)}},Ut=new WeakMap,$t=new WeakMap,Re=new WeakMap,pt=new WeakMap,_t=new WeakSet,zs=function(){var n;const t=((n=y(this,Re))==null?void 0:n.state)??Wa();V(this,$t,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},wi=function(t){me.batch(()=>{var n,s,r,o,i,c,l,u;if(y(this,pt)&&this.hasListeners()){const d=y(this,$t).variables,h=y(this,$t).context;(t==null?void 0:t.type)==="success"?((s=(n=y(this,pt)).onSuccess)==null||s.call(n,t.data,d,h),(o=(r=y(this,pt)).onSettled)==null||o.call(r,t.data,null,d,h)):(t==null?void 0:t.type)==="error"&&((c=(i=y(this,pt)).onError)==null||c.call(i,t.error,d,h),(u=(l=y(this,pt)).onSettled)==null||u.call(l,void 0,t.error,d,h))}this.listeners.forEach(d=>{d(y(this,$t))})})},Aa),Ga=p.createContext(void 0),mr=e=>{const t=p.useContext(Ga);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Gu=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(Ga.Provider,{value:e,children:t})),Ja=p.createContext(!1),Ju=()=>p.useContext(Ja);Ja.Provider;function Yu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xu=p.createContext(Yu()),ed=()=>p.useContext(Xu);function Ya(e,t){return typeof e=="function"?e(...t):!!e}function xi(){}var td=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nd=e=>{p.useEffect(()=>{e.clearReset()},[e])},sd=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||Ya(n,[e.error,s])),rd=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},id=(e,t)=>e.isLoading&&e.isFetching&&!t,od=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Po=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ad(e,t,n){var h,m,g,v,b;const s=mr(),r=Ju(),o=ed(),i=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),i._optimisticResults=r?"isRestoring":"optimistic",rd(i),td(i,o),nd(o);const c=!s.getQueryCache().get(i.queryHash),[l]=p.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(w=>{const x=d?l.subscribe(me.batchCalls(w)):xi;return l.updateResult(),x},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(i)},[i,l]),od(i,u))throw Po(i,l,o);if(sd({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((v=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||v.call(g,i,u),i.experimental_prefetchInRender&&!vn&&id(u,r)){const w=c?Po(i,l,o):(b=s.getQueryCache().get(i.queryHash))==null?void 0:b.promise;w==null||w.catch(xi).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function Xa(e,t){return ad(e,zu)}function Fe(e,t){const n=mr(),[s]=p.useState(()=>new Qu(n,e));p.useEffect(()=>{s.setOptions(e)},[s,e]);const r=p.useSyncExternalStore(p.useCallback(i=>s.subscribe(me.batchCalls(i)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),o=p.useCallback((i,c)=>{s.mutate(i,c).catch(xi)},[s]);if(r.error&&Ya(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var cd="Invariant failed";function gt(e,t){if(!e)throw new Error(cd)}const Rn=new WeakMap,Ks=new WeakMap,Ys={current:[]};let Or=!1,ys=0;const ps=new Set,Fs=new Map;function ec(e){const t=Array.from(e).sort((n,s)=>n instanceof En&&n.options.deps.includes(s)?1:s instanceof En&&s.options.deps.includes(n)?-1:0);for(const n of t){if(Ys.current.includes(n))continue;Ys.current.push(n),n.recompute();const s=Ks.get(n);if(s)for(const r of s){const o=Rn.get(r);o&&ec(o)}}}function ld(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function ud(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function tc(e){if(ys>0&&!Fs.has(e)&&Fs.set(e,e.prevState),ps.add(e),!(ys>0)&&!Or)try{for(Or=!0;ps.size>0;){const t=Array.from(ps);ps.clear();for(const n of t){const s=Fs.get(n)??n.prevState;n.prevState=s,ld(n)}for(const n of t){const s=Rn.get(n);s&&(Ys.current.push(n),ec(s))}for(const n of t){const s=Rn.get(n);if(s)for(const r of s)ud(r)}}}finally{Or=!1,Ys.current=[],Fs.clear()}}function Hr(e){ys++;try{e()}finally{if(ys--,ys===0){const t=Array.from(ps)[0];t&&tc(t)}}}function dd(e){return typeof e=="function"}class _i{constructor(t,n){this.listeners=new Set,this.subscribe=s=>{var r,o;this.listeners.add(s);const i=(o=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:o.call(r,s,this);return()=>{this.listeners.delete(s),i==null||i()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,s,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):dd(t)?this.state=t(this.prevState):this.state=t,(r=(s=this.options)==null?void 0:s.onUpdate)==null||r.call(s),tc(this)}}class En{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=[],s=[];for(const r of this.options.deps)n.push(r.prevState),s.push(r.state);return this.lastSeenDepValues=s,{prevDepVals:n,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,s;this.prevState=this.state;const{prevDepVals:r,currDepVals:o,prevVal:i}=this.getDepVals();this.state=this.options.fn({prevDepVals:r,currDepVals:o,prevVal:i}),(s=(n=this.options).onUpdate)==null||s.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof En&&o.checkIfRecalculationNeededDeeply();let n=!1;const s=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let o=0;o<r.length;o++)if(r[o]!==s[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var s,r;this.listeners.add(n);const o=(r=(s=this.options).onSubscribe)==null?void 0:r.call(s,n,this);return()=>{this.listeners.delete(n),o==null||o()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof En)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof _i){let s=Rn.get(n);s||(s=new Set,Rn.set(n,s)),s.add(this);let r=Ks.get(this);r||(r=new Set,Ks.set(this,r)),r.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof En)this.unregisterFromGraph(n.options.deps);else if(n instanceof _i){const s=Rn.get(n);s&&s.delete(this);const r=Ks.get(this);r&&r.delete(n)}}}const zt="__TSR_index",ko="popstate",Mo="beforeunload";function nc(e){let t=e.getLocation();const n=new Set,s=i=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:i}))},r=i=>{e.notifyOnIndexChange??!0?s(i):t=e.getLocation()},o=async({task:i,navigateOpts:c,...l})=>{var u,d;if((c==null?void 0:c.ignoreBlocker)??!1){i();return}const m=((u=e.getBlockers)==null?void 0:u.call(e))??[],g=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&m.length&&g)for(const v of m){const b=xs(l.path,l.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:l.type})){(d=e.onBlocked)==null||d.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,c,l)=>{const u=t.state[zt];c=Si(u+1,c),o({task:()=>{e.pushState(i,c),s({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:c})},replace:(i,c,l)=>{const u=t.state[zt];c=Si(u,c),o({task:()=>{e.replaceState(i,c),s({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:c})},go:(i,c)=>{o({task:()=>{e.go(i),r({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[zt]!==0,createHref:i=>e.createHref(i),block:i=>{var c;if(!e.setBlockers)return()=>{};const l=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...l,i]),()=>{var u,d;const h=((u=e.getBlockers)==null?void 0:u.call(e))??[];(d=e.setBlockers)==null||d.call(e,h.filter(m=>m!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:s}}function Si(e,t){return t||(t={}),{...t,key:$i(),[zt]:e}}function hd(e){var t;const n=typeof document<"u"?window:void 0,s=n.history.pushState,r=n.history.replaceState;let o=[];const i=()=>o,c=_=>o=_,l=_=>_,u=()=>xs(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state);(t=n.history.state)!=null&&t.key||n.history.replaceState({[zt]:0,key:$i()},"");let d=u(),h,m=!1,g=!1,v=!1,b=!1;const w=()=>d;let x,j;const A=()=>{x&&(S._ignoreSubscribers=!0,(x.isPush?n.history.pushState:n.history.replaceState)(x.state,"",x.href),S._ignoreSubscribers=!1,x=void 0,j=void 0,h=void 0)},H=(_,F,D)=>{const N=l(F);j||(h=d),d=xs(F,D),x={href:N,state:D,isPush:(x==null?void 0:x.isPush)||_==="push"},j||(j=Promise.resolve().then(()=>A()))},I=_=>{d=u(),S.notify({type:_})},E=async()=>{if(g){g=!1;return}const _=u(),F=_.state[zt]-d.state[zt],D=F===1,N=F===-1,T=!D&&!N||m;m=!1;const $=T?"GO":N?"BACK":"FORWARD",q=T?{type:"GO",index:F}:{type:N?"BACK":"FORWARD"};if(v)v=!1;else{const Z=i();if(typeof document<"u"&&Z.length){for(const B of Z)if(await B.blockerFn({currentLocation:d,nextLocation:_,action:$})){g=!0,n.history.go(1),S.notify(q);return}}}d=u(),S.notify(q)},L=_=>{if(b){b=!1;return}let F=!1;const D=i();if(typeof document<"u"&&D.length)for(const N of D){const T=N.enableBeforeUnload??!0;if(T===!0){F=!0;break}if(typeof T=="function"&&T()===!0){F=!0;break}}if(F)return _.preventDefault(),_.returnValue=""},S=nc({getLocation:w,getLength:()=>n.history.length,pushState:(_,F)=>H("push",_,F),replaceState:(_,F)=>H("replace",_,F),back:_=>(_&&(v=!0),b=!0,n.history.back()),forward:_=>{_&&(v=!0),b=!0,n.history.forward()},go:_=>{m=!0,n.history.go(_)},createHref:_=>l(_),flush:A,destroy:()=>{n.history.pushState=s,n.history.replaceState=r,n.removeEventListener(Mo,L,{capture:!0}),n.removeEventListener(ko,E)},onBlocked:()=>{h&&d!==h&&(d=h)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return n.addEventListener(Mo,L,{capture:!0}),n.addEventListener(ko,E),n.history.pushState=function(..._){const F=s.apply(n.history,_);return S._ignoreSubscribers||I("PUSH"),F},n.history.replaceState=function(..._){const F=r.apply(n.history,_);return S._ignoreSubscribers||I("REPLACE"),F},S}function fd(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const s=t.map((o,i)=>Si(i,void 0));return nc({getLocation:()=>xs(t[n],s[n]),getLength:()=>t.length,pushState:(o,i)=>{n<t.length-1&&(t.splice(n+1),s.splice(n+1)),s.push(i),t.push(o),n=Math.max(t.length-1,0)},replaceState:(o,i)=>{s[n]=i,t[n]=o},back:()=>{n=Math.max(n-1,0)},forward:()=>{n=Math.min(n+1,t.length-1)},go:o=>{n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function xs(e,t){const n=e.indexOf("#"),s=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:e.length),hash:n>-1?e.substring(n):"",search:s>-1?e.slice(s,n===-1?void 0:n):"",state:t||{[zt]:0,key:$i()}}}function $i(){return(Math.random()+1).toString(36).substring(7)}function Sn(e){return e[e.length-1]}function pd(e){return typeof e=="function"}function an(e,t){return pd(e)?e(t):e}function ji(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function Ve(e,t){if(e===t)return e;const n=t,s=Ho(e)&&Ho(n);if(s||Xs(e)&&Xs(n)){const r=s?e:Object.keys(e),o=r.length,i=s?n:Object.keys(n),c=i.length,l=s?[]:{};let u=0;for(let d=0;d<c;d++){const h=s?d:i[d];(!s&&r.includes(h)||s)&&e[h]===void 0&&n[h]===void 0?(l[h]=void 0,u++):(l[h]=Ve(e[h],n[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return o===c&&u===o?e:l}return n}function Xs(e){if(!Oo(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Oo(n)||!n.hasOwnProperty("isPrototypeOf"))}function Oo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ho(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lo(e,t){let n=Object.keys(e);return t&&(n=n.filter(s=>e[s]!==void 0)),n}function Pn(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Xs(e)&&Xs(t)){const s=(n==null?void 0:n.ignoreUndefined)??!0,r=Lo(e,s),o=Lo(t,s);return!(n!=null&&n.partial)&&r.length!==o.length?!1:o.every(i=>Pn(e[i],t[i],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((s,r)=>!Pn(s,t[r],n)):!1}function _n(e){let t,n;const s=new Promise((r,o)=>{t=r,n=o});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,t(r),e==null||e(r)},s.reject=r=>{s.status="rejected",n(r)},s}function md(e){return/%[0-9A-Fa-f]{2}/.test(e)}function wt(e){return gr(e.filter(t=>t!==void 0).join("/"))}function gr(e){return e.replace(/\/{2,}/g,"/")}function qi(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function cn(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function gd(e){return cn(qi(e))}function er(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function vd(e,t,n){return er(e,n)===er(t,n)}function yd({basepath:e,base:t,to:n,trailingSlash:s="never",caseSensitive:r}){var o,i;t=tr(e,t,r),n=tr(e,n,r);let c=Wn(t);const l=Wn(n);c.length>1&&((o=Sn(c))==null?void 0:o.value)==="/"&&c.pop(),l.forEach((d,h)=>{d.value==="/"?h?h===l.length-1&&c.push(d):c=[d]:d.value===".."?c.pop():d.value==="."||c.push(d)}),c.length>1&&(((i=Sn(c))==null?void 0:i.value)==="/"?s==="never"&&c.pop():s==="always"&&c.push({type:"pathname",value:"/"}));const u=wt([e,...c.map(d=>d.value)]);return gr(u)}function Wn(e){if(!e)return[];e=gr(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(s=>s==="$"||s==="*"?{type:"wildcard",value:s}:s.charAt(0)==="$"?{type:"param",value:s}:{type:"pathname",value:s.includes("%25")?s.split("%25").map(r=>decodeURI(r)).join("%25"):decodeURI(s)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function Ts({path:e,params:t,leaveWildcards:n,leaveParams:s,decodeCharMap:r}){const o=Wn(e);function i(u){const d=t[u],h=typeof d=="string";return["*","_splat"].includes(u)?h?encodeURI(d):d:h?bd(d,r):d}const c={},l=wt(o.map(u=>{if(u.type==="wildcard"){c._splat=t._splat;const d=i("_splat");return n?`${u.value}${d??""}`:d}if(u.type==="param"){const d=u.value.substring(1);if(c[d]=t[d],s){const h=i(u.value);return`${u.value}${h??""}`}return i(d)??"undefined"}return u.value}));return{usedParams:c,interpolatedPath:l}}function bd(e,t){let n=encodeURIComponent(e);if(t)for(const[s,r]of t)n=n.replaceAll(s,r);return n}function Ds(e,t,n){const s=wd(e,t,n);if(!(n.to&&!s))return s??{}}function tr(e,t,n=!1){const s=n?e:e.toLowerCase(),r=n?t:t.toLowerCase();switch(!0){case s==="/":return t;case r===s:return"";case t.length<e.length:return t;case r[s.length]!=="/":return t;case r.startsWith(s):return t.slice(e.length);default:return t}}function wd(e,t,n){if(e!=="/"&&!t.startsWith(e))return;t=tr(e,t,n.caseSensitive);const s=tr(e,`${n.to??"$"}`,n.caseSensitive),r=Wn(t),o=Wn(s);t.startsWith("/")||r.unshift({type:"pathname",value:"/"}),s.startsWith("/")||o.unshift({type:"pathname",value:"/"});const i={};return(()=>{for(let l=0;l<Math.max(r.length,o.length);l++){const u=r[l],d=o[l],h=l>=r.length-1,m=l>=o.length-1;if(d){if(d.type==="wildcard"){const g=decodeURI(wt(r.slice(l).map(v=>v.value)));return i["*"]=g,i._splat=g,!0}if(d.type==="pathname"){if(d.value==="/"&&!(u!=null&&u.value))return!0;if(u){if(n.caseSensitive){if(d.value!==u.value)return!1}else if(d.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(d.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(i[d.value.substring(1)]=decodeURIComponent(u.value))}}if(!h&&m)return i["**"]=wt(r.slice(l+1).map(g=>g.value)),!!n.fuzzy&&(d==null?void 0:d.value)!=="/"}return!0})()?i:void 0}function $e(e){return!!(e!=null&&e.isNotFound)}const nr="tsr-scroll-restoration-v1_3";let sc=!1;try{sc=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const xd=(e,t)=>{let n;return(...s)=>{n||(n=setTimeout(()=>{e(...s),n=null},t))}},jn=sc?{state:JSON.parse(window.sessionStorage.getItem(nr)||"null")||{},set:t=>(jn.state=an(t,jn.state)||jn.state,window.sessionStorage.setItem(nr,JSON.stringify(jn.state)))}:void 0,Ci=e=>e.state.key||e.href;function _d(e){const t=[];let n;for(;n=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children,e)+1})`),e=n;return`${t.join(" > ")}`.toLowerCase()}let sr=!1;function rc(e,t,n,s,r){var o;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const c=t||((o=window.history.state)==null?void 0:o.key),l=i[c];sr=!0,(()=>{if(s&&l){for(const d in l){const h=l[d];if(d==="window")window.scrollTo({top:h.scrollY,left:h.scrollX,behavior:n});else if(d){const m=document.querySelector(d);m&&(m.scrollLeft=h.scrollX,m.scrollTop=h.scrollY)}}return}const u=window.location.hash.split("#")[1];if(u){const d=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(d){const h=document.getElementById(u);h&&h.scrollIntoView(d)}return}["window",...(r==null?void 0:r.filter(d=>d!=="window"))??[]].forEach(d=>{const h=d==="window"?window:document.querySelector(d);h&&h.scrollTo({top:0,left:0,behavior:n})})})(),sr=!1}function Sd(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,sr=!1;const s=e.options.getScrollRestorationKey||Ci;window.history.scrollRestoration="manual";const r=o=>{if(sr||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?i=`[data-scroll-restoration-id="${l}"]`:i=_d(o.target)}const c=s(e.state.location);jn.set(l=>{const u=l[c]=l[c]||{},d=u[i]=u[i]||{};if(i==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(i){const h=document.querySelector(i);h&&(d.scrollX=h.scrollLeft||0,d.scrollY=h.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",xd(r,100),!0),e.subscribe("onRendered",o=>{const i=s(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}rc(nr,i,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&jn.set(c=>(c[i]=c[i]||{},c))})}function jd(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Cd(e,t){const n=Object.entries(e).flatMap(([r,o])=>Array.isArray(o)?o.map(i=>[r,String(i)]):[[r,String(o)]]);return""+new URLSearchParams(n).toString()}function Lr(e){if(!e)return"";const t=md(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Ad(e,t){const n=e;return[...new URLSearchParams(n).entries()].reduce((o,[i,c])=>{const l=o[i];return l==null?o[i]=Lr(c):o[i]=Array.isArray(l)?[...l,Lr(c)]:[l,Lr(c)],o},{})}const Rd=Pd(JSON.parse),Ed=kd(JSON.stringify,JSON.parse);function Pd(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=Ad(t);for(const s in n){const r=n[s];if(typeof r=="string")try{n[s]=e(r)}catch{}}return n}}function kd(e,t){function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(typeof s=="string"&&typeof t=="function")try{return t(s),e(s)}catch{}return s}return s=>{s={...s},Object.keys(s).forEach(o=>{const i=s[o];typeof i>"u"||i===void 0?delete s[o]:s[o]=n(i)});const r=Cd(s).toString();return r?`?${r}`:""}}const We="__root__";function rn(e){return!!(e!=null&&e.isRedirect)}function Ir(e){return!!(e!=null&&e.isRedirect)&&e.href}function kn(e){const t=e.resolvedLocation,n=e.location,s=(t==null?void 0:t.pathname)!==n.pathname,r=(t==null?void 0:t.href)!==n.href,o=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:s,hrefChanged:r,hashChanged:o}}class Md{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var s;n.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 r=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(o=>[encodeURIComponent(o),o])):void 0,(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${gd(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?fd({initialEntries:[this.basepath||"/"]}):hd()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new _i(Hd(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}),Sd(this)),typeof window<"u"&&"CSS"in window&&typeof((s=window.CSS)==null?void 0:s.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[n.id]=n);const s=i=>{i.forEach((c,l)=>{c.init({originalIndex:l,defaultSsr:this.options.defaultSsr});const u=this.routesById[c.id];if(gt(!u,`Duplicate routes found with id: ${String(c.id)}`),this.routesById[c.id]=c,!c.isRoot&&c.path){const h=cn(c.fullPath);(!this.routesByPath[h]||c.fullPath.endsWith("/"))&&(this.routesByPath[h]=c)}const d=c.children;d!=null&&d.length&&s(d)})};s([this.routeTree]);const r=[];Object.values(this.routesById).forEach((i,c)=>{var l;if(i.isRoot||!i.path)return;const u=qi(i.fullPath),d=Wn(u);for(;d.length>1&&((l=d[0])==null?void 0:l.value)==="/";)d.shift();const h=d.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);r.push({child:i,trimmed:u,parsed:d,index:c,scores:h})}),this.flatRoutes=r.sort((i,c)=>{const l=Math.min(i.scores.length,c.scores.length);for(let u=0;u<l;u++)if(i.scores[u]!==c.scores[u])return c.scores[u]-i.scores[u];if(i.scores.length!==c.scores.length)return c.scores.length-i.scores.length;for(let u=0;u<l;u++)if(i.parsed[u].value!==c.parsed[u].value)return i.parsed[u].value>c.parsed[u].value?1:-1;return i.index-c.index}).map((i,c)=>(i.child.rank=c,i.child))},this.subscribe=(n,s)=>{const r={eventType:n,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=n=>{this.subscribers.forEach(s=>{s.eventType===n.type&&s.fn(n)})},this.parseLocation=(n,s)=>{const r=({pathname:l,search:u,hash:d,state:h})=>{const m=this.options.parseSearch(u),g=this.options.stringifySearch(m);return{pathname:l,searchStr:g,search:Ve(n==null?void 0:n.search,m),hash:d.split("#").reverse()[0]??"",href:`${l}${g}${d}`,state:Ve(n==null?void 0:n.state,h)}},o=r(s??this.history.location),{__tempLocation:i,__tempKey:c}=o.state;if(i&&(!c||c===this.tempLocationKey)){const l=r(i);return l.state.key=o.state.key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathWithBase=(n,s)=>yd({basepath:this.basepath,base:n,to:gr(s),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(n,s,r)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},r):this.matchRoutesInternal(n,s),this.getMatchedRoutes=(n,s)=>{let r={};const o=cn(n.pathname),i=d=>Ds(this.basepath,o,{to:d.fullPath,caseSensitive:d.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let c=(s==null?void 0:s.to)!==void 0?this.routesByPath[s.to]:void 0;c?r=i(c):c=this.flatRoutes.find(d=>{const h=i(d);return h?(r=h,!0):!1});let l=c||this.routesById[We];const u=[l];for(;l.parentRoute;)l=l.parentRoute,u.unshift(l);return{matchedRoutes:u,routeParams:r,foundRoute:c}},this.cancelMatch=n=>{const s=this.getMatch(n);s&&(s.abortController.abort(),clearTimeout(s.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const s=(o={},i)=>{var c,l,u,d,h,m,g;const v=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}):this.state.matches,b=o.from!=null?v.find(N=>Ds(this.basepath,cn(N.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,w=(b==null?void 0:b.pathname)||this.latestLocation.pathname;gt(o.from==null||b!=null,"Could not find match for from: "+o.from);const x=(c=this.state.pendingMatches)!=null&&c.length?(l=Sn(this.state.pendingMatches))==null?void 0:l.search:((u=Sn(v))==null?void 0:u.search)||this.latestLocation.search,j=i==null?void 0:i.matchedRoutes.filter(N=>v.find(T=>T.routeId===N.id));let A;if(o.to){const N=(b==null?void 0:b.fullPath)||((d=Sn(v))==null?void 0:d.fullPath)||this.latestLocation.pathname;A=this.resolvePathWithBase(N,`${o.to}`)}else{const N=this.routesById[(h=j==null?void 0:j.find(T=>{const $=Ts({path:T.fullPath,params:(i==null?void 0:i.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return wt([this.basepath,$])===w}))==null?void 0:h.id];A=this.resolvePathWithBase(w,(N==null?void 0:N.to)??w)}const H={...(m=Sn(v))==null?void 0:m.params};let I=(o.params??!0)===!0?H:{...H,...an(o.params,H)};Object.keys(I).length>0&&(i==null||i.matchedRoutes.map(N=>{var T;return((T=N.options.params)==null?void 0:T.stringify)??N.options.stringifyParams}).filter(Boolean).forEach(N=>{I={...I,...N(I)}})),A=Ts({path:A,params:I??{},leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let E=x;if(n._includeValidateSearch&&((g=this.options.search)!=null&&g.strict)){let N={};i==null||i.matchedRoutes.forEach(T=>{try{T.options.validateSearch&&(N={...N,...Nr(T.options.validateSearch,{...N,...E})??{}})}catch{}}),E=N}E=(N=>{const T=(i==null?void 0:i.matchedRoutes.reduce((Z,B)=>{var z;const G=[];if("search"in B.options)(z=B.options.search)!=null&&z.middlewares&&G.push(...B.options.search.middlewares);else if(B.options.preSearchFilters||B.options.postSearchFilters){const X=({search:J,next:ye})=>{let te=J;"preSearchFilters"in B.options&&B.options.preSearchFilters&&(te=B.options.preSearchFilters.reduce((oe,ae)=>ae(oe),J));const ne=ye(te);return"postSearchFilters"in B.options&&B.options.postSearchFilters?B.options.postSearchFilters.reduce((oe,ae)=>ae(oe),ne):ne};G.push(X)}if(n._includeValidateSearch&&B.options.validateSearch){const X=({search:J,next:ye})=>{const te=ye(J);try{return{...te,...Nr(B.options.validateSearch,te)??{}}}catch{return te}};G.push(X)}return Z.concat(G)},[]))??[],$=({search:Z})=>o.search?o.search===!0?Z:an(o.search,Z):{};T.push($);const q=(Z,B)=>{if(Z>=T.length)return B;const z=T[Z];return z({search:B,next:X=>q(Z+1,X)})};return q(0,N)})(E),E=Ve(x,E);const S=this.options.stringifySearch(E),_=o.hash===!0?this.latestLocation.hash:o.hash?an(o.hash,this.latestLocation.hash):void 0,F=_?`#${_}`:"";let D=o.state===!0?this.latestLocation.state:o.state?an(o.state,this.latestLocation.state):{};return D=Ve(this.latestLocation.state,D),{pathname:A,search:E,searchStr:S,state:D,hash:_??"",href:`${A}${S}${F}`,unmaskOnReload:o.unmaskOnReload}},r=(o={},i)=>{var c;const l=s(o);let u=i?s(i):void 0;if(!u){let m={};const g=(c=this.options.routeMasks)==null?void 0:c.find(v=>{const b=Ds(this.basepath,l.pathname,{to:v.from,caseSensitive:!1,fuzzy:!1});return b?(m=b,!0):!1});if(g){const{from:v,...b}=g;i={...ji(n,["from"]),...b,params:m},u=s(i)}}const d=this.getMatchedRoutes(l,o),h=s(o,d);if(u){const m=this.getMatchedRoutes(u,i),g=s(i,m);h.maskedLocation=g}return h};return n.mask?r(n,{...ji(n,["from"]),...n.mask}):r(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:s,...r})=>{const o=()=>{const l=["key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(d=>{r.state[d]=this.latestLocation.state[d]});const u=Pn(r.state,this.latestLocation.state);return l.forEach(d=>{delete r.state[d]}),u},i=this.latestLocation.href===r.href,c=this.commitLocationPromise;if(this.commitLocationPromise=_n(()=>{c==null||c.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...d}=r;l&&(d={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[r.replace?"replace":"push"](d.href,d.state,{ignoreBlocker:s})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:r,viewTransition:o,ignoreBlocker:i,href:c,...l}={})=>{if(c){const d=this.history.location.state.__TSR_index,h=xs(c,{__TSR_index:n?d:d+1});l.to=h.pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});return this.commitLocation({...u,viewTransition:o,replace:n,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:i})},this.navigate=({to:n,reloadDocument:s,href:r,...o})=>{if(s){if(!r){const i=this.buildLocation({to:n,...o});r=this.history.createHref(i.href)}o.replace?window.location.replace(r):window.location.href=r;return}return this.buildAndCommitLocation({...o,href:r,to:n})},this.load=async n=>{this.latestLocation=this.parseLocation(this.latestLocation);let s,r,o;for(o=new Promise(i=>{this.startTransition(async()=>{var c;try{const l=this.latestLocation,u=this.state.resolvedLocation;this.cancelMatches();let d;Hr(()=>{d=this.matchRoutes(l),this.__store.setState(h=>({...h,status:"pending",isLoading:!0,location:l,pendingMatches:d,cachedMatches:h.cachedMatches.filter(m=>!d.find(g=>g.id===m.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",...kn({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...kn({resolvedLocation:u,location:l})}),await this.loadMatches({sync:n==null?void 0:n.sync,matches:d,location:l,onReady:async()=>{this.startViewTransition(async()=>{let h,m,g;Hr(()=>{this.__store.setState(v=>{const b=v.matches,w=v.pendingMatches||v.matches;return h=b.filter(x=>!w.find(j=>j.id===x.id)),m=w.filter(x=>!b.find(j=>j.id===x.id)),g=b.filter(x=>w.find(j=>j.id===x.id)),{...v,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...v.cachedMatches,...h.filter(x=>x.status!=="error")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[m,"onEnter"],[g,"onStay"]].forEach(([v,b])=>{v.forEach(w=>{var x,j;(j=(x=this.looseRoutesById[w.routeId].options)[b])==null||j.call(x,w)})})})}})}catch(l){Ir(l)?(s=l,this.isServer||this.navigate({...s,replace:!0,ignoreBlocker:!0})):$e(l)&&(r=l),this.__store.setState(u=>({...u,statusCode:s?s.statusCode:r?404:u.matches.some(d=>d.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===o&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(i=>({...i,statusCode:404}))},this.startViewTransition=n=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;typeof s=="object"&&this.isViewTransitionTypesSupported?r={update:n,types:s.types}:r=n,document.startViewTransition(r)}else n()},this.updateMatch=(n,s)=>{var r;let o;const i=(r=this.state.pendingMatches)==null?void 0:r.find(d=>d.id===n),c=this.state.matches.find(d=>d.id===n),l=this.state.cachedMatches.find(d=>d.id===n),u=i?"pendingMatches":c?"matches":l?"cachedMatches":"";return u&&this.__store.setState(d=>{var h;return{...d,[u]:(h=d[u])==null?void 0:h.map(m=>m.id===n?o=s(m):m)}}),o},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(s=>s.id===n),this.loadMatches=async({location:n,matches:s,preload:r,onReady:o,updateMatch:i=this.updateMatch,sync:c})=>{let l,u=!1;const d=async()=>{u||(u=!0,await(o==null?void 0:o()))},h=g=>!!(r&&!this.state.matches.find(v=>v.id===g));!this.isServer&&!this.state.matches.length&&d();const m=(g,v)=>{var b,w,x,j;if(Ir(v)&&!v.reloadDocument)throw v;if(rn(v)||$e(v)){if(i(g.id,A=>({...A,status:rn(v)?"redirected":$e(v)?"notFound":"error",isFetching:!1,error:v,beforeLoadPromise:void 0,loaderPromise:void 0})),v.routeId||(v.routeId=g.routeId),(b=g.beforeLoadPromise)==null||b.resolve(),(w=g.loaderPromise)==null||w.resolve(),(x=g.loadPromise)==null||x.resolve(),rn(v))throw u=!0,v=this.resolveRedirect({...v,_fromLocation:n}),v;if($e(v))throw this._handleNotFound(s,v,{updateMatch:i}),(j=this.serverSsr)==null||j.onMatchSettled({router:this,match:this.getMatch(g.id)}),v}};try{await new Promise((g,v)=>{(async()=>{var b,w,x,j;try{const A=(E,L,S)=>{var _,F;const{id:D,routeId:N}=s[E],T=this.looseRoutesById[N];if(L instanceof Promise)throw L;L.routerCode=S,l=l??E,m(this.getMatch(D),L);try{(F=(_=T.options).onError)==null||F.call(_,L)}catch($){L=$,m(this.getMatch(D),L)}i(D,$=>{var q,Z;return(q=$.beforeLoadPromise)==null||q.resolve(),(Z=$.loadPromise)==null||Z.resolve(),{...$,error:L,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[E,{id:L,routeId:S}]of s.entries()){const _=this.getMatch(L),F=(b=s[E-1])==null?void 0:b.id,D=this.looseRoutesById[S],N=D.options.pendingMs??this.options.defaultPendingMs,T=!!(o&&!this.isServer&&!h(L)&&(D.options.loader||D.options.beforeLoad)&&typeof N=="number"&&N!==1/0&&(D.options.pendingComponent??((w=this.options)==null?void 0:w.defaultPendingComponent)));let $=!0;if((_.beforeLoadPromise||_.loaderPromise)&&(T&&setTimeout(()=>{try{d()}catch{}},N),await _.beforeLoadPromise,$=this.getMatch(L).status!=="success"),$){try{i(L,ce=>{const Y=ce.loadPromise;return{...ce,loadPromise:_n(()=>{Y==null||Y.resolve()}),beforeLoadPromise:_n()}});const q=new AbortController;let Z;T&&(Z=setTimeout(()=>{try{d()}catch{}},N));const{paramsError:B,searchError:z}=this.getMatch(L);B&&A(E,B,"PARSE_PARAMS"),z&&A(E,z,"VALIDATE_SEARCH");const G=()=>F?this.getMatch(F).context:this.options.context??{};i(L,ce=>({...ce,isFetching:"beforeLoad",fetchCount:ce.fetchCount+1,abortController:q,pendingTimeout:Z,context:{...G(),...ce.__routeContext}}));const{search:X,params:J,context:ye,cause:te}=this.getMatch(L),ne=h(L),oe={search:X,abortController:q,params:J,preload:ne,context:ye,location:n,navigate:ce=>this.navigate({...ce,_fromLocation:n}),buildLocation:this.buildLocation,cause:ne?"preload":te,matches:s},ae=await((j=(x=D.options).beforeLoad)==null?void 0:j.call(x,oe))??{};(rn(ae)||$e(ae))&&A(E,ae,"BEFORE_LOAD"),i(L,ce=>({...ce,__beforeLoadContext:ae,context:{...G(),...ce.__routeContext,...ae},abortController:q}))}catch(q){A(E,q,"BEFORE_LOAD")}i(L,q=>{var Z;return(Z=q.beforeLoadPromise)==null||Z.resolve(),{...q,beforeLoadPromise:void 0,isFetching:!1}})}}const H=s.slice(0,l),I=[];H.forEach(({id:E,routeId:L},S)=>{I.push((async()=>{const{loaderPromise:_}=this.getMatch(E);let F=!1,D=!1;if(_){await _;const N=this.getMatch(E);N.error&&m(N,N.error)}else{const N=I[S-1],T=this.looseRoutesById[L],$=()=>{const{params:te,loaderDeps:ne,abortController:oe,context:ae,cause:ce}=this.getMatch(E),Y=h(E);return{params:te,deps:ne,preload:!!Y,parentMatchPromise:N,abortController:oe,context:ae,location:n,navigate:ie=>this.navigate({...ie,_fromLocation:n}),cause:Y?"preload":ce,route:T}},q=Date.now()-this.getMatch(E).updatedAt,Z=h(E),B=Z?T.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:T.options.staleTime??this.options.defaultStaleTime??0,z=T.options.shouldReload,G=typeof z=="function"?z($()):z;i(E,te=>({...te,loaderPromise:_n(),preload:!!Z&&!this.state.matches.find(ne=>ne.id===E)}));const X=async()=>{var te,ne,oe,ae,ce,Y,ie,Xe,Te,et,De;try{const Me=async()=>{const he=this.getMatch(E);he.minPendingPromise&&await he.minPendingPromise};try{this.loadRouteChunk(T),i(E,tn=>({...tn,isFetching:"loader"}));const he=await((ne=(te=T.options).loader)==null?void 0:ne.call(te,$()));m(this.getMatch(E),he),await T._lazyPromise,await Me();const be={matches:s,match:this.getMatch(E),params:this.getMatch(E).params,loaderData:he},pe=(ae=(oe=T.options).head)==null?void 0:ae.call(oe,be),Pt=pe==null?void 0:pe.meta,dt=pe==null?void 0:pe.links,Ls=pe==null?void 0:pe.scripts,se=(Y=(ce=T.options).scripts)==null?void 0:Y.call(ce,be),le=(Xe=(ie=T.options).headers)==null?void 0:Xe.call(ie,{loaderData:he});i(E,tn=>({...tn,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:he,meta:Pt,links:dt,headScripts:Ls,headers:le,scripts:se}))}catch(he){let be=he;await Me(),m(this.getMatch(E),he);try{(et=(Te=T.options).onError)==null||et.call(Te,he)}catch(pe){be=pe,m(this.getMatch(E),pe)}i(E,pe=>({...pe,error:be,status:"error",isFetching:!1}))}(De=this.serverSsr)==null||De.onMatchSettled({router:this,match:this.getMatch(E)}),await T._componentsPromise}catch(Me){i(E,he=>({...he,loaderPromise:void 0})),m(this.getMatch(E),Me)}},{status:J,invalid:ye}=this.getMatch(E);F=J==="success"&&(ye||(G??q>B)),Z&&T.options.preload===!1||(F&&!c?(D=!0,(async()=>{try{await X();const{loaderPromise:te,loadPromise:ne}=this.getMatch(E);te==null||te.resolve(),ne==null||ne.resolve(),i(E,oe=>({...oe,loaderPromise:void 0}))}catch(te){Ir(te)&&await this.navigate(te)}})()):(J!=="success"||F&&c)&&await X())}if(!D){const{loaderPromise:N,loadPromise:T}=this.getMatch(E);N==null||N.resolve(),T==null||T.resolve()}return i(E,N=>({...N,isFetching:D?N.isFetching:!1,loaderPromise:D?N.loaderPromise:void 0,invalid:!1})),this.getMatch(E)})())}),await Promise.all(I),g()}catch(A){v(A)}})()}),await d()}catch(g){if(rn(g)||$e(g))throw $e(g)&&!r&&await d(),g}return s},this.invalidate=n=>{const s=r=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,r))??!0?{...r,invalid:!0,...r.status==="error"?{status:"pending",error:void 0}:{}}:r};return this.__store.setState(r=>{var o;return{...r,matches:r.matches.map(s),cachedMatches:r.cachedMatches.map(s),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(s)}}),this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{const s=n;return s.href||(s.href=this.buildLocation(s).href),s},this.clearCache=n=>{const s=n==null?void 0:n.filter;s!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(o=>!s(o))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=s=>{const r=this.looseRoutesById[s.routeId];if(!r.options.loader)return!0;const o=(s.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(s.status!=="error"&&Date.now()-s.updatedAt<o)};this.clearCache({filter:n})},this.loadRouteChunk=n=>(n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(s=>{const{id:r,...o}=s.options;Object.assign(n.options,o)}):n._lazyPromise=Promise.resolve()),n._componentsPromise===void 0&&(n._componentsPromise=n._lazyPromise.then(()=>Promise.all(ic.map(async s=>{const r=n.options[s];r!=null&&r.preload&&await r.preload()})))),n._componentsPromise),this.preloadRoute=async n=>{const s=this.buildLocation(n);let r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),i=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);Hr(()=>{r.forEach(c=>{i.has(c.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,c]}))})});try{return r=await this.loadMatches({matches:r,location:s,preload:!0,updateMatch:(c,l)=>{o.has(c)?r=r.map(u=>u.id===c?l(u):u):this.updateMatch(c,l)}}),r}catch(c){if(rn(c))return c.reloadDocument?void 0:await this.preloadRoute({...c,_fromLocation:s});$e(c)||console.error(c);return}},this.matchRoute=(n,s)=>{const r={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(r);if(s!=null&&s.pending&&this.state.status!=="pending")return!1;const c=((s==null?void 0:s.pending)===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=Ds(this.basepath,c.pathname,{...s,to:o.pathname});return!l||n.params&&!Pn(l,n.params,{partial:!0})?!1:l&&((s==null?void 0:s.includeSearch)??!0)?Pn(c.search,o.search,{partial:!0})?l:!1:l},this._handleNotFound=(n,s,{updateMatch:r=this.updateMatch}={})=>{var o;const i=this.routesById[s.routeId??""]??this.routeTree,c={};for(const u of n)c[u.routeId]=u;!i.options.notFoundComponent&&((o=this.options)!=null&&o.defaultNotFoundComponent)&&(i.options.notFoundComponent=this.options.defaultNotFoundComponent),gt(i.options.notFoundComponent);const l=c[i.id];gt(l,"Could not find match for route: "+i.id),r(l.id,u=>({...u,status:"notFound",error:s,isFetching:!1})),s.routerCode==="BEFORE_LOAD"&&i.parentRoute&&(s.routeId=i.parentRoute.id,this._handleNotFound(n,s,{updateMatch:r}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ed,parseSearch:t.parseSearch??Rd}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:s,matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(t,n==null?void 0:n.dest);let i=!1;(s?s.path!=="/"&&o["**"]:cn(t.pathname))&&(this.options.notFoundRoute?r.push(this.options.notFoundRoute):i=!0);const c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let h=r.length-1;h>=0;h--){const m=r[h];if(m.children)return m.id}return We}})(),l=r.map(h=>{var m;let g;const v=((m=h.options.params)==null?void 0:m.parse)??h.options.parseParams;if(v)try{const b=v(o);Object.assign(o,b)}catch(b){if(g=new Od(b.message,{cause:b}),n!=null&&n.throwOnError)throw g;return g}}),u=[],d=h=>(h==null?void 0:h.id)?h.context??this.options.context??{}:this.options.context??{};return r.forEach((h,m)=>{var g,v;const b=u[m-1],[w,x,j]=(()=>{const T=(b==null?void 0:b.search)??t.search,$=(b==null?void 0:b._strictSearch)??{};try{const q=Nr(h.options.validateSearch,{...T})??{};return[{...T,...q},{...$,...q},void 0]}catch(q){let Z=q;if(q instanceof rr||(Z=new rr(q.message,{cause:q})),n!=null&&n.throwOnError)throw Z;return[T,{},Z]}})(),A=((v=(g=h.options).loaderDeps)==null?void 0:v.call(g,{search:w}))??"",H=A?JSON.stringify(A):"",{usedParams:I,interpolatedPath:E}=Ts({path:h.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),L=Ts({path:h.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+H,S=this.getMatch(L),_=this.state.matches.find(T=>T.routeId===h.id),F=_?"stay":"enter";let D;if(S)D={...S,cause:F,params:_?Ve(_.params,o):o,_strictParams:I,search:Ve(_?_.search:S.search,w),_strictSearch:x};else{const T=h.options.loader||h.options.beforeLoad||h.lazyFn||Ld(h)?"pending":"success";D={id:L,index:m,routeId:h.id,params:_?Ve(_.params,o):o,_strictParams:I,pathname:wt([this.basepath,E]),updatedAt:Date.now(),search:_?Ve(_.search,w):w,_strictSearch:x,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:l[m],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:_?Ve(_.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},loadPromise:_n(),fullPath:h.fullPath}}n!=null&&n.preload||(D.globalNotFound=c===h.id),D.searchError=j;const N=d(b);D.context={...N,...D.__routeContext,...D.__beforeLoadContext},u.push(D)}),u.forEach((h,m)=>{var g,v,b,w,x,j,A,H;const I=this.looseRoutesById[h.routeId];if(!this.getMatch(h.id)&&(n==null?void 0:n._buildLocation)!==!0){const L=u[m-1],S=d(L),_={deps:h.loaderDeps,params:h.params,context:S,location:t,navigate:F=>this.navigate({...F,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:u};h.__routeContext=((v=(g=I.options).context)==null?void 0:v.call(g,_))??{},h.context={...S,...h.__routeContext,...h.__beforeLoadContext}}if(h.status==="success"){h.headers=(w=(b=I.options).headers)==null?void 0:w.call(b,{loaderData:h.loaderData});const L={matches:u,match:h,params:h.params,loaderData:h.loaderData},S=(j=(x=I.options).head)==null?void 0:j.call(x,L);h.links=S==null?void 0:S.links,h.headScripts=S==null?void 0:S.scripts,h.meta=S==null?void 0:S.meta,h.scripts=(H=(A=I.options).scripts)==null?void 0:H.call(A,L)}}),u}}class rr extends Error{}class Od extends Error{}function Hd(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Nr(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new rr("Async validation not supported");if(n.issues)throw new rr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const ic=["component","errorComponent","pendingComponent","notFoundComponent"];function Ld(e){var t;for(const n of ic)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Id="Error preloading route! ☝️";class oc{constructor(t){if(this.init=n=>{var s,r;this.originalIndex=n.originalIndex;const o=this.options,i=!(o!=null&&o.path)&&!(o!=null&&o.id);if(this.parentRoute=(r=(s=this.options).getParentRoute)==null?void 0:r.call(s),i)this._path=We;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let c=i?We:o==null?void 0:o.path;c&&c!=="/"&&(c=qi(c));const l=(o==null?void 0:o.id)||c;let u=i?We:wt([this.parentRoute.id===We?"":this.parentRoute.id,l]);c===We&&(c="/"),u!==We&&(u=wt(["/",u]));const d=u===We?"/":wt([this.parentRoute.fullPath,c]);this._path=c,this._id=u,this._fullPath=d,this._to=d,this._ssr=(o==null?void 0:o.ssr)??n.defaultSsr??!0},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class Nd extends oc{constructor(t){super(t)}}function Bi(e){const t=e.errorComponent??vr;return a.jsx(Fd,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:s})=>n?p.createElement(t,{error:n,reset:s}):e.children})}class Fd extends p.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function vr({error:e}){const[t,n]=p.useState(!1);return a.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[a.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),a.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(s=>!s),children:t?"Hide Error":"Show Error"})]}),a.jsx("div",{style:{height:".25rem"}}),t?a.jsx("div",{children:a.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?a.jsx("code",{children:e.message}):null})}):null]})}var Fr={exports:{}},Tr={},Dr={exports:{}},Vr={};/**
|
|
1
|
+
var Tl=Object.defineProperty;var bo=e=>{throw TypeError(e)};var Dl=(e,t,n)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>Dl(e,typeof t!="symbol"?t+"":t,n),kr=(e,t,n)=>t.has(e)||bo("Cannot "+n);var y=(e,t,n)=>(kr(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?bo("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,s)=>(kr(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),W=(e,t,n)=>(kr(e,t,"access private method"),n);var Is=(e,t,n,s)=>({set _(r){V(e,t,r,n)},get _(){return y(e,t,s)}});import{r as p,j as a,a as Pa,p as Et,u as Ie,B as je,T as M,L as Vl,c as Kn,b as Ii,d as qt,A as bt,e as ka,f as Zl,C as Ul,g as $l}from"./admonition-DyZGyzv9.js";import{r as Ma,P as ks,u as oi,c as Oa,a as fr,b as ql,d as Bl,e as zl,f as Ha,g as Kl,h as Wl,R as Ql,i as Gl,j as Jl,F as Yl,D as Xl,k as eu,l as Ni,A as tu,m as La,n as Ia,o as lt,p as nu,q as Ce,s as Ne,z as f,Z as ge,t as su,C as Na,v as ru,T as iu,w as ou,O as au,x as cu,y as lu,B as uu,E as du,S as St,G as jt,I as pr,H as hu,J as fu,K as ai,L as Fi,M as Fa,N as pu,Q as mu,U as Ta,V as gu,W as Da,X as vu,Y as yu,_ as bu,$ as wu,a0 as wo,a1 as xu,a2 as _u,a3 as Su,a4 as ju,a5 as Cu,a6 as Au,a7 as Ru,a8 as Eu,a9 as Pu}from"./index-BGzCQjcN.js";import{c as Cn,E as Ti}from"./error-view-DyR04KA3.js";var ts=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vn=typeof window>"u"||"Deno"in globalThis;function Ue(){}function ku(e,t){return typeof e=="function"?e(t):e}function ci(e){return typeof e=="number"&&e>=0&&e!==1/0}function Va(e,t){return Math.max(e+(t||0)-Date.now(),0)}function An(e,t){return typeof e=="function"?e(t):e}function Qe(e,t){return typeof e=="function"?e(t):e}function xo(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:o,queryKey:i,stale:c}=e;if(i){if(s){if(t.queryHash!==Di(i,t.options))return!1}else if(!ws(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||r&&r!==t.state.fetchStatus||o&&!o(t))}function _o(e,t){const{exact:n,status:s,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(yn(t.options.mutationKey)!==yn(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function Di(e,t){return((t==null?void 0:t.queryKeyHashFn)||yn)(e)}function yn(e){return JSON.stringify(e,(t,n)=>li(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function ws(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ws(e[n],t[n])):!1}function Za(e,t){if(e===t)return e;const n=So(e)&&So(t);if(n||li(e)&&li(t)){const s=n?e:Object.keys(e),r=s.length,o=n?t:Object.keys(t),i=o.length,c=n?[]:{};let l=0;for(let u=0;u<i;u++){const d=n?u:o[u];(!n&&s.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(c[d]=void 0,l++):(c[d]=Za(e[d],t[d]),c[d]===e[d]&&e[d]!==void 0&&l++)}return r===i&&l===r?e:c}return t}function Gs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function So(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function li(e){if(!jo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mu(e){return new Promise(t=>{setTimeout(t,e)})}function ui(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Za(e,t):t}function Ou(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Hu(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Vi=Symbol();function Ua(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ln,It,Ln,va,Lu=(va=class extends ts{constructor(){super();U(this,ln);U(this,It);U(this,Ln);V(this,Ln,t=>{if(!vn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){y(this,It)||this.setEventListener(y(this,Ln))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,It))==null||t.call(this),V(this,It,void 0))}setEventListener(t){var n;V(this,Ln,t),(n=y(this,It))==null||n.call(this),V(this,It,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){y(this,ln)!==t&&(V(this,ln,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof y(this,ln)=="boolean"?y(this,ln):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ln=new WeakMap,It=new WeakMap,Ln=new WeakMap,va),Zi=new Lu,In,Nt,Nn,ya,Iu=(ya=class extends ts{constructor(){super();U(this,In,!0);U(this,Nt);U(this,Nn);V(this,Nn,t=>{if(!vn&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){y(this,Nt)||this.setEventListener(y(this,Nn))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Nt))==null||t.call(this),V(this,Nt,void 0))}setEventListener(t){var n;V(this,Nn,t),(n=y(this,Nt))==null||n.call(this),V(this,Nt,t(this.setOnline.bind(this)))}setOnline(t){y(this,In)!==t&&(V(this,In,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return y(this,In)}},In=new WeakMap,Nt=new WeakMap,Nn=new WeakMap,ya),Js=new Iu;function di(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}function Nu(e){return Math.min(1e3*2**e,3e4)}function $a(e){return(e??"online")==="online"?Js.isOnline():!0}var qa=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Mr(e){return e instanceof qa}function Ba(e){let t=!1,n=0,s=!1,r;const o=di(),i=b=>{var w;s||(m(new qa(b)),(w=e.abort)==null||w.call(e))},c=()=>{t=!0},l=()=>{t=!1},u=()=>Zi.isFocused()&&(e.networkMode==="always"||Js.isOnline())&&e.canRun(),d=()=>$a(e.networkMode)&&e.canRun(),h=b=>{var w;s||(s=!0,(w=e.onSuccess)==null||w.call(e,b),r==null||r(),o.resolve(b))},m=b=>{var w;s||(s=!0,(w=e.onError)==null||w.call(e,b),r==null||r(),o.reject(b))},g=()=>new Promise(b=>{var w;r=x=>{(s||u())&&b(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var b;r=void 0,s||(b=e.onContinue)==null||b.call(e)}),v=()=>{if(s)return;let b;const w=n===0?e.initialPromise:void 0;try{b=w??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(h).catch(x=>{var E;if(s)return;const j=e.retry??(vn?0:3),A=e.retryDelay??Nu,H=typeof A=="function"?A(n,x):A,I=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,x);if(t||!I){m(x);return}n++,(E=e.onFail)==null||E.call(e,n,x),Mu(H).then(()=>u()?void 0:g()).then(()=>{t?m(x):v()})})};return{promise:o,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?v():g().then(v),o)}}var Fu=e=>setTimeout(e,0);function Tu(){let e=[],t=0,n=c=>{c()},s=c=>{c()},r=Fu;const o=c=>{t?e.push(c):r(()=>{n(c)})},i=()=>{const c=e;e=[],c.length&&r(()=>{s(()=>{c.forEach(l=>{n(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{o(()=>{c(...l)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{r=c}}}var me=Tu(),un,ba,za=(ba=class{constructor(){U(this,un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ci(this.gcTime)&&V(this,un,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vn?1/0:5*60*1e3))}clearGcTimeout(){y(this,un)&&(clearTimeout(y(this,un)),V(this,un,void 0))}},un=new WeakMap,ba),Fn,Tn,Ze,dn,we,As,hn,ze,ht,wa,Du=(wa=class extends za{constructor(t){super();U(this,ze);U(this,Fn);U(this,Tn);U(this,Ze);U(this,dn);U(this,we);U(this,As);U(this,hn);V(this,hn,!1),V(this,As,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,dn,t.client),V(this,Ze,y(this,dn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Fn,Vu(this.options)),this.state=t.state??y(this,Fn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=y(this,we))==null?void 0:t.promise}setOptions(t){this.options={...y(this,As),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Ze).remove(this)}setData(t,n){const s=ui(this.state.data,t,this.options);return W(this,ze,ht).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){W(this,ze,ht).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,r;const n=(s=y(this,we))==null?void 0:s.promise;return(r=y(this,we))==null||r.cancel(t),n?n.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(y(this,Fn))}isActive(){return this.observers.some(t=>Qe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vi||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Va(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,we))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,we))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,Ze).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(y(this,we)&&(y(this,hn)?y(this,we).cancel({revert:!0}):y(this,we).cancelRetry()),this.scheduleGc()),y(this,Ze).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||W(this,ze,ht).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(y(this,we))return y(this,we).continueRetry(),y(this,we).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,r=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(V(this,hn,!0),s.signal)})},o=()=>{const h=Ua(this.options,n),m={client:y(this,dn),queryKey:this.queryKey,meta:this.meta};return r(m),V(this,hn,!1),this.options.persister?this.options.persister(h,m,this):h(m)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:y(this,dn),state:this.state,fetchFn:o};r(i),(l=this.options.behavior)==null||l.onFetch(i,this),V(this,Tn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&W(this,ze,ht).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta});const c=h=>{var m,g,v,b;Mr(h)&&h.silent||W(this,ze,ht).call(this,{type:"error",error:h}),Mr(h)||((g=(m=y(this,Ze).config).onError)==null||g.call(m,h,this),(b=(v=y(this,Ze).config).onSettled)==null||b.call(v,this.state.data,h,this)),this.scheduleGc()};return V(this,we,Ba({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:s.abort.bind(s),onSuccess:h=>{var m,g,v,b;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){c(w);return}(g=(m=y(this,Ze).config).onSuccess)==null||g.call(m,h,this),(b=(v=y(this,Ze).config).onSettled)==null||b.call(v,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{W(this,ze,ht).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{W(this,ze,ht).call(this,{type:"pause"})},onContinue:()=>{W(this,ze,ht).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),y(this,we).start()}},Fn=new WeakMap,Tn=new WeakMap,Ze=new WeakMap,dn=new WeakMap,we=new WeakMap,As=new WeakMap,hn=new WeakMap,ze=new WeakSet,ht=function(t){const n=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,...Ka(s.data,this.options),fetchMeta:t.meta??null};case"success":return{...s,data:t.data,dataUpdateCount:s.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Mr(r)&&r.revert&&y(this,Tn)?{...y(this,Tn),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),me.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),y(this,Ze).notify({query:this,type:"updated",action:t})})},wa);function Ka(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$a(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nt,xa,Zu=(xa=class extends ts{constructor(t={}){super();U(this,nt);this.config=t,V(this,nt,new Map)}build(t,n,s){const r=n.queryKey,o=n.queryHash??Di(r,n);let i=this.get(o);return i||(i=new Du({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){y(this,nt).has(t.queryHash)||(y(this,nt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=y(this,nt).get(t.queryHash);n&&(t.destroy(),n===t&&y(this,nt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,nt).get(t)}getAll(){return[...y(this,nt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>xo(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>xo(t,s)):n}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nt=new WeakMap,xa),st,_e,fn,rt,Mt,_a,Uu=(_a=class extends za{constructor(t){super();U(this,rt);U(this,st);U(this,_e);U(this,fn);this.mutationId=t.mutationId,V(this,_e,t.mutationCache),V(this,st,[]),this.state=t.state||Wa(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,st).includes(t)||(y(this,st).push(t),this.clearGcTimeout(),y(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,st,y(this,st).filter(n=>n!==t)),this.scheduleGc(),y(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,st).length||(this.state.status==="pending"?this.scheduleGc():y(this,_e).remove(this))}continue(){var t;return((t=y(this,fn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,o,i,c,l,u,d,h,m,g,v,b,w,x,j,A,H,I,E,L;V(this,fn,Ba({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,_)=>{W(this,rt,Mt).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{W(this,rt,Mt).call(this,{type:"pause"})},onContinue:()=>{W(this,rt,Mt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,_e).canRun(this)}));const n=this.state.status==="pending",s=!y(this,fn).canStart();try{if(!n){W(this,rt,Mt).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(r=y(this,_e).config).onMutate)==null?void 0:o.call(r,t,this));const _=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,t));_!==this.state.context&&W(this,rt,Mt).call(this,{type:"pending",context:_,variables:t,isPaused:s})}const S=await y(this,fn).start();return await((u=(l=y(this,_e).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,S,t,this.state.context)),await((g=(m=y(this,_e).config).onSettled)==null?void 0:g.call(m,S,null,this.state.variables,this.state.context,this)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,S,null,t,this.state.context)),W(this,rt,Mt).call(this,{type:"success",data:S}),S}catch(S){try{throw await((x=(w=y(this,_e).config).onError)==null?void 0:x.call(w,S,t,this.state.context,this)),await((A=(j=this.options).onError)==null?void 0:A.call(j,S,t,this.state.context)),await((I=(H=y(this,_e).config).onSettled)==null?void 0:I.call(H,void 0,S,this.state.variables,this.state.context,this)),await((L=(E=this.options).onSettled)==null?void 0:L.call(E,void 0,S,t,this.state.context)),S}finally{W(this,rt,Mt).call(this,{type:"error",error:S})}}finally{y(this,_e).runNext(this)}}},st=new WeakMap,_e=new WeakMap,fn=new WeakMap,rt=new WeakSet,Mt=function(t){const n=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=n(this.state),me.batch(()=>{y(this,st).forEach(s=>{s.onMutationUpdate(t)}),y(this,_e).notify({mutation:this,type:"updated",action:t})})},_a);function Wa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ft,Ke,Rs,Sa,$u=(Sa=class extends ts{constructor(t={}){super();U(this,ft);U(this,Ke);U(this,Rs);this.config=t,V(this,ft,new Set),V(this,Ke,new Map),V(this,Rs,0)}build(t,n,s){const r=new Uu({mutationCache:this,mutationId:++Is(this,Rs)._,options:t.defaultMutationOptions(n),state:s});return this.add(r),r}add(t){y(this,ft).add(t);const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n);s?s.push(t):y(this,Ke).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,ft).delete(t)){const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&y(this,Ke).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n),r=s==null?void 0:s.find(o=>o.state.status==="pending");return!r||r===t}else return!0}runNext(t){var s;const n=Ns(t);if(typeof n=="string"){const r=(s=y(this,Ke).get(n))==null?void 0:s.find(o=>o!==t&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{y(this,ft).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,ft).clear(),y(this,Ke).clear()})}getAll(){return Array.from(y(this,ft))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>_o(n,s))}findAll(t={}){return this.getAll().filter(n=>_o(t,n))}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return me.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ue))))}},ft=new WeakMap,Ke=new WeakMap,Rs=new WeakMap,Sa);function Ns(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Co(e){return{onFetch:(t,n)=>{var d,h,m,g,v;const s=t.options,r=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],i=((v=t.state.data)==null?void 0:v.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let b=!1;const w=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},x=Ua(t.options,t.fetchOptions),j=async(A,H,I)=>{if(b)return Promise.reject();if(H==null&&A.pages.length)return Promise.resolve(A);const E={client:t.client,queryKey:t.queryKey,pageParam:H,direction:I?"backward":"forward",meta:t.options.meta};w(E);const L=await x(E),{maxPages:S}=t.options,_=I?Hu:Ou;return{pages:_(A.pages,L,S),pageParams:_(A.pageParams,H,S)}};if(r&&o.length){const A=r==="backward",H=A?qu:Ao,I={pages:o,pageParams:i},E=H(s,I);c=await j(I,E,A)}else{const A=e??o.length;do{const H=l===0?i[0]??s.initialPageParam:Ao(s,c);if(l>0&&H==null)break;c=await j(c,H),l++}while(l<A)}return c};t.options.persister?t.fetchFn=()=>{var b,w;return(w=(b=t.options).persister)==null?void 0:w.call(b,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ao(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function qu(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var ue,Ft,Tt,Dn,Vn,Dt,Zn,Un,ja,Bu=(ja=class{constructor(e={}){U(this,ue);U(this,Ft);U(this,Tt);U(this,Dn);U(this,Vn);U(this,Dt);U(this,Zn);U(this,Un);V(this,ue,e.queryCache||new Zu),V(this,Ft,e.mutationCache||new $u),V(this,Tt,e.defaultOptions||{}),V(this,Dn,new Map),V(this,Vn,new Map),V(this,Dt,0)}mount(){Is(this,Dt)._++,y(this,Dt)===1&&(V(this,Zn,Zi.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onFocus())})),V(this,Un,Js.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onOnline())})))}unmount(){var e,t;Is(this,Dt)._--,y(this,Dt)===0&&((e=y(this,Zn))==null||e.call(this),V(this,Zn,void 0),(t=y(this,Un))==null||t.call(this),V(this,Un,void 0))}isFetching(e){return y(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,Ft).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ue).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=y(this,ue).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(An(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return y(this,ue).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),r=y(this,ue).get(s.queryHash),o=r==null?void 0:r.state.data,i=ku(t,o);if(i!==void 0)return y(this,ue).build(this,s).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return me.batch(()=>y(this,ue).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ue).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=y(this,ue);me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=y(this,ue);return me.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=me.batch(()=>y(this,ue).findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(Ue).catch(Ue)}invalidateQueries(e,t={}){return me.batch(()=>(y(this,ue).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=me.batch(()=>y(this,ue).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let o=r.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ue)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(Ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=y(this,ue).build(this,t);return n.isStaleByTime(An(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ue).catch(Ue)}fetchInfiniteQuery(e){return e.behavior=Co(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ue).catch(Ue)}ensureInfiniteQueryData(e){return e.behavior=Co(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Js.isOnline()?y(this,Ft).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,ue)}getMutationCache(){return y(this,Ft)}getDefaultOptions(){return y(this,Tt)}setDefaultOptions(e){V(this,Tt,e)}setQueryDefaults(e,t){y(this,Dn).set(yn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,Dn).values()],n={};return t.forEach(s=>{ws(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){y(this,Vn).set(yn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Vn).values()],n={};return t.forEach(s=>{ws(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,Tt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Di(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Vi&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,Tt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,ue).clear(),y(this,Ft).clear()}},ue=new WeakMap,Ft=new WeakMap,Tt=new WeakMap,Dn=new WeakMap,Vn=new WeakMap,Dt=new WeakMap,Zn=new WeakMap,Un=new WeakMap,ja),Ae,Q,Es,Se,pn,$n,Vt,it,Ps,qn,Bn,mn,gn,Zt,zn,ee,fs,hi,fi,pi,mi,gi,vi,yi,Qa,Ca,zu=(Ca=class extends ts{constructor(t,n){super();U(this,ee);U(this,Ae);U(this,Q);U(this,Es);U(this,Se);U(this,pn);U(this,$n);U(this,Vt);U(this,it);U(this,Ps);U(this,qn);U(this,Bn);U(this,mn);U(this,gn);U(this,Zt);U(this,zn,new Set);this.options=n,V(this,Ae,t),V(this,it,null),V(this,Vt,di()),this.options.experimental_prefetchInRender||y(this,Vt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,Q).addObserver(this),Ro(y(this,Q),this.options)?W(this,ee,fs).call(this):this.updateResult(),W(this,ee,mi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bi(y(this,Q),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bi(y(this,Q),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,ee,gi).call(this),W(this,ee,vi).call(this),y(this,Q).removeObserver(this)}setOptions(t){const n=this.options,s=y(this,Q);if(this.options=y(this,Ae).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Qe(this.options.enabled,y(this,Q))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");W(this,ee,yi).call(this),y(this,Q).setOptions(this.options),n._defaulted&&!Gs(this.options,n)&&y(this,Ae).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,Q),observer:this});const r=this.hasListeners();r&&Eo(y(this,Q),s,this.options,n)&&W(this,ee,fs).call(this),this.updateResult(),r&&(y(this,Q)!==s||Qe(this.options.enabled,y(this,Q))!==Qe(n.enabled,y(this,Q))||An(this.options.staleTime,y(this,Q))!==An(n.staleTime,y(this,Q)))&&W(this,ee,hi).call(this);const o=W(this,ee,fi).call(this);r&&(y(this,Q)!==s||Qe(this.options.enabled,y(this,Q))!==Qe(n.enabled,y(this,Q))||o!==y(this,Zt))&&W(this,ee,pi).call(this,o)}getOptimisticResult(t){const n=y(this,Ae).getQueryCache().build(y(this,Ae),t),s=this.createResult(n,t);return Wu(this,s)&&(V(this,Se,s),V(this,$n,this.options),V(this,pn,y(this,Q).state)),s}getCurrentResult(){return y(this,Se)}trackResult(t,n){const s={};return Object.keys(t).forEach(r=>{Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),s}trackProp(t){y(this,zn).add(t)}getCurrentQuery(){return y(this,Q)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=y(this,Ae).defaultQueryOptions(t),s=y(this,Ae).getQueryCache().build(y(this,Ae),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return W(this,ee,fs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Se)))}createResult(t,n){var S;const s=y(this,Q),r=this.options,o=y(this,Se),i=y(this,pn),c=y(this,$n),u=t!==s?t.state:y(this,Es),{state:d}=t;let h={...d},m=!1,g;if(n._optimisticResults){const _=this.hasListeners(),F=!_&&Ro(t,n),D=_&&Eo(t,s,n,r);(F||D)&&(h={...h,...Ka(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:w}=h;if(n.select&&h.data!==void 0)if(o&&h.data===(i==null?void 0:i.data)&&n.select===y(this,Ps))g=y(this,qn);else try{V(this,Ps,n.select),g=n.select(h.data),g=ui(o==null?void 0:o.data,g,n),V(this,qn,g),V(this,it,null)}catch(_){V(this,it,_)}else g=h.data;if(n.placeholderData!==void 0&&g===void 0&&w==="pending"){let _;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))_=o.data;else if(_=typeof n.placeholderData=="function"?n.placeholderData((S=y(this,Bn))==null?void 0:S.state.data,y(this,Bn)):n.placeholderData,n.select&&_!==void 0)try{_=n.select(_),V(this,it,null)}catch(F){V(this,it,F)}_!==void 0&&(w="success",g=ui(o==null?void 0:o.data,_,n),m=!0)}y(this,it)&&(v=y(this,it),g=y(this,qn),b=Date.now(),w="error");const x=h.fetchStatus==="fetching",j=w==="pending",A=w==="error",H=j&&x,I=g!==void 0,L={status:w,fetchStatus:h.fetchStatus,isPending:j,isSuccess:w==="success",isError:A,isInitialLoading:H,isLoading:H,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!j,isLoadingError:A&&!I,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&I,isStale:Ui(t,n),refetch:this.refetch,promise:y(this,Vt)};if(this.options.experimental_prefetchInRender){const _=N=>{L.status==="error"?N.reject(L.error):L.data!==void 0&&N.resolve(L.data)},F=()=>{const N=V(this,Vt,L.promise=di());_(N)},D=y(this,Vt);switch(D.status){case"pending":t.queryHash===s.queryHash&&_(D);break;case"fulfilled":(L.status==="error"||L.data!==D.value)&&F();break;case"rejected":(L.status!=="error"||L.error!==D.reason)&&F();break}}return L}updateResult(){const t=y(this,Se),n=this.createResult(y(this,Q),this.options);if(V(this,pn,y(this,Q).state),V(this,$n,this.options),y(this,pn).data!==void 0&&V(this,Bn,y(this,Q)),Gs(n,t))return;V(this,Se,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!y(this,zn).size)return!0;const i=new Set(o??y(this,zn));return this.options.throwOnError&&i.add("error"),Object.keys(y(this,Se)).some(c=>{const l=c;return y(this,Se)[l]!==t[l]&&i.has(l)})};W(this,ee,Qa).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,ee,mi).call(this)}},Ae=new WeakMap,Q=new WeakMap,Es=new WeakMap,Se=new WeakMap,pn=new WeakMap,$n=new WeakMap,Vt=new WeakMap,it=new WeakMap,Ps=new WeakMap,qn=new WeakMap,Bn=new WeakMap,mn=new WeakMap,gn=new WeakMap,Zt=new WeakMap,zn=new WeakMap,ee=new WeakSet,fs=function(t){W(this,ee,yi).call(this);let n=y(this,Q).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ue)),n},hi=function(){W(this,ee,gi).call(this);const t=An(this.options.staleTime,y(this,Q));if(vn||y(this,Se).isStale||!ci(t))return;const s=Va(y(this,Se).dataUpdatedAt,t)+1;V(this,mn,setTimeout(()=>{y(this,Se).isStale||this.updateResult()},s))},fi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,Q)):this.options.refetchInterval)??!1},pi=function(t){W(this,ee,vi).call(this),V(this,Zt,t),!(vn||Qe(this.options.enabled,y(this,Q))===!1||!ci(y(this,Zt))||y(this,Zt)===0)&&V(this,gn,setInterval(()=>{(this.options.refetchIntervalInBackground||Zi.isFocused())&&W(this,ee,fs).call(this)},y(this,Zt)))},mi=function(){W(this,ee,hi).call(this),W(this,ee,pi).call(this,W(this,ee,fi).call(this))},gi=function(){y(this,mn)&&(clearTimeout(y(this,mn)),V(this,mn,void 0))},vi=function(){y(this,gn)&&(clearInterval(y(this,gn)),V(this,gn,void 0))},yi=function(){const t=y(this,Ae).getQueryCache().build(y(this,Ae),this.options);if(t===y(this,Q))return;const n=y(this,Q);V(this,Q,t),V(this,Es,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Qa=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(y(this,Se))}),y(this,Ae).getQueryCache().notify({query:y(this,Q),type:"observerResultsUpdated"})})},Ca);function Ku(e,t){return Qe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ro(e,t){return Ku(e,t)||e.state.data!==void 0&&bi(e,t,t.refetchOnMount)}function bi(e,t,n){if(Qe(t.enabled,e)!==!1){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Ui(e,t)}return!1}function Eo(e,t,n,s){return(e!==t||Qe(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ui(e,n)}function Ui(e,t){return Qe(t.enabled,e)!==!1&&e.isStaleByTime(An(t.staleTime,e))}function Wu(e,t){return!Gs(e.getCurrentResult(),t)}var Ut,$t,Re,pt,_t,zs,wi,Aa,Qu=(Aa=class extends ts{constructor(t,n){super();U(this,_t);U(this,Ut);U(this,$t);U(this,Re);U(this,pt);V(this,Ut,t),this.setOptions(n),this.bindMethods(),W(this,_t,zs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=y(this,Ut).defaultMutationOptions(t),Gs(this.options,n)||y(this,Ut).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,Re),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&yn(n.mutationKey)!==yn(this.options.mutationKey)?this.reset():((s=y(this,Re))==null?void 0:s.state.status)==="pending"&&y(this,Re).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=y(this,Re))==null||t.removeObserver(this)}onMutationUpdate(t){W(this,_t,zs).call(this),W(this,_t,wi).call(this,t)}getCurrentResult(){return y(this,$t)}reset(){var t;(t=y(this,Re))==null||t.removeObserver(this),V(this,Re,void 0),W(this,_t,zs).call(this),W(this,_t,wi).call(this)}mutate(t,n){var s;return V(this,pt,n),(s=y(this,Re))==null||s.removeObserver(this),V(this,Re,y(this,Ut).getMutationCache().build(y(this,Ut),this.options)),y(this,Re).addObserver(this),y(this,Re).execute(t)}},Ut=new WeakMap,$t=new WeakMap,Re=new WeakMap,pt=new WeakMap,_t=new WeakSet,zs=function(){var n;const t=((n=y(this,Re))==null?void 0:n.state)??Wa();V(this,$t,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},wi=function(t){me.batch(()=>{var n,s,r,o,i,c,l,u;if(y(this,pt)&&this.hasListeners()){const d=y(this,$t).variables,h=y(this,$t).context;(t==null?void 0:t.type)==="success"?((s=(n=y(this,pt)).onSuccess)==null||s.call(n,t.data,d,h),(o=(r=y(this,pt)).onSettled)==null||o.call(r,t.data,null,d,h)):(t==null?void 0:t.type)==="error"&&((c=(i=y(this,pt)).onError)==null||c.call(i,t.error,d,h),(u=(l=y(this,pt)).onSettled)==null||u.call(l,void 0,t.error,d,h))}this.listeners.forEach(d=>{d(y(this,$t))})})},Aa),Ga=p.createContext(void 0),mr=e=>{const t=p.useContext(Ga);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Gu=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(Ga.Provider,{value:e,children:t})),Ja=p.createContext(!1),Ju=()=>p.useContext(Ja);Ja.Provider;function Yu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xu=p.createContext(Yu()),ed=()=>p.useContext(Xu);function Ya(e,t){return typeof e=="function"?e(...t):!!e}function xi(){}var td=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nd=e=>{p.useEffect(()=>{e.clearReset()},[e])},sd=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||Ya(n,[e.error,s])),rd=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},id=(e,t)=>e.isLoading&&e.isFetching&&!t,od=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Po=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ad(e,t,n){var h,m,g,v,b;const s=mr(),r=Ju(),o=ed(),i=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),i._optimisticResults=r?"isRestoring":"optimistic",rd(i),td(i,o),nd(o);const c=!s.getQueryCache().get(i.queryHash),[l]=p.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(w=>{const x=d?l.subscribe(me.batchCalls(w)):xi;return l.updateResult(),x},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(i)},[i,l]),od(i,u))throw Po(i,l,o);if(sd({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((v=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||v.call(g,i,u),i.experimental_prefetchInRender&&!vn&&id(u,r)){const w=c?Po(i,l,o):(b=s.getQueryCache().get(i.queryHash))==null?void 0:b.promise;w==null||w.catch(xi).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function Xa(e,t){return ad(e,zu)}function Fe(e,t){const n=mr(),[s]=p.useState(()=>new Qu(n,e));p.useEffect(()=>{s.setOptions(e)},[s,e]);const r=p.useSyncExternalStore(p.useCallback(i=>s.subscribe(me.batchCalls(i)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),o=p.useCallback((i,c)=>{s.mutate(i,c).catch(xi)},[s]);if(r.error&&Ya(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var cd="Invariant failed";function gt(e,t){if(!e)throw new Error(cd)}const Rn=new WeakMap,Ks=new WeakMap,Ys={current:[]};let Or=!1,ys=0;const ps=new Set,Fs=new Map;function ec(e){const t=Array.from(e).sort((n,s)=>n instanceof En&&n.options.deps.includes(s)?1:s instanceof En&&s.options.deps.includes(n)?-1:0);for(const n of t){if(Ys.current.includes(n))continue;Ys.current.push(n),n.recompute();const s=Ks.get(n);if(s)for(const r of s){const o=Rn.get(r);o&&ec(o)}}}function ld(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function ud(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function tc(e){if(ys>0&&!Fs.has(e)&&Fs.set(e,e.prevState),ps.add(e),!(ys>0)&&!Or)try{for(Or=!0;ps.size>0;){const t=Array.from(ps);ps.clear();for(const n of t){const s=Fs.get(n)??n.prevState;n.prevState=s,ld(n)}for(const n of t){const s=Rn.get(n);s&&(Ys.current.push(n),ec(s))}for(const n of t){const s=Rn.get(n);if(s)for(const r of s)ud(r)}}}finally{Or=!1,Ys.current=[],Fs.clear()}}function Hr(e){ys++;try{e()}finally{if(ys--,ys===0){const t=Array.from(ps)[0];t&&tc(t)}}}function dd(e){return typeof e=="function"}class _i{constructor(t,n){this.listeners=new Set,this.subscribe=s=>{var r,o;this.listeners.add(s);const i=(o=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:o.call(r,s,this);return()=>{this.listeners.delete(s),i==null||i()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,s,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):dd(t)?this.state=t(this.prevState):this.state=t,(r=(s=this.options)==null?void 0:s.onUpdate)==null||r.call(s),tc(this)}}class En{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=[],s=[];for(const r of this.options.deps)n.push(r.prevState),s.push(r.state);return this.lastSeenDepValues=s,{prevDepVals:n,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,s;this.prevState=this.state;const{prevDepVals:r,currDepVals:o,prevVal:i}=this.getDepVals();this.state=this.options.fn({prevDepVals:r,currDepVals:o,prevVal:i}),(s=(n=this.options).onUpdate)==null||s.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof En&&o.checkIfRecalculationNeededDeeply();let n=!1;const s=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let o=0;o<r.length;o++)if(r[o]!==s[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var s,r;this.listeners.add(n);const o=(r=(s=this.options).onSubscribe)==null?void 0:r.call(s,n,this);return()=>{this.listeners.delete(n),o==null||o()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof En)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof _i){let s=Rn.get(n);s||(s=new Set,Rn.set(n,s)),s.add(this);let r=Ks.get(this);r||(r=new Set,Ks.set(this,r)),r.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof En)this.unregisterFromGraph(n.options.deps);else if(n instanceof _i){const s=Rn.get(n);s&&s.delete(this);const r=Ks.get(this);r&&r.delete(n)}}}const zt="__TSR_index",ko="popstate",Mo="beforeunload";function nc(e){let t=e.getLocation();const n=new Set,s=i=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:i}))},r=i=>{e.notifyOnIndexChange??!0?s(i):t=e.getLocation()},o=async({task:i,navigateOpts:c,...l})=>{var u,d;if((c==null?void 0:c.ignoreBlocker)??!1){i();return}const m=((u=e.getBlockers)==null?void 0:u.call(e))??[],g=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&m.length&&g)for(const v of m){const b=xs(l.path,l.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:l.type})){(d=e.onBlocked)==null||d.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,c,l)=>{const u=t.state[zt];c=Si(u+1,c),o({task:()=>{e.pushState(i,c),s({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:c})},replace:(i,c,l)=>{const u=t.state[zt];c=Si(u,c),o({task:()=>{e.replaceState(i,c),s({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:c})},go:(i,c)=>{o({task:()=>{e.go(i),r({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[zt]!==0,createHref:i=>e.createHref(i),block:i=>{var c;if(!e.setBlockers)return()=>{};const l=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...l,i]),()=>{var u,d;const h=((u=e.getBlockers)==null?void 0:u.call(e))??[];(d=e.setBlockers)==null||d.call(e,h.filter(m=>m!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:s}}function Si(e,t){return t||(t={}),{...t,key:$i(),[zt]:e}}function hd(e){var t;const n=typeof document<"u"?window:void 0,s=n.history.pushState,r=n.history.replaceState;let o=[];const i=()=>o,c=_=>o=_,l=_=>_,u=()=>xs(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state);(t=n.history.state)!=null&&t.key||n.history.replaceState({[zt]:0,key:$i()},"");let d=u(),h,m=!1,g=!1,v=!1,b=!1;const w=()=>d;let x,j;const A=()=>{x&&(S._ignoreSubscribers=!0,(x.isPush?n.history.pushState:n.history.replaceState)(x.state,"",x.href),S._ignoreSubscribers=!1,x=void 0,j=void 0,h=void 0)},H=(_,F,D)=>{const N=l(F);j||(h=d),d=xs(F,D),x={href:N,state:D,isPush:(x==null?void 0:x.isPush)||_==="push"},j||(j=Promise.resolve().then(()=>A()))},I=_=>{d=u(),S.notify({type:_})},E=async()=>{if(g){g=!1;return}const _=u(),F=_.state[zt]-d.state[zt],D=F===1,N=F===-1,T=!D&&!N||m;m=!1;const $=T?"GO":N?"BACK":"FORWARD",q=T?{type:"GO",index:F}:{type:N?"BACK":"FORWARD"};if(v)v=!1;else{const Z=i();if(typeof document<"u"&&Z.length){for(const B of Z)if(await B.blockerFn({currentLocation:d,nextLocation:_,action:$})){g=!0,n.history.go(1),S.notify(q);return}}}d=u(),S.notify(q)},L=_=>{if(b){b=!1;return}let F=!1;const D=i();if(typeof document<"u"&&D.length)for(const N of D){const T=N.enableBeforeUnload??!0;if(T===!0){F=!0;break}if(typeof T=="function"&&T()===!0){F=!0;break}}if(F)return _.preventDefault(),_.returnValue=""},S=nc({getLocation:w,getLength:()=>n.history.length,pushState:(_,F)=>H("push",_,F),replaceState:(_,F)=>H("replace",_,F),back:_=>(_&&(v=!0),b=!0,n.history.back()),forward:_=>{_&&(v=!0),b=!0,n.history.forward()},go:_=>{m=!0,n.history.go(_)},createHref:_=>l(_),flush:A,destroy:()=>{n.history.pushState=s,n.history.replaceState=r,n.removeEventListener(Mo,L,{capture:!0}),n.removeEventListener(ko,E)},onBlocked:()=>{h&&d!==h&&(d=h)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return n.addEventListener(Mo,L,{capture:!0}),n.addEventListener(ko,E),n.history.pushState=function(..._){const F=s.apply(n.history,_);return S._ignoreSubscribers||I("PUSH"),F},n.history.replaceState=function(..._){const F=r.apply(n.history,_);return S._ignoreSubscribers||I("REPLACE"),F},S}function fd(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const s=t.map((o,i)=>Si(i,void 0));return nc({getLocation:()=>xs(t[n],s[n]),getLength:()=>t.length,pushState:(o,i)=>{n<t.length-1&&(t.splice(n+1),s.splice(n+1)),s.push(i),t.push(o),n=Math.max(t.length-1,0)},replaceState:(o,i)=>{s[n]=i,t[n]=o},back:()=>{n=Math.max(n-1,0)},forward:()=>{n=Math.min(n+1,t.length-1)},go:o=>{n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function xs(e,t){const n=e.indexOf("#"),s=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:e.length),hash:n>-1?e.substring(n):"",search:s>-1?e.slice(s,n===-1?void 0:n):"",state:t||{[zt]:0,key:$i()}}}function $i(){return(Math.random()+1).toString(36).substring(7)}function Sn(e){return e[e.length-1]}function pd(e){return typeof e=="function"}function an(e,t){return pd(e)?e(t):e}function ji(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function Ve(e,t){if(e===t)return e;const n=t,s=Ho(e)&&Ho(n);if(s||Xs(e)&&Xs(n)){const r=s?e:Object.keys(e),o=r.length,i=s?n:Object.keys(n),c=i.length,l=s?[]:{};let u=0;for(let d=0;d<c;d++){const h=s?d:i[d];(!s&&r.includes(h)||s)&&e[h]===void 0&&n[h]===void 0?(l[h]=void 0,u++):(l[h]=Ve(e[h],n[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return o===c&&u===o?e:l}return n}function Xs(e){if(!Oo(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Oo(n)||!n.hasOwnProperty("isPrototypeOf"))}function Oo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ho(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lo(e,t){let n=Object.keys(e);return t&&(n=n.filter(s=>e[s]!==void 0)),n}function Pn(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Xs(e)&&Xs(t)){const s=(n==null?void 0:n.ignoreUndefined)??!0,r=Lo(e,s),o=Lo(t,s);return!(n!=null&&n.partial)&&r.length!==o.length?!1:o.every(i=>Pn(e[i],t[i],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((s,r)=>!Pn(s,t[r],n)):!1}function _n(e){let t,n;const s=new Promise((r,o)=>{t=r,n=o});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,t(r),e==null||e(r)},s.reject=r=>{s.status="rejected",n(r)},s}function md(e){return/%[0-9A-Fa-f]{2}/.test(e)}function wt(e){return gr(e.filter(t=>t!==void 0).join("/"))}function gr(e){return e.replace(/\/{2,}/g,"/")}function qi(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function cn(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function gd(e){return cn(qi(e))}function er(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function vd(e,t,n){return er(e,n)===er(t,n)}function yd({basepath:e,base:t,to:n,trailingSlash:s="never",caseSensitive:r}){var o,i;t=tr(e,t,r),n=tr(e,n,r);let c=Wn(t);const l=Wn(n);c.length>1&&((o=Sn(c))==null?void 0:o.value)==="/"&&c.pop(),l.forEach((d,h)=>{d.value==="/"?h?h===l.length-1&&c.push(d):c=[d]:d.value===".."?c.pop():d.value==="."||c.push(d)}),c.length>1&&(((i=Sn(c))==null?void 0:i.value)==="/"?s==="never"&&c.pop():s==="always"&&c.push({type:"pathname",value:"/"}));const u=wt([e,...c.map(d=>d.value)]);return gr(u)}function Wn(e){if(!e)return[];e=gr(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(s=>s==="$"||s==="*"?{type:"wildcard",value:s}:s.charAt(0)==="$"?{type:"param",value:s}:{type:"pathname",value:s.includes("%25")?s.split("%25").map(r=>decodeURI(r)).join("%25"):decodeURI(s)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function Ts({path:e,params:t,leaveWildcards:n,leaveParams:s,decodeCharMap:r}){const o=Wn(e);function i(u){const d=t[u],h=typeof d=="string";return["*","_splat"].includes(u)?h?encodeURI(d):d:h?bd(d,r):d}const c={},l=wt(o.map(u=>{if(u.type==="wildcard"){c._splat=t._splat;const d=i("_splat");return n?`${u.value}${d??""}`:d}if(u.type==="param"){const d=u.value.substring(1);if(c[d]=t[d],s){const h=i(u.value);return`${u.value}${h??""}`}return i(d)??"undefined"}return u.value}));return{usedParams:c,interpolatedPath:l}}function bd(e,t){let n=encodeURIComponent(e);if(t)for(const[s,r]of t)n=n.replaceAll(s,r);return n}function Ds(e,t,n){const s=wd(e,t,n);if(!(n.to&&!s))return s??{}}function tr(e,t,n=!1){const s=n?e:e.toLowerCase(),r=n?t:t.toLowerCase();switch(!0){case s==="/":return t;case r===s:return"";case t.length<e.length:return t;case r[s.length]!=="/":return t;case r.startsWith(s):return t.slice(e.length);default:return t}}function wd(e,t,n){if(e!=="/"&&!t.startsWith(e))return;t=tr(e,t,n.caseSensitive);const s=tr(e,`${n.to??"$"}`,n.caseSensitive),r=Wn(t),o=Wn(s);t.startsWith("/")||r.unshift({type:"pathname",value:"/"}),s.startsWith("/")||o.unshift({type:"pathname",value:"/"});const i={};return(()=>{for(let l=0;l<Math.max(r.length,o.length);l++){const u=r[l],d=o[l],h=l>=r.length-1,m=l>=o.length-1;if(d){if(d.type==="wildcard"){const g=decodeURI(wt(r.slice(l).map(v=>v.value)));return i["*"]=g,i._splat=g,!0}if(d.type==="pathname"){if(d.value==="/"&&!(u!=null&&u.value))return!0;if(u){if(n.caseSensitive){if(d.value!==u.value)return!1}else if(d.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(d.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(i[d.value.substring(1)]=decodeURIComponent(u.value))}}if(!h&&m)return i["**"]=wt(r.slice(l+1).map(g=>g.value)),!!n.fuzzy&&(d==null?void 0:d.value)!=="/"}return!0})()?i:void 0}function $e(e){return!!(e!=null&&e.isNotFound)}const nr="tsr-scroll-restoration-v1_3";let sc=!1;try{sc=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const xd=(e,t)=>{let n;return(...s)=>{n||(n=setTimeout(()=>{e(...s),n=null},t))}},jn=sc?{state:JSON.parse(window.sessionStorage.getItem(nr)||"null")||{},set:t=>(jn.state=an(t,jn.state)||jn.state,window.sessionStorage.setItem(nr,JSON.stringify(jn.state)))}:void 0,Ci=e=>e.state.key||e.href;function _d(e){const t=[];let n;for(;n=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children,e)+1})`),e=n;return`${t.join(" > ")}`.toLowerCase()}let sr=!1;function rc(e,t,n,s,r){var o;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const c=t||((o=window.history.state)==null?void 0:o.key),l=i[c];sr=!0,(()=>{if(s&&l){for(const d in l){const h=l[d];if(d==="window")window.scrollTo({top:h.scrollY,left:h.scrollX,behavior:n});else if(d){const m=document.querySelector(d);m&&(m.scrollLeft=h.scrollX,m.scrollTop=h.scrollY)}}return}const u=window.location.hash.split("#")[1];if(u){const d=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(d){const h=document.getElementById(u);h&&h.scrollIntoView(d)}return}["window",...(r==null?void 0:r.filter(d=>d!=="window"))??[]].forEach(d=>{const h=d==="window"?window:document.querySelector(d);h&&h.scrollTo({top:0,left:0,behavior:n})})})(),sr=!1}function Sd(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,sr=!1;const s=e.options.getScrollRestorationKey||Ci;window.history.scrollRestoration="manual";const r=o=>{if(sr||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?i=`[data-scroll-restoration-id="${l}"]`:i=_d(o.target)}const c=s(e.state.location);jn.set(l=>{const u=l[c]=l[c]||{},d=u[i]=u[i]||{};if(i==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(i){const h=document.querySelector(i);h&&(d.scrollX=h.scrollLeft||0,d.scrollY=h.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",xd(r,100),!0),e.subscribe("onRendered",o=>{const i=s(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}rc(nr,i,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&jn.set(c=>(c[i]=c[i]||{},c))})}function jd(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Cd(e,t){const n=Object.entries(e).flatMap(([r,o])=>Array.isArray(o)?o.map(i=>[r,String(i)]):[[r,String(o)]]);return""+new URLSearchParams(n).toString()}function Lr(e){if(!e)return"";const t=md(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Ad(e,t){const n=e;return[...new URLSearchParams(n).entries()].reduce((o,[i,c])=>{const l=o[i];return l==null?o[i]=Lr(c):o[i]=Array.isArray(l)?[...l,Lr(c)]:[l,Lr(c)],o},{})}const Rd=Pd(JSON.parse),Ed=kd(JSON.stringify,JSON.parse);function Pd(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=Ad(t);for(const s in n){const r=n[s];if(typeof r=="string")try{n[s]=e(r)}catch{}}return n}}function kd(e,t){function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(typeof s=="string"&&typeof t=="function")try{return t(s),e(s)}catch{}return s}return s=>{s={...s},Object.keys(s).forEach(o=>{const i=s[o];typeof i>"u"||i===void 0?delete s[o]:s[o]=n(i)});const r=Cd(s).toString();return r?`?${r}`:""}}const We="__root__";function rn(e){return!!(e!=null&&e.isRedirect)}function Ir(e){return!!(e!=null&&e.isRedirect)&&e.href}function kn(e){const t=e.resolvedLocation,n=e.location,s=(t==null?void 0:t.pathname)!==n.pathname,r=(t==null?void 0:t.href)!==n.href,o=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:s,hrefChanged:r,hashChanged:o}}class Md{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var s;n.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 r=this.options;this.options={...this.options,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(o=>[encodeURIComponent(o),o])):void 0,(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${gd(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?fd({initialEntries:[this.basepath||"/"]}):hd()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new _i(Hd(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}),Sd(this)),typeof window<"u"&&"CSS"in window&&typeof((s=window.CSS)==null?void 0:s.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[n.id]=n);const s=i=>{i.forEach((c,l)=>{c.init({originalIndex:l,defaultSsr:this.options.defaultSsr});const u=this.routesById[c.id];if(gt(!u,`Duplicate routes found with id: ${String(c.id)}`),this.routesById[c.id]=c,!c.isRoot&&c.path){const h=cn(c.fullPath);(!this.routesByPath[h]||c.fullPath.endsWith("/"))&&(this.routesByPath[h]=c)}const d=c.children;d!=null&&d.length&&s(d)})};s([this.routeTree]);const r=[];Object.values(this.routesById).forEach((i,c)=>{var l;if(i.isRoot||!i.path)return;const u=qi(i.fullPath),d=Wn(u);for(;d.length>1&&((l=d[0])==null?void 0:l.value)==="/";)d.shift();const h=d.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);r.push({child:i,trimmed:u,parsed:d,index:c,scores:h})}),this.flatRoutes=r.sort((i,c)=>{const l=Math.min(i.scores.length,c.scores.length);for(let u=0;u<l;u++)if(i.scores[u]!==c.scores[u])return c.scores[u]-i.scores[u];if(i.scores.length!==c.scores.length)return c.scores.length-i.scores.length;for(let u=0;u<l;u++)if(i.parsed[u].value!==c.parsed[u].value)return i.parsed[u].value>c.parsed[u].value?1:-1;return i.index-c.index}).map((i,c)=>(i.child.rank=c,i.child))},this.subscribe=(n,s)=>{const r={eventType:n,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=n=>{this.subscribers.forEach(s=>{s.eventType===n.type&&s.fn(n)})},this.parseLocation=(n,s)=>{const r=({pathname:l,search:u,hash:d,state:h})=>{const m=this.options.parseSearch(u),g=this.options.stringifySearch(m);return{pathname:l,searchStr:g,search:Ve(n==null?void 0:n.search,m),hash:d.split("#").reverse()[0]??"",href:`${l}${g}${d}`,state:Ve(n==null?void 0:n.state,h)}},o=r(s??this.history.location),{__tempLocation:i,__tempKey:c}=o.state;if(i&&(!c||c===this.tempLocationKey)){const l=r(i);return l.state.key=o.state.key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathWithBase=(n,s)=>yd({basepath:this.basepath,base:n,to:gr(s),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(n,s,r)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},r):this.matchRoutesInternal(n,s),this.getMatchedRoutes=(n,s)=>{let r={};const o=cn(n.pathname),i=d=>Ds(this.basepath,o,{to:d.fullPath,caseSensitive:d.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let c=(s==null?void 0:s.to)!==void 0?this.routesByPath[s.to]:void 0;c?r=i(c):c=this.flatRoutes.find(d=>{const h=i(d);return h?(r=h,!0):!1});let l=c||this.routesById[We];const u=[l];for(;l.parentRoute;)l=l.parentRoute,u.unshift(l);return{matchedRoutes:u,routeParams:r,foundRoute:c}},this.cancelMatch=n=>{const s=this.getMatch(n);s&&(s.abortController.abort(),clearTimeout(s.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const s=(o={},i)=>{var c,l,u,d,h,m,g;const v=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}):this.state.matches,b=o.from!=null?v.find(N=>Ds(this.basepath,cn(N.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,w=(b==null?void 0:b.pathname)||this.latestLocation.pathname;gt(o.from==null||b!=null,"Could not find match for from: "+o.from);const x=(c=this.state.pendingMatches)!=null&&c.length?(l=Sn(this.state.pendingMatches))==null?void 0:l.search:((u=Sn(v))==null?void 0:u.search)||this.latestLocation.search,j=i==null?void 0:i.matchedRoutes.filter(N=>v.find(T=>T.routeId===N.id));let A;if(o.to){const N=(b==null?void 0:b.fullPath)||((d=Sn(v))==null?void 0:d.fullPath)||this.latestLocation.pathname;A=this.resolvePathWithBase(N,`${o.to}`)}else{const N=this.routesById[(h=j==null?void 0:j.find(T=>{const $=Ts({path:T.fullPath,params:(i==null?void 0:i.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return wt([this.basepath,$])===w}))==null?void 0:h.id];A=this.resolvePathWithBase(w,(N==null?void 0:N.to)??w)}const H={...(m=Sn(v))==null?void 0:m.params};let I=(o.params??!0)===!0?H:{...H,...an(o.params,H)};Object.keys(I).length>0&&(i==null||i.matchedRoutes.map(N=>{var T;return((T=N.options.params)==null?void 0:T.stringify)??N.options.stringifyParams}).filter(Boolean).forEach(N=>{I={...I,...N(I)}})),A=Ts({path:A,params:I??{},leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let E=x;if(n._includeValidateSearch&&((g=this.options.search)!=null&&g.strict)){let N={};i==null||i.matchedRoutes.forEach(T=>{try{T.options.validateSearch&&(N={...N,...Nr(T.options.validateSearch,{...N,...E})??{}})}catch{}}),E=N}E=(N=>{const T=(i==null?void 0:i.matchedRoutes.reduce((Z,B)=>{var z;const G=[];if("search"in B.options)(z=B.options.search)!=null&&z.middlewares&&G.push(...B.options.search.middlewares);else if(B.options.preSearchFilters||B.options.postSearchFilters){const X=({search:J,next:ye})=>{let te=J;"preSearchFilters"in B.options&&B.options.preSearchFilters&&(te=B.options.preSearchFilters.reduce((oe,ae)=>ae(oe),J));const ne=ye(te);return"postSearchFilters"in B.options&&B.options.postSearchFilters?B.options.postSearchFilters.reduce((oe,ae)=>ae(oe),ne):ne};G.push(X)}if(n._includeValidateSearch&&B.options.validateSearch){const X=({search:J,next:ye})=>{const te=ye(J);try{return{...te,...Nr(B.options.validateSearch,te)??{}}}catch{return te}};G.push(X)}return Z.concat(G)},[]))??[],$=({search:Z})=>o.search?o.search===!0?Z:an(o.search,Z):{};T.push($);const q=(Z,B)=>{if(Z>=T.length)return B;const z=T[Z];return z({search:B,next:X=>q(Z+1,X)})};return q(0,N)})(E),E=Ve(x,E);const S=this.options.stringifySearch(E),_=o.hash===!0?this.latestLocation.hash:o.hash?an(o.hash,this.latestLocation.hash):void 0,F=_?`#${_}`:"";let D=o.state===!0?this.latestLocation.state:o.state?an(o.state,this.latestLocation.state):{};return D=Ve(this.latestLocation.state,D),{pathname:A,search:E,searchStr:S,state:D,hash:_??"",href:`${A}${S}${F}`,unmaskOnReload:o.unmaskOnReload}},r=(o={},i)=>{var c;const l=s(o);let u=i?s(i):void 0;if(!u){let m={};const g=(c=this.options.routeMasks)==null?void 0:c.find(v=>{const b=Ds(this.basepath,l.pathname,{to:v.from,caseSensitive:!1,fuzzy:!1});return b?(m=b,!0):!1});if(g){const{from:v,...b}=g;i={...ji(n,["from"]),...b,params:m},u=s(i)}}const d=this.getMatchedRoutes(l,o),h=s(o,d);if(u){const m=this.getMatchedRoutes(u,i),g=s(i,m);h.maskedLocation=g}return h};return n.mask?r(n,{...ji(n,["from"]),...n.mask}):r(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:s,...r})=>{const o=()=>{const l=["key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(d=>{r.state[d]=this.latestLocation.state[d]});const u=Pn(r.state,this.latestLocation.state);return l.forEach(d=>{delete r.state[d]}),u},i=this.latestLocation.href===r.href,c=this.commitLocationPromise;if(this.commitLocationPromise=_n(()=>{c==null||c.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...d}=r;l&&(d={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[r.replace?"replace":"push"](d.href,d.state,{ignoreBlocker:s})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:r,viewTransition:o,ignoreBlocker:i,href:c,...l}={})=>{if(c){const d=this.history.location.state.__TSR_index,h=xs(c,{__TSR_index:n?d:d+1});l.to=h.pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});return this.commitLocation({...u,viewTransition:o,replace:n,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:i})},this.navigate=({to:n,reloadDocument:s,href:r,...o})=>{if(s){if(!r){const i=this.buildLocation({to:n,...o});r=this.history.createHref(i.href)}o.replace?window.location.replace(r):window.location.href=r;return}return this.buildAndCommitLocation({...o,href:r,to:n})},this.load=async n=>{this.latestLocation=this.parseLocation(this.latestLocation);let s,r,o;for(o=new Promise(i=>{this.startTransition(async()=>{var c;try{const l=this.latestLocation,u=this.state.resolvedLocation;this.cancelMatches();let d;Hr(()=>{d=this.matchRoutes(l),this.__store.setState(h=>({...h,status:"pending",isLoading:!0,location:l,pendingMatches:d,cachedMatches:h.cachedMatches.filter(m=>!d.find(g=>g.id===m.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",...kn({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...kn({resolvedLocation:u,location:l})}),await this.loadMatches({sync:n==null?void 0:n.sync,matches:d,location:l,onReady:async()=>{this.startViewTransition(async()=>{let h,m,g;Hr(()=>{this.__store.setState(v=>{const b=v.matches,w=v.pendingMatches||v.matches;return h=b.filter(x=>!w.find(j=>j.id===x.id)),m=w.filter(x=>!b.find(j=>j.id===x.id)),g=b.filter(x=>w.find(j=>j.id===x.id)),{...v,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...v.cachedMatches,...h.filter(x=>x.status!=="error")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[m,"onEnter"],[g,"onStay"]].forEach(([v,b])=>{v.forEach(w=>{var x,j;(j=(x=this.looseRoutesById[w.routeId].options)[b])==null||j.call(x,w)})})})}})}catch(l){Ir(l)?(s=l,this.isServer||this.navigate({...s,replace:!0,ignoreBlocker:!0})):$e(l)&&(r=l),this.__store.setState(u=>({...u,statusCode:s?s.statusCode:r?404:u.matches.some(d=>d.status==="error")?500:200,redirect:s}))}this.latestLoadPromise===o&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(i=>({...i,statusCode:404}))},this.startViewTransition=n=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;typeof s=="object"&&this.isViewTransitionTypesSupported?r={update:n,types:s.types}:r=n,document.startViewTransition(r)}else n()},this.updateMatch=(n,s)=>{var r;let o;const i=(r=this.state.pendingMatches)==null?void 0:r.find(d=>d.id===n),c=this.state.matches.find(d=>d.id===n),l=this.state.cachedMatches.find(d=>d.id===n),u=i?"pendingMatches":c?"matches":l?"cachedMatches":"";return u&&this.__store.setState(d=>{var h;return{...d,[u]:(h=d[u])==null?void 0:h.map(m=>m.id===n?o=s(m):m)}}),o},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(s=>s.id===n),this.loadMatches=async({location:n,matches:s,preload:r,onReady:o,updateMatch:i=this.updateMatch,sync:c})=>{let l,u=!1;const d=async()=>{u||(u=!0,await(o==null?void 0:o()))},h=g=>!!(r&&!this.state.matches.find(v=>v.id===g));!this.isServer&&!this.state.matches.length&&d();const m=(g,v)=>{var b,w,x,j;if(Ir(v)&&!v.reloadDocument)throw v;if(rn(v)||$e(v)){if(i(g.id,A=>({...A,status:rn(v)?"redirected":$e(v)?"notFound":"error",isFetching:!1,error:v,beforeLoadPromise:void 0,loaderPromise:void 0})),v.routeId||(v.routeId=g.routeId),(b=g.beforeLoadPromise)==null||b.resolve(),(w=g.loaderPromise)==null||w.resolve(),(x=g.loadPromise)==null||x.resolve(),rn(v))throw u=!0,v=this.resolveRedirect({...v,_fromLocation:n}),v;if($e(v))throw this._handleNotFound(s,v,{updateMatch:i}),(j=this.serverSsr)==null||j.onMatchSettled({router:this,match:this.getMatch(g.id)}),v}};try{await new Promise((g,v)=>{(async()=>{var b,w,x,j;try{const A=(E,L,S)=>{var _,F;const{id:D,routeId:N}=s[E],T=this.looseRoutesById[N];if(L instanceof Promise)throw L;L.routerCode=S,l=l??E,m(this.getMatch(D),L);try{(F=(_=T.options).onError)==null||F.call(_,L)}catch($){L=$,m(this.getMatch(D),L)}i(D,$=>{var q,Z;return(q=$.beforeLoadPromise)==null||q.resolve(),(Z=$.loadPromise)==null||Z.resolve(),{...$,error:L,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[E,{id:L,routeId:S}]of s.entries()){const _=this.getMatch(L),F=(b=s[E-1])==null?void 0:b.id,D=this.looseRoutesById[S],N=D.options.pendingMs??this.options.defaultPendingMs,T=!!(o&&!this.isServer&&!h(L)&&(D.options.loader||D.options.beforeLoad)&&typeof N=="number"&&N!==1/0&&(D.options.pendingComponent??((w=this.options)==null?void 0:w.defaultPendingComponent)));let $=!0;if((_.beforeLoadPromise||_.loaderPromise)&&(T&&setTimeout(()=>{try{d()}catch{}},N),await _.beforeLoadPromise,$=this.getMatch(L).status!=="success"),$){try{i(L,ce=>{const Y=ce.loadPromise;return{...ce,loadPromise:_n(()=>{Y==null||Y.resolve()}),beforeLoadPromise:_n()}});const q=new AbortController;let Z;T&&(Z=setTimeout(()=>{try{d()}catch{}},N));const{paramsError:B,searchError:z}=this.getMatch(L);B&&A(E,B,"PARSE_PARAMS"),z&&A(E,z,"VALIDATE_SEARCH");const G=()=>F?this.getMatch(F).context:this.options.context??{};i(L,ce=>({...ce,isFetching:"beforeLoad",fetchCount:ce.fetchCount+1,abortController:q,pendingTimeout:Z,context:{...G(),...ce.__routeContext}}));const{search:X,params:J,context:ye,cause:te}=this.getMatch(L),ne=h(L),oe={search:X,abortController:q,params:J,preload:ne,context:ye,location:n,navigate:ce=>this.navigate({...ce,_fromLocation:n}),buildLocation:this.buildLocation,cause:ne?"preload":te,matches:s},ae=await((j=(x=D.options).beforeLoad)==null?void 0:j.call(x,oe))??{};(rn(ae)||$e(ae))&&A(E,ae,"BEFORE_LOAD"),i(L,ce=>({...ce,__beforeLoadContext:ae,context:{...G(),...ce.__routeContext,...ae},abortController:q}))}catch(q){A(E,q,"BEFORE_LOAD")}i(L,q=>{var Z;return(Z=q.beforeLoadPromise)==null||Z.resolve(),{...q,beforeLoadPromise:void 0,isFetching:!1}})}}const H=s.slice(0,l),I=[];H.forEach(({id:E,routeId:L},S)=>{I.push((async()=>{const{loaderPromise:_}=this.getMatch(E);let F=!1,D=!1;if(_){await _;const N=this.getMatch(E);N.error&&m(N,N.error)}else{const N=I[S-1],T=this.looseRoutesById[L],$=()=>{const{params:te,loaderDeps:ne,abortController:oe,context:ae,cause:ce}=this.getMatch(E),Y=h(E);return{params:te,deps:ne,preload:!!Y,parentMatchPromise:N,abortController:oe,context:ae,location:n,navigate:ie=>this.navigate({...ie,_fromLocation:n}),cause:Y?"preload":ce,route:T}},q=Date.now()-this.getMatch(E).updatedAt,Z=h(E),B=Z?T.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:T.options.staleTime??this.options.defaultStaleTime??0,z=T.options.shouldReload,G=typeof z=="function"?z($()):z;i(E,te=>({...te,loaderPromise:_n(),preload:!!Z&&!this.state.matches.find(ne=>ne.id===E)}));const X=async()=>{var te,ne,oe,ae,ce,Y,ie,Xe,Te,et,De;try{const Me=async()=>{const he=this.getMatch(E);he.minPendingPromise&&await he.minPendingPromise};try{this.loadRouteChunk(T),i(E,tn=>({...tn,isFetching:"loader"}));const he=await((ne=(te=T.options).loader)==null?void 0:ne.call(te,$()));m(this.getMatch(E),he),await T._lazyPromise,await Me();const be={matches:s,match:this.getMatch(E),params:this.getMatch(E).params,loaderData:he},pe=(ae=(oe=T.options).head)==null?void 0:ae.call(oe,be),Pt=pe==null?void 0:pe.meta,dt=pe==null?void 0:pe.links,Ls=pe==null?void 0:pe.scripts,se=(Y=(ce=T.options).scripts)==null?void 0:Y.call(ce,be),le=(Xe=(ie=T.options).headers)==null?void 0:Xe.call(ie,{loaderData:he});i(E,tn=>({...tn,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:he,meta:Pt,links:dt,headScripts:Ls,headers:le,scripts:se}))}catch(he){let be=he;await Me(),m(this.getMatch(E),he);try{(et=(Te=T.options).onError)==null||et.call(Te,he)}catch(pe){be=pe,m(this.getMatch(E),pe)}i(E,pe=>({...pe,error:be,status:"error",isFetching:!1}))}(De=this.serverSsr)==null||De.onMatchSettled({router:this,match:this.getMatch(E)}),await T._componentsPromise}catch(Me){i(E,he=>({...he,loaderPromise:void 0})),m(this.getMatch(E),Me)}},{status:J,invalid:ye}=this.getMatch(E);F=J==="success"&&(ye||(G??q>B)),Z&&T.options.preload===!1||(F&&!c?(D=!0,(async()=>{try{await X();const{loaderPromise:te,loadPromise:ne}=this.getMatch(E);te==null||te.resolve(),ne==null||ne.resolve(),i(E,oe=>({...oe,loaderPromise:void 0}))}catch(te){Ir(te)&&await this.navigate(te)}})()):(J!=="success"||F&&c)&&await X())}if(!D){const{loaderPromise:N,loadPromise:T}=this.getMatch(E);N==null||N.resolve(),T==null||T.resolve()}return i(E,N=>({...N,isFetching:D?N.isFetching:!1,loaderPromise:D?N.loaderPromise:void 0,invalid:!1})),this.getMatch(E)})())}),await Promise.all(I),g()}catch(A){v(A)}})()}),await d()}catch(g){if(rn(g)||$e(g))throw $e(g)&&!r&&await d(),g}return s},this.invalidate=n=>{const s=r=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,r))??!0?{...r,invalid:!0,...r.status==="error"?{status:"pending",error:void 0}:{}}:r};return this.__store.setState(r=>{var o;return{...r,matches:r.matches.map(s),cachedMatches:r.cachedMatches.map(s),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(s)}}),this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{const s=n;return s.href||(s.href=this.buildLocation(s).href),s},this.clearCache=n=>{const s=n==null?void 0:n.filter;s!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(o=>!s(o))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=s=>{const r=this.looseRoutesById[s.routeId];if(!r.options.loader)return!0;const o=(s.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(s.status!=="error"&&Date.now()-s.updatedAt<o)};this.clearCache({filter:n})},this.loadRouteChunk=n=>(n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(s=>{const{id:r,...o}=s.options;Object.assign(n.options,o)}):n._lazyPromise=Promise.resolve()),n._componentsPromise===void 0&&(n._componentsPromise=n._lazyPromise.then(()=>Promise.all(ic.map(async s=>{const r=n.options[s];r!=null&&r.preload&&await r.preload()})))),n._componentsPromise),this.preloadRoute=async n=>{const s=this.buildLocation(n);let r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),i=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);Hr(()=>{r.forEach(c=>{i.has(c.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,c]}))})});try{return r=await this.loadMatches({matches:r,location:s,preload:!0,updateMatch:(c,l)=>{o.has(c)?r=r.map(u=>u.id===c?l(u):u):this.updateMatch(c,l)}}),r}catch(c){if(rn(c))return c.reloadDocument?void 0:await this.preloadRoute({...c,_fromLocation:s});$e(c)||console.error(c);return}},this.matchRoute=(n,s)=>{const r={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(r);if(s!=null&&s.pending&&this.state.status!=="pending")return!1;const c=((s==null?void 0:s.pending)===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=Ds(this.basepath,c.pathname,{...s,to:o.pathname});return!l||n.params&&!Pn(l,n.params,{partial:!0})?!1:l&&((s==null?void 0:s.includeSearch)??!0)?Pn(c.search,o.search,{partial:!0})?l:!1:l},this._handleNotFound=(n,s,{updateMatch:r=this.updateMatch}={})=>{var o;const i=this.routesById[s.routeId??""]??this.routeTree,c={};for(const u of n)c[u.routeId]=u;!i.options.notFoundComponent&&((o=this.options)!=null&&o.defaultNotFoundComponent)&&(i.options.notFoundComponent=this.options.defaultNotFoundComponent),gt(i.options.notFoundComponent);const l=c[i.id];gt(l,"Could not find match for route: "+i.id),r(l.id,u=>({...u,status:"notFound",error:s,isFetching:!1})),s.routerCode==="BEFORE_LOAD"&&i.parentRoute&&(s.routeId=i.parentRoute.id,this._handleNotFound(n,s,{updateMatch:r}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ed,parseSearch:t.parseSearch??Rd}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:s,matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(t,n==null?void 0:n.dest);let i=!1;(s?s.path!=="/"&&o["**"]:cn(t.pathname))&&(this.options.notFoundRoute?r.push(this.options.notFoundRoute):i=!0);const c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let h=r.length-1;h>=0;h--){const m=r[h];if(m.children)return m.id}return We}})(),l=r.map(h=>{var m;let g;const v=((m=h.options.params)==null?void 0:m.parse)??h.options.parseParams;if(v)try{const b=v(o);Object.assign(o,b)}catch(b){if(g=new Od(b.message,{cause:b}),n!=null&&n.throwOnError)throw g;return g}}),u=[],d=h=>(h==null?void 0:h.id)?h.context??this.options.context??{}:this.options.context??{};return r.forEach((h,m)=>{var g,v;const b=u[m-1],[w,x,j]=(()=>{const T=(b==null?void 0:b.search)??t.search,$=(b==null?void 0:b._strictSearch)??{};try{const q=Nr(h.options.validateSearch,{...T})??{};return[{...T,...q},{...$,...q},void 0]}catch(q){let Z=q;if(q instanceof rr||(Z=new rr(q.message,{cause:q})),n!=null&&n.throwOnError)throw Z;return[T,{},Z]}})(),A=((v=(g=h.options).loaderDeps)==null?void 0:v.call(g,{search:w}))??"",H=A?JSON.stringify(A):"",{usedParams:I,interpolatedPath:E}=Ts({path:h.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),L=Ts({path:h.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+H,S=this.getMatch(L),_=this.state.matches.find(T=>T.routeId===h.id),F=_?"stay":"enter";let D;if(S)D={...S,cause:F,params:_?Ve(_.params,o):o,_strictParams:I,search:Ve(_?_.search:S.search,w),_strictSearch:x};else{const T=h.options.loader||h.options.beforeLoad||h.lazyFn||Ld(h)?"pending":"success";D={id:L,index:m,routeId:h.id,params:_?Ve(_.params,o):o,_strictParams:I,pathname:wt([this.basepath,E]),updatedAt:Date.now(),search:_?Ve(_.search,w):w,_strictSearch:x,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:l[m],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:_?Ve(_.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},loadPromise:_n(),fullPath:h.fullPath}}n!=null&&n.preload||(D.globalNotFound=c===h.id),D.searchError=j;const N=d(b);D.context={...N,...D.__routeContext,...D.__beforeLoadContext},u.push(D)}),u.forEach((h,m)=>{var g,v,b,w,x,j,A,H;const I=this.looseRoutesById[h.routeId];if(!this.getMatch(h.id)&&(n==null?void 0:n._buildLocation)!==!0){const L=u[m-1],S=d(L),_={deps:h.loaderDeps,params:h.params,context:S,location:t,navigate:F=>this.navigate({...F,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:u};h.__routeContext=((v=(g=I.options).context)==null?void 0:v.call(g,_))??{},h.context={...S,...h.__routeContext,...h.__beforeLoadContext}}if(h.status==="success"){h.headers=(w=(b=I.options).headers)==null?void 0:w.call(b,{loaderData:h.loaderData});const L={matches:u,match:h,params:h.params,loaderData:h.loaderData},S=(j=(x=I.options).head)==null?void 0:j.call(x,L);h.links=S==null?void 0:S.links,h.headScripts=S==null?void 0:S.scripts,h.meta=S==null?void 0:S.meta,h.scripts=(H=(A=I.options).scripts)==null?void 0:H.call(A,L)}}),u}}class rr extends Error{}class Od extends Error{}function Hd(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Nr(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new rr("Async validation not supported");if(n.issues)throw new rr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const ic=["component","errorComponent","pendingComponent","notFoundComponent"];function Ld(e){var t;for(const n of ic)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Id="Error preloading route! ☝️";class oc{constructor(t){if(this.init=n=>{var s,r;this.originalIndex=n.originalIndex;const o=this.options,i=!(o!=null&&o.path)&&!(o!=null&&o.id);if(this.parentRoute=(r=(s=this.options).getParentRoute)==null?void 0:r.call(s),i)this._path=We;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let c=i?We:o==null?void 0:o.path;c&&c!=="/"&&(c=qi(c));const l=(o==null?void 0:o.id)||c;let u=i?We:wt([this.parentRoute.id===We?"":this.parentRoute.id,l]);c===We&&(c="/"),u!==We&&(u=wt(["/",u]));const d=u===We?"/":wt([this.parentRoute.fullPath,c]);this._path=c,this._id=u,this._fullPath=d,this._to=d,this._ssr=(o==null?void 0:o.ssr)??n.defaultSsr??!0},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class Nd extends oc{constructor(t){super(t)}}function Bi(e){const t=e.errorComponent??vr;return a.jsx(Fd,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:s})=>n?p.createElement(t,{error:n,reset:s}):e.children})}class Fd extends p.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function vr({error:e}){const[t,n]=p.useState(!1);return a.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[a.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),a.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(s=>!s),children:t?"Hide Error":"Show Error"})]}),a.jsx("div",{style:{height:".25rem"}}),t?a.jsx("div",{children:a.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?a.jsx("code",{children:e.message}):null})}):null]})}var Fr={exports:{}},Tr={},Dr={exports:{}},Vr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* use-sync-external-store-shim.production.js
|
|
4
4
|
*
|
|
@@ -21,4 +21,4 @@ ${b.map(({label:w,value:x})=>`${w}: ${x}`).join(`
|
|
|
21
21
|
`)}`).join(`
|
|
22
22
|
|
|
23
23
|
`)}});return`mailto:?body=${encodeURIComponent(m)}`},[e,u,d,c]);return a.jsxs("div",{...n,children:[a.jsx(jt,{label:s._({id:"2AW+PM"}),children:a.jsx(Wp,{maxColumns:1,value:l.method,onChange:i,options:c.map(({method:m,label:g,description:v})=>({value:m,label:g,description:v}))})}),a.jsx("p",{className:"my-2",children:l.message}),l.values.map(({label:m,value:g,copyable:v},b)=>a.jsx(Kp,{label:m,copyable:v,children:g},b)),a.jsxs("p",{className:"my-2 flex flex-row flex-wrap gap-3",children:[a.jsx(qt,{href:u,className:"text-blue-600 hover:underline",children:a.jsx(M,{id:"c3XJ18"})}),a.jsx(qt,{href:d,className:"text-blue-600 hover:underline",children:a.jsx(M,{id:"et+mIi"})}),a.jsx(qt,{href:h,noUtm:!0,className:"text-blue-600 hover:underline",children:a.jsx(M,{id:"CzD50V"})})]})]})}function Gp({did:e,...t}){return a.jsx(St,{...t,validate:({handle:n})=>{if(n&&Da(n))return{handle:n}},fields:({values:n,setterFor:s})=>a.jsxs(a.Fragment,{children:[a.jsx(jt,{label:a.jsx(M,{id:"BfIgP6"}),children:a.jsx(qp,{defaultValue:n.handle,onHandle:s("handle"),did:e,name:"domain",required:!0,autoFocus:!0,enterKeyHint:"done"})}),a.jsx(Qp,{className:"text-sm",handle:n.handle,did:e})]})})}function Jp({domains:e,...t}){return a.jsx(St,{...t,validate:({handle:n})=>{if(n&&e.some(s=>n.endsWith(s)))return{handle:n}},fields:({values:n,set:s})=>a.jsx(yu,{handle:n.handle,onHandle:r=>s("handle",r),domains:e,name:"handle",required:!0,autoFocus:!0,enterKeyHint:"done"})})}function Yp({handler:e,children:t,domains:n,currentHandle:s,did:r}){const[o,i]=p.useState(!1),[c,l]=p.useState(null),[u,d]=p.useState(!1);p.useEffect(()=>{o||l(null)},[o]);const h=!u,[m,g]=s&&n.some(v=>s.endsWith(v))?[s,void 0]:[void 0,s];return c===0&&n.length?a.jsx(Le,{open:o,onOpenChange:i,dismissable:h,trigger:t,title:a.jsx(M,{id:"T6sYqW"}),description:a.jsx(M,{id:"Bno89U"}),children:a.jsx(Jp,{domains:n,onBack:()=>l(null),values:{handle:m},onLoadingChange:d,handler:async(v,b)=>{await e(v,b),i(!1)}})}):c===1?a.jsx(Le,{open:o,onOpenChange:i,dismissable:h,trigger:t,title:a.jsx(M,{id:"T6sYqW"}),description:a.jsx(M,{id:"O78aQm"}),children:a.jsx(Gp,{did:r,onBack:()=>l(null),submitLabel:a.jsx(M,{id:"G7Vcxo"}),values:{handle:g},onLoadingChange:d,handler:async(v,b)=>{await e(v,b),i(!1)}})}):a.jsx(Le,{trigger:t,title:a.jsx(M,{id:"T6sYqW"}),description:a.jsx(M,{id:"GNCK6k",components:{0:a.jsx(qt,{href:"https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial",className:"text-blue-600 hover:underline"})}}),open:o,onOpenChange:i,children:a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(je,{onClick:()=>l(0),disabled:!n.length,children:a.jsx(ga,{label:a.jsx(M,{id:"57gCMx"}),example:a.jsx(M,{id:"Zhm/NX",values:{0:n[0]},components:{0:a.jsx("em",{})}})})}),a.jsx(je,{onClick:()=>l(1),children:a.jsx(ga,{label:a.jsx(M,{id:"Pahpw8"}),example:a.jsx(M,{id:"2ns2wB",components:{0:a.jsx("em",{})}})})})]})})}function ga({label:e,example:t}){return a.jsxs("span",{className:"flex w-full flex-col gap-0.5 text-left",children:[a.jsx("span",{children:e}),a.jsx("span",{className:"text-text-light text-sm leading-snug",children:t})]})}function Xp({email:e,requestPending:t,confirmPending:n,onRequest:s,onConfirm:r,children:o}){const{i18n:i,_:c}=Ie(),[l,u]=p.useState(!1),[d,h]=p.useState(0),[m,g]=p.useState(!1);p.useEffect(()=>{l||h(0)},[l]);const v=!t&&!m;return a.jsx(Le,{trigger:o,title:i._({id:"qRxXtM"}),description:a.jsx(M,{id:"ukpmGq"}),open:l,onOpenChange:u,dismissable:v,children:d===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Fi,{action:async()=>{await s(),h(1)},loading:t,disabled:n,color:"primary",className:"w-full"}),a.jsx(je,{onClick:()=>h(1),className:"w-full",children:a.jsx(M,{id:"FTT4a4"})})]}):a.jsx(bu,{email:e,disabled:n,onLoadingChange:g,onResend:s,handler:async b=>{await r(b),u(!1)}})})}function em({onResend:e,...t}){return a.jsx(St,{...t,validate:({token:n})=>{if(n)return{token:n}},fields:({set:n,values:s})=>a.jsx(jt,{label:a.jsx(M,{id:"AdWhjZ"}),children:a.jsx(pr,{name:"code",enterKeyHint:"done",required:!0,autoFocus:!0,defaultValue:s.token,onToken:r=>n("token",r??void 0),onResend:e})})})}function tm({email:e,requestPending:t,confirmPending:n,onRequest:s,onConfirm:r,children:o}){const{i18n:i,_:c}=Ie(),[l,u]=p.useState(!1),[d,h]=p.useState(0),[m,g]=p.useState(!1);p.useEffect(()=>{l||h(0)},[l]);const v=!t&&!m;return a.jsx(Le,{trigger:o,title:i._({id:"/IBv6X"}),description:a.jsx(M,{id:"+Qnl3Q",values:{email:e},components:{0:a.jsx("strong",{})}}),open:l,onOpenChange:u,dismissable:v,children:d===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Fi,{action:async()=>{await s(),h(1)},loading:t,disabled:n,color:"primary",className:"w-full"}),a.jsx(je,{onClick:()=>h(1),className:"w-full",children:a.jsx(M,{id:"FTT4a4"})})]}):a.jsx(em,{disabled:n,onLoadingChange:g,handler:async b=>{await r(b),u(!1)},onResend:s})})}function nm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.deactivateAccount(s)},onSuccess(s,r,o){t({title:{id:"K5DOaD"},description:{id:"GCPbSt"}})},onError(s,r,o){n(s,{title:{id:"F+HpQO"},description:{id:"U/me+u"}})}})}function sm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.reactivateAccount(s)},onSuccess(s,r,o){t({title:{id:"ZTs+D3"},description:{id:"fMAR1c"}})},onError(s,r,o){n(s,{title:{id:"Wrj6E0"},description:{id:"U/me+u"}})}})}function rm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.deleteAccountRequest(s)},onSuccess(s,r,o){t({title:{id:"13PnPF"},description:{id:"f6ChCo"}})},onError(s,r,o){n(s,{title:{id:"Mhc//w"},description:{id:"U/me+u"}})}})}function im(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.deleteAccountConfirm(s)},onSuccess(s,r,o){t({title:{id:"TKFUnX"},description:{id:"/C919/"}})},onError(s,r,o){n(s,{title:{id:"ykyODs"},description:{id:"xFKkhq"}})}})}function om(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.updateEmailRequest(s)},onSuccess(s,r,o){t({title:{id:"Y/tbFA"},description:{id:"lAK2OC"}})},onError(s,r,o){n(s,{title:{id:"E1zEOj"},description:{id:"JANaVF"}})}})}function am(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.updateEmailConfirm(s)},onSuccess(s,r,o){t({title:{id:"j/19E8"},description:{id:"YNQVYW"}})},onError(s,r,o){n(s,{title:{id:"PNuvRd"},description:{id:"q1d4qv"}})}})}function Ll(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.verifyEmailRequest(s)},onSuccess(s,r,o){t({title:{id:"I6Q2R9"},description:{id:"rpbuva"}})},onError(s,r,o){n(s,{title:{id:"yI9fD4"},description:{id:"U/me+u"}})}})}function Il(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.verifyEmailConfirm(s)},onSuccess(s,r,o){t({title:{id:"PLEl94"},description:{id:"HrYlJ7"}})},onError(s,r,o){n(s,{title:{id:"rxy0tG"},description:{id:"78Ju9c"}})}})}function cm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.updateHandle(s)},onSuccess(s,r,o){t({title:{id:"2HQiAC"},description:{id:"6Hg1zS"}})},onError(s,r,o){n(s,{title:{id:"DsHRti"},description:{id:"GZC2rQ"}})}})}function lm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.initiatePasswordReset(s)},onSuccess(s,r,o){t({title:{id:"boBFOP"},description:{id:"lAK2OC"}})},onError(s,r,o){n(s,{title:{id:"eMlT5s"},description:{id:"JANaVF"}})}})}function um(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.confirmResetPassword(s)},onSuccess(s,r,o){t({title:{id:"D9Jms7"},description:{id:"67nRLM"}})},onError(s,r,o){n(s,{title:{id:"3DLYmM"},description:{id:"q1d4qv"}})}})}function dm(){return a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx(hm,{}),a.jsx(fm,{}),a.jsx("hr",{className:"border-none","aria-hidden":!0}),a.jsx(vm,{}),a.jsx(pm,{}),a.jsx("hr",{className:"border-none","aria-hidden":!0}),a.jsx(mm,{}),a.jsx(gm,{})]})}function hm(){const{account:e}=lt(),{did:t,email:n,emailVerified:s}=e,r=Ll(),o=Il();return!n||s?null:a.jsx(bt,{role:"info",icon:_c,action:a.jsx(tm,{email:n,requestPending:r.isPending,confirmPending:o.isPending,onRequest:async()=>{await r.mutateAsync({did:t})},onConfirm:async({token:i})=>{await o.mutateAsync({did:t,token:i,email:n})},children:a.jsx(je,{size:"sm",color:"info",children:a.jsx(M,{id:"HFfnZo"})})}),children:a.jsx(M,{id:"Eo3tBf"})})}function fm(e){const{account:t}=lt(),n=Ii(),{did:s,email:r}=t,o=om(),i=am(),c=Ll(),l=Il();return a.jsx($p,{email:r,requestPending:o.isPending,confirmPending:i.isPending,onUpdateRequest:async()=>o.mutateAsync({did:s}),onUpdateConfirm:async({email:u,token:d})=>{await i.mutateAsync({did:s,email:u,token:d})},onVerifyRequest:async()=>{await c.mutateAsync({did:s})},onVerifyConfirm:async({email:u,token:d})=>{await l.mutateAsync({did:s,email:u,token:d})},introMessage:n.show2FaWarningOnEmailUpdate&&a.jsx(bt,{role:"warning",className:"text-sm",children:a.jsx(M,{id:"WV5h6m"})}),children:a.jsx(es,{...e,icon:wu,value:r,children:a.jsx(M,{id:"ATGYL1"})})})}function pm(e){const{account:t}=lt(),{email:n}=t,s=lm(),r=um();return n?a.jsx(Xp,{email:n,requestPending:s.isPending,confirmPending:r.isPending,onRequest:async()=>{await s.mutateAsync({email:n})},onConfirm:async({token:o,password:i})=>{await r.mutateAsync({token:o,password:i})},children:a.jsx(es,{...e,icon:wc,children:a.jsx(M,{id:"8ZsakT"})})}):null}function mm(e){const{account:t}=lt(),n=nm(),s=sm();return t.deactivated?a.jsx(Zp,{onConfirm:async()=>{await s.mutateAsync({did:t.did})},children:a.jsx(es,{...e,icon:wo,color:"primary",children:a.jsx(M,{id:"+A9Udm"})})}):a.jsx(Tp,{onConfirm:async()=>{await n.mutateAsync({did:t.did})},children:a.jsx(es,{...e,icon:wo,color:"error",children:a.jsx(M,{id:"bm0hju"})})})}function gm(e){const{account:t}=lt(),{did:n,email:s,handle:r}=t,o=rm(),i=im();return a.jsx(Vp,{handle:r,email:s,requestPending:o.isPending,confirmPending:i.isPending,onRequest:async()=>{await o.mutateAsync({did:n})},onConfirm:async({token:c,password:l})=>{await i.mutateAsync({did:n,token:c,password:l})},children:a.jsx(es,{...e,icon:Sc,color:"error",children:a.jsx(M,{id:"ZDGm40"})})})}function vm(e){const{account:t}=lt(),{availableUserDomains:n=[]}=Ii(),{did:s,handle:r}=t,o=cm();return a.jsx(Yp,{did:s,currentHandle:r,domains:n,handler:async({handle:i})=>{await o.mutateAsync({did:s,handle:i})},children:a.jsx(es,{...e,icon:Ta,value:a.jsx(ai,{handle:r}),children:a.jsx(M,{id:"7sNhEz"})})})}function es({icon:e,value:t,children:n,className:s,transparent:r=!0,...o}){return a.jsxs(je,{shape:"padded",...o,transparent:r,className:Kn("gap-2",s),children:[a.jsx(e,{"aria-hidden":!0,className:"size-5 shrink-0 grow-0"}),a.jsx("span",{className:"grow-1 truncate text-left font-medium",children:n}),t!=null&&a.jsx("span",{className:"hidden min-w-0 flex-1 truncate text-right text-sm sm:inline",children:t}),a.jsx(xu,{"aria-hidden":!0,className:"size-4 shrink-0"})]})}function ym(){const{account:e}=lt();return a.jsx("div",{className:"flex min-h-full flex-col items-center gap-4",children:a.jsx("div",{className:"flex flex-1 flex-col items-center justify-center",children:a.jsx(La,{account:e,children:a.jsx(bm,{className:"text-text-light text-center text-sm"})})})})}function bm(e){return a.jsxs("p",{...e,children:[a.jsx(M,{id:"Jn0vdi",components:{0:a.jsx(al,{})}})," ",a.jsx(ir,{to:"/account/about",className:"text-sm text-blue-600 hover:underline",children:a.jsx(M,{id:"z73+hu"})})]})}const wm={"/":{icon:bc,position:0,title:{id:"i0qMbr"},component:()=>a.jsx(ym,{})},"/manage":{icon:Su,position:10,title:{id:"AeXO77"},description:{id:"Xu88FC"},component:()=>a.jsx(dm,{})},"/devices":{icon:vc,position:20,title:{id:"qavm0B"},description:{id:"bdNEzF"},component:()=>a.jsx(Np,{})},"/apps":{icon:yc,position:30,title:{id:"VDvaN2"},description:{id:"xSiaWQ"},component:()=>a.jsx(bp,{})},"/about":{icon:_u,position:50,title:{id:"uyJsf6"},component:()=>a.jsx(zf,{}),description:{id:"nxn0xR"}}};function xm(e,t){const n={...wm,...t},s=Ai({getParentRoute:()=>so,path:e,component:()=>a.jsx(Sm,{signOutTo:e,children:a.jsx(_m,{basePath:e,subPages:n})})}),r=Object.entries(n).map(([o,{component:i}])=>Ai({getParentRoute:()=>s,path:o,component:i}));return[s,...r]}function _m({basePath:e,subPages:t}){const n=p.useMemo(()=>Object.entries(t).sort(([s,r],[o,i])=>{if(r.position!=null&&i.position!=null){const c=r.position-i.position;if(c!==0)return c}return s.localeCompare(o)}).map(([s,r])=>({to:e==="/"?s:s==="/"?e:`${e}${s}`,title:r.title,description:r.description,hidden:r.hidden,icon:r.icon})),[t,e]);return a.jsx(Bf,{title:{id:"KdxItU"},basePath:e,links:n,children:a.jsx(zi,{})})}const Bs=new URL(window.location.href);function Sm({children:e,signOutTo:t}){const n=Be(),{session:s}=Ni(),r=p.useRef(s!=null),o=Bs.searchParams.get("display")==="popup",i=Bs.searchParams.get("login_hint")||void 0,c=Bs.searchParams.get("nonce")||void 0,l=Bs.searchParams.get("redirect_uri")||void 0,u=p.useMemo(()=>{if(l&&c)return()=>{const d=new URL(l);window.location.href=d.toString()};if(o)return()=>{var d;(d=window.opener)==null||d.postMessage({nonce:c,event:"done"},"*"),window.postMessage({nonce:c,event:"done"},"*"),window.close()}},[o,l,c]);return p.useEffect(()=>{s&&!r.current?r.current=!0:!s&&r.current&&(r.current=!1,t&&n.navigate({to:t}),u==null||u())},[s,u]),a.jsx(ju,{forcedIdentifier:i,disableRemember:o,onCancel:u,children:e})}const jm=Ai({getParentRoute:()=>so,path:"/account/reset-password",component:Cm,errorComponent:Ti});function Cm(){const{api:e}=Ni(),t=Be();return a.jsx(Cu,{onResetPasswordRequest:async n=>e.initiatePasswordReset(n),onResetPasswordConfirm:async n=>e.confirmResetPassword(n),onBack:()=>{window.history.back(),setTimeout(()=>{t.state.location.pathname==="/account/reset-password"&&t.navigate({to:"/account"})},1e3)}})}const Am=xm("/account",{"/branding":{icon:xc,hidden:!0,position:40,title:{id:"A3MAIm"},component:Sh}}),Rm=uh({routeTree:so.addChildren([...Am,jm])}),{__customizationData:Em,__deviceSessions:Pm}=window,km=new Bu,Mm=document.getElementById("root");Zl.createRoot(Mm).render(a.jsx(p.StrictMode,{children:a.jsx(Ul,{value:Em,children:a.jsx($l,{children:a.jsx(Au,{children:a.jsx(Ru,{fallbackRender:({error:e,resetErrorBoundary:t})=>a.jsx(Ti,{error:e,retry:t}),children:a.jsx(Eu,{initialSessions:Pm,initialSelected:Pu.Only,children:a.jsx(Gu,{client:km,children:a.jsx(fh,{router:Rm})})})})})})})}));
|
|
24
|
-
//# sourceMappingURL=account-page-
|
|
24
|
+
//# sourceMappingURL=account-page-BX2GZBEw.js.map
|