iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://www.hull.ac.uk/_jWMR6Q_b6fc1dc3-ed0b-44c4-8ae5-ddf86161373e/static/browser-BwP1cLXF.js
var Aa=Object.defineProperty;var Ia=(e,t,r)=>t in e?Aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Dt=(e,t,r)=>Ia(e,typeof t!="symbol"?t+"":t,r);import{a as c,R as _n,b as Ua}from"./index-Cf5smBgf.js";/** * @remix-run/router v1.20.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function He(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ba(){return Math.random().toString(36).substr(2,8)}function Zr(e,t){return{usr:e.state,key:e.key,idx:t}}function mt(e,t,r,n){return r===void 0&&(r=null),Y({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?be(t):t,{state:r,key:t&&t.key||n||Ba()})}function Oe(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function be(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Ha(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=Q.Pop,l=null,u=f();u==null&&(u=0,i.replaceState(Y({},i.state,{idx:u}),""));function f(){return(i.state||{idx:null}).idx}function d(){s=Q.Pop;let b=f(),L=b==null?null:b-u;u=b,l&&l({action:s,location:x.location,delta:L})}function m(b,L){s=Q.Push;let R=mt(x.location,b,L);u=f()+1;let _=Zr(R,u),S=x.createHref(R);try{i.pushState(_,"",S)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;a.location.assign(S)}o&&l&&l({action:s,location:x.location,delta:1})}function g(b,L){s=Q.Replace;let R=mt(x.location,b,L);u=f();let _=Zr(R,u),S=x.createHref(R);i.replaceState(_,"",S),o&&l&&l({action:s,location:x.location,delta:0})}function y(b){let L=a.location.origin!=="null"?a.location.origin:a.location.href,R=typeof b=="string"?b:Oe(b);return R=R.replace(/ $/,"%20"),k(L,"No window.location.(origin|href) available to create URL for href: "+R),new URL(R,L)}let x={get action(){return s},get location(){return e(a,i)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Qr,d),l=b,()=>{a.removeEventListener(Qr,d),l=null}},createHref(b){return t(a,b)},createURL:y,encodeLocation(b){let L=y(b);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:m,replace:g,go(b){return i.go(b)}};return x}var J;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(J||(J={}));const za=new Set(["lazy","caseSensitive","path","id","index","children"]);function Wa(e){return e.index===!0}function Ut(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,String(o)],s=typeof a.id=="string"?a.id:i.join("-");if(k(a.index!==!0||!a.children,"Cannot specify children on an index route"),k(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Wa(a)){let l=Y({},a,t(a),{id:s});return n[s]=l,l}else{let l=Y({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=Ut(a.children,t,i,n)),l}})}function we(e,t,r){return r===void 0&&(r="/"),jt(e,t,r,!1)}function jt(e,t,r,n){let a=typeof t=="string"?be(t):t,o=le(a.pathname||"/",r);if(o==null)return null;let i=Cn(e);Ja(i);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(k(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ee([n,l.relativePath]),f=r.concat(l);o.children&&o.children.length>0&&(k(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Cn(o.children,t,f,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Za(u,o.index),routesMeta:f})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))a(o,i);else for(let l of Pn(o.path))a(o,i,l)}),t}function Pn(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Pn(n.join("/")),s=[];return s.push(...i.map(l=>l===""?o:[o,l].join("/"))),a&&s.push(...i),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ja(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:qa(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ka=/^:[\w-]+$/,Va=3,Ya=2,Xa=1,Ga=10,Qa=-2,qr=e=>e==="*";function Za(e,t){let r=e.split("/"),n=r.length;return r.some(qr)&&(n+=Qa),t&&(n+=Ya),r.filter(a=>!qr(a)).reduce((a,o)=>a+(Ka.test(o)?Va:o===""?Xa:Ga),n)}function qa(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function ei(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;si==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,s,l)=>{if(s===l.length-1&&i==="*")return a(t["*"]);const f=i.match(/^:([\w-]+)(\??)$/);if(f){const[,d,m]=f;let g=t[d];return k(m==="?"||g!=null,'Missing ":'+d+'" param'),a(g)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+o.join("/")}function pt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ti(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((u,f,d)=>{let{paramName:m,isOptional:g}=f;if(m==="*"){let x=s[d]||"";i=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const y=s[d];return g&&!y?u[m]=void 0:u[m]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function ti(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),He(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,l)=>(n.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Dn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return He(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function le(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function ri(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?be(e):e;return{pathname:r?r.startsWith("/")?r:ni(r,t):t,search:ii(n),hash:oi(a)}}function ni(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function nr(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Mn(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function zt(e,t){let r=Mn(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Wt(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=be(e):(a=Y({},e),k(!a.pathname||!a.pathname.includes("?"),nr("?","pathname","search",a)),k(!a.pathname||!a.pathname.includes("#"),nr("#","pathname","hash",a)),k(!a.search||!a.search.includes("#"),nr("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(i==null)s=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;a.pathname=m.join("/")}s=d>=0?t[d]:"/"}let l=ri(a,s),u=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||f)&&(l.pathname+="/"),l}const Ee=e=>e.join("/").replace(/\/\/+/g,"/"),ai=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ii=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oi=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,is=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),Y({},n,{headers:a}))};class li{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function Tn(e,t){return new li(e,typeof t=="number"?{status:t}:t)}class $t extends Error{}class On{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],k(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new $t("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((o,i)=>{let[s,l]=i;return Object.assign(o,{[s]:this.trackPromise(s,l)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof $t)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let o=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>o}),this.emit(!1,r),Promise.reject(o)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return k(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:ui(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function si(e){return e instanceof Promise&&e._tracked===!0}function ui(e){if(!si(e))return e;if(e._error)throw e._error;return e._data}const os=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new On(t,n)},Jt=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,Y({},n,{headers:a}))},ls=(e,t)=>{let r=Jt(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},ss=(e,t)=>{let r=Jt(e,t);return r.headers.set("X-Remix-Replace","true"),r};class Fe{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function et(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fn=["post","put","patch","delete"],ci=new Set(Fn),di=["get",...Fn],fi=new Set(di),hi=new Set([301,302,303,307,308]),mi=new Set([307,308]),ar={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},kn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ze={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Er=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pi=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),jn="remix-router-transitions";function vi(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;k(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let h=e.detectErrorBoundary;a=v=>({hasErrorBoundary:h(v)})}else a=pi;let o={},i=Ut(e.routes,a,void 0,o),s,l=e.basename||"/",u=e.dataStrategy||Ei,f=e.patchRoutesOnNavigation,d=Y({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),m=null,g=new Set,y=null,x=null,b=null,L=e.hydrationData!=null,R=we(i,e.history.location,l),_=null;if(R==null&&!f){let h=oe(404,{pathname:e.history.location.pathname}),{matches:v,route:w}=dn(i);R=v,_={[w.id]:h}}R&&!e.hydrationData&&_t(R,i,e.history.location.pathname).active&&(R=null);let S;if(R)if(R.some(h=>h.route.lazy))S=!1;else if(!R.some(h=>h.route.loader))S=!0;else if(d.v7_partialHydration){let h=e.hydrationData?e.hydrationData.loaderData:null,v=e.hydrationData?e.hydrationData.errors:null;if(v){let w=R.findIndex(E=>v[E.route.id]!==void 0);S=R.slice(0,w+1).every(E=>!fr(E.route,h,v))}else S=R.every(w=>!fr(w.route,h,v))}else S=e.hydrationData!=null;else if(S=!1,R=[],d.v7_partialHydration){let h=_t(null,i,e.history.location.pathname);h.active&&h.matches&&(R=h.matches)}let j,p={historyAction:e.history.action,location:e.history.location,matches:R,initialized:S,navigation:ar,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||_,fetchers:new Map,blockers:new Map},A=Q.Pop,D=!1,N,$=!1,W=new Map,K=null,ne=!1,q=!1,ae=[],Le=new Set,te=new Map,bt=0,nt=-1,Je=new Map,xe=new Set,Ke=new Map,at=new Map,Re=new Set,je=new Map,Ne=new Map,xt;function Ea(){if(m=e.history.listen(h=>{let{action:v,location:w,delta:E}=h;if(xt){xt(),xt=void 0;return}He(Ne.size===0||E!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let C=Vr({currentLocation:p.location,nextLocation:w,historyAction:v});if(C&&E!=null){let O=new Promise(I=>{xt=I});e.history.go(E*-1),St(C,{state:"blocked",location:w,proceed(){St(C,{state:"proceeding",proceed:void 0,reset:void 0,location:w}),O.then(()=>e.history.go(E))},reset(){let I=new Map(p.blockers);I.set(C,Ze),ie({blockers:I})}});return}return Ae(v,w)}),r){ki(t,W);let h=()=>ji(t,W);t.addEventListener("pagehide",h),K=()=>t.removeEventListener("pagehide",h)}return p.initialized||Ae(Q.Pop,p.location,{initialHydration:!0}),j}function ba(){m&&m(),K&&K(),g.clear(),N&&N.abort(),p.fetchers.forEach((h,v)=>Rt(v)),p.blockers.forEach((h,v)=>Kr(v))}function xa(h){return g.add(h),()=>g.delete(h)}function ie(h,v){v===void 0&&(v={}),p=Y({},p,h);let w=[],E=[];d.v7_fetcherPersist&&p.fetchers.forEach((C,O)=>{C.state==="idle"&&(Re.has(O)?E.push(O):w.push(O))}),[...g].forEach(C=>C(p,{deletedFetchers:E,viewTransitionOpts:v.viewTransitionOpts,flushSync:v.flushSync===!0})),d.v7_fetcherPersist&&(w.forEach(C=>p.fetchers.delete(C)),E.forEach(C=>Rt(C)))}function Ve(h,v,w){var E,C;let{flushSync:O}=w===void 0?{}:w,I=p.actionData!=null&&p.navigation.formMethod!=null&&pe(p.navigation.formMethod)&&p.navigation.state==="loading"&&((E=h.state)==null?void 0:E._isRedirect)!==!0,M;v.actionData?Object.keys(v.actionData).length>0?M=v.actionData:M=null:I?M=p.actionData:M=null;let T=v.loaderData?un(p.loaderData,v.loaderData,v.matches||[],v.errors):p.loaderData,P=p.blockers;P.size>0&&(P=new Map(P),P.forEach((B,re)=>P.set(re,Ze)));let F=D===!0||p.navigation.formMethod!=null&&pe(p.navigation.formMethod)&&((C=h.state)==null?void 0:C._isRedirect)!==!0;s&&(i=s,s=void 0),ne||A===Q.Pop||(A===Q.Push?e.history.push(h,h.state):A===Q.Replace&&e.history.replace(h,h.state));let U;if(A===Q.Pop){let B=W.get(p.location.pathname);B&&B.has(h.pathname)?U={currentLocation:p.location,nextLocation:h}:W.has(h.pathname)&&(U={currentLocation:h,nextLocation:p.location})}else if($){let B=W.get(p.location.pathname);B?B.add(h.pathname):(B=new Set([h.pathname]),W.set(p.location.pathname,B)),U={currentLocation:p.location,nextLocation:h}}ie(Y({},v,{actionData:M,loaderData:T,historyAction:A,location:h,initialized:!0,navigation:ar,revalidation:"idle",restoreScrollPosition:Xr(h,v.matches||p.matches),preventScrollReset:F,blockers:P}),{viewTransitionOpts:U,flushSync:O===!0}),A=Q.Pop,D=!1,$=!1,ne=!1,q=!1,ae=[]}async function Ur(h,v){if(typeof h=="number"){e.history.go(h);return}let w=dr(p.location,p.matches,l,d.v7_prependBasename,h,d.v7_relativeSplatPath,v==null?void 0:v.fromRouteId,v==null?void 0:v.relative),{path:E,submission:C,error:O}=en(d.v7_normalizeFormMethod,!1,w,v),I=p.location,M=mt(p.location,E,v&&v.state);M=Y({},M,e.history.encodeLocation(M));let T=v&&v.replace!=null?v.replace:void 0,P=Q.Push;T===!0?P=Q.Replace:T===!1||C!=null&&pe(C.formMethod)&&C.formAction===p.location.pathname+p.location.search&&(P=Q.Replace);let F=v&&"preventScrollReset"in v?v.preventScrollReset===!0:void 0,U=(v&&v.flushSync)===!0,B=Vr({currentLocation:I,nextLocation:M,historyAction:P});if(B){St(B,{state:"blocked",location:M,proceed(){St(B,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),Ur(h,v)},reset(){let re=new Map(p.blockers);re.set(B,Ze),ie({blockers:re})}});return}return await Ae(P,M,{submission:C,pendingError:O,preventScrollReset:F,replace:v&&v.replace,enableViewTransition:v&&v.viewTransition,flushSync:U})}function Ra(){if(qt(),ie({revalidation:"loading"}),p.navigation.state!=="submitting"){if(p.navigation.state==="idle"){Ae(p.historyAction,p.location,{startUninterruptedRevalidation:!0});return}Ae(A||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation,enableViewTransition:$===!0})}}async function Ae(h,v,w){N&&N.abort(),N=null,A=h,ne=(w&&w.startUninterruptedRevalidation)===!0,Fa(p.location,p.matches),D=(w&&w.preventScrollReset)===!0,$=(w&&w.enableViewTransition)===!0;let E=s||i,C=w&&w.overrideNavigation,O=we(E,v,l),I=(w&&w.flushSync)===!0,M=_t(O,E,v.pathname);if(M.active&&M.matches&&(O=M.matches),!O){let{error:V,notFoundMatches:z,route:X}=er(v.pathname);Ve(v,{matches:z,loaderData:{},errors:{[X.id]:V}},{flushSync:I});return}if(p.initialized&&!q&&Li(p.location,v)&&!(w&&w.submission&&pe(w.submission.formMethod))){Ve(v,{matches:O},{flushSync:I});return}N=new AbortController;let T=Qe(e.history,v,N.signal,w&&w.submission),P;if(w&&w.pendingError)P=[$e(O).route.id,{type:J.error,error:w.pendingError}];else if(w&&w.submission&&pe(w.submission.formMethod)){let V=await Sa(T,v,w.submission,O,M.active,{replace:w.replace,flushSync:I});if(V.shortCircuited)return;if(V.pendingActionResult){let[z,X]=V.pendingActionResult;if(ce(X)&&et(X.error)&&X.error.status===404){N=null,Ve(v,{matches:V.matches,loaderData:{},errors:{[z]:X.error}});return}}O=V.matches||O,P=V.pendingActionResult,C=ir(v,w.submission),I=!1,M.active=!1,T=Qe(e.history,T.url,T.signal)}let{shortCircuited:F,matches:U,loaderData:B,errors:re}=await _a(T,v,O,M.active,C,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,I,P);F||(N=null,Ve(v,Y({matches:U||O},cn(P),{loaderData:B,errors:re})))}async function Sa(h,v,w,E,C,O){O===void 0&&(O={}),qt();let I=Oi(v,w);if(ie({navigation:I},{flushSync:O.flushSync===!0}),C){let P=await Lt(E,v.pathname,h.signal);if(P.type==="aborted")return{shortCircuited:!0};if(P.type==="error"){let F=$e(P.partialMatches).route.id;return{matches:P.partialMatches,pendingActionResult:[F,{type:J.error,error:P.error}]}}else if(P.matches)E=P.matches;else{let{notFoundMatches:F,error:U,route:B}=er(v.pathname);return{matches:F,pendingActionResult:[B.id,{type:J.error,error:U}]}}}let M,T=ft(E,v);if(!T.route.action&&!T.route.lazy)M={type:J.error,error:oe(405,{method:h.method,pathname:v.pathname,routeId:T.route.id})};else if(M=(await it("action",p,h,[T],E,null))[T.route.id],h.signal.aborted)return{shortCircuited:!0};if(Be(M)){let P;return O&&O.replace!=null?P=O.replace:P=on(M.response.headers.get("Location"),new URL(h.url),l)===p.location.pathname+p.location.search,await Ie(h,M,!0,{submission:w,replace:P}),{shortCircuited:!0}}if(Te(M))throw oe(400,{type:"defer-action"});if(ce(M)){let P=$e(E,T.route.id);return(O&&O.replace)!==!0&&(A=Q.Push),{matches:E,pendingActionResult:[P.route.id,M]}}return{matches:E,pendingActionResult:[T.route.id,M]}}async function _a(h,v,w,E,C,O,I,M,T,P,F){let U=C||ir(v,O),B=O||I||hn(U),re=!ne&&(!d.v7_partialHydration||!T);if(E){if(re){let G=$r(F);ie(Y({navigation:U},G!==void 0?{actionData:G}:{}),{flushSync:P})}let H=await Lt(w,v.pathname,h.signal);if(H.type==="aborted")return{shortCircuited:!0};if(H.type==="error"){let G=$e(H.partialMatches).route.id;return{matches:H.partialMatches,loaderData:{},errors:{[G]:H.error}}}else if(H.matches)w=H.matches;else{let{error:G,notFoundMatches:Xe,route:st}=er(v.pathname);return{matches:Xe,loaderData:{},errors:{[st.id]:G}}}}let V=s||i,[z,X]=rn(e.history,p,w,B,v,d.v7_partialHydration&&T===!0,d.v7_skipActionErrorRevalidation,q,ae,Le,Re,Ke,xe,V,l,F);if(tr(H=>!(w&&w.some(G=>G.route.id===H))||z&&z.some(G=>G.route.id===H)),nt=++bt,z.length===0&&X.length===0){let H=Wr();return Ve(v,Y({matches:w,loaderData:{},errors:F&&ce(F[1])?{[F[0]]:F[1].error}:null},cn(F),H?{fetchers:new Map(p.fetchers)}:{}),{flushSync:P}),{shortCircuited:!0}}if(re){let H={};if(!E){H.navigation=U;let G=$r(F);G!==void 0&&(H.actionData=G)}X.length>0&&(H.fetchers=La(X)),ie(H,{flushSync:P})}X.forEach(H=>{Pe(H.key),H.controller&&te.set(H.key,H.controller)});let Ye=()=>X.forEach(H=>Pe(H.key));N&&N.signal.addEventListener("abort",Ye);let{loaderResults:ot,fetcherResults:_e}=await Br(p,w,z,X,h);if(h.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",Ye),X.forEach(H=>te.delete(H.key));let ge=Mt(ot);if(ge)return await Ie(h,ge.result,!0,{replace:M}),{shortCircuited:!0};if(ge=Mt(_e),ge)return xe.add(ge.key),await Ie(h,ge.result,!0,{replace:M}),{shortCircuited:!0};let{loaderData:rr,errors:lt}=sn(p,w,ot,F,X,_e,je);je.forEach((H,G)=>{H.subscribe(Xe=>{(Xe||H.done)&&je.delete(G)})}),d.v7_partialHydration&&T&&p.errors&&(lt=Y({},p.errors,lt));let Ue=Wr(),Ct=Jr(nt),Pt=Ue||Ct||X.length>0;return Y({matches:w,loaderData:rr,errors:lt},Pt?{fetchers:new Map(p.fetchers)}:{})}function $r(h){if(h&&!ce(h[1]))return{[h[0]]:h[1].data};if(p.actionData)return Object.keys(p.actionData).length===0?null:p.actionData}function La(h){return h.forEach(v=>{let w=p.fetchers.get(v.key),E=ut(void 0,w?w.data:void 0);p.fetchers.set(v.key,E)}),new Map(p.fetchers)}function Ca(h,v,w,E){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Pe(h);let C=(E&&E.flushSync)===!0,O=s||i,I=dr(p.location,p.matches,l,d.v7_prependBasename,w,d.v7_relativeSplatPath,v,E==null?void 0:E.relative),M=we(O,I,l),T=_t(M,O,I);if(T.active&&T.matches&&(M=T.matches),!M){Se(h,v,oe(404,{pathname:I}),{flushSync:C});return}let{path:P,submission:F,error:U}=en(d.v7_normalizeFormMethod,!0,I,E);if(U){Se(h,v,U,{flushSync:C});return}let B=ft(M,P),re=(E&&E.preventScrollReset)===!0;if(F&&pe(F.formMethod)){Pa(h,v,P,B,M,T.active,C,re,F);return}Ke.set(h,{routeId:v,path:P}),Da(h,v,P,B,M,T.active,C,re,F)}async function Pa(h,v,w,E,C,O,I,M,T){qt(),Ke.delete(h);function P(Z){if(!Z.route.action&&!Z.route.lazy){let Ge=oe(405,{method:T.formMethod,pathname:w,routeId:v});return Se(h,v,Ge,{flushSync:I}),!0}return!1}if(!O&&P(E))return;let F=p.fetchers.get(h);Ce(h,Fi(T,F),{flushSync:I});let U=new AbortController,B=Qe(e.history,w,U.signal,T);if(O){let Z=await Lt(C,w,B.signal);if(Z.type==="aborted")return;if(Z.type==="error"){Se(h,v,Z.error,{flushSync:I});return}else if(Z.matches){if(C=Z.matches,E=ft(C,w),P(E))return}else{Se(h,v,oe(404,{pathname:w}),{flushSync:I});return}}te.set(h,U);let re=bt,z=(await it("action",p,B,[E],C,h))[E.route.id];if(B.signal.aborted){te.get(h)===U&&te.delete(h);return}if(d.v7_fetcherPersist&&Re.has(h)){if(Be(z)||ce(z)){Ce(h,Me(void 0));return}}else{if(Be(z))if(te.delete(h),nt>re){Ce(h,Me(void 0));return}else return xe.add(h),Ce(h,ut(T)),Ie(B,z,!1,{fetcherSubmission:T,preventScrollReset:M});if(ce(z)){Se(h,v,z.error);return}}if(Te(z))throw oe(400,{type:"defer-action"});let X=p.navigation.location||p.location,Ye=Qe(e.history,X,U.signal),ot=s||i,_e=p.navigation.state!=="idle"?we(ot,p.navigation.location,l):p.matches;k(_e,"Didn't find any matches after fetcher action");let ge=++bt;Je.set(h,ge);let rr=ut(T,z.data);p.fetchers.set(h,rr);let[lt,Ue]=rn(e.history,p,_e,T,X,!1,d.v7_skipActionErrorRevalidation,q,ae,Le,Re,Ke,xe,ot,l,[E.route.id,z]);Ue.filter(Z=>Z.key!==h).forEach(Z=>{let Ge=Z.key,Gr=p.fetchers.get(Ge),Na=ut(void 0,Gr?Gr.data:void 0);p.fetchers.set(Ge,Na),Pe(Ge),Z.controller&&te.set(Ge,Z.controller)}),ie({fetchers:new Map(p.fetchers)});let Ct=()=>Ue.forEach(Z=>Pe(Z.key));U.signal.addEventListener("abort",Ct);let{loaderResults:Pt,fetcherResults:H}=await Br(p,_e,lt,Ue,Ye);if(U.signal.aborted)return;U.signal.removeEventListener("abort",Ct),Je.delete(h),te.delete(h),Ue.forEach(Z=>te.delete(Z.key));let G=Mt(Pt);if(G)return Ie(Ye,G.result,!1,{preventScrollReset:M});if(G=Mt(H),G)return xe.add(G.key),Ie(Ye,G.result,!1,{preventScrollReset:M});let{loaderData:Xe,errors:st}=sn(p,_e,Pt,void 0,Ue,H,je);if(p.fetchers.has(h)){let Z=Me(z.data);p.fetchers.set(h,Z)}Jr(ge),p.navigation.state==="loading"&&ge>nt?(k(A,"Expected pending action"),N&&N.abort(),Ve(p.navigation.location,{matches:_e,loaderData:Xe,errors:st,fetchers:new Map(p.fetchers)})):(ie({errors:st,loaderData:un(p.loaderData,Xe,_e,st),fetchers:new Map(p.fetchers)}),q=!1)}async function Da(h,v,w,E,C,O,I,M,T){let P=p.fetchers.get(h);Ce(h,ut(T,P?P.data:void 0),{flushSync:I});let F=new AbortController,U=Qe(e.history,w,F.signal);if(O){let z=await Lt(C,w,U.signal);if(z.type==="aborted")return;if(z.type==="error"){Se(h,v,z.error,{flushSync:I});return}else if(z.matches)C=z.matches,E=ft(C,w);else{Se(h,v,oe(404,{pathname:w}),{flushSync:I});return}}te.set(h,F);let B=bt,V=(await it("loader",p,U,[E],C,h))[E.route.id];if(Te(V)&&(V=await br(V,U.signal,!0)||V),te.get(h)===F&&te.delete(h),!U.signal.aborted){if(Re.has(h)){Ce(h,Me(void 0));return}if(Be(V))if(nt>B){Ce(h,Me(void 0));return}else{xe.add(h),await Ie(U,V,!1,{preventScrollReset:M});return}if(ce(V)){Se(h,v,V.error);return}k(!Te(V),"Unhandled fetcher deferred data"),Ce(h,Me(V.data))}}async function Ie(h,v,w,E){let{submission:C,fetcherSubmission:O,preventScrollReset:I,replace:M}=E===void 0?{}:E;v.response.headers.has("X-Remix-Revalidate")&&(q=!0);let T=v.response.headers.get("Location");k(T,"Expected a Location header on the redirect Response"),T=on(T,new URL(h.url),l);let P=mt(p.location,T,{_isRedirect:!0});if(r){let z=!1;if(v.response.headers.has("X-Remix-Reload-Document"))z=!0;else if(Er.test(T)){const X=e.history.createURL(T);z=X.origin!==t.location.origin||le(X.pathname,l)==null}if(z){M?t.location.replace(T):t.location.assign(T);return}}N=null;let F=M===!0||v.response.headers.has("X-Remix-Replace")?Q.Replace:Q.Push,{formMethod:U,formAction:B,formEncType:re}=p.navigation;!C&&!O&&U&&B&&re&&(C=hn(p.navigation));let V=C||O;if(mi.has(v.response.status)&&V&&pe(V.formMethod))await Ae(F,P,{submission:Y({},V,{formAction:T}),preventScrollReset:I||D,enableViewTransition:w?$:void 0});else{let z=ir(P,C);await Ae(F,P,{overrideNavigation:z,fetcherSubmission:O,preventScrollReset:I||D,enableViewTransition:w?$:void 0})}}async function it(h,v,w,E,C,O){let I,M={};try{I=await bi(u,h,v,w,E,C,O,o,a)}catch(T){return E.forEach(P=>{M[P.route.id]={type:J.error,error:T}}),M}for(let[T,P]of Object.entries(I))if(Ci(P)){let F=P.result;M[T]={type:J.redirect,response:Si(F,w,T,C,l,d.v7_relativeSplatPath)}}else M[T]=await Ri(P);return M}async function Br(h,v,w,E,C){let O=h.matches,I=it("loader",h,C,w,v,null),M=Promise.all(E.map(async F=>{if(F.matches&&F.match&&F.controller){let B=(await it("loader",h,Qe(e.history,F.path,F.controller.signal),[F.match],F.matches,F.key))[F.match.route.id];return{[F.key]:B}}else return Promise.resolve({[F.key]:{type:J.error,error:oe(404,{pathname:F.path})}})})),T=await I,P=(await M).reduce((F,U)=>Object.assign(F,U),{});return await Promise.all([Mi(v,T,C.signal,O,h.loaderData),Ti(v,P,E)]),{loaderResults:T,fetcherResults:P}}function qt(){q=!0,ae.push(...tr()),Ke.forEach((h,v)=>{te.has(v)&&Le.add(v),Pe(v)})}function Ce(h,v,w){w===void 0&&(w={}),p.fetchers.set(h,v),ie({fetchers:new Map(p.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function Se(h,v,w,E){E===void 0&&(E={});let C=$e(p.matches,v);Rt(h),ie({errors:{[C.route.id]:w},fetchers:new Map(p.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function Hr(h){return d.v7_fetcherPersist&&(at.set(h,(at.get(h)||0)+1),Re.has(h)&&Re.delete(h)),p.fetchers.get(h)||kn}function Rt(h){let v=p.fetchers.get(h);te.has(h)&&!(v&&v.state==="loading"&&Je.has(h))&&Pe(h),Ke.delete(h),Je.delete(h),xe.delete(h),Re.delete(h),Le.delete(h),p.fetchers.delete(h)}function Ma(h){if(d.v7_fetcherPersist){let v=(at.get(h)||0)-1;v<=0?(at.delete(h),Re.add(h)):at.set(h,v)}else Rt(h);ie({fetchers:new Map(p.fetchers)})}function Pe(h){let v=te.get(h);v&&(v.abort(),te.delete(h))}function zr(h){for(let v of h){let w=Hr(v),E=Me(w.data);p.fetchers.set(v,E)}}function Wr(){let h=[],v=!1;for(let w of xe){let E=p.fetchers.get(w);k(E,"Expected fetcher: "+w),E.state==="loading"&&(xe.delete(w),h.push(w),v=!0)}return zr(h),v}function Jr(h){let v=[];for(let[w,E]of Je)if(E0}function Ta(h,v){let w=p.blockers.get(h)||Ze;return Ne.get(h)!==v&&Ne.set(h,v),w}function Kr(h){p.blockers.delete(h),Ne.delete(h)}function St(h,v){let w=p.blockers.get(h)||Ze;k(w.state==="unblocked"&&v.state==="blocked"||w.state==="blocked"&&v.state==="blocked"||w.state==="blocked"&&v.state==="proceeding"||w.state==="blocked"&&v.state==="unblocked"||w.state==="proceeding"&&v.state==="unblocked","Invalid blocker state transition: "+w.state+" -> "+v.state);let E=new Map(p.blockers);E.set(h,v),ie({blockers:E})}function Vr(h){let{currentLocation:v,nextLocation:w,historyAction:E}=h;if(Ne.size===0)return;Ne.size>1&&He(!1,"A router only supports one blocker at a time");let C=Array.from(Ne.entries()),[O,I]=C[C.length-1],M=p.blockers.get(O);if(!(M&&M.state==="proceeding")&&I({currentLocation:v,nextLocation:w,historyAction:E}))return O}function er(h){let v=oe(404,{pathname:h}),w=s||i,{matches:E,route:C}=dn(w);return tr(),{notFoundMatches:E,route:C,error:v}}function tr(h){let v=[];return je.forEach((w,E)=>{(!h||h(E))&&(w.cancel(),v.push(E),je.delete(E))}),v}function Oa(h,v,w){if(y=h,b=v,x=w||null,!L&&p.navigation===ar){L=!0;let E=Xr(p.location,p.matches);E!=null&&ie({restoreScrollPosition:E})}return()=>{y=null,b=null,x=null}}function Yr(h,v){return x&&x(h,v.map(E=>Ln(E,p.loaderData)))||h.key}function Fa(h,v){if(y&&b){let w=Yr(h,v);y[w]=b()}}function Xr(h,v){if(y){let w=Yr(h,v),E=y[w];if(typeof E=="number")return E}return null}function _t(h,v,w){if(f)if(h){if(Object.keys(h[0].params).length>0)return{active:!0,matches:jt(v,w,l,!0)}}else return{active:!0,matches:jt(v,w,l,!0)||[]};return{active:!1,matches:null}}async function Lt(h,v,w){if(!f)return{type:"success",matches:h};let E=h;for(;;){let C=s==null,O=s||i,I=o;try{await f({path:v,matches:E,patch:(P,F)=>{w.aborted||an(P,F,O,I,a)}})}catch(P){return{type:"error",error:P,partialMatches:E}}finally{C&&!w.aborted&&(i=[...i])}if(w.aborted)return{type:"aborted"};let M=we(O,v,l);if(M)return{type:"success",matches:M};let T=jt(O,v,l,!0);if(!T||E.length===T.length&&E.every((P,F)=>P.route.id===T[F].route.id))return{type:"success",matches:null};E=T}}function ka(h){o={},s=Ut(h,a,void 0,o)}function ja(h,v){let w=s==null;an(h,v,s||i,o,a),w&&(i=[...i],ie({}))}return j={get basename(){return l},get future(){return d},get state(){return p},get routes(){return i},get window(){return t},initialize:Ea,subscribe:xa,enableScrollRestoration:Oa,navigate:Ur,fetch:Ca,revalidate:Ra,createHref:h=>e.history.createHref(h),encodeLocation:h=>e.history.encodeLocation(h),getFetcher:Hr,deleteFetcher:Ma,dispose:ba,getBlocker:Ta,deleteBlocker:Kr,patchRoutes:ja,_internalFetchControllers:te,_internalActiveDeferreds:je,_internalSetRoutes:ka},j}function yi(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function dr(e,t,r,n,a,o,i,s){let l,u;if(i){l=[];for(let d of t)if(l.push(d),d.route.id===i){u=d;break}}else l=t,u=t[t.length-1];let f=Wt(a||".",zt(l,o),le(e.pathname,r)||e.pathname,s==="path");if(a==null&&(f.search=e.search,f.hash=e.hash),(a==null||a===""||a===".")&&u){let d=xr(f.search);if(u.route.index&&!d)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&d){let m=new URLSearchParams(f.search),g=m.getAll("index");m.delete("index"),g.filter(x=>x).forEach(x=>m.append("index",x));let y=m.toString();f.search=y?"?"+y:""}}return n&&r!=="/"&&(f.pathname=f.pathname==="/"?r:Ee([r,f.pathname])),Oe(f)}function en(e,t,r,n){if(!n||!yi(n))return{path:r};if(n.formMethod&&!Di(n.formMethod))return{path:r,error:oe(405,{method:n.formMethod})};let a=()=>({path:r,error:oe(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),s=In(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!pe(i))return a();let m=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((g,y)=>{let[x,b]=y;return""+g+x+"="+b+` `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:m}}}else if(n.formEncType==="application/json"){if(!pe(i))return a();try{let m=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:m,text:void 0}}}catch{return a()}}}k(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=hr(n.formData),u=n.formData;else if(n.body instanceof FormData)l=hr(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=ln(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=ln(l)}catch{return a()}let f={formMethod:i,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(pe(f.formMethod))return{path:r,submission:f};let d=be(r);return t&&d.search&&xr(d.search)&&l.append("index",""),d.search="?"+l,{path:Oe(d),submission:f}}function tn(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function rn(e,t,r,n,a,o,i,s,l,u,f,d,m,g,y,x){let b=x?ce(x[1])?x[1].error:x[1].data:void 0,L=e.createURL(t.location),R=e.createURL(a),_=r;o&&t.errors?_=tn(r,Object.keys(t.errors)[0],!0):x&&ce(x[1])&&(_=tn(r,x[0]));let S=x?x[1].statusCode:void 0,j=i&&S&&S>=400,p=_.filter((D,N)=>{let{route:$}=D;if($.lazy)return!0;if($.loader==null)return!1;if(o)return fr($,t.loaderData,t.errors);if(gi(t.loaderData,t.matches[N],D)||l.some(ne=>ne===D.route.id))return!0;let W=t.matches[N],K=D;return nn(D,Y({currentUrl:L,currentParams:W.params,nextUrl:R,nextParams:K.params},n,{actionResult:b,actionStatus:S,defaultShouldRevalidate:j?!1:s||L.pathname+L.search===R.pathname+R.search||L.search!==R.search||Nn(W,K)}))}),A=[];return d.forEach((D,N)=>{if(o||!r.some(q=>q.route.id===D.routeId)||f.has(N))return;let $=we(g,D.path,y);if(!$){A.push({key:N,routeId:D.routeId,path:D.path,matches:null,match:null,controller:null});return}let W=t.fetchers.get(N),K=ft($,D.path),ne=!1;m.has(N)?ne=!1:u.has(N)?(u.delete(N),ne=!0):W&&W.state!=="idle"&&W.data===void 0?ne=s:ne=nn(K,Y({currentUrl:L,currentParams:t.matches[t.matches.length-1].params,nextUrl:R,nextParams:r[r.length-1].params},n,{actionResult:b,actionStatus:S,defaultShouldRevalidate:j?!1:s})),ne&&A.push({key:N,routeId:D.routeId,path:D.path,matches:$,match:K,controller:new AbortController})}),[p,A]}function fr(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function gi(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function Nn(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function nn(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function an(e,t,r,n,a){var o;let i;if(e){let u=n[e];k(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),i=u.children}else i=r;let s=t.filter(u=>!i.some(f=>An(u,f))),l=Ut(s,a,[e||"_","patch",String(((o=i)==null?void 0:o.length)||"0")],n);i.push(...l)}function An(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(o=>An(r,o))}):!1}async function wi(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];k(a,"No route found in manifest");let o={};for(let i in n){let l=a[i]!==void 0&&i!=="hasErrorBoundary";He(!l,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!l&&!za.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,Y({},t(a),{lazy:void 0}))}async function Ei(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,o,i)=>Object.assign(a,{[r[i].route.id]:o}),{})}async function bi(e,t,r,n,a,o,i,s,l,u){let f=o.map(g=>g.route.lazy?wi(g.route,l,s):void 0),d=o.map((g,y)=>{let x=f[y],b=a.some(R=>R.route.id===g.route.id);return Y({},g,{shouldLoad:b,resolve:async R=>(R&&n.method==="GET"&&(g.route.lazy||g.route.loader)&&(b=!0),b?xi(t,n,g,x,R,u):Promise.resolve({type:J.data,result:void 0}))})}),m=await e({matches:d,request:n,params:o[0].params,fetcherKey:i,context:u});try{await Promise.all(f)}catch{}return m}async function xi(e,t,r,n,a,o){let i,s,l=u=>{let f,d=new Promise((y,x)=>f=x);s=()=>f(),t.signal.addEventListener("abort",s);let m=y=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:o},...y!==void 0?[y]:[]),g=(async()=>{try{return{type:"data",result:await(a?a(x=>m(x)):m())}}catch(y){return{type:"error",result:y}}})();return Promise.race([g,d])};try{let u=r.route[e];if(n)if(u){let f,[d]=await Promise.all([l(u).catch(m=>{f=m}),n]);if(f!==void 0)throw f;i=d}else if(await n,u=r.route[e],u)i=await l(u);else if(e==="action"){let f=new URL(t.url),d=f.pathname+f.search;throw oe(405,{method:t.method,pathname:d,routeId:r.route.id})}else return{type:J.data,result:void 0};else if(u)i=await l(u);else{let f=new URL(t.url),d=f.pathname+f.search;throw oe(404,{pathname:d})}k(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:J.error,result:u}}finally{s&&t.signal.removeEventListener("abort",s)}return i}async function Ri(e){let{result:t,type:r}=e;if(Un(t)){let u;try{let f=t.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(f){return{type:J.error,error:f}}return r===J.error?{type:J.error,error:new Fe(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:J.data,data:u,statusCode:t.status,headers:t.headers}}if(r===J.error){if(fn(t)){var n;if(t.data instanceof Error){var a;return{type:J.error,error:t.data,statusCode:(a=t.init)==null?void 0:a.status}}t=new Fe(((n=t.init)==null?void 0:n.status)||500,void 0,t.data)}return{type:J.error,error:t,statusCode:et(t)?t.status:void 0}}if(Pi(t)){var o,i;return{type:J.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}if(fn(t)){var s,l;return{type:J.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:J.data,data:t}}function Si(e,t,r,n,a,o){let i=e.headers.get("Location");if(k(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Er.test(i)){let s=n.slice(0,n.findIndex(l=>l.route.id===r)+1);i=dr(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function on(e,t,r){if(Er.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=le(a.pathname,r)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Qe(e,t,r,n){let a=e.createURL(In(t)).toString(),o={signal:r};if(n&&pe(n.formMethod)){let{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=hr(n.formData):o.body=n.formData}return new Request(a,o)}function hr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function ln(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function _i(e,t,r,n,a){let o={},i=null,s,l=!1,u={},f=r&&ce(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let m=d.route.id,g=t[m];if(k(!Be(g),"Cannot handle redirect results in processLoaderData"),ce(g)){let y=g.error;f!==void 0&&(y=f,f=void 0),i=i||{};{let x=$e(e,m);i[x.route.id]==null&&(i[x.route.id]=y)}o[m]=void 0,l||(l=!0,s=et(g.error)?g.error.status:500),g.headers&&(u[m]=g.headers)}else Te(g)?(n.set(m,g.deferredData),o[m]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!l&&(s=g.statusCode),g.headers&&(u[m]=g.headers)):(o[m]=g.data,g.statusCode&&g.statusCode!==200&&!l&&(s=g.statusCode),g.headers&&(u[m]=g.headers))}),f!==void 0&&r&&(i={[r[0]]:f},o[r[0]]=void 0),{loaderData:o,errors:i,statusCode:s||200,loaderHeaders:u}}function sn(e,t,r,n,a,o,i){let{loaderData:s,errors:l}=_i(t,r,n,i);return a.forEach(u=>{let{key:f,match:d,controller:m}=u,g=o[f];if(k(g,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(ce(g)){let y=$e(e.matches,d==null?void 0:d.route.id);l&&l[y.route.id]||(l=Y({},l,{[y.route.id]:g.error})),e.fetchers.delete(f)}else if(Be(g))k(!1,"Unhandled fetcher revalidation redirect");else if(Te(g))k(!1,"Unhandled fetcher deferred data");else{let y=Me(g.data);e.fetchers.set(f,y)}}),{loaderData:s,errors:l}}function un(e,t,r,n){let a=Y({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function cn(e){return e?ce(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function $e(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function dn(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function oe(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=t===void 0?{}:t,s="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(s="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?l="defer() is not supported in actions":o==="invalid-body"&&(l="Unable to encode submission body")):e===403?(s="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(s="Not Found",l='No route matches URL "'+r+'"'):e===405&&(s="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new Fe(e||500,s,new Error(l),!0)}function Mt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Be(a))return{key:n,result:a}}}function In(e){let t=typeof e=="string"?be(e):e;return Oe(Y({},t,{hash:""}))}function Li(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ci(e){return Un(e.result)&&hi.has(e.result.status)}function Te(e){return e.type===J.deferred}function ce(e){return e.type===J.error}function Be(e){return(e&&e.type)===J.redirect}function fn(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Pi(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Un(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Di(e){return fi.has(e.toLowerCase())}function pe(e){return ci.has(e.toLowerCase())}async function Mi(e,t,r,n,a){let o=Object.entries(t);for(let i=0;i(m==null?void 0:m.route.id)===s);if(!u)continue;let f=n.find(m=>m.route.id===u.route.id),d=f!=null&&!Nn(f,u)&&(a&&a[u.route.id])!==void 0;Te(l)&&d&&await br(l,r,!1).then(m=>{m&&(t[s]=m)})}}async function Ti(e,t,r){for(let n=0;n(u==null?void 0:u.route.id)===o)&&Te(s)&&(k(i,"Expected an AbortController for revalidating fetcher deferred result"),await br(s,i.signal,!0).then(u=>{u&&(t[a]=u)}))}}async function br(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:J.data,data:e.deferredData.unwrappedData}}catch(a){return{type:J.error,error:a}}return{type:J.data,data:e.deferredData.data}}}function xr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function ft(e,t){let r=typeof t=="string"?be(t).search:t.search;if(e[e.length-1].route.index&&xr(r||""))return e[e.length-1];let n=Mn(e);return n[n.length-1]}function hn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function ir(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Oi(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function ut(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Fi(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Me(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ki(e,t){try{let r=e.sessionStorage.getItem(jn);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function ji(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(jn,JSON.stringify(r))}catch(n){He(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.27.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ze(){return ze=Object.assign?Object.assign.bind():function(e){for(var t=1;tpt(e,Dn(t)),[t,e])}function Bn(e){c.useContext(fe).static||c.useLayoutEffect(e)}function Sr(){let{isDataRoute:e}=c.useContext(he);return e?qi():Ni()}function Ni(){We()||k(!1);let e=c.useContext(tt),{basename:t,future:r,navigator:n}=c.useContext(fe),{matches:a}=c.useContext(he),{pathname:o}=me(),i=JSON.stringify(zt(a,r.v7_relativeSplatPath)),s=c.useRef(!1);return Bn(()=>{s.current=!0}),c.useCallback(function(u,f){if(f===void 0&&(f={}),!s.current)return;if(typeof u=="number"){n.go(u);return}let d=Wt(u,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ee([t,d.pathname])),(f.replace?n.replace:n.push)(d,f.state,f)},[t,n,i,o,e])}const Hn=c.createContext(null);function ds(){return c.useContext(Hn)}function Ai(e){let t=c.useContext(he).outlet;return t&&c.createElement(Hn.Provider,{value:e},t)}function fs(){let{matches:e}=c.useContext(he),t=e[e.length-1];return t?t.params:{}}function wt(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=c.useContext(fe),{matches:a}=c.useContext(he),{pathname:o}=me(),i=JSON.stringify(zt(a,n.v7_relativeSplatPath));return c.useMemo(()=>Wt(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function Ii(e,t){return zn(e,t)}function zn(e,t,r,n){We()||k(!1);let{navigator:a}=c.useContext(fe),{matches:o}=c.useContext(he),i=o[o.length-1],s=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=me(),f;if(t){var d;let b=typeof t=="string"?be(t):t;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||k(!1),f=b}else f=u;let m=f.pathname||"/",g=m;if(l!=="/"){let b=l.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let y=we(e,{pathname:g}),x=Wn(y&&y.map(b=>Object.assign({},b,{params:Object.assign({},s,b.params),pathname:Ee([l,a.encodeLocation?a.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Ee([l,a.encodeLocation?a.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,r,n);return t&&x?c.createElement(gt.Provider,{value:{location:ze({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Q.Pop}},x):x}function Ui(){let e=Kn(),t=et(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:a},r):null,null)}const $i=c.createElement(Ui,null);class Bi extends c.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?c.createElement(he.Provider,{value:this.props.routeContext},c.createElement($n.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Hi(e){let{routeContext:t,match:r,children:n}=e,a=c.useContext(tt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),c.createElement(he.Provider,{value:t},n)}function Wn(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,s=(a=r)==null?void 0:a.errors;if(s!=null){let f=i.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);f>=0||k(!1),i=i.slice(0,Math.min(i.length,f+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let f=0;f=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((f,d,m)=>{let g,y=!1,x=null,b=null;r&&(g=s&&d.route.id?s[d.route.id]:void 0,x=d.route.errorElement||$i,l&&(u<0&&m===0?(y=!0,b=null):u===m&&(y=!0,b=d.route.hydrateFallbackElement||null)));let L=t.concat(i.slice(0,m+1)),R=()=>{let _;return g?_=x:y?_=b:d.route.Component?_=c.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=f,c.createElement(Hi,{match:d,routeContext:{outlet:f,matches:L,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?c.createElement(Bi,{location:r.location,revalidation:r.revalidation,component:x,error:g,children:R(),routeContext:{outlet:null,matches:L,isDataRoute:!0}}):R()},null)}var Kt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Kt||{}),se=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(se||{});function _r(e){let t=c.useContext(tt);return t||k(!1),t}function ke(e){let t=c.useContext(yt);return t||k(!1),t}function zi(e){let t=c.useContext(he);return t||k(!1),t}function Et(e){let t=zi(),r=t.matches[t.matches.length-1];return r.route.id||k(!1),r.route.id}function Wi(){return Et(se.UseRouteId)}function Ji(){return ke(se.UseNavigation).navigation}function hs(){let e=_r(Kt.UseRevalidator),t=ke(se.UseRevalidator);return c.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function Jn(){let{matches:e,loaderData:t}=ke(se.UseMatches);return c.useMemo(()=>e.map(r=>Ln(r,t)),[e,t])}function Ki(){let e=ke(se.UseLoaderData),t=Et(se.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function Vi(e){return ke(se.UseRouteLoaderData).loaderData[e]}function Yi(){let e=ke(se.UseActionData),t=Et(se.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Kn(){var e;let t=c.useContext($n),r=ke(se.UseRouteError),n=Et(se.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function Xi(){let e=c.useContext(Bt);return e==null?void 0:e._data}function Gi(){let e=c.useContext(Bt);return e==null?void 0:e._error}let Qi=0;function Zi(e){let{router:t,basename:r}=_r(Kt.UseBlocker),n=ke(se.UseBlocker),[a,o]=c.useState(""),i=c.useCallback(s=>{if(typeof e!="function")return!!e;if(r==="/")return e(s);let{currentLocation:l,nextLocation:u,historyAction:f}=s;return e({currentLocation:ze({},l,{pathname:le(l.pathname,r)||l.pathname}),nextLocation:ze({},u,{pathname:le(u.pathname,r)||u.pathname}),historyAction:f})},[r,e]);return c.useEffect(()=>{let s=String(++Qi);return o(s),()=>t.deleteBlocker(s)},[t]),c.useEffect(()=>{a!==""&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):Ze}function qi(){let{router:e}=_r(Kt.UseNavigateStable),t=Et(se.UseNavigateStable),r=c.useRef(!1);return Bn(()=>{r.current=!0}),c.useCallback(function(a,o){o===void 0&&(o={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ze({fromRouteId:t},o)))},[e,t])}function ms(e){let{to:t,replace:r,state:n,relative:a}=e;We()||k(!1);let{future:o,static:i}=c.useContext(fe),{matches:s}=c.useContext(he),{pathname:l}=me(),u=Sr(),f=Wt(t,zt(s,o.v7_relativeSplatPath),l,a==="path"),d=JSON.stringify(f);return c.useEffect(()=>u(JSON.parse(d),{replace:r,state:n,relative:a}),[u,d,a,r,n]),null}function ps(e){return Ai(e.context)}function eo(e){k(!1)}function to(e){let{basename:t="/",children:r=null,location:n,navigationType:a=Q.Pop,navigator:o,static:i=!1,future:s}=e;We()&&k(!1);let l=t.replace(/^\/*/,"/"),u=c.useMemo(()=>({basename:l,navigator:o,static:i,future:ze({v7_relativeSplatPath:!1},s)}),[l,s,o,i]);typeof n=="string"&&(n=be(n));let{pathname:f="/",search:d="",hash:m="",state:g=null,key:y="default"}=n,x=c.useMemo(()=>{let b=le(f,l);return b==null?null:{location:{pathname:b,search:d,hash:m,state:g,key:y},navigationType:a}},[l,f,d,m,g,y,a]);return x==null?null:c.createElement(fe.Provider,{value:u},c.createElement(gt.Provider,{children:r,value:x}))}function vs(e){let{children:t,location:r}=e;return Ii(mr(t),r)}function ro(e){let{children:t,errorElement:r,resolve:n}=e;return c.createElement(ao,{resolve:n,errorElement:r},c.createElement(io,null,t))}var de=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(de||{});const no=new Promise(()=>{});class ao extends c.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,r){console.error(" caught the following error during render",t,r)}render(){let{children:t,errorElement:r,resolve:n}=this.props,a=null,o=de.pending;if(!(n instanceof Promise))o=de.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){o=de.error;let i=this.state.error;a=Promise.reject().catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_error",{get:()=>i})}else n._tracked?(a=n,o="_error"in a?de.error:"_data"in a?de.success:de.pending):(o=de.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),a=n.then(i=>Object.defineProperty(n,"_data",{get:()=>i}),i=>Object.defineProperty(n,"_error",{get:()=>i})));if(o===de.error&&a._error instanceof $t)throw no;if(o===de.error&&!r)throw a._error;if(o===de.error)return c.createElement(Bt.Provider,{value:a,children:r});if(o===de.success)return c.createElement(Bt.Provider,{value:a,children:t});throw a}}function io(e){let{children:t}=e,r=Xi(),n=typeof t=="function"?t(r):t;return c.createElement(c.Fragment,null,n)}function mr(e,t){t===void 0&&(t=[]);let r=[];return c.Children.forEach(e,(n,a)=>{if(!c.isValidElement(n))return;let o=[...t,a];if(n.type===c.Fragment){r.push.apply(r,mr(n.props.children,o));return}n.type!==eo&&k(!1),!n.props.index||!n.props.children||k(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=mr(n.props.children,o)),r.push(i)}),r}function ys(e){return Wn(e)}function oo(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:c.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:c.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:c.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.27.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}const Nt="get",or="application/x-www-form-urlencoded";function Vt(e){return e!=null&&typeof e.tagName=="string"}function lo(e){return Vt(e)&&e.tagName.toLowerCase()==="button"}function so(e){return Vt(e)&&e.tagName.toLowerCase()==="form"}function uo(e){return Vt(e)&&e.tagName.toLowerCase()==="input"}function co(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fo(e,t){return e.button===0&&(!t||t==="_self")&&!co(e)}function pr(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function ho(e,t){let r=pr(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}let Tt=null;function mo(){if(Tt===null)try{new FormData(document.createElement("form"),0),Tt=!1}catch{Tt=!0}return Tt}const po=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function lr(e){return e!=null&&!po.has(e)?null:e}function vo(e,t){let r,n,a,o,i;if(so(e)){let s=e.getAttribute("action");n=s?le(s,t):null,r=e.getAttribute("method")||Nt,a=lr(e.getAttribute("enctype"))||or,o=new FormData(e)}else if(lo(e)||uo(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a