!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9b7eb892-46ef-5d94-9efd-f70903420172")}catch(e){}}(); function Jr(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ma=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Gr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function va(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),r}var Pt={exports:{}},A={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Qt;function Xr(){if(Qt)return A;Qt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function R(l){return l===null||typeof l!="object"?null:(l=b&&l[b]||l["@@iterator"],typeof l=="function"?l:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,O={};function k(l,y,L){this.props=l,this.context=y,this.refs=O,this.updater=L||M}k.prototype.isReactComponent={},k.prototype.setState=function(l,y){if(typeof l!="object"&&typeof l!="function"&&l!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,l,y,"setState")},k.prototype.forceUpdate=function(l){this.updater.enqueueForceUpdate(this,l,"forceUpdate")};function I(){}I.prototype=k.prototype;function Q(l,y,L){this.props=l,this.context=y,this.refs=O,this.updater=L||M}var ie=Q.prototype=new I;ie.constructor=Q,x(ie,k.prototype),ie.isPureReactComponent=!0;var ne=Array.isArray;function Ee(){}var d={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function Z(l,y,L){var T=L.ref;return{$$typeof:e,type:l,key:y,ref:T!==void 0?T:null,props:L}}function V(l,y){return Z(l.type,y,l.props)}function ae(l){return typeof l=="object"&&l!==null&&l.$$typeof===e}function ce(l){var y={"=":"=0",":":"=2"};return"$"+l.replace(/[=:]/g,function(L){return y[L]})}var de=/\/+/g;function ye(l,y){return typeof l=="object"&&l!==null&&l.key!=null?ce(""+l.key):y.toString(36)}function Re(l){switch(l.status){case"fulfilled":return l.value;case"rejected":throw l.reason;default:switch(typeof l.status=="string"?l.then(Ee,Ee):(l.status="pending",l.then(function(y){l.status==="pending"&&(l.status="fulfilled",l.value=y)},function(y){l.status==="pending"&&(l.status="rejected",l.reason=y)})),l.status){case"fulfilled":return l.value;case"rejected":throw l.reason}}throw l}function ve(l,y,L,T,U){var H=typeof l;(H==="undefined"||H==="boolean")&&(l=null);var z=!1;if(l===null)z=!0;else switch(H){case"bigint":case"string":case"number":z=!0;break;case"object":switch(l.$$typeof){case e:case t:z=!0;break;case v:return z=l._init,ve(z(l._payload),y,L,T,U)}}if(z)return U=U(l),z=T===""?"."+ye(l,0):T,ne(U)?(L="",z!=null&&(L=z.replace(de,"$&/")+"/"),ve(U,y,L,"",function(yt){return yt})):U!=null&&(ae(U)&&(U=V(U,L+(U.key==null||l&&l.key===U.key?"":(""+U.key).replace(de,"$&/")+"/")+z)),y.push(U)),1;z=0;var se=T===""?".":T+":";if(ne(l))for(var le=0;le"u")throw new Error(t)}function Be(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Zr(){return Math.random().toString(36).substr(2,8)}function tr(e,t){return{usr:e.state,key:e.key,idx:t}}function tt(e,t,r,n){return r===void 0&&(r=null),G({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Te(t):t,{state:r,key:t&&t.key||n||Zr()})}function nt(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 Te(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 en(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,i=a.history,h=re.Pop,c=null,m=v();m==null&&(m=0,i.replaceState(G({},i.state,{idx:m}),""));function v(){return(i.state||{idx:null}).idx}function p(){h=re.Pop;let O=v(),k=O==null?null:O-m;m=O,c&&c({action:h,location:x.location,delta:k})}function b(O,k){h=re.Push;let I=tt(x.location,O,k);m=v()+1;let Q=tr(I,m),ie=x.createHref(I);try{i.pushState(Q,"",ie)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;a.location.assign(ie)}s&&c&&c({action:h,location:x.location,delta:1})}function R(O,k){h=re.Replace;let I=tt(x.location,O,k);m=v();let Q=tr(I,m),ie=x.createHref(I);i.replaceState(Q,"",ie),s&&c&&c({action:h,location:x.location,delta:0})}function M(O){let k=a.location.origin!=="null"?a.location.origin:a.location.href,I=typeof O=="string"?O:nt(O);return I=I.replace(/ $/,"%20"),F(k,"No window.location.(origin|href) available to create URL for href: "+I),new URL(I,k)}let x={get action(){return h},get location(){return e(a,i)},listen(O){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(er,p),c=O,()=>{a.removeEventListener(er,p),c=null}},createHref(O){return t(a,O)},createURL:M,encodeLocation(O){let k=M(O);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:b,replace:R,go(O){return i.go(O)}};return x}var K;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(K||(K={}));const tn=new Set(["lazy","caseSensitive","path","id","index","children"]);function rn(e){return e.index===!0}function mt(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,s)=>{let i=[...r,String(s)],h=typeof a.id=="string"?a.id:i.join("-");if(F(a.index!==!0||!a.children,"Cannot specify children on an index route"),F(!n[h],'Found a route id collision on id "'+h+`". Route id's must be globally unique within Data Router usages`),rn(a)){let c=G({},a,t(a),{id:h});return n[h]=c,c}else{let c=G({},a,t(a),{id:h,children:void 0});return n[h]=c,a.children&&(c.children=mt(a.children,t,i,n)),c}})}function Ne(e,t,r){return r===void 0&&(r="/"),pt(e,t,r,!1)}function pt(e,t,r,n){let a=typeof t=="string"?Te(t):t,s=at(a.pathname||"/",r);if(s==null)return null;let i=Er(e);nn(i);let h=null;for(let c=0;h==null&&c{let c={relativePath:h===void 0?s.path||"":h,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};c.relativePath.startsWith("/")&&(F(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let m=xe([n,c.relativePath]),v=r.concat(c);s.children&&s.children.length>0&&(F(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),Er(s.children,t,v,m)),!(s.path==null&&!s.index)&&t.push({path:m,score:dn(m,s.index),routesMeta:v})};return e.forEach((s,i)=>{var h;if(s.path===""||!((h=s.path)!=null&&h.includes("?")))a(s,i);else for(let c of Rr(s.path))a(s,i,c)}),t}function Rr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),s=r.replace(/\?$/,"");if(n.length===0)return a?[s,""]:[s];let i=Rr(n.join("/")),h=[];return h.push(...i.map(c=>c===""?s:[s,c].join("/"))),a&&h.push(...i),h.map(c=>e.startsWith("/")&&c===""?"/":c)}function nn(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:fn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const an=/^:[\w-]+$/,on=3,ln=2,sn=1,un=10,cn=-2,rr=e=>e==="*";function dn(e,t){let r=e.split("/"),n=r.length;return r.some(rr)&&(n+=cn),t&&(n+=ln),r.filter(a=>!rr(a)).reduce((a,s)=>a+(an.test(s)?on:s===""?sn:un),n)}function fn(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 hn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},s="/",i=[];for(let h=0;h{let{paramName:b,isOptional:R}=v;if(b==="*"){let x=h[p]||"";i=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const M=h[p];return R&&!M?m[b]=void 0:m[b]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:i,pattern:e}}function pn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Be(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,h,c)=>(n.push({paramName:h,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function mn(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Be(!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 at(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)||"/"}const vn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gn=e=>vn.test(e);function yn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Te(e):e,s;if(r)if(gn(r))s=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),Be(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+r))}r.startsWith("/")?s=ar(r.substring(1),"/"):s=ar(r,t)}else s=t;return{pathname:s,search:En(n),hash:Rn(a)}}function ar(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 Dt(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 wr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function jt(e,t){let r=wr(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Ot(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Te(e):(a=G({},e),F(!a.pathname||!a.pathname.includes("?"),Dt("?","pathname","search",a)),F(!a.pathname||!a.pathname.includes("#"),Dt("#","pathname","hash",a)),F(!a.search||!a.search.includes("#"),Dt("#","search","hash",a)));let s=e===""||a.pathname==="",i=s?"/":a.pathname,h;if(i==null)h=r;else{let p=t.length-1;if(!n&&i.startsWith("..")){let b=i.split("/");for(;b[0]==="..";)b.shift(),p-=1;a.pathname=b.join("/")}h=p>=0?t[p]:"/"}let c=yn(a,h),m=i&&i!=="/"&&i.endsWith("/"),v=(s||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(m||v)&&(c.pathname+="/"),c}const xe=e=>e.join("/").replace(/\/\/+/g,"/"),bn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),En=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Rn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class wn{constructor(t,r){this.type="DataWithResponseInit",this.data=t,this.init=r||null}}function ba(e,t){return new wn(e,typeof t=="number"?{status:t}:t)}class _t extends Error{}class Ea{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],F(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,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((s,i)=>{let[h,c]=i;return Object.assign(s,{[h]:this.trackPromise(h,c)})},{}),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 s=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:()=>s}),this.emit(!1,r),Promise.reject(s)}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(s=>{t.removeEventListener("abort",n),(s||this.done)&&a(s)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return F(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]:Dn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Pn(e){return e instanceof Promise&&e._tracked===!0}function Dn(e){if(!Pn(e))return e;if(e._error)throw e._error;return e._data}const Ra=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,G({},n,{headers:a}))};class Ct{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 rt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Pr=["post","put","patch","delete"],xn=new Set(Pr),Sn=["get",...Pr],_n=new Set(Sn),Cn=new Set([301,302,303,307,308]),Mn=new Set([307,308]),xt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ln={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Qe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},At=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Dr="remix-router-transitions";function wa(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;F(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 o=e.detectErrorBoundary;a=u=>({hasErrorBoundary:o(u)})}else a=Tn;let s={},i=mt(e.routes,a,void 0,s),h,c=e.basename||"/",m=e.dataStrategy||Un,v=e.patchRoutesOnNavigation,p=G({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),b=null,R=new Set,M=null,x=null,O=null,k=e.hydrationData!=null,I=Ne(i,e.history.location,c),Q=!1,ie=null;if(I==null&&!v){let o=fe(404,{pathname:e.history.location.pathname}),{matches:u,route:f}=mr(i);I=u,ie={[f.id]:o}}I&&!e.hydrationData&&ut(I,i,e.history.location.pathname).active&&(I=null);let ne;if(I)if(I.some(o=>o.route.lazy))ne=!1;else if(!I.some(o=>o.route.loader))ne=!0;else if(p.v7_partialHydration){let o=e.hydrationData?e.hydrationData.loaderData:null,u=e.hydrationData?e.hydrationData.errors:null;if(u){let f=I.findIndex(g=>u[g.route.id]!==void 0);ne=I.slice(0,f+1).every(g=>!Lt(g.route,o,u))}else ne=I.every(f=>!Lt(f.route,o,u))}else ne=e.hydrationData!=null;else if(ne=!1,I=[],p.v7_partialHydration){let o=ut(null,i,e.history.location.pathname);o.active&&o.matches&&(Q=!0,I=o.matches)}let Ee,d={historyAction:e.history.action,location:e.history.location,matches:I,initialized:ne,navigation:xt,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||ie,fetchers:new Map,blockers:new Map},Y=re.Pop,Z=!1,V,ae=!1,ce=new Map,de=null,ye=!1,Re=!1,ve=[],we=new Set,ee=new Map,je=0,Oe=-1,l=new Map,y=new Set,L=new Map,T=new Map,U=new Set,H=new Map,z=new Map,se;function le(){if(b=e.history.listen(o=>{let{action:u,location:f,delta:g}=o;if(se){se(),se=void 0;return}Be(z.size===0||g!=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 E=Jt({currentLocation:d.location,nextLocation:f,historyAction:u});if(E&&g!=null){let C=new Promise(j=>{se=j});e.history.go(g*-1),st(E,{state:"blocked",location:f,proceed(){st(E,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),C.then(()=>e.history.go(g))},reset(){let j=new Map(d.blockers);j.set(E,Qe),ue({blockers:j})}});return}return Ae(u,f)}),r){Gn(t,ce);let o=()=>Xn(t,ce);t.addEventListener("pagehide",o),de=()=>t.removeEventListener("pagehide",o)}return d.initialized||Ae(re.Pop,d.location,{initialHydration:!0}),Ee}function yt(){b&&b(),de&&de(),R.clear(),V&&V.abort(),d.fetchers.forEach((o,u)=>lt(u)),d.blockers.forEach((o,u)=>Vt(u))}function Or(o){return R.add(o),()=>R.delete(o)}function ue(o,u){u===void 0&&(u={}),d=G({},d,o);let f=[],g=[];p.v7_fetcherPersist&&d.fetchers.forEach((E,C)=>{E.state==="idle"&&(U.has(C)?g.push(C):f.push(C))}),U.forEach(E=>{!d.fetchers.has(E)&&!ee.has(E)&&g.push(E)}),[...R].forEach(E=>E(d,{deletedFetchers:g,viewTransitionOpts:u.viewTransitionOpts,flushSync:u.flushSync===!0})),p.v7_fetcherPersist?(f.forEach(E=>d.fetchers.delete(E)),g.forEach(E=>lt(E))):g.forEach(E=>U.delete(E))}function ze(o,u,f){var g,E;let{flushSync:C}=f===void 0?{}:f,j=d.actionData!=null&&d.navigation.formMethod!=null&&ge(d.navigation.formMethod)&&d.navigation.state==="loading"&&((g=o.state)==null?void 0:g._isRedirect)!==!0,D;u.actionData?Object.keys(u.actionData).length>0?D=u.actionData:D=null:j?D=d.actionData:D=null;let S=u.loaderData?hr(d.loaderData,u.loaderData,u.matches||[],u.errors):d.loaderData,P=d.blockers;P.size>0&&(P=new Map(P),P.forEach((B,oe)=>P.set(oe,Qe)));let _=Z===!0||d.navigation.formMethod!=null&&ge(d.navigation.formMethod)&&((E=o.state)==null?void 0:E._isRedirect)!==!0;h&&(i=h,h=void 0),ye||Y===re.Pop||(Y===re.Push?e.history.push(o,o.state):Y===re.Replace&&e.history.replace(o,o.state));let N;if(Y===re.Pop){let B=ce.get(d.location.pathname);B&&B.has(o.pathname)?N={currentLocation:d.location,nextLocation:o}:ce.has(o.pathname)&&(N={currentLocation:o,nextLocation:d.location})}else if(ae){let B=ce.get(d.location.pathname);B?B.add(o.pathname):(B=new Set([o.pathname]),ce.set(d.location.pathname,B)),N={currentLocation:d.location,nextLocation:o}}ue(G({},u,{actionData:D,loaderData:S,historyAction:Y,location:o,initialized:!0,navigation:xt,revalidation:"idle",restoreScrollPosition:Xt(o,u.matches||d.matches),preventScrollReset:_,blockers:P}),{viewTransitionOpts:N,flushSync:C===!0}),Y=re.Pop,Z=!1,ae=!1,ye=!1,Re=!1,ve=[]}async function Bt(o,u){if(typeof o=="number"){e.history.go(o);return}let f=Mt(d.location,d.matches,c,p.v7_prependBasename,o,p.v7_relativeSplatPath,u?.fromRouteId,u?.relative),{path:g,submission:E,error:C}=or(p.v7_normalizeFormMethod,!1,f,u),j=d.location,D=tt(d.location,g,u&&u.state);D=G({},D,e.history.encodeLocation(D));let S=u&&u.replace!=null?u.replace:void 0,P=re.Push;S===!0?P=re.Replace:S===!1||E!=null&&ge(E.formMethod)&&E.formAction===d.location.pathname+d.location.search&&(P=re.Replace);let _=u&&"preventScrollReset"in u?u.preventScrollReset===!0:void 0,N=(u&&u.flushSync)===!0,B=Jt({currentLocation:j,nextLocation:D,historyAction:P});if(B){st(B,{state:"blocked",location:D,proceed(){st(B,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),Bt(o,u)},reset(){let oe=new Map(d.blockers);oe.set(B,Qe),ue({blockers:oe})}});return}return await Ae(P,D,{submission:E,pendingError:C,preventScrollReset:_,replace:u&&u.replace,enableViewTransition:u&&u.viewTransition,flushSync:N})}function Ar(){if(bt(),ue({revalidation:"loading"}),d.navigation.state!=="submitting"){if(d.navigation.state==="idle"){Ae(d.historyAction,d.location,{startUninterruptedRevalidation:!0});return}Ae(Y||d.historyAction,d.navigation.location,{overrideNavigation:d.navigation,enableViewTransition:ae===!0})}}async function Ae(o,u,f){V&&V.abort(),V=null,Y=o,ye=(f&&f.startUninterruptedRevalidation)===!0,Wr(d.location,d.matches),Z=(f&&f.preventScrollReset)===!0,ae=(f&&f.enableViewTransition)===!0;let g=h||i,E=f&&f.overrideNavigation,C=f!=null&&f.initialHydration&&d.matches&&d.matches.length>0&&!Q?d.matches:Ne(g,u,c),j=(f&&f.flushSync)===!0;if(C&&d.initialized&&!Re&&zn(d.location,u)&&!(f&&f.submission&&ge(f.submission.formMethod))){ze(u,{matches:C},{flushSync:j});return}let D=ut(C,g,u.pathname);if(D.active&&D.matches&&(C=D.matches),!C){let{error:J,notFoundMatches:W,route:X}=Et(u.pathname);ze(u,{matches:W,loaderData:{},errors:{[X.id]:J}},{flushSync:j});return}V=new AbortController;let S=Ke(e.history,u,V.signal,f&&f.submission),P;if(f&&f.pendingError)P=[Fe(C).route.id,{type:K.error,error:f.pendingError}];else if(f&&f.submission&&ge(f.submission.formMethod)){let J=await Ur(S,u,f.submission,C,D.active,{replace:f.replace,flushSync:j});if(J.shortCircuited)return;if(J.pendingActionResult){let[W,X]=J.pendingActionResult;if(he(X)&&rt(X.error)&&X.error.status===404){V=null,ze(u,{matches:J.matches,loaderData:{},errors:{[W]:X.error}});return}}C=J.matches||C,P=J.pendingActionResult,E=St(u,f.submission),j=!1,D.active=!1,S=Ke(e.history,S.url,S.signal)}let{shortCircuited:_,matches:N,loaderData:B,errors:oe}=await Ir(S,u,C,D.active,E,f&&f.submission,f&&f.fetcherSubmission,f&&f.replace,f&&f.initialHydration===!0,j,P);_||(V=null,ze(u,G({matches:N||C},pr(P),{loaderData:B,errors:oe})))}async function Ur(o,u,f,g,E,C){C===void 0&&(C={}),bt();let j=Vn(u,f);if(ue({navigation:j},{flushSync:C.flushSync===!0}),E){let P=await ct(g,u.pathname,o.signal);if(P.type==="aborted")return{shortCircuited:!0};if(P.type==="error"){let _=Fe(P.partialMatches).route.id;return{matches:P.partialMatches,pendingActionResult:[_,{type:K.error,error:P.error}]}}else if(P.matches)g=P.matches;else{let{notFoundMatches:_,error:N,route:B}=Et(u.pathname);return{matches:_,pendingActionResult:[B.id,{type:K.error,error:N}]}}}let D,S=et(g,u);if(!S.route.action&&!S.route.lazy)D={type:K.error,error:fe(405,{method:o.method,pathname:u.pathname,routeId:S.route.id})};else if(D=(await Je("action",d,o,[S],g,null))[S.route.id],o.signal.aborted)return{shortCircuited:!0};if(He(D)){let P;return C&&C.replace!=null?P=C.replace:P=cr(D.response.headers.get("Location"),new URL(o.url),c,e.history)===d.location.pathname+d.location.search,await Ue(o,D,!0,{submission:f,replace:P}),{shortCircuited:!0}}if(Le(D))throw fe(400,{type:"defer-action"});if(he(D)){let P=Fe(g,S.route.id);return(C&&C.replace)!==!0&&(Y=re.Push),{matches:g,pendingActionResult:[P.route.id,D]}}return{matches:g,pendingActionResult:[S.route.id,D]}}async function Ir(o,u,f,g,E,C,j,D,S,P,_){let N=E||St(u,C),B=C||j||gr(N),oe=!ye&&(!p.v7_partialHydration||!S);if(g){if(oe){let q=zt(_);ue(G({navigation:N},q!==void 0?{actionData:q}:{}),{flushSync:P})}let $=await ct(f,u.pathname,o.signal);if($.type==="aborted")return{shortCircuited:!0};if($.type==="error"){let q=Fe($.partialMatches).route.id;return{matches:$.partialMatches,loaderData:{},errors:{[q]:$.error}}}else if($.matches)f=$.matches;else{let{error:q,notFoundMatches:$e,route:qe}=Et(u.pathname);return{matches:$e,loaderData:{},errors:{[qe.id]:q}}}}let J=h||i,[W,X]=lr(e.history,d,f,B,u,p.v7_partialHydration&&S===!0,p.v7_skipActionErrorRevalidation,Re,ve,we,U,L,y,J,c,_);if(Rt($=>!(f&&f.some(q=>q.route.id===$))||W&&W.some(q=>q.route.id===$)),Oe=++je,W.length===0&&X.length===0){let $=Kt();return ze(u,G({matches:f,loaderData:{},errors:_&&he(_[1])?{[_[0]]:_[1].error}:null},pr(_),$?{fetchers:new Map(d.fetchers)}:{}),{flushSync:P}),{shortCircuited:!0}}if(oe){let $={};if(!g){$.navigation=N;let q=zt(_);q!==void 0&&($.actionData=q)}X.length>0&&($.fetchers=Nr(X)),ue($,{flushSync:P})}X.forEach($=>{Ce($.key),$.controller&&ee.set($.key,$.controller)});let ke=()=>X.forEach($=>Ce($.key));V&&V.signal.addEventListener("abort",ke);let{loaderResults:Ge,fetcherResults:De}=await kt(d,f,W,X,o);if(o.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",ke),X.forEach($=>ee.delete($.key));let be=ht(Ge);if(be)return await Ue(o,be.result,!0,{replace:D}),{shortCircuited:!0};if(be=ht(De),be)return y.add(be.key),await Ue(o,be.result,!0,{replace:D}),{shortCircuited:!0};let{loaderData:wt,errors:Xe}=fr(d,f,Ge,_,X,De,H);H.forEach(($,q)=>{$.subscribe($e=>{($e||$.done)&&H.delete(q)})}),p.v7_partialHydration&&S&&d.errors&&(Xe=G({},d.errors,Xe));let Ie=Kt(),dt=Yt(Oe),ft=Ie||dt||X.length>0;return G({matches:f,loaderData:wt,errors:Xe},ft?{fetchers:new Map(d.fetchers)}:{})}function zt(o){if(o&&!he(o[1]))return{[o[0]]:o[1].data};if(d.actionData)return Object.keys(d.actionData).length===0?null:d.actionData}function Nr(o){return o.forEach(u=>{let f=d.fetchers.get(u.key),g=Ze(void 0,f?f.data:void 0);d.fetchers.set(u.key,g)}),new Map(d.fetchers)}function Fr(o,u,f,g){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.");Ce(o);let E=(g&&g.flushSync)===!0,C=h||i,j=Mt(d.location,d.matches,c,p.v7_prependBasename,f,p.v7_relativeSplatPath,u,g?.relative),D=Ne(C,j,c),S=ut(D,C,j);if(S.active&&S.matches&&(D=S.matches),!D){Pe(o,u,fe(404,{pathname:j}),{flushSync:E});return}let{path:P,submission:_,error:N}=or(p.v7_normalizeFormMethod,!0,j,g);if(N){Pe(o,u,N,{flushSync:E});return}let B=et(D,P),oe=(g&&g.preventScrollReset)===!0;if(_&&ge(_.formMethod)){Hr(o,u,P,B,D,S.active,E,oe,_);return}L.set(o,{routeId:u,path:P}),Br(o,u,P,B,D,S.active,E,oe,_)}async function Hr(o,u,f,g,E,C,j,D,S){bt(),L.delete(o);function P(te){if(!te.route.action&&!te.route.lazy){let We=fe(405,{method:S.formMethod,pathname:f,routeId:u});return Pe(o,u,We,{flushSync:j}),!0}return!1}if(!C&&P(g))return;let _=d.fetchers.get(o);_e(o,Jn(S,_),{flushSync:j});let N=new AbortController,B=Ke(e.history,f,N.signal,S);if(C){let te=await ct(E,new URL(B.url).pathname,B.signal,o);if(te.type==="aborted")return;if(te.type==="error"){Pe(o,u,te.error,{flushSync:j});return}else if(te.matches){if(E=te.matches,g=et(E,f),P(g))return}else{Pe(o,u,fe(404,{pathname:f}),{flushSync:j});return}}ee.set(o,N);let oe=je,W=(await Je("action",d,B,[g],E,o))[g.route.id];if(B.signal.aborted){ee.get(o)===N&&ee.delete(o);return}if(p.v7_fetcherPersist&&U.has(o)){if(He(W)||he(W)){_e(o,Me(void 0));return}}else{if(He(W))if(ee.delete(o),Oe>oe){_e(o,Me(void 0));return}else return y.add(o),_e(o,Ze(S)),Ue(B,W,!1,{fetcherSubmission:S,preventScrollReset:D});if(he(W)){Pe(o,u,W.error);return}}if(Le(W))throw fe(400,{type:"defer-action"});let X=d.navigation.location||d.location,ke=Ke(e.history,X,N.signal),Ge=h||i,De=d.navigation.state!=="idle"?Ne(Ge,d.navigation.location,c):d.matches;F(De,"Didn't find any matches after fetcher action");let be=++je;l.set(o,be);let wt=Ze(S,W.data);d.fetchers.set(o,wt);let[Xe,Ie]=lr(e.history,d,De,S,X,!1,p.v7_skipActionErrorRevalidation,Re,ve,we,U,L,y,Ge,c,[g.route.id,W]);Ie.filter(te=>te.key!==o).forEach(te=>{let We=te.key,qt=d.fetchers.get(We),Vr=Ze(void 0,qt?qt.data:void 0);d.fetchers.set(We,Vr),Ce(We),te.controller&&ee.set(We,te.controller)}),ue({fetchers:new Map(d.fetchers)});let dt=()=>Ie.forEach(te=>Ce(te.key));N.signal.addEventListener("abort",dt);let{loaderResults:ft,fetcherResults:$}=await kt(d,De,Xe,Ie,ke);if(N.signal.aborted)return;N.signal.removeEventListener("abort",dt),l.delete(o),ee.delete(o),Ie.forEach(te=>ee.delete(te.key));let q=ht(ft);if(q)return Ue(ke,q.result,!1,{preventScrollReset:D});if(q=ht($),q)return y.add(q.key),Ue(ke,q.result,!1,{preventScrollReset:D});let{loaderData:$e,errors:qe}=fr(d,De,ft,void 0,Ie,$,H);if(d.fetchers.has(o)){let te=Me(W.data);d.fetchers.set(o,te)}Yt(be),d.navigation.state==="loading"&&be>Oe?(F(Y,"Expected pending action"),V&&V.abort(),ze(d.navigation.location,{matches:De,loaderData:$e,errors:qe,fetchers:new Map(d.fetchers)})):(ue({errors:qe,loaderData:hr(d.loaderData,$e,De,qe),fetchers:new Map(d.fetchers)}),Re=!1)}async function Br(o,u,f,g,E,C,j,D,S){let P=d.fetchers.get(o);_e(o,Ze(S,P?P.data:void 0),{flushSync:j});let _=new AbortController,N=Ke(e.history,f,_.signal);if(C){let W=await ct(E,new URL(N.url).pathname,N.signal,o);if(W.type==="aborted")return;if(W.type==="error"){Pe(o,u,W.error,{flushSync:j});return}else if(W.matches)E=W.matches,g=et(E,f);else{Pe(o,u,fe(404,{pathname:f}),{flushSync:j});return}}ee.set(o,_);let B=je,J=(await Je("loader",d,N,[g],E,o))[g.route.id];if(Le(J)&&(J=await Ut(J,N.signal,!0)||J),ee.get(o)===_&&ee.delete(o),!N.signal.aborted){if(U.has(o)){_e(o,Me(void 0));return}if(He(J))if(Oe>B){_e(o,Me(void 0));return}else{y.add(o),await Ue(N,J,!1,{preventScrollReset:D});return}if(he(J)){Pe(o,u,J.error);return}F(!Le(J),"Unhandled fetcher deferred data"),_e(o,Me(J.data))}}async function Ue(o,u,f,g){let{submission:E,fetcherSubmission:C,preventScrollReset:j,replace:D}=g===void 0?{}:g;u.response.headers.has("X-Remix-Revalidate")&&(Re=!0);let S=u.response.headers.get("Location");F(S,"Expected a Location header on the redirect Response"),S=cr(S,new URL(o.url),c,e.history);let P=tt(d.location,S,{_isRedirect:!0});if(r){let W=!1;if(u.response.headers.has("X-Remix-Reload-Document"))W=!0;else if(At.test(S)){const X=e.history.createURL(S);W=X.origin!==t.location.origin||at(X.pathname,c)==null}if(W){D?t.location.replace(S):t.location.assign(S);return}}V=null;let _=D===!0||u.response.headers.has("X-Remix-Replace")?re.Replace:re.Push,{formMethod:N,formAction:B,formEncType:oe}=d.navigation;!E&&!C&&N&&B&&oe&&(E=gr(d.navigation));let J=E||C;if(Mn.has(u.response.status)&&J&&ge(J.formMethod))await Ae(_,P,{submission:G({},J,{formAction:S}),preventScrollReset:j||Z,enableViewTransition:f?ae:void 0});else{let W=St(P,E);await Ae(_,P,{overrideNavigation:W,fetcherSubmission:C,preventScrollReset:j||Z,enableViewTransition:f?ae:void 0})}}async function Je(o,u,f,g,E,C){let j,D={};try{j=await In(m,o,u,f,g,E,C,s,a)}catch(S){return g.forEach(P=>{D[P.route.id]={type:K.error,error:S}}),D}for(let[S,P]of Object.entries(j))if(kn(P)){let _=P.result;D[S]={type:K.redirect,response:Hn(_,f,S,E,c,p.v7_relativeSplatPath)}}else D[S]=await Fn(P);return D}async function kt(o,u,f,g,E){let C=o.matches,j=Je("loader",o,E,f,u,null),D=Promise.all(g.map(async _=>{if(_.matches&&_.match&&_.controller){let B=(await Je("loader",o,Ke(e.history,_.path,_.controller.signal),[_.match],_.matches,_.key))[_.match.route.id];return{[_.key]:B}}else return Promise.resolve({[_.key]:{type:K.error,error:fe(404,{pathname:_.path})}})})),S=await j,P=(await D).reduce((_,N)=>Object.assign(_,N),{});return await Promise.all([Kn(u,S,E.signal,C,o.loaderData),Yn(u,P,g)]),{loaderResults:S,fetcherResults:P}}function bt(){Re=!0,ve.push(...Rt()),L.forEach((o,u)=>{ee.has(u)&&we.add(u),Ce(u)})}function _e(o,u,f){f===void 0&&(f={}),d.fetchers.set(o,u),ue({fetchers:new Map(d.fetchers)},{flushSync:(f&&f.flushSync)===!0})}function Pe(o,u,f,g){g===void 0&&(g={});let E=Fe(d.matches,u);lt(o),ue({errors:{[E.route.id]:f},fetchers:new Map(d.fetchers)},{flushSync:(g&&g.flushSync)===!0})}function $t(o){return T.set(o,(T.get(o)||0)+1),U.has(o)&&U.delete(o),d.fetchers.get(o)||Ln}function lt(o){let u=d.fetchers.get(o);ee.has(o)&&!(u&&u.state==="loading"&&l.has(o))&&Ce(o),L.delete(o),l.delete(o),y.delete(o),p.v7_fetcherPersist&&U.delete(o),we.delete(o),d.fetchers.delete(o)}function zr(o){let u=(T.get(o)||0)-1;u<=0?(T.delete(o),U.add(o),p.v7_fetcherPersist||lt(o)):T.set(o,u),ue({fetchers:new Map(d.fetchers)})}function Ce(o){let u=ee.get(o);u&&(u.abort(),ee.delete(o))}function Wt(o){for(let u of o){let f=$t(u),g=Me(f.data);d.fetchers.set(u,g)}}function Kt(){let o=[],u=!1;for(let f of y){let g=d.fetchers.get(f);F(g,"Expected fetcher: "+f),g.state==="loading"&&(y.delete(f),o.push(f),u=!0)}return Wt(o),u}function Yt(o){let u=[];for(let[f,g]of l)if(g0}function kr(o,u){let f=d.blockers.get(o)||Qe;return z.get(o)!==u&&z.set(o,u),f}function Vt(o){d.blockers.delete(o),z.delete(o)}function st(o,u){let f=d.blockers.get(o)||Qe;F(f.state==="unblocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="blocked"||f.state==="blocked"&&u.state==="proceeding"||f.state==="blocked"&&u.state==="unblocked"||f.state==="proceeding"&&u.state==="unblocked","Invalid blocker state transition: "+f.state+" -> "+u.state);let g=new Map(d.blockers);g.set(o,u),ue({blockers:g})}function Jt(o){let{currentLocation:u,nextLocation:f,historyAction:g}=o;if(z.size===0)return;z.size>1&&Be(!1,"A router only supports one blocker at a time");let E=Array.from(z.entries()),[C,j]=E[E.length-1],D=d.blockers.get(C);if(!(D&&D.state==="proceeding")&&j({currentLocation:u,nextLocation:f,historyAction:g}))return C}function Et(o){let u=fe(404,{pathname:o}),f=h||i,{matches:g,route:E}=mr(f);return Rt(),{notFoundMatches:g,route:E,error:u}}function Rt(o){let u=[];return H.forEach((f,g)=>{(!o||o(g))&&(f.cancel(),u.push(g),H.delete(g))}),u}function $r(o,u,f){if(M=o,O=u,x=f||null,!k&&d.navigation===xt){k=!0;let g=Xt(d.location,d.matches);g!=null&&ue({restoreScrollPosition:g})}return()=>{M=null,O=null,x=null}}function Gt(o,u){return x&&x(o,u.map(g=>br(g,d.loaderData)))||o.key}function Wr(o,u){if(M&&O){let f=Gt(o,u);M[f]=O()}}function Xt(o,u){if(M){let f=Gt(o,u),g=M[f];if(typeof g=="number")return g}return null}function ut(o,u,f){if(v)if(o){if(Object.keys(o[0].params).length>0)return{active:!0,matches:pt(u,f,c,!0)}}else return{active:!0,matches:pt(u,f,c,!0)||[]};return{active:!1,matches:null}}async function ct(o,u,f,g){if(!v)return{type:"success",matches:o};let E=o;for(;;){let C=h==null,j=h||i,D=s;try{await v({signal:f,path:u,matches:E,fetcherKey:g,patch:(_,N)=>{f.aborted||ur(_,N,j,D,a)}})}catch(_){return{type:"error",error:_,partialMatches:E}}finally{C&&!f.aborted&&(i=[...i])}if(f.aborted)return{type:"aborted"};let S=Ne(j,u,c);if(S)return{type:"success",matches:S};let P=pt(j,u,c,!0);if(!P||E.length===P.length&&E.every((_,N)=>_.route.id===P[N].route.id))return{type:"success",matches:null};E=P}}function Kr(o){s={},h=mt(o,a,void 0,s)}function Yr(o,u){let f=h==null;ur(o,u,h||i,s,a),f&&(i=[...i],ue({}))}return Ee={get basename(){return c},get future(){return p},get state(){return d},get routes(){return i},get window(){return t},initialize:le,subscribe:Or,enableScrollRestoration:$r,navigate:Bt,fetch:Fr,revalidate:Ar,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:$t,deleteFetcher:zr,dispose:yt,getBlocker:kr,deleteBlocker:Vt,patchRoutes:Yr,_internalFetchControllers:ee,_internalActiveDeferreds:H,_internalSetRoutes:Kr},Ee}function jn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Mt(e,t,r,n,a,s,i,h){let c,m;if(i){c=[];for(let p of t)if(c.push(p),p.route.id===i){m=p;break}}else c=t,m=t[t.length-1];let v=Ot(a||".",jt(c,s),at(e.pathname,r)||e.pathname,h==="path");if(a==null&&(v.search=e.search,v.hash=e.hash),(a==null||a===""||a===".")&&m){let p=It(v.search);if(m.route.index&&!p)v.search=v.search?v.search.replace(/^\?/,"?index&"):"?index";else if(!m.route.index&&p){let b=new URLSearchParams(v.search),R=b.getAll("index");b.delete("index"),R.filter(x=>x).forEach(x=>b.append("index",x));let M=b.toString();v.search=M?"?"+M:""}}return n&&r!=="/"&&(v.pathname=v.pathname==="/"?r:xe([r,v.pathname])),nt(v)}function or(e,t,r,n){if(!n||!jn(n))return{path:r};if(n.formMethod&&!Wn(n.formMethod))return{path:r,error:fe(405,{method:n.formMethod})};let a=()=>({path:r,error:fe(400,{type:"invalid-body"})}),s=n.formMethod||"get",i=e?s.toUpperCase():s.toLowerCase(),h=_r(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ge(i))return a();let b=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((R,M)=>{let[x,O]=M;return""+R+x+"="+O+` `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:h,formEncType:n.formEncType,formData:void 0,json:void 0,text:b}}}else if(n.formEncType==="application/json"){if(!ge(i))return a();try{let b=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:h,formEncType:n.formEncType,formData:void 0,json:b,text:void 0}}}catch{return a()}}}F(typeof FormData=="function","FormData is not available in this environment");let c,m;if(n.formData)c=Tt(n.formData),m=n.formData;else if(n.body instanceof FormData)c=Tt(n.body),m=n.body;else if(n.body instanceof URLSearchParams)c=n.body,m=dr(c);else if(n.body==null)c=new URLSearchParams,m=new FormData;else try{c=new URLSearchParams(n.body),m=dr(c)}catch{return a()}let v={formMethod:i,formAction:h,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:m,json:void 0,text:void 0};if(ge(v.formMethod))return{path:r,submission:v};let p=Te(r);return t&&p.search&&It(p.search)&&c.append("index",""),p.search="?"+c,{path:nt(p),submission:v}}function ir(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 lr(e,t,r,n,a,s,i,h,c,m,v,p,b,R,M,x){let O=x?he(x[1])?x[1].error:x[1].data:void 0,k=e.createURL(t.location),I=e.createURL(a),Q=r;s&&t.errors?Q=ir(r,Object.keys(t.errors)[0],!0):x&&he(x[1])&&(Q=ir(r,x[0]));let ie=x?x[1].statusCode:void 0,ne=i&&ie&&ie>=400,Ee=Q.filter((Y,Z)=>{let{route:V}=Y;if(V.lazy)return!0;if(V.loader==null)return!1;if(s)return Lt(V,t.loaderData,t.errors);if(On(t.loaderData,t.matches[Z],Y)||c.some(de=>de===Y.route.id))return!0;let ae=t.matches[Z],ce=Y;return sr(Y,G({currentUrl:k,currentParams:ae.params,nextUrl:I,nextParams:ce.params},n,{actionResult:O,actionStatus:ie,defaultShouldRevalidate:ne?!1:h||k.pathname+k.search===I.pathname+I.search||k.search!==I.search||xr(ae,ce)}))}),d=[];return p.forEach((Y,Z)=>{if(s||!r.some(ye=>ye.route.id===Y.routeId)||v.has(Z))return;let V=Ne(R,Y.path,M);if(!V){d.push({key:Z,routeId:Y.routeId,path:Y.path,matches:null,match:null,controller:null});return}let ae=t.fetchers.get(Z),ce=et(V,Y.path),de=!1;b.has(Z)?de=!1:m.has(Z)?(m.delete(Z),de=!0):ae&&ae.state!=="idle"&&ae.data===void 0?de=h:de=sr(ce,G({currentUrl:k,currentParams:t.matches[t.matches.length-1].params,nextUrl:I,nextParams:r[r.length-1].params},n,{actionResult:O,actionStatus:ie,defaultShouldRevalidate:ne?!1:h})),de&&d.push({key:Z,routeId:Y.routeId,path:Y.path,matches:V,match:ce,controller:new AbortController})}),[Ee,d]}function Lt(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 On(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function xr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function sr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ur(e,t,r,n,a){var s;let i;if(e){let m=n[e];F(m,"No route found to patch children into: routeId = "+e),m.children||(m.children=[]),i=m.children}else i=r;let h=t.filter(m=>!i.some(v=>Sr(m,v))),c=mt(h,a,[e||"_","patch",String(((s=i)==null?void 0:s.length)||"0")],n);i.push(...c)}function Sr(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(s=>Sr(r,s))}):!1}async function An(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];F(a,"No route found in manifest");let s={};for(let i in n){let c=a[i]!==void 0&&i!=="hasErrorBoundary";Be(!c,'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.')),!c&&!tn.has(i)&&(s[i]=n[i])}Object.assign(a,s),Object.assign(a,G({},t(a),{lazy:void 0}))}async function Un(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,s,i)=>Object.assign(a,{[r[i].route.id]:s}),{})}async function In(e,t,r,n,a,s,i,h,c,m){let v=s.map(R=>R.route.lazy?An(R.route,c,h):void 0),p=s.map((R,M)=>{let x=v[M],O=a.some(I=>I.route.id===R.route.id);return G({},R,{shouldLoad:O,resolve:async I=>(I&&n.method==="GET"&&(R.route.lazy||R.route.loader)&&(O=!0),O?Nn(t,n,R,x,I,m):Promise.resolve({type:K.data,result:void 0}))})}),b=await e({matches:p,request:n,params:s[0].params,fetcherKey:i,context:m});try{await Promise.all(v)}catch{}return b}async function Nn(e,t,r,n,a,s){let i,h,c=m=>{let v,p=new Promise((M,x)=>v=x);h=()=>v(),t.signal.addEventListener("abort",h);let b=M=>typeof m!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):m({request:t,params:r.params,context:s},...M!==void 0?[M]:[]),R=(async()=>{try{return{type:"data",result:await(a?a(x=>b(x)):b())}}catch(M){return{type:"error",result:M}}})();return Promise.race([R,p])};try{let m=r.route[e];if(n)if(m){let v,[p]=await Promise.all([c(m).catch(b=>{v=b}),n]);if(v!==void 0)throw v;i=p}else if(await n,m=r.route[e],m)i=await c(m);else if(e==="action"){let v=new URL(t.url),p=v.pathname+v.search;throw fe(405,{method:t.method,pathname:p,routeId:r.route.id})}else return{type:K.data,result:void 0};else if(m)i=await c(m);else{let v=new URL(t.url),p=v.pathname+v.search;throw fe(404,{pathname:p})}F(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(m){return{type:K.error,result:m}}finally{h&&t.signal.removeEventListener("abort",h)}return i}async function Fn(e){let{result:t,type:r}=e;if(Cr(t)){let p;try{let b=t.headers.get("Content-Type");b&&/\bapplication\/json\b/.test(b)?t.body==null?p=null:p=await t.json():p=await t.text()}catch(b){return{type:K.error,error:b}}return r===K.error?{type:K.error,error:new Ct(t.status,t.statusText,p),statusCode:t.status,headers:t.headers}:{type:K.data,data:p,statusCode:t.status,headers:t.headers}}if(r===K.error){if(vr(t)){var n,a;if(t.data instanceof Error){var s,i;return{type:K.error,error:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:K.error,error:new Ct(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:rt(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:K.error,error:t,statusCode:rt(t)?t.status:void 0}}if($n(t)){var h,c;return{type:K.deferred,deferredData:t,statusCode:(h=t.init)==null?void 0:h.status,headers:((c=t.init)==null?void 0:c.headers)&&new Headers(t.init.headers)}}if(vr(t)){var m,v;return{type:K.data,data:t.data,statusCode:(m=t.init)==null?void 0:m.status,headers:(v=t.init)!=null&&v.headers?new Headers(t.init.headers):void 0}}return{type:K.data,data:t}}function Hn(e,t,r,n,a,s){let i=e.headers.get("Location");if(F(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!At.test(i)){let h=n.slice(0,n.findIndex(c=>c.route.id===r)+1);i=Mt(new URL(t.url),h,a,!0,i,s),e.headers.set("Location",i)}return e}function cr(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(At.test(e)){let s=e,i=s.startsWith("//")?new URL(t.protocol+s):new URL(s);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let h=at(i.pathname,r)!=null;if(i.origin===t.origin&&h)return i.pathname+i.search+i.hash}try{let s=n.createURL(e);if(a.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ke(e,t,r,n){let a=e.createURL(_r(t)).toString(),s={signal:r};if(n&&ge(n.formMethod)){let{formMethod:i,formEncType:h}=n;s.method=i.toUpperCase(),h==="application/json"?(s.headers=new Headers({"Content-Type":h}),s.body=JSON.stringify(n.json)):h==="text/plain"?s.body=n.text:h==="application/x-www-form-urlencoded"&&n.formData?s.body=Tt(n.formData):s.body=n.formData}return new Request(a,s)}function Tt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function dr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Bn(e,t,r,n,a){let s={},i=null,h,c=!1,m={},v=r&&he(r[1])?r[1].error:void 0;return e.forEach(p=>{if(!(p.route.id in t))return;let b=p.route.id,R=t[b];if(F(!He(R),"Cannot handle redirect results in processLoaderData"),he(R)){let M=R.error;v!==void 0&&(M=v,v=void 0),i=i||{};{let x=Fe(e,b);i[x.route.id]==null&&(i[x.route.id]=M)}s[b]=void 0,c||(c=!0,h=rt(R.error)?R.error.status:500),R.headers&&(m[b]=R.headers)}else Le(R)?(n.set(b,R.deferredData),s[b]=R.deferredData.data,R.statusCode!=null&&R.statusCode!==200&&!c&&(h=R.statusCode),R.headers&&(m[b]=R.headers)):(s[b]=R.data,R.statusCode&&R.statusCode!==200&&!c&&(h=R.statusCode),R.headers&&(m[b]=R.headers))}),v!==void 0&&r&&(i={[r[0]]:v},s[r[0]]=void 0),{loaderData:s,errors:i,statusCode:h||200,loaderHeaders:m}}function fr(e,t,r,n,a,s,i){let{loaderData:h,errors:c}=Bn(t,r,n,i);return a.forEach(m=>{let{key:v,match:p,controller:b}=m,R=s[v];if(F(R,"Did not find corresponding fetcher result"),!(b&&b.signal.aborted))if(he(R)){let M=Fe(e.matches,p?.route.id);c&&c[M.route.id]||(c=G({},c,{[M.route.id]:R.error})),e.fetchers.delete(v)}else if(He(R))F(!1,"Unhandled fetcher revalidation redirect");else if(Le(R))F(!1,"Unhandled fetcher deferred data");else{let M=Me(R.data);e.fetchers.set(v,M)}}),{loaderData:h,errors:c}}function hr(e,t,r,n){let a=G({},t);for(let s of r){let i=s.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&s.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function pr(e){return e?he(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fe(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 mr(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 fe(e,t){let{pathname:r,routeId:n,method:a,type:s,message:i}=t===void 0?{}:t,h="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(h="Bad Request",a&&r&&n?c="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.":s==="defer-action"?c="defer() is not supported in actions":s==="invalid-body"&&(c="Unable to encode submission body")):e===403?(h="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):e===404?(h="Not Found",c='No route matches URL "'+r+'"'):e===405&&(h="Method Not Allowed",a&&r&&n?c="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&&(c='Invalid request method "'+a.toUpperCase()+'"')),new Ct(e||500,h,new Error(c),!0)}function ht(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(He(a))return{key:n,result:a}}}function _r(e){let t=typeof e=="string"?Te(e):e;return nt(G({},t,{hash:""}))}function zn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function kn(e){return Cr(e.result)&&Cn.has(e.result.status)}function Le(e){return e.type===K.deferred}function he(e){return e.type===K.error}function He(e){return(e&&e.type)===K.redirect}function vr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function $n(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 Cr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Wn(e){return _n.has(e.toLowerCase())}function ge(e){return xn.has(e.toLowerCase())}async function Kn(e,t,r,n,a){let s=Object.entries(t);for(let i=0;ib?.route.id===h);if(!m)continue;let v=n.find(b=>b.route.id===m.route.id),p=v!=null&&!xr(v,m)&&(a&&a[m.route.id])!==void 0;Le(c)&&p&&await Ut(c,r,!1).then(b=>{b&&(t[h]=b)})}}async function Yn(e,t,r){for(let n=0;nm?.route.id===s)&&Le(h)&&(F(i,"Expected an AbortController for revalidating fetcher deferred result"),await Ut(h,i.signal,!0).then(m=>{m&&(t[a]=m)}))}}async function Ut(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:K.data,data:e.deferredData.unwrappedData}}catch(a){return{type:K.error,error:a}}return{type:K.data,data:e.deferredData.data}}}function It(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function et(e,t){let r=typeof t=="string"?Te(t).search:t.search;if(e[e.length-1].route.index&&It(r||""))return e[e.length-1];let n=wr(e);return n[n.length-1]}function gr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:s,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(s!=null)return{formMethod:t,formAction:r,formEncType:n,formData:s,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 St(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 Vn(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 Ze(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 Jn(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 Gn(e,t){try{let r=e.sessionStorage.getItem(Dr);if(r){let n=JSON.parse(r);for(let[a,s]of Object.entries(n||{}))s&&Array.isArray(s)&&t.set(a,new Set(s||[]))}}catch{}}function Xn(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Dr,JSON.stringify(r))}catch(n){Be(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/** * React Router v6.30.3 * * 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 vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{h.current=!0}),w.useCallback(function(m,v){if(v===void 0&&(v={}),!h.current)return;if(typeof m=="number"){n.go(m);return}let p=Ot(m,JSON.parse(i),s,v.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:xe([t,p.pathname])),(v.replace?n.replace:n.push)(p,v.state,v)},[t,n,i,s,e])}const Tr=w.createContext(null);function xa(){return w.useContext(Tr)}function Zn(e){let t=w.useContext(Se).outlet;return t&&w.createElement(Tr.Provider,{value:e},t)}function Sa(){let{matches:e}=w.useContext(Se),t=e[e.length-1];return t?t.params:{}}function ea(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=w.useContext(Ye),{matches:a}=w.useContext(Se),{pathname:s}=Ht(),i=JSON.stringify(jt(a,n.v7_relativeSplatPath));return w.useMemo(()=>Ot(e,JSON.parse(i),s,r==="path"),[e,i,s,r])}function _a(e,t,r,n){ot()||F(!1);let{navigator:a}=w.useContext(Ye),{matches:s}=w.useContext(Se),i=s[s.length-1],h=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let m=Ht(),v;v=m;let p=v.pathname||"/",b=p;if(c!=="/"){let x=c.replace(/^\//,"").split("/");b="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let R=Ne(e,{pathname:b});return oa(R&&R.map(x=>Object.assign({},x,{params:Object.assign({},h,x.params),pathname:xe([c,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:xe([c,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,r,n)}function ta(){let e=sa(),t=rt(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 w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),r?w.createElement("pre",{style:a},r):null,null)}const ra=w.createElement(ta,null);class na extends w.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?w.createElement(Se.Provider,{value:this.props.routeContext},w.createElement(Mr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function aa(e){let{routeContext:t,match:r,children:n}=e,a=w.useContext(Nt);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),w.createElement(Se.Provider,{value:t},n)}function oa(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var s;if(!r)return null;if(r.errors)e=r.matches;else if((s=n)!=null&&s.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,h=(a=r)==null?void 0:a.errors;if(h!=null){let v=i.findIndex(p=>p.route.id&&h?.[p.route.id]!==void 0);v>=0||F(!1),i=i.slice(0,Math.min(i.length,v+1))}let c=!1,m=-1;if(r&&n&&n.v7_partialHydration)for(let v=0;v=0?i=i.slice(0,m+1):i=[i[0]];break}}}return i.reduceRight((v,p,b)=>{let R,M=!1,x=null,O=null;r&&(R=h&&p.route.id?h[p.route.id]:void 0,x=p.route.errorElement||ra,c&&(m<0&&b===0?(da("route-fallback"),M=!0,O=null):m===b&&(M=!0,O=p.route.hydrateFallbackElement||null)));let k=t.concat(i.slice(0,b+1)),I=()=>{let Q;return R?Q=x:M?Q=O:p.route.Component?Q=w.createElement(p.route.Component,null):p.route.element?Q=p.route.element:Q=v,w.createElement(aa,{match:p,routeContext:{outlet:v,matches:k,isDataRoute:r!=null},children:Q})};return r&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?w.createElement(na,{location:r.location,revalidation:r.revalidation,component:x,error:R,children:I(),routeContext:{outlet:null,matches:k,isDataRoute:!0}}):I()},null)}var jr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(jr||{}),me=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}(me||{});function ia(e){let t=w.useContext(Nt);return t||F(!1),t}function Ve(e){let t=w.useContext(qn);return t||F(!1),t}function la(e){let t=w.useContext(Se);return t||F(!1),t}function it(e){let t=la(),r=t.matches[t.matches.length-1];return r.route.id||F(!1),r.route.id}function Ca(){return it(me.UseRouteId)}function Ma(){return Ve(me.UseNavigation).navigation}function La(){let{matches:e,loaderData:t}=Ve(me.UseMatches);return w.useMemo(()=>e.map(r=>br(r,t)),[e,t])}function Ta(){let e=Ve(me.UseLoaderData),t=it(me.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")");return}return e.loaderData[t]}function ja(e){return Ve(me.UseRouteLoaderData).loaderData[e]}function Oa(){let e=Ve(me.UseActionData),t=it(me.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function sa(){var e;let t=w.useContext(Mr),r=Ve(me.UseRouteError),n=it(me.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function ua(){let e=w.useContext(gt);return e?._data}function Aa(){let e=w.useContext(gt);return e?._error}function ca(){let{router:e}=ia(jr.UseNavigateStable),t=it(me.UseNavigateStable),r=w.useRef(!1);return Lr(()=>{r.current=!0}),w.useCallback(function(a,s){s===void 0&&(s={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,vt({fromRouteId:t},s)))},[e,t])}const yr={};function da(e,t,r){yr[e]||(yr[e]=!0)}function Ua(e,t){e?.v7_startTransition,e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function Ia(e){return Zn(e.context)}function Na(e){let{basename:t="/",children:r=null,location:n,navigationType:a=re.Pop,navigator:s,static:i=!1,future:h}=e;ot()&&F(!1);let c=t.replace(/^\/*/,"/"),m=w.useMemo(()=>({basename:c,navigator:s,static:i,future:vt({v7_relativeSplatPath:!1},h)}),[c,h,s,i]);typeof n=="string"&&(n=Te(n));let{pathname:v="/",search:p="",hash:b="",state:R=null,key:M="default"}=n,x=w.useMemo(()=>{let O=at(v,c);return O==null?null:{location:{pathname:O,search:p,hash:b,state:R,key:M},navigationType:a}},[c,v,p,b,R,M,a]);return x==null?null:w.createElement(Ye.Provider,{value:m},w.createElement(Ft.Provider,{children:r,value:x}))}function Fa(e){let{children:t,errorElement:r,resolve:n}=e;return w.createElement(ha,{resolve:n,errorElement:r},w.createElement(pa,null,t))}var pe=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(pe||{});const fa=new Promise(()=>{});class ha extends w.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,s=pe.pending;if(!(n instanceof Promise))s=pe.success,a=Promise.resolve(),Object.defineProperty(a,"_tracked",{get:()=>!0}),Object.defineProperty(a,"_data",{get:()=>n});else if(this.state.error){s=pe.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,s="_error"in a?pe.error:"_data"in a?pe.success:pe.pending):(s=pe.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(s===pe.error&&a._error instanceof _t)throw fa;if(s===pe.error&&!r)throw a._error;if(s===pe.error)return w.createElement(gt.Provider,{value:a,children:r});if(s===pe.success)return w.createElement(gt.Provider,{value:a,children:t});throw a}}function pa(e){let{children:t}=e,r=ua(),n=typeof t=="function"?t(r):t;return w.createElement(w.Fragment,null,n)}function Ha(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:w.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:w.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:w.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}export{ga as $,_t as A,Ra as B,sa as C,Nt as D,Ct as E,Ne as F,Fa as G,Aa as H,Ln as I,ja as J,Ta as K,Oa as L,va as M,Ye as N,Ia as O,ma as P,wa as Q,Na as R,ya as S,Ha as T,Ht as a,xa as b,Ma as c,Sa as d,Qr as e,qr as f,Gr as g,qn as h,_a as i,Se as j,F as k,Ua as l,Ca as m,Pa as n,ea as o,La as p,nt as q,w as r,at as s,nr as t,Da as u,xe as v,Te as w,Ea as x,rt as y,ba as z}; //# sourceMappingURL=index-DwaoyV61.js.map //# debugId=9b7eb892-46ef-5d94-9efd-f70903420172