vendor: 4,895 bytes, line 1
1import{e as _a,b as Me,i as I,o as za,q as Fa,t as wt,E as bt,u as mr,v as it,P as Br,x as yr,w as me,d as ot,a as Wt,s as Dt,y as Vt,z as Na,B as Ve,C as Yt,D as Ua,F as Jt,G as ja,H as Wr,I as Ia,J as Aa,K as ka,L as Ha,r as p,M as $a,j as Et,p as Ba,N as Wa}from"./utils-Bz76n4nO.js";var zt={exports:{}},Xe={};var vr;function Va(){if(vr)return Xe;vr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(a,i,o){var u=null;if(o!==void 0&&(u=""+o),i.key!==void 0&&(u=""+i.key),"key"in i){o={};for(var d in i)d!=="key"&&(o[d]=i[d])}else o=i;return i=o.ref,{$$typeof:e,type:a,key:u,ref:i!==void 0?i:null,props:o}}return Xe.Fragment=t,Xe.jsx=r,Xe.jsxs=r,Xe}var pr;function Ya(){return pr||(pr=1,zt.exports=Va()),zt.exports}var ho=Ya(),Ft={exports:{}},Z={};var gr;function Ja(){if(gr)return Z;gr=1;var e=_a();function t(f){var l="https://react.dev/errors/"+f;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)l+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+f+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal"),o=Symbol.for("react.recoverable"),u=Symbol.for("react.optimistic_key");function d(f,l,g){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:w==null?null:w===u?u:""+w,children:f,containerInfo:l,implementation:g}}var y=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(f,l){if(f==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return Z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Z.browser=function(f){return{$$typeof:o,_reason:f}},Z.createPortal=function(f,l){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return d(f,l,null,g)},Z.flushSync=function(f){var l=y.T,g=a.p;try{if(y.T=null,a.p=2,f)return f()}finally{y.T=l,a.p=g,a.d.f()}},Z.preconnect=function(f,l){typeof f=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,a.d.C(f,l))},Z.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},Z.preinit=function(f,l){if(typeof f=="string"&&l&&typeof l.as=="string"){var g=l.as,w=h(g,l.crossOrigin),b=typeof l.integrity=="string"?l.integrity:void 0,T=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;g==="style"?a.d.S(f,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:w,integrity:b,fetchPriority:T}):g==="script"&&a.d.X(f,{crossOrigin:w,integrity:b,fetchPriority:T,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},Z.preinitModule=function(f,l){if(typeof f=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var g=h(l.as,l.crossOrigin);a.d.M(f,{crossOrigin:g,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0})}}else l==null&&a.d.M(f)},Z.preload=function(f,l){if(typeof f=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var g=l.as,w=h(g,l.crossOrigin);a.d.L(f,g,{crossOrigin:w,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},Z.preloadModule=function(f,l){if(typeof f=="string")if(l){var g=h(l.as,l.crossOrigin);a.d.m(f,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:g,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0})}else a.d.m(f)},Z.requestFormReset=function(f){a.d.r(f)},Z.unstable_batchedUpdates=function(f,l){return f(l)},Z.useFormState=function(f,l,g){return y.H.useFormState(f,l,g)},Z.useFormStatus=function(){return y.H.useHostTransitionStatus()},Z.version="19.3.0",Z}var Rr;function Ga(){if(Rr)return Ft.exports;Rr=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ft.exports=Ja(),Ft.exports}var mo=Ga();const Vr=Symbol("Uninstrumented");let et=new WeakMap;function Ka(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(i=>
1i({id:t.id,index:t.index,path:t.path,instrument(o){o.lazy!=null&&r.lazy.push(o.lazy),o["lazy.loader"]!=null&&r["lazy.loader"].push(o["lazy.loader"]),o["lazy.action"]!=null&&r["lazy.action"].push(o["lazy.action"]),o["lazy.middleware"]!=null&&r["lazy.middleware"].push(o["lazy.middleware"]),o.middleware!=null&&r.middleware.push(o.middleware),o.loader!=null&&r.loader.push(o.loader),o.action!=null&&r.action.push(o.action)}}));let a={};if(typeof t.lazy=="function"&&r.lazy.length>0){let i=t.lazy;a.lazy=async(...o)=>Pe(await ge(r.lazy,void 0,()=>i(...o),Ce))}if(typeof t.lazy=="object"){let i=t.lazy;if(typeof i.middleware=="function"&&r["lazy.middleware"].length>0){let o=i.middleware;a.lazy=Object.assign(a.lazy||{},{middleware:async(...u)=>Pe(await ge(r["lazy.middleware"],void 0,()=>o(...u),Ce))})}if(typeof i.loader=="function"&&r["lazy.loader"].length>0){let o=i.loader;a.lazy=Object.assign(a.lazy||{},{loader:async(...u)=>Pe(await ge(r["lazy.loader"],void 0,()=>o(...u),Ce))})}if(typeof i.action=="function"&&r["lazy.action"].length>0){let o=i.action;a.lazy=Object.assign(a.lazy||{},{action:async(...u)=>Pe(await ge(r["lazy.action"],void 0,()=>o(...u),Ce))})}}if(typeof t.loader=="function"&&r.loader.length>0){let i=tt(t.loader),o=async(...u)=>Pe(await ge(r.loader,Nt(u[0]),()=>i(...u),Ce));i.hydrate===!0&&(o.hydrate=!0),rt(o,i),a.loader=o}if(typeof t.action=="function"&&r.action.length>0){let i=tt(t.action),o=async(...u)=>Pe(await ge(r.action,Nt(u[0]),()=>i(...u),Ce));rt(o,i),a.action=o}return t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(a.middleware=t.middleware.map(i=>{let o=tt(i),u=async(...d)=>Pe(await ge(r.middleware,Nt(d[0]),()=>o(...d),Ce));return rt(u,o),u})),a}function qa(e,t){let r={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(i){i.navigate!=null&&r.navigate.push(i.navigate),i.fetch!=null&&r.fetch.push(i.fetch)}})),r.navigate.length>0){let a=tt(e.navigate),i=async(...o)=>{let[u,d]=o,y,h={to:typeof u=="number"||typeof u=="string"?u:u?Me(u):".",...br(e,d??{})};return Pe(await ge(r.navigate,h,async()=>{if(typeof u=="number")return await a(...o);let f=wr(e,l=>{y=l});try{return await a(...o)}finally{f()}},f=>({...Ce(f),meta:y})))};rt(i,a),e.navigate=i}if(r.fetch.length>0){let a=tt(e.fetch),i=async(...o)=>{let[u,d,y,h]=o,f;return Pe(await ge(r.fetch,{href:y??".",fetcherKey:u,...br(e,h??{})},async()=>{let l=wr(e,g=>{f=g});try{return await a(...o)}finally{l()}},l=>({...Ce(l),meta:f})))};rt(i,a),e.fetch=i}return e}function tt(e){return e[Vr]??e}function rt(e,t){e[Vr]=t}function wr(e,t){return et.set(e,t),()=>{et.get(e)===t&&et.delete(e)}}function Er(e){let t=et.get(e);return et.delete(e),t}function Pe(e){if(e.type==="error")throw e.value;return e.value}async function ge(e,t,r,a,i={result:null,innerResult:null},o=e.length-1){let u=e[o];if(u){let d,y=async()=>(d?console.error("You cannot call instrumented handlers more than once"):d=ge(e,t,r,a,i,o-1),await d,I(i.innerResult,"Expected an inner result"),i.innerResult);try{await u(y,t)}catch(h){console.error("An instrumentation function threw an error:",h)}d||await y(),await d}else{try{i.result={type:"success",value:await r()}}catch(d){i.result={type:"error",value:d}}i.innerResult=a(i.result,t)}return i.result||(i.result={type:"error",value:new Error("No result assigned in instrumentation chain.")},i.innerResult=a(i.result,t)),i.result}function Ce(e){return e.type==="error"&&e.value instanceof Error?{status:"error",error:e.value}:{status:"success",error:void 0}}function Nt(e){let{request:t,context:r,params:a}=e;return{...e,request:Xa(t),params:{...a},context:Qa(r)}}function br(e,t){return{currentUrl:Me(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Xa(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Qa(e){return{get:t=>e.get(t)}}var Za=class{#t=[];#e=[];#r;constructor(e){this.#r=e}update(e){this.#t=e,this.#e=za(e)}match(e,t=!1){return Fa(this.#t,e,this.#r,t,this.#e)}};let en;function tn(){return en}const Dr=new URL("http://localhost");function Yr(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Dr)}catch{return Dr}}function Ut(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function rn(e,t){if(e.startsWith("//"))return!0;let r=t.protocol.toLowerCase();return e.toLowerCase().startsWith(r)?t.host===""||e.slice(r.length).startsWith("//"):!1}function at(e,t,r,a){let i=null;try{i=e==null?null:new URL(e,r)}catch{}let o=new URL(t,r),u=i!=null&&!Ut(i,r),d=!Ut(o,r);if(a==="reject"){if(u||d)throw new Error("External navigation is not allowed")}else if(d&&(i==null||!rn(e,i)||!Ut(i,o)))throw new Error("External navigation is not allowed")}const Jr=["POST","PUT","PATCH","DELETE"],an=new Set(Jr),nn=["GET",...Jr],on=new Set(nn),Gr=new Set([301,302,303,307,308]),ln=new Set([307,308]),jt={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sn={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},Kr="remix-router-transitions",qr=Symbol("ResetLoaderData");function un(e,t){if(e.unstable_routePatternMatching){let r=tn();return I(r,'You must call unstable_preloadRoutePattern() from "react-router/route-pattern" before enabling future.unstable_routePatternMatching.'),new r(t)}return new Za(t)}var cn=class{#t;#e;#r;constructor(t,r){this.#t=t,this.#r=r,this.#r.update(t)}get stableRoutes(){return this.#t}get activeRoutes(){return this.#e??this.#t}get hasHMRRoutes(){return this.#e!=null}setRoutes(t){this.#t=t,this.#e||this.#r.update(t)}setHmrRoutes(t){this.#e=t,this.#r.update(t)}commitHmrRoutes(){this.#e&&(this.#t=this.#e,this.#e=void 0,this.#r.update(this.#t))}};function vo(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";I(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],i=e.mapRouteProperties,o=i||(()=>({}));if(e.instrumentations){let n=e.instrumentations;o=s=>({...i?.(s),...Ka(n.map(c=>
1c.route).filter(Boolean),s)})}let u={...e.future},d=e.basename||"/";d.startsWith("/")||(d=`/${d}`);let y=un(u,d),h={},f=new cn(wt(e.routes,o,void 0,h),y),l=e.dataStrategy||yn,g=null,w=new Set,b=null,T=null,N=null,H=null,B=e.hydrationData!=null,$=y.match(e.history.location),de=!1,fe=null,G,ne;if($==null&&!e.patchRoutesOnNavigation){let n=ce(404,{pathname:e.history.location.pathname}),{matches:s,route:c}=pt(f.activeRoutes);G=!0,ne=!G,$=s,fe={[c.id]:n}}else if($&&!e.hydrationData&&dt($,e.history.location.pathname).active&&($=null),$)if($.some(n=>n.route.lazy))G=!1,ne=!G;else if(!$.some(n=>Gt(n.route)))G=!0,ne=!G;else{let n=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null,c=$;if(s){let v=$.findIndex(R=>s[R.route.id]!==void 0);c=c.slice(0,v+1)}ne=!1,G=!0,c.forEach(v=>{let R=Xr(v.route,n,s);ne=ne||R.renderFallback,G=G&&!R.shouldLoad})}else{G=!1,ne=!G,$=[];let n=dt(null,e.history.location.pathname);n.active&&n.matches&&(de=!0,$=n.matches)}let le,m={historyAction:e.history.action,location:e.history.location,matches:$,initialized:G,renderFallback:ne,navigation:jt,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||fe,fetchers:new Map,blockers:new Map},ae="POP",O=null,X=!1,C,A=!1,W=new Map,ee=null,F=!1,K=!1,Re=new Set,V=new Map,ye=0,se=-1,he=new Map,we=new Set,je=new Map,Ge=new Map,ve=new Set,Oe=new Map,ut,Ke=null;function ha(){if(g=e.history.listen(({action:n,location:s,delta:c})=>{if(ut){ut(),ut=void 0;return}me(Oe.size===0||c!=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 v=ur({currentLocation:m.location,nextLocation:s,historyAction:n});if(v&&c!=null){let R=new Promise(x=>{ut=x});e.history.go(c*-1),ct(v,{state:"blocked",location:s,proceed(){ct(v,{state:"proceeding",proceed:void 0,reset:void 0,location:s}),R.then(()=>e.history.go(c))},reset(){let x=new Map(m.blockers);x.set(v,Qe),te({blockers:x})}}),O?.resolve(),O=null;return}return _e(n,s)}),r){Fn(t,W);let n=()=>Nn(t,W);t.addEventListener("pagehide",n),ee=()=>t.removeEventListener("pagehide",n)}return m.initialized||_e("POP",m.location,{initialHydration:!0}),le}function ma(){g&&g(),ee&&ee(),w.clear(),C&&C.abort(),m.fetchers.forEach((n,s)=>Tt(m.fetchers,s)),m.blockers.forEach((n,s)=>sr(s))}function ya(n){if(w.add(n),b){let{newErrors:s}=b;b=null,n(m,{deletedFetchers:[],newErrors:s,viewTransitionOpts:void 0,flushSync:!1})}return()=>w.delete(n)}function te(n,s={}){n.matches&&(n.matches=n.matches.map(R=>{let x=h[R.route.id],P=R.route;return P.element!==x.element||P.errorElement!==x.errorElement||P.hydrateFallbackElement!==x.hydrateFallbackElement?{...R,route:x}:R})),m={...m,...n};let c=[],v=[];m.fetchers.forEach((R,x)=>{R.state==="idle"&&(ve.has(x)?c.push(x):v.push(x))}),ve.forEach(R=>{!m.fetchers.has(R)&&!V.has(R)&&c.push(R)}),w.size===0&&(b={newErrors:n.errors??null}),[...w].forEach(R=>R(m,{deletedFetchers:c,newErrors:n.errors??null,viewTransitionOpts:s.viewTransitionOpts,flushSync:s.flushSync===!0})),c.forEach(R=>Tt(m.fetchers,R)),v.forEach(R=>m.fetchers.delete(R))}function Ie(n,s,{flushSync:c}={}){let v=m.actionData!=null&&m.navigation.formMethod!=null&&re(m.navigation.formMethod)&&m.navigation.state==="loading"&&n.state?._isRedirect!==!0,R;s.actionData?Object.keys(s.actionData).length>0?R=s.actionData:R=null:v?R=m.actionData:R=null;let x=s.loaderData?zr(m.loaderData,s.loaderData,s.matches||[],s.errors):m.loaderData,P=m.blockers;P.size>0&&!F&&(P=new Map(P),P.forEach((M,L)=>P.set(L,Qe)));let E=F?!1:dr(n,s.matches||m.matches),D=X===!0||m.navigation.formMethod!=null&&re(m.navigation.formMethod)&&n.state?._isRedirect!==!0;f.commitHmrRoutes(),F||ae==="POP"||(ae==="PUSH"?e.history.push(n,n.state):ae==="REPLACE"&&e.history.replace(n,n.state));let S;if(ae==="POP"&&!F&&n!==m.location){let M=W.get(m.location.pathname);M&&M.has(n.pathname)?S={currentLocation:m.location,nextLocation:n}:W.has(n.pathname)&&(S={currentLocation:n,nextLocation:m.location})}else if(A){let M=W.get(m.location.pathname);M?M.add(n.pathname):(M=new Set([n.pathname]),W.set(m.location.pathname,M)),S={currentLocation:m.location,nextLocation:n}}te({...s,actionData:R,loaderData:x,historyAction:ae,location:n,initialized:!0,renderFallback:!1,navigation:jt,revalidation:"idle",restoreScrollPosition:E,preventScrollReset:D,blockers:P},{viewTransitionOpts:S,flushSync:c===!0}),ae="POP",X=!1,A=!1,F=!1,K=!1,O?.resolve(),O=null,Ke?.resolve(),Ke=null}
1async function rr(n,s){if(O?.resolve(),O=null,typeof n=="number"){O||(O=Ir());let j=O.promise;return e.history.go(n),j}let c=Er(le),{path:v,submission:R,error:x}=xr(!1,kt(m.location,m.matches,d,n,s?.fromRouteId,s?.relative),s),P;if(s?.mask){let j=typeof s.mask=="string"?it(s.mask):{...m.location.mask,...s.mask};if(P={pathname:j.pathname??"",search:j.search??"",hash:j.hash??""},Br.test(P.pathname))throw new Error("External navigation is not allowed");P.pathname.startsWith("\\")&&(P.pathname=P.pathname.replace(/^\\+/,"/")),at(typeof s.mask=="string"?s.mask:Me(s.mask),Me(P),e.history.createURL("/"),"reject")}let E=m.location,D=yr(E,v,s&&s.state,void 0,P);D={...D,...e.history.encodeLocation(D)},at(n==null?e.history.createHref(m.location):typeof n=="string"?n:Me(n),e.history.createHref(D.mask||D),e.history.createURL("/"),"reject");let S=s&&s.replace!=null?s.replace:void 0,M="PUSH";S===!0?M="REPLACE":S===!1||R!=null&&re(R.formMethod)&&R.formAction===m.location.pathname+m.location.search&&(M="REPLACE");let L=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,_=(s&&s.flushSync)===!0,J=ur({currentLocation:E,nextLocation:D,historyAction:M});if(J){ct(J,{state:"blocked",location:D,proceed(){ct(J,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),rr(n,s)},reset(){let j=new Map(m.blockers);j.set(J,Qe),te({blockers:j})}});return}await _e(M,D,{submission:R,pendingError:x,preventScrollReset:L,replace:s&&s.replace,enableViewTransition:s&&s.viewTransition,flushSync:_,callSiteDefaultShouldRevalidate:s&&s.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:c})}function va(){Ke||(Ke=Ir()),St(),te({revalidation:"loading"});let n=Ke.promise;return m.navigation.state==="submitting"?n:m.navigation.state==="idle"?(_e(m.historyAction,m.location,{startUninterruptedRevalidation:!0}),n):(_e(ae||m.historyAction,m.navigation.location,{overrideNavigation:m.navigation,enableViewTransition:A===!0}),n)}async function _e(n,s,c){C&&C.abort(),C=null,ae=n,F=(c&&c.startUninterruptedRevalidation)===!0,La(m.location,m.matches),X=(c&&c.preventScrollReset)===!0,A=(c&&c.enableViewTransition)===!0;let v=c?.initialHydration&&m.matches&&m.matches.length>0&&!de?m.matches:y.match(s),R=(c&&c.flushSync)===!0;if(v&&m.initialized&&!K&&xn(m.location,s)&&!(c&&c.submission&&re(c.submission.formMethod))){Ie(s,{matches:v},{flushSync:R});return}let x=dt(v,s.pathname);if(x.active&&x.matches&&(v=x.matches),c?.instrumentationNavigateMetaReceiver){let k=Ur(e.history,s,v);c.instrumentationNavigateMetaReceiver(k)}if(!v){let{error:k,notFoundMatches:U,route:Q}=Ot(s.pathname);Ie(s,{matches:U,loaderData:{},errors:{[Q.id]:k}},{flushSync:R});return}let P=c&&c.overrideNavigation?{...c.overrideNavigation,matches:v,historyAction:n}:void 0;C=new AbortController;let E=Be(e.history,s,C.signal,c&&c.submission),D=e.getContext?await e.getContext():new mr,S;if(c&&c.pendingError)S=[Se(v).route.id,{type:"error",error:c.pendingError}];else if(c&&c.submission&&re(c.submission.formMethod)){let k=await pa(E,s,c.submission,v,n,D,x.active,c&&c.initialHydration===!0,{replace:c.replace,flushSync:R});if(k.shortCircuited)return;if(k.pendingActionResult){let[U,Q]=k.pendingActionResult;if(ie(Q)&&ot(Q.error)&&Q.error.status===404){C=null,Ie(s,{matches:k.matches,loaderData:{},errors:{[U]:Q.error}});return}}v=k.matches||v,S=k.pendingActionResult,P=It(s,v,n,c.submission),R=!1,x.active=!1,E=Be(e.history,E.url,E.signal)}let{shortCircuited:M,matches:L,loaderData:_,errors:J,workingFetchers:j}=await ga(E,s,v,n,D,x.active,P,c&&c.submission,c&&c.fetcherSubmission,c&&c.replace,c&&c.initialHydration===!0,R,S,c&&c.callSiteDefaultShouldRevalidate);M||(C=null,Ie(s,{matches:L||v,...Fr(S),loaderData:_,errors:J,...j?{fetchers:j}:{}}))}async function pa(n,s,c,v,R,x,P,E,D={}){if(St(),te({navigation:_n(s,v,R,c)},{flushSync:D.flushSync===!0}),P){let L=await ft(v,s.pathname,n.signal);if(L.type==="aborted")return{shortCircuited:!0};if(L.type==="error"){if(L.partialMatches.length===0){let{matches:J,route:j}=pt(f.activeRoutes);return{matches:J,pendingActionResult:[j.id,{type:"error",error:L.error}]}}let _=Se(L.partialMatches).route.id;return{matches:L.partialMatches,pendingActionResult:[_,{type:"error",error:L.error}]}}else if(L.matches)v=L.matches;else{let{notFoundMatches:_,error:J,route:j}=Ot(s.pathname);return{matches:_,pendingActionResult:[j.id,{type:"error",error:J}]}}}let S,M=Rt(v,s);if(!M.route.action&&!M.route.lazy)S={type:"error",error:ce(405,{method:n.method,pathname:s.pathname,routeId:M.route.id})};else{let L=await qe(n,s,We(o,h,n,s,v,M,E?[]:a,x),x,null);if(S=L[M.route.id],!S){for(let _ of v)if(L[_.route.id]){S=L[_.route.id];break}}if(n.signal.aborted)return{shortCircuited:!0}}if(Ue(S)){let L;return D&&D.replace!=null?L=D.replace:L=Tr(S.response.headers.get("Location"),new URL(n.url),d,e.history)===m.location.pathname+m.location.search,await ze(n,S,!0,{submission:c,replace:L}),{shortCircuited:!0}}if(ie(S)){let L=Se(v,M.route.id);return(D&&D.replace)!==!0&&(ae="PUSH"),{matches:v,pendingActionResult:[L.route.id,S,M.route.id]}}return{matches:v,pendingActionResult:[M.route.id,S]}}async function ga(n,s,c,v,R,x,P,E,D,S,M,L,_,J){let j=P||It(s,c,v,E),k=E||D||jr(j),U=!F&&!M;if(x){if(U){let q=ar(_);te({navigation:j,...q!==void 0?{actionData:q}:{}},{flushSync:L})}
1let z=await ft(c,s.pathname,n.signal);if(z.type==="aborted")return{shortCircuited:!0};if(z.type==="error"){if(z.partialMatches.length===0){let{matches:xe,route:$e}=pt(f.activeRoutes);return{matches:xe,loaderData:{},errors:{[$e.id]:z.error}}}let q=Se(z.partialMatches).route.id;return{matches:z.partialMatches,loaderData:{},errors:{[q]:z.error}}}else if(z.matches)c=z.matches;else{let{error:q,notFoundMatches:xe,route:$e}=Ot(s.pathname);return{matches:xe,loaderData:{},errors:{[$e.id]:q}}}}let{dsMatches:Q,revalidatingFetchers:oe}=Pr(n,R,o,h,e.history,m,c,k,s,M?[]:a,M===!0,K,Re,ve,je,we,y,_,J);if(se=++ye,!e.dataStrategy&&!Q.some(z=>z.shouldLoad)&&!Q.some(z=>z.route.middleware&&z.route.middleware.length>0)&&oe.length===0){let z=new Map(m.fetchers),q=ir(z);return Ie(s,{matches:c,loaderData:{},errors:_&&ie(_[1])?{[_[0]]:_[1].error}:null,...Fr(_),...q?{fetchers:z}:{}},{flushSync:L}),{shortCircuited:!0}}if(U){let z={};if(!x){z.navigation=j;let q=ar(_);q!==void 0&&(z.actionData=q)}oe.length>0&&(z.fetchers=Ra(oe)),te(z,{flushSync:L})}oe.forEach(z=>{De(z.key),z.controller&&V.set(z.key,z.controller)});let Le=()=>oe.forEach(z=>De(z.key));C&&C.signal.addEventListener("abort",Le);let{loaderResults:Fe,fetcherResults:ht}=await nr(Q,oe,n,s,R);if(n.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",Le),oe.forEach(z=>V.delete(z.key));let ue=gt(Fe);if(ue)return await ze(n,ue.result,!0,{replace:S}),{shortCircuited:!0};if(ue=gt(ht),ue)return we.add(ue.key),await ze(n,ue.result,!0,{replace:S}),{shortCircuited:!0};let Ae=new Map(m.fetchers),{loaderData:ke,errors:He}=_r(m,c,Fe,_,oe,ht,Ae);M&&m.errors&&(He={...m.errors,...He});let mt=ir(Ae),yt=lr(se,Ae),vt=mt||yt||oe.length>0;return{matches:c,loaderData:ke,errors:He,...vt?{workingFetchers:Ae}:{}}}function ar(n){if(n&&!ie(n[1]))return{[n[0]]:n[1].data};if(m.actionData)return Object.keys(m.actionData).length===0?null:m.actionData}function Ra(n){let s=new Map(m.fetchers);return n.forEach(c=>{let v=s.get(c.key),R=Ze(void 0,v?v.data:void 0);s.set(c.key,R)}),s}async function wa(n,s,c,v){De(n);let R=(v&&v.flushSync)===!0,x=Er(le),P=kt(m.location,m.matches,d,c,s,v?.relative),E=y.match(P),D=dt(E,P);if(D.active&&D.matches&&(E=D.matches),x&&x(Ur(e.history,P,E)),!E){be(n,s,ce(404,{pathname:P}),{flushSync:R});return}let{path:S,submission:M,error:L}=xr(!0,P,v);if(L){be(n,s,L,{flushSync:R});return}let _=e.getContext?await e.getContext():new mr,J=(v&&v.preventScrollReset)===!0;if(M&&re(M.formMethod)){await Ea(n,s,S,E,_,D.active,R,J,M,v&&v.defaultShouldRevalidate);return}let j={routeId:s,path:S,isDiscovering:D.active};je.set(n,j),await ba(n,j,E,_,R,J,M)}async function Ea(n,s,c,v,R,x,P,E,D,S){St(),je.delete(n),Ee(n,zn(D,m.fetchers.get(n)),{flushSync:P});let M=new AbortController,L=Be(e.history,c,M.signal,D);if(x){let Y=await ft(v,new URL(L.url).pathname,L.signal,n);if(Y.type==="aborted")return;if(Y.type==="error"){be(n,s,Y.error,{flushSync:P});return}else if(Y.matches)v=Y.matches;else{be(n,s,ce(404,{pathname:c}),{flushSync:P});return}}let _=Rt(v,c);if(!_.route.action&&!_.route.lazy){be(n,s,ce(405,{method:D.formMethod,pathname:c,routeId:s}),{flushSync:P});return}V.set(n,M);let J=ye,j=We(o,h,L,c,v,_,a,R),k=await qe(L,c,j,R,n),U=k[_.route.id];if(!U){for(let Y of j)if(k[Y.route.id]){U=k[Y.route.id];break}}if(L.signal.aborted){V.get(n)===M&&V.delete(n);return}if(ve.has(n)){if(Ue(U)||ie(U)){Ee(n,pe(void 0));return}}else{if(Ue(U))if(V.delete(n),se>J){Ee(n,pe(void 0));return}else return we.add(n),Ee(n,Ze(D)),ze(L,U,!1,{fetcherSubmission:D,preventScrollReset:E});if(ie(U)){be(n,s,U.error);return}}let Q=m.navigation.location||m.location,oe=Be(e.history,Q,M.signal),Le=m.navigation.state!=="idle"?y.match(m.navigation.location):m.matches;I(Le,"Didn't find any matches after fetcher action");let Fe=++ye;he.set(n,Fe);let{dsMatches:ht,revalidatingFetchers:ue}=Pr(oe,R,o,h,e.history,m,Le,D,Q,a,!1,K,Re,ve,je,we,y,[_.route.id,U],S),Ae=Ze(D,U.data),ke=new Map(m.fetchers);ke.set(n,Ae),ue.filter(Y=>Y.key!==n).forEach(Y=>{let Ne=Y.key,hr=ke.get(Ne),Oa=Ze(void 0,hr?hr.data:void 0);ke.set(Ne,Oa),De(Ne),Y.controller&&V.set(Ne,Y.controller)}),te({fetchers:ke});let He=()=>ue.forEach(Y=>
1De(Y.key));M.signal.addEventListener("abort",He);let{loaderResults:mt,fetcherResults:yt}=await nr(ht,ue,oe,Q,R);if(M.signal.aborted){he.get(n)===Fe&&he.delete(n);return}M.signal.removeEventListener("abort",He),he.delete(n),V.delete(n),ue.forEach(Y=>V.delete(Y.key));let vt=m.fetchers.has(n),z=Y=>{if(!vt)return Y;let Ne=new Map(Y.fetchers);return Ne.set(n,pe(U.data)),{...Y,fetchers:Ne}},q=gt(mt);if(q)return m=z(m),ze(oe,q.result,!1,{preventScrollReset:E});if(q=gt(yt),q)return we.add(q.key),m=z(m),ze(oe,q.result,!1,{preventScrollReset:E});let xe=new Map(m.fetchers);vt&&xe.set(n,pe(U.data));let{loaderData:$e,errors:_t}=_r(m,Le,mt,void 0,ue,yt,xe);lr(Fe,xe),m.navigation.state==="loading"&&Fe>se?(I(ae,"Expected pending action"),C&&C.abort(),Ie(m.navigation.location,{matches:Le,loaderData:$e,errors:_t,fetchers:xe})):(te({errors:_t,loaderData:zr(m.loaderData,$e,Le,_t),fetchers:xe}),K=!1)}async function ba(n,s,c,v,R,x,P){let{routeId:E,path:D}=s,S=m.fetchers.get(n);Ee(n,Ze(P,S?S.data:void 0),{flushSync:R});let M=new AbortController,L=Be(e.history,D,M.signal);if(s.isDiscovering){let U=await ft(c,new URL(L.url).pathname,L.signal,n);if(U.type==="aborted")return;if(U.type==="error"){be(n,E,U.error,{flushSync:R});return}else if(U.matches)c=U.matches,s.isDiscovering=!1;else{be(n,E,ce(404,{pathname:D}),{flushSync:R});return}}let _=Rt(c,D);V.set(n,M);let J=ye,j=await qe(L,D,We(o,h,L,D,c,_,a,v),v,n),k=j[_.route.id];if(!k){for(let U of c)if(j[U.route.id]){k=j[U.route.id];break}}if(V.get(n)===M&&V.delete(n),!L.signal.aborted){if(ve.has(n)){Ee(n,pe(void 0));return}if(Ue(k))if(se>J){Ee(n,pe(void 0));return}else{we.add(n),await ze(L,k,!1,{preventScrollReset:x});return}if(ie(k)){be(n,E,k.error);return}Ee(n,pe(k.data))}}async function ze(n,s,c,{submission:v,fetcherSubmission:R,preventScrollReset:x,replace:P}={}){c||(O?.resolve(),O=null),s.response.headers.has("X-Remix-Revalidate")&&(K=!0);let E=s.response.headers.get("Location");I(E,"Expected a Location header on the redirect Response");let D=E,S=new URL(n.url);E=Tr(E,S,d,e.history),at(D,E,S,"allow-explicit");let M=yr(m.location,E,{_isRedirect:!0});if(r){let U=!1;if(s.response.headers.has("X-Remix-Reload-Document"))U=!0;else if(Jt(E)){const Q=ja(t,E,!0);U=Q.origin!==t.location.origin||Dt(Q.pathname,d)==null}if(U){P?t.location.replace(E):t.location.assign(E);return}}C=null;let L=P===!0||s.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:_,formAction:J,formEncType:j}=m.navigation;!v&&!R&&_&&J&&j&&(v=jr(m.navigation));let k=v||R;ln.has(s.response.status)&&k&&re(k.formMethod)?await _e(L,M,{submission:{...k,formAction:E},preventScrollReset:x||X,enableViewTransition:c?A:void 0}):await _e(L,M,{overrideNavigation:It(M,[],L,v),fetcherSubmission:R,preventScrollReset:x||X,enableViewTransition:c?A:void 0})}async function qe(n,s,c,v,R){let x,P={};try{x=await pn(l,n,s,c,R,v,!1)}catch(E){return c.filter(D=>D.shouldLoad).forEach(D=>{P[D.route.id]={type:"error",error:E}}),P}if(n.signal.aborted)return P;if(!re(n.method))for(let E of c){if(x[E.route.id]?.type==="error")break;!x.hasOwnProperty(E.route.id)&&!m.loaderData.hasOwnProperty(E.route.id)&&(!m.errors||!m.errors.hasOwnProperty(E.route.id))&&E.shouldCallHandler()&&(x[E.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${E.route.id}`)})}for(let[E,D]of Object.entries(x))if(Ln(D)){let S=D.result;P[E]={type:"redirect",response:En(S,n,E,c,d)}}else P[E]=await wn(D);return P}async function nr(n,s,c,v,R){let x=qe(c,v,n,R,null),P=Promise.all(s.map(async E=>{if(E.matches&&E.match&&E.request&&E.controller){let D=(await qe(E.request,E.path,E.matches,R,E.key))[E.match.route.id];return{[E.key]:D}}else return Promise.resolve({[E.key]:{type:"error",error:ce(404,{pathname:E.path})}})}));return{loaderResults:await x,fetcherResults:(await P).reduce((E,D)=>Object.assign(E,D),{})}}function St(){K=!0,je.forEach((n,s)=>{V.has(s)&&Re.add(s),De(s)})}function Ee(n,s,c={}){let v=new Map(m.fetchers);v.set(n,s),te({fetchers:v},{flushSync:(c&&c.flushSync)===!0})}function be(n,s,c,v={}){let R=Se(m.matches,s),x=new Map(m.fetchers);Tt(x,n),te({errors:{[R.route.id]:c},fetchers:x},{flushSync:(v&&v.flushSync)===!0})}function Da(n){return Ge.set(n,(Ge.get(n)||0)+1),ve.has(n)&&ve.delete(n),m.fetchers.get(n)||sn}function xa(n,s){De(n,s?.reason),Ee(n,pe(null))}function Tt(n,s){let c=m.fetchers.get(s);V.has(s)&&!(c&&c.state==="loading"&&he.has(s))&&De(s),je.delete(s),he.delete(s),we.delete(s),ve.delete(s),Re.delete(s),n.delete(s)}function Pa(n){let s=(Ge.get(n)||0)-1;s<=0?(Ge.delete(n),ve.add(n)):Ge.set(n,s),te({fetchers:new Map(m.fetchers)})}function De(n,s){let c=V.get(n);c&&(c.abort(s),V.delete(n))}function or(n,s){for(let c of n){let v=s.get(c);I(v,`Expected fetcher: ${c}`);let R=pe(v.data);s.set(c,R)}}function ir(n){let s=[],c=!1;for(let v of we){let R=n.get(v);I(R,`Expected fetcher: ${v}`),R.state==="loading"&&(we.delete(v),s.push(v),c=!0)}return or(s,n),c}function lr(n,s){let c=[];for(let[v,R]of he)if(R<n){let x=s.get(v);I(x,`Expected fetcher: ${v}`),x.state==="loading"&&(De(v),he.delete(v),c.push(v))}return or(c,s),c.length>0}function Ca(n,s){let c=m.blockers.get(n)||Qe;return Oe.get(n)!==s&&Oe.set(n,s),c}function sr(n){m.blockers.delete(n),Oe.delete(n)}function ct(n,s){let c=m.blockers.get(n)||Qe;I(c.state==="unblocked"&&s.state==="blocked"||c.state==="blocked"&&s.state==="blocked"||c.state==="blocked"&&s.state==="proceeding"||c.state==="blocked"&&s.state==="unblocked"||c.state==="proceeding"&&s.state==="unblocked",`Invalid blocker state transition: ${c.state} -> ${s.state}`);let v=new Map(m.blockers);v.set(n,s),te({blockers:v})}function ur({currentLocation:n,nextLocation:s,historyAction:c}){if(Oe.size===0)return;Oe.size>1&&me(!1,"A router only supports one blocker at a time");let v=Array.from(Oe.entries()),[R,x]=v[v.length-1],P=m.blockers.get(R);if(!(P&&P.state==="proceeding")&&x({currentLocation:n,nextLocation:s,historyAction:c}))return R}function Ot(n){let s=ce(404,{pathname:n}),c=f.activeRoutes,{matches:v,route:R}=pt(c);return{notFoundMatches:v,route:R,error:s}}function Ma(n,s,c){if(T=n,H=s,N=c||null,!B&&m.navigation===jt){B=!0;let v=dr(m.location,m.matches);v!=null&&te({restoreScrollPosition:v})}return()=>{T=null,H=null,N=null}}function cr(n,s){return N&&N(n,s.map(c=>Wr(c,m.loaderData)))||n.key}function La(n,s){if(T&&H){let c=cr(n,s);T[c]=H()}}
1function dr(n,s){if(T){let c=cr(n,s),v=T[c];if(typeof v=="number")return v}return null}function dt(n,s){if(e.patchRoutesOnNavigation)if(n){if(Object.keys(n[0].params).length>0)return{active:!0,matches:y.match(s,!0)}}else return{active:!0,matches:y.match(s,!0)||[]};return{active:!1,matches:null}}async function ft(n,s,c,v){if(!e.patchRoutesOnNavigation)return{type:"success",matches:n};let R=n;for(;;){let x=h;try{await e.patchRoutesOnNavigation({signal:c,path:s,matches:R,fetcherKey:v,patch:(D,S)=>{c.aborted||Cr(D,S,f,x,o,!1)}})}catch(D){return{type:"error",error:D,partialMatches:R}}if(c.aborted)return{type:"aborted"};let P=y.match(s),E=null;if(P){if(Object.keys(P[0].params).length===0)return{type:"success",matches:P};if(E=y.match(s,!0),!(E&&R.length<E.length&&fr(R,E.slice(0,R.length))))return{type:"success",matches:P}}if(E||(E=y.match(s,!0)),!E||fr(R,E))return{type:"success",matches:null};R=E}}function fr(n,s){return n.length===s.length&&n.every((c,v)=>c.route.id===s[v].route.id)}function Sa(n){h={},f.setHmrRoutes(wt(n,o,void 0,h))}function Ta(n,s,c=!1){Cr(n,s,f,h,o,c),f.hasHMRRoutes||te({})}return le={get basename(){return d},get future(){return u},get state(){return m},get routes(){return f.stableRoutes},match(n){return y.match(n)},get manifest(){return h},get window(){return t},initialize:ha,subscribe:ya,enableScrollRestoration:Ma,navigate:rr,fetch:wa,revalidate:va,createHref:n=>e.history.createHref(n),createURL:n=>e.history.createURL(n),encodeLocation:n=>e.history.encodeLocation(n),getFetcher:Da,resetFetcher:xa,deleteFetcher:Pa,dispose:ma,getBlocker:Ca,deleteBlocker:sr,patchRoutes:Ta,_internalFetchControllers:V,_internalSetRoutes:Sa,_internalSetStateDoNotUseOrYouWillBreakYourApp(n){te(n)}},e.instrumentations&&(le=qa(le,e.instrumentations.map(n=>n.router).filter(Boolean))),le}function dn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function kt(e,t,r,a,i,o){let u,d;if(i){u=[];for(let h of t)if(u.push(h),h.route.id===i){d=h;break}}else u=t,d=t[t.length-1];let y=Wt(a||".",Vt(u),Dt(e.pathname,r)||e.pathname,o==="path");if(a==null&&(y.search=e.search,y.hash=e.hash),(a==null||a===""||a===".")&&d){let h=qt(y.search);if(d.route.index&&!h)y.search=y.search?y.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&h){let f=new URLSearchParams(y.search),l=f.getAll("index");f.delete("index"),l.filter(w=>w).forEach(w=>f.append("index",w));let g=f.toString();y.search=g?`?${g}`:""}}return r!=="/"&&(y.pathname=Na({basename:r,pathname:y.pathname})),Me(y)}function xr(e,t,r){if(!r||!dn(r))return{path:t};if(r.formMethod&&!On(r.formMethod))return{path:t,error:ce(405,{method:r.formMethod})};let a=()=>({path:t,error:ce(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),o=aa(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!re(i))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((l,[g,w])=>`${l}${g}=${w} 2`,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!re(i))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:o,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}I(typeof FormData=="function","FormData is not available in this environment");let u,d;if(r.formData)u=Bt(r.formData),d=r.formData;else if(r.body instanceof FormData)u=Bt(r.body),d=r.body;else if(r.body instanceof URLSearchParams)u=r.body,d=Or(u);else if(r.body==null)u=new URLSearchParams,d=new FormData;else try{u=new URLSearchParams(r.body),d=Or(u)}catch{return a()}let y={formMethod:i,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(re(y.formMethod))return{path:t,submission:y};let h=it(t);return e&&h.search&&qt(h.search)&&u.append("index",""),h.search=`?${u}`,{path:Me(h),submission:y}}function Pr(e,t,r,a,i,o,u,d,y,h,f,l,g,w,b,T,N,H,B){let $=H?ie(H[1])?H[1].error:H[1].data:void 0,de=i.createURL(o.location),fe=i.createURL(y),G;if(f&&o.errors){let C=Object.keys(o.errors)[0];G=u.findIndex(A=>A.route.id===C)}else if(H&&ie(H[1])){let C=H[0];G=u.findIndex(A=>A.route.id===C)-1}let ne=H?H[1].statusCode:void 0,le=ne&&ne>
2=400,m={currentUrl:de,currentParams:o.matches[0]?.params||{},nextUrl:fe,nextParams:u[0].params,...d,actionResult:$,actionStatus:ne},ae=Ve(u),O=u.map((C,A)=>{let{route:W}=C,ee=null;if(G!=null&&A>G)ee=!1;else if(W.lazy)ee=!0;else if(!Gt(W))ee=!1;else if(f){let{shouldLoad:Re}=Xr(W,o.loaderData,o.errors);ee=Re}else fn(o.loaderData,o.matches[A],C)&&(ee=!0);if(ee!==null)return Ht(r,a,e,y,ae,C,h,t,ee);let F=!1;typeof B=="boolean"?F=B:le?F=!1:(l||de.pathname+de.search===fe.pathname+fe.search||de.search!==fe.search||hn(o.matches[A],C))&&(F=!0);let K={...m,defaultShouldRevalidate:F};return Ht(r,a,e,y,ae,C,h,t,nt(C,K),K,B)}),X=[];return b.forEach((C,A)=>{if(f||!u.some(se=>se.route.id===C.routeId)||w.has(A)||C.isDiscovering)return;let W=o.fetchers.get(A),ee=W&&W.state!=="idle"&&W.data===void 0,F=N.match(C.path);if(!F){X.push({key:A,routeId:C.routeId,path:C.path,matches:null,match:null,request:null,controller:null});return}if(T.has(A))return;let K=Rt(F,C.path),Re=new AbortController,V=Be(i,C.path,Re.signal),ye=null;if(g.has(A))g.delete(A),ye=We(r,a,V,C.path,F,K,h,t);else if(ee)l&&(ye=We(r,a,V,C.path,F,K,h,t));else{let se;typeof B=="boolean"?se=B:le?se=!1:se=l;let he={...m,defaultShouldRevalidate:se};nt(K,he)&&(ye=We(r,a,V,C.path,F,K,h,t,he))}ye&&X.push({key:A,routeId:C.routeId,path:C.path,matches:ye,match:K,request:V,controller:Re})}),{dsMatches:O,revalidatingFetchers:X}}function Gt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Xr(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Gt(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,i=r!=null&&r[e.id]!==void 0;if(!a&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let o=!a&&!i;return{shouldLoad:o,renderFallback:o}}function fn(e,t,r){let a=!t||r.route.id!==t.route.id,i=!e.hasOwnProperty(r.route.id);return a||i}function hn(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function nt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Cr(e,t,r,a,i,o){let u;if(e){let h=a[e];I(h,`No route found to patch children into: routeId = ${e}`),h.children||(h.children=[]),u=h.children}else u=r.activeRoutes;let d=[],y=[];if(t.forEach(h=>{let f=u.find(l=>Qr(h,l));f?y.push({existingRoute:f,newRoute:h}):d.push(h)}),d.length>0){let h=wt(d,i,[e||"_","patch",String(u?.length||"0")],a);u.push(...h)}if(o&&y.length>0)for(let h=0;h<y.length;h++){let{existingRoute:f,newRoute:l}=y[h],g=f,[w]=wt([l],i,[],{},!0);Object.assign(g,{element:w.element?w.element:g.element,errorElement:w.errorElement?w.errorElement:g.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:g.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function Qr(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,a)=>t.children?.some(i=>Qr(r,i)))??!1:!1}const Mr=new WeakMap,Zr=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let i=r[t.id];if(I(i,"No route found in manifest"),!i.lazy||typeof i.lazy!="object")return;let o=i.lazy[e];if(!o)return;let u=Mr.get(i);u||(u={},Mr.set(i,u));let d=u[e];if(d)return d;let y=(async()=>{let h=ka(e),f=i[e]!==void 0;if(h)me(!h,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(f)me(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let l=await o();l!=null&&(Object.assign(i,{[e]:l}),Object.assign(i,a(i)))}typeof i.lazy=="object"&&(i.lazy[e]=void 0,Object.values(i.lazy).every(l=>l===void 0)&&(i.lazy=void 0))})();return u[e]=y,y},Lr=new WeakMap;function mn(e,t,r,a,i){let o=r[e.id];if(I(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=Lr.get(o);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let l=(async()=>{I(typeof e.lazy=="function","No lazy route function found");let g=await e.lazy(),w={};for(let b in g){let T=g[b];if(T===void 0)continue;let N=Ha(b),H=o[b]!==void 0;N?me(!N,"Route property "+b+" is not a supported property to be returned from a lazy route function. This property will be ignored."):H?me(!H,`Route "${o.id}" has a static property "${b}" defined but its lazy function is also returning a value for this property. The lazy route property "${b}" will be ignored.`):w[b]=T}Object.assign(o,w),Object.assign(o,{...a(o),lazy:void 0})})();return Lr.set(o,l),l.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:l}}let u=Object.keys(e.lazy),d=[],y;for(let f of u){if(i&&i.includes(f))continue;let l=Zr({key:f,route:e,manifest:r,mapRouteProperties:a});l&&(d.push(l),f===t&&(y=l))}let h=d.length>0?Promise.all(d).then(()=>{}):void 0;return h?.catch(()=>{}),y?.catch(()=>{}),{lazyRoutePromise:h,lazyHandlerPromise:y}}async function Sr(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>
2a.resolve()))).forEach((a,i)=>{r[t[i].route.id]=a}),r}async function yn(e){return e.matches.some(t=>t.route.middleware)?ea(e,()=>Sr(e)):Sr(e)}function ea(e,t){return vn(e,t,a=>{if(Tn(a))throw a;return a},Cn,r);async function r(a,i,o){if(o)return Object.assign(o.value,{[i]:{type:"error",result:a}});{let{matches:u}=e,d=Math.min(Math.max(u.findIndex(h=>h.route.id===i),0),Math.max(u.findIndex(h=>h.shouldCallHandler()),0)),y=u[d].route.id;for(let h of u.slice(0,d+1))try{await h._lazyPromises?.route}catch{y=h.route.id;break}return{[Se(u,y).route.id]:{type:"error",result:a}}}}}async function vn(e,t,r,a,i){let{matches:o,...u}=e;return await ta(u,o.flatMap(d=>d.route.middleware?d.route.middleware.map(y=>[d.route.id,y]):[]),t,r,a,i)}async function ta(e,t,r,a,i,o,u=0){let{request:d}=e;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let y=t[u];if(!y)return await r();let[h,f]=y,l,g=async()=>{if(l)throw new Error("You may only call `next()` once per middleware");try{return l={value:await ta(e,t,r,a,i,o,u+1)},l.value}catch(w){return l={value:await o(w,h,l)},l.value}};try{let w=await f(e,g),b=w!=null?a(w):void 0;return i(b)?b:l?b??l.value:(l={value:await g()},l.value)}catch(w){return await o(w,h,l)}}function ra(e,t,r,a,i){let o=Zr({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=mn(a.route,re(r.method)?"action":"loader",t,e,i);return{middleware:o,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function Ht(e,t,r,a,i,o,u,d,y,h=null,f){let l=!1,g=ra(e,t,r,o,u);return{...o,_lazyPromises:g,shouldLoad:y,shouldRevalidateArgs:h,shouldCallHandler(w){return l=!0,h?typeof f=="boolean"?nt(o,{...h,defaultShouldRevalidate:f}):typeof w=="boolean"?nt(o,{...h,defaultShouldRevalidate:w}):nt(o,h):y},resolve(w){let{lazy:b,loader:T,middleware:N}=o.route,H=l||y||w&&!re(r.method)&&(b||T),B=N&&N.length>0&&!T&&!b;return H&&(re(r.method)||!B)?gn({request:r,path:a,pattern:i,match:o,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:w,scopedContext:d}):Promise.resolve({type:"data",result:void 0})}}}function We(e,t,r,a,i,o,u,d,y=null){return i.map(h=>h.route.id!==o.route.id?{...h,shouldLoad:!1,shouldRevalidateArgs:y,shouldCallHandler:()=>!1,_lazyPromises:ra(e,t,r,h,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ht(e,t,r,a,Ve(i),h,u,d,!0,y))}async function pn(e,t,r,a,i,o,u){a.some(f=>f._lazyPromises?.middleware)&&await Promise.all(a.map(f=>f._lazyPromises?.middleware));let d={request:t,url:Yt(t,r),pattern:Ve(a),params:a[0].params,context:o,matches:a},h=await e({...d,fetcherKey:i,runClientMiddleware:f=>{let l=d;return ea(l,()=>f({...l,fetcherKey:i,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(f=>[f._lazyPromises?.handler,f._lazyPromises?.route]))}catch{}return h}async function gn({request:e,path:t,pattern:r,match:a,lazyHandlerPromise:i,lazyRoutePromise:o,handlerOverride:u,scopedContext:d}){let y,h,f=re(e.method),l=f?"action":"loader",g=w=>{let b,T=new Promise((B,$)=>b=$);h=()=>b(),e.signal.addEventListener("abort",h);let N=B=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${l}" [routeId: ${a.route.id}]`)):w({request:e,url:Yt(e,t),pattern:r,params:a.params,context:d},...B!==void 0?[B]:[]),H=(async()=>{try{return{type:"data",result:await(u?u(B=>N(B)):N())}}catch(B){return{type:"error",result:B}}})();return Promise.race([H,T])};try{let w=f?a.route.action:a.route.loader;if(i||o)if(w){let b,[T]=await Promise.all([g(w).catch(N=>{b=N}),i,o]);if(b!==void 0)throw b;y=T}else{await i;let b=f?a.route.action:a.route.loader;if(b)[y]=await Promise.all([g(b),o]);else if(l==="action"){let T=new URL(e.url),N=T.pathname+T.search;throw ce(405,{method:e.method,pathname:N,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(w)y=await g(w);else{let b=new URL(e.url);throw ce(404,{pathname:b.pathname+b.search})}}catch(w){return{type:"error",result:w}}finally{h&&e.signal.removeEventListener("abort",h)}return y}async function Rn(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function wn(e){let{result:t,type:r}=e;if(Kt(t)){let a;try{a=await Rn(t)}catch(i){return{type:"error",error:i}}return r==="error"?{type:"error",error:new bt(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return r==="error"?Nr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Pn(t),statusCode:ot(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ot(t)?t.status:void 0}:Nr(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function En(e,t,r,a,i){let o=e.headers.get("Location");if(I(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Jt(o)){let u=a.slice(0,a.findIndex(d=>d.route.id===r)+1);o=kt(new URL(t.url),u,i,o),e.headers.set("Location",o)}return e}const bn=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function $t(e){try{return bn.includes(new URL(e).protocol)}catch{return!1}}function Tr(e,t,r,a){if(Jt(e)){let i=e,o=Br.test(i)?new URL(Ia(i,t.protocol)):new URL(i);if($t(o.toString()))throw new Error("Invalid redirect location");let u=Dt(o.pathname,r)!=null;if(o.origin===t.origin&&u)return Aa(o.pathname)+o.search+o.hash}try{if($t(a.createURL(e).toString()))throw new Error("Invalid redirect location")}catch{}return e}function Be(e,t,r,a){let i=e.createURL(aa(t)).toString(),o={signal:r};if(a&&re(a.formMethod)){let{formMethod:u,formEncType:d}=a;o.method=u.toUpperCase(),d==="application/json"?(o.headers=new Headers({"Content-Type":d}),o.body=JSON.stringify(a.json)):d==="text/plain"?o.body=a.text:d==="application/x-www-form-urlencoded"&&a.formData?o.body=Bt(a.formData):o.body=a.formData}
2return new Request(i,o)}function Bt(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function Or(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function Dn(e,t,r,a=!1,i=!1){let o={},u=null,d,y=!1,h={},f=r&&ie(r[1])?r[1].error:void 0;return e.forEach(l=>{if(!(l.route.id in t))return;let g=l.route.id,w=t[g];if(I(!Ue(w),"Cannot handle redirect results in processLoaderData"),ie(w)){let b=w.error;if(f!==void 0&&(b=f,f=void 0),u=u||{},i)u[g]=b;else{let T=Se(e,g);u[T.route.id]==null&&(u[T.route.id]=b)}a||(o[g]=qr),y||(y=!0,d=ot(w.error)?w.error.status:500),w.headers&&(h[g]=w.headers)}else o[g]=w.data,w.statusCode&&w.statusCode!==200&&!y&&(d=w.statusCode),w.headers&&(h[g]=w.headers)}),f!==void 0&&r&&(u={[r[0]]:f},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:u,statusCode:d||200,loaderHeaders:h}}function _r(e,t,r,a,i,o,u){let{loaderData:d,errors:y}=Dn(t,r,a);return i.filter(h=>!h.matches||h.matches.some(f=>f.shouldLoad)).forEach(h=>{let{key:f,match:l,controller:g}=h;if(g&&g.signal.aborted)return;let w=o[f];if(I(w,"Did not find corresponding fetcher result"),ie(w)){let b=Se(e.matches,l?.route.id);y&&y[b.route.id]||(y={...y,[b.route.id]:w.error}),u.delete(f)}else if(Ue(w))I(!1,"Unhandled fetcher revalidation redirect");else{let b=pe(w.data);u.set(f,b)}}),{loaderData:d,errors:y}}function zr(e,t,r,a){let i=Object.entries(t).filter(([,u])=>u!==qr).reduce((u,[d,y])=>(u[d]=y,u),{}),o=0;for(let u of r){let d=u.route.id;if(!t.hasOwnProperty(d)&&e.hasOwnProperty(d)&&u.route.loader&&(i[d]=e[d],o++),a&&a.hasOwnProperty(d))break}return Object.keys(t).length===0&&o===Object.keys(e).length?e:i}function Fr(e){return e?ie(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Se(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.ErrorBoundary!=null||r.route.errorElement!=null)||e[0]}function pt(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 ce(e,{pathname:t,routeId:r,method:a,type:i,message:o}={}){let u="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&r?d=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:i==="invalid-body"&&(d="Unable to encode submission body")):e===403?(u="Forbidden",d=`Route "${r}" does not match URL "${t}"`):e===404?(u="Not Found",d=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&r?d=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(d=`Invalid request method "${a.toUpperCase()}"`)),new bt(e||500,u,new Error(d),!0)}function gt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,i]=t[r];if(Ue(i))return{key:a,result:i}}}function aa(e){return Me({...typeof e=="string"?it(e):e,hash:""})}function xn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Pn(e){return new bt(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Cn(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&Mn(r))}function Mn(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Ln(e){return Kt(e.result)&&Gr.has(e.result.status)}function ie(e){return e.type==="error"}function Ue(e){return(e&&e.type)==="redirect"}function Nr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Kt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Sn(e){return Gr.has(e)}function Tn(e){return Kt(e)&&Sn(e.status)&&e.headers.has("Location")}function On(e){return on.has(e.toUpperCase())}function re(e){return an.has(e.toUpperCase())}function qt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Rt(e,t){let r=typeof t=="string"?it(t).search:t.search;if(e[e.length-1].route.index&&qt(r||""))return e[e.length-1];let a=Ua(e);return a[a.length-1]}function Ur(e,t,r){return{url:Yt(e.createURL(t),t),pattern:r?Ve(r):"",params:r?.[0]?.params?{...r[0].params}:{}}}function jr(e){let{formMethod:t,formAction:r,formEncType:a,text:i,formData:o,json:u}=e;if(!(!t||!r||!a)){if(i!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:u,text:void 0}}}function It(e,t,r,a){return a?{state:"loading",location:e,matches:t,historyAction:r,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function _n(e,t,r,a){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.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 zn(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 pe(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 Fn(e,t){try{let r=e.sessionStorage.getItem(Kr);if(r){let a=JSON.parse(r);for(let[i,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Nn(e,t){if(t.size>0){let r={};for(let[a,i]of t)r[a]=[...i];try{e.sessionStorage.setItem(Kr,JSON.stringify(r))}catch(a){me(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Ir(){let e,t,r=new Promise((a,i)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{i(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}const Ye=p.createContext(null);Ye.displayName="DataRouter";const Xt=p.createContext(null);Xt.displayName="DataRouterState";const Qt=p.createContext(null);Qt.displayName="DataRouterData";const Zt=p.createContext(null);Zt.displayName="DataRouterNavigation";const na=p.createContext(!1);function Un(){return p.useContext(na)}const oa=p.createContext({isTransitioning:!1});oa.displayName="ViewTransition";const ia=p.createContext(null);ia.displayName="Fetchers";const jn=p.createContext(null);jn.displayName="Await";const Je=p.createContext(null);Je.displayName="Navigation";const xt=p.createContext(null);xt.displayName="Location";const Te=p.createContext({outlet:null,matches:[],isDataRoute:!1});Te.displayName="Route";const Pt=p.createContext(!1);Pt.displayName="IsDataRoute";const Ct=p.createContext(void 0);Ct.displayName="RouteId";const er=p.createContext(null);er.displayName="RouteError";const la="REACT_ROUTER_ERROR",In="REDIRECT",An="ROUTE_ERROR_RESPONSE";function kn(e){if(e.startsWith(`${la}:${In}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="str
2ing"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Hn(e){if(e.startsWith(`${la}:${An}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new bt(t.status,t.statusText,t.data)}catch{}}function po(e,{relative:t}={}){I(lt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=p.useContext(Je),{hash:i,pathname:o,search:u}=Vn(e,{relative:t}),d=o;return r!=="/"&&(d=o==="/"?r:Et([r,o])),a.createHref({pathname:d,search:u,hash:i})}function lt(){return p.useContext(xt)!=null}function tr(){return I(lt(),"useLocation() may be used only in the context of a <Router> component."),p.useContext(xt).location}const sa="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function go(){return p.useContext(Pt)?ao():$n()}function $n(){I(lt(),"useNavigate() may be used only in the context of a <Router> component.");let e=p.useContext(Ye),{base
2name:t,navigator:r}=p.useContext(Je),{matches:a}=p.useContext(Te),{pathname:i}=tr(),o=JSON.stringify(Vt(a)),u=p.useRef(!1);return p.useLayoutEffect(()=>{u.current=!0}),p.useCallback((d,y={})=>{if(me(u.current,sa),!u.current)return;if(typeof d=="number"){r.go(d);return}let h=Wt(d,JSON.parse(o),i,y.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Et([t,h.pathname])),at(typeof d=="string"?d:Me(d),r.createHref(h),Yr(r),"reject"),(y.replace?r.replace:r.push)(h,y.state,y)},[t,r,o,i,e])}const Bn=p.createContext(null);function Wn(e){let t=p.useContext(Te).outlet;return p.useMemo(()=>t&&p.createElement(Bn.Provider,{value:e},t),[t,e])}function ua(){let{matches:e}=p.useContext(Te);return e[e.length-1]?.params??{}}function Vn(e,{relative:t}={}){let{matches:r}=p.useContext(Te),{pathname:a}=tr(),i=JSON.stringify(Vt(r));return p.useMemo(()=>Wt(e,JSON.parse(i),a,t==="path"),[e,i,a,t])}function Yn(e,t,r){I(lt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=p.useContext(Je),{matches:i}=p.useContext(Te),o=i[i.length-1],u=o?o.params:{};o&&o.pathname;let d=o?o.pathnameBase:"/";o&&o.route;let y=tr(),h;h=y;let f=h.pathname||"/",l=f;if(d!=="/"){let b=d.replace(/^\//,"").split("/");l="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let g;return r?r.state.matches.length?g=r.state.matches.map(b=>Object.assign(b,{route:r.manifest[b.route.id]||b.route})):g=r.router.match(r.state.location):g=$a(e,{pathname:l}),Qn(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},u,b.params),pathname:Et([d,a.encodeLocation?a.encodeLocation(b.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?d:Et([d,a.encodeLocation?a.encodeLocation(b.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:b.pathnameBase])})),i,r)}function Jn(){let e=fa(),t=ot(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)}const Gn=p.createElement(Jn,null);var Kn=class extends p.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=na;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=Hn(e.digest);r&&(e=r)}let t=e!==void 0?p.createElement(Te.Provider,{value:this.props.routeContext},p.createElement(Pt.Provider,{value:this.props.routeContext.isDataRoute},p.createElement(Ct.Provider,{value:this.props.routeContext.matches[this.props.routeContext.matches.length-1]?.route.id},p.createElement(er.Provider,{value:e,children:this.props.component})))):this.props.children;return this.context?p.createElement(qn,{error:e},t):t}};const At=new WeakMap;function qn({children:e,error:t}){let{basename:r,navigator:a}=p.useContext(Je);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=kn(t.digest);if(i){let o=At.get(t);if(o)throw o;let u=Ba(i.location,r),d=u.absoluteURL||u.to;if(at(i.location,d,Yr(a),"allow-explicit"),$t(d))throw new Error("Invalid redirect location");if(Wa&&!At.get(t))if(u.isExternal||i.reloadDocument)window.location.href=d;else{const y=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:i.replace}));throw At.set(t,y),y}return p.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d}`})}}return e}function Xn({routeContext:e,match:t,children:r}){let a=p.useContext(Ye);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),p.createElement(Te.Provider,{value:e},p.createElement(Pt.Provider,{value:e.isDataRoute},p.createElement(Ct.Provider,{value:t.route.id},r)))}function Qn(e,t=[],r){let a=r?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let i=e,o=a?.errors;if(o!=null){let f=i.findIndex(l=>l.route.id&&o?.[l.route.id]!==void 0);I(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,f+1))}let u=!1,d=-1;if(r&&a){u=a.renderFallback;for(let f=0;f<i.length;f++){let l=i[f];if((l.route.HydrateFallback||l.route.hydrateFallbackElement)&&(d=f),l.route.id){let{loaderData:g,errors:w}
2=a,b=l.route.loader&&!g.hasOwnProperty(l.route.id)&&(!w||w[l.route.id]===void 0);if(l.route.lazy||b){r.isStatic&&(u=!0),d>=0?i=i.slice(0,d+1):i=[i[0]];break}}}}let y=r?.onError,h=a&&y?(f,l)=>{y(f,{location:a.location,params:a.matches?.[0]?.params??{},pattern:Ve(a.matches),errorInfo:l})}:void 0;return i.reduceRight((f,l,g)=>{let w,b=!1,T=null,N=null;a&&(w=o&&l.route.id?o[l.route.id]:void 0,T=l.route.errorElement||Gn,u&&(d<0&&g===0?(no("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,N=null):d===g&&(b=!0,N=l.route.hydrateFallbackElement||null)));let H=t.concat(i.slice(0,g+1)),B=()=>{let $;return w?$=T:b?$=N:l.route.Component?$=p.createElement(l.route.Component,null):l.route.element?$=l.route.element:$=f,p.createElement(Xn,{match:l,routeContext:{outlet:f,matches:H,isDataRoute:a!=null},children:$})};return a&&(l.route.ErrorBoundary||l.route.errorElement||g===0)?p.createElement(Kn,{location:a.location,revalidation:a.revalidation,component:T,error:w,children:B(),routeContext:{outlet:null,matches:H,isDataRoute:!0},onError:h}):B()},null)}function Mt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zn(e){let t=p.useContext(Ye);return I(t,Mt(e)),t}function eo(e){let t=p.useContext(Xt);return I(t,Mt(e)),t}function st(e){let t=p.useContext(Qt);return I(t,Mt(e)),t}function to(e){let t=p.useContext(Zt);return I(t,Mt(e)),t}function Lt(e){let t=p.useContext(Ct);return I(t,`${e} can only be used on routes that contain a unique "id"`),t}function Ro(){let{navigation:e}=to("useNavigation");return p.useMemo(()=>{let{matches:t,historyAction:r,...a}=e;return a},[e])}function ro(){let{matches:e}=eo("useMatches"),{loaderData:t}=st("useMatches");return p.useMemo(()=>e.map(r=>Wr(r,t)),[e,t])}function ca(){let e=st("useLoaderData"),t=Lt("useLoaderData");return e.loaderData[t]}function wo(e){return st("useRouteLoaderData").loaderData[e]}function da(){let e=st("useActionData"),t=Lt("useActionData");return e.actionData?e.actionData[t]:void 0}function fa(){let e=p.useContext(er),t=st("useRouteError"),r=Lt("useRouteError");return e!==void 0?e:t.errors?.[r]}function ao(){let{router:e}=Zn("useNavigate"),t=Lt("useNavigate"),r=p.useRef(!1);return p.useLayoutEffect(()=>{r.current=!0}),p.useCallback(async(a,i={})=>{me(r.current,sa),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...i}))},[e,t])}const Ar={};function no(e,t,r){Ar[e]||(Ar[e]=!0,me(!1,r))}const kr={};function Hr(e,t){!e&&!kr[t]&&(kr[t]=!0,console.warn(t))}const Eo=["HydrateFallback","hydrateFallbackElement"];var oo=class{status="pending";promise;resolve;reject;
2constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function bo({router:e,flushSync:t,onError:r,useTransitions:a}){a=Un()||a;let[i,o]=p.useState(e.state),[u,d]=p.useOptimistic(i),[y,h]=p.useState(),[f,l]=p.useState({isTransitioning:!1}),[g,w]=p.useState(),[b,T]=p.useState(),[N,H]=p.useState(),B=p.useRef(new Map),$=p.useCallback((O,{deletedFetchers:X,newErrors:C,flushSync:A,viewTransitionOpts:W})=>{C&&r&&Object.values(C).forEach(F=>r(F,{location:O.location,params:O.matches[0]?.params??{},pattern:Ve(O.matches)})),O.fetchers.forEach((F,K)=>{F.data!==void 0&&B.current.set(K,F.data)}),X.forEach(F=>B.current.delete(F)),Hr(A===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ee=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Hr(W==null||ee,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!W||!ee){t&&A?t(()=>o(O)):a===!1?o(O):p.startTransition(()=>{a===!0&&d(F=>$r(F,O)),o(O)});return}if(t&&A){t(()=>{b&&(g?.resolve(),b.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:W.currentLocation,nextLocation:W.nextLocation})});let F=e.window.document.startViewTransition(()=>{t(()=>o(O))});F.finished.finally(()=>{t(()=>{w(void 0),T(void 0),h(void 0),l({isTransitioning:!1})})}),t(()=>T(F));return}b?(g?.resolve(),b.skipTransition(),H({state:O,currentLocation:W.currentLocation,nextLocation:W.nextLocation})):(h(O),l({isTransitioning:!0,flushSync:!1,currentLocation:W.currentLocation,nextLocation:W.nextLocation}))},[e.window,t,b,g,a,d,r]);p.useLayoutEffect(()=>e.subscribe($),[e,$]),p.useEffect(()=>{f.isTransitioning&&!f.flushSync&&w(new oo)},[f]),p.useEffect(()=>{if(g&&y&&e.window){let O=y,X=g.promise,C=e.window.document.startViewTransition(async()=>{a===!1?o(O):p.startTransition(()=>{a===!0&&d(A=>$r(A,O)),o(O)}),await X});C.finished.finally(()=>{w(void 0),T(void 0),h(void 0),l({isTransitioning:!1})}),T(C)}},[y,g,e.window,a,d]),p.useEffect(()=>{g&&y&&u.location.key===y.location.key&&g.resolve()},[g,b,u.location,y]),p.useEffect(()=>{!f.isTransitioning&&N&&(h(N.state),l({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}),H(void 0))},[f.isTransitioning,N]);let de=p.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:O=>e.navigate(O),push:(O,X,C)=>e.navigate(O,{state:X,preventScrollReset:C?.preventScrollReset}),replace:(O,X,C)=>e.navigate(O,{replace:!0,state:X,preventScrollReset:C?.preventScrollReset})}),[e]),fe=e.basename||"/",G=p.useMemo(()=>({router:e,navigator:de,static:!1,basename:fe,onError:r}),[e,de,fe,r]),ne=p.useMemo(()=>({historyAction:u.historyAction,location:u.location,matches:u.matches,initialized:u.initialized,renderFallback:u.renderFallback,restoreScrollPosition:u.restoreScrollPosition,preventScrollReset:u.preventScrollReset,blockers:u.blockers}),[u.historyAction,u.location,u.matches,u.initialized,u.renderFallback,u.restoreScrollPosition,u.preventScrollReset,u.blockers]),le=p.useMemo(()=>({navigation:u.navigation,revalidation:u.revalidation}),[u.navigation,u.revalidation]),m=p.useMemo(()=>({loaderData:u.loaderData,actionData:u.actionData,errors:u.errors}),[u.loaderData,u.actionData,u.errors]),ae=p.useMemo(()=>({fetchers:u.fetchers,fetcherData:B.current}),[u.fetchers]);return p.createElement(p.Fragment,null,p.createElement(Ye.Provider,{value:G},p.createElement(Xt.Provider,{value:ne},p.createElement(Zt.Provider,{value:le},p.createElement(Qt.Provider,{value:m},p.createElement(ia.Provider,{value:ae},p.createElement(oa.Provider,{value:f},p.createElement(so,{basename:fe,location:u.location,navigationType:u.historyAction,navigator:de,useTransitions:a},p.createElement(io,{routes:e.routes,manifest:e.manifest,state:u,isStatic:!1,onError:r})))))))),null)}function $r(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}const io=p.memo(lo);function lo({routes:e,manifest:t,state:r,isStatic:a,onError:i}){let o=p.useContext(Ye);return I(o,"You must render this element inside a <DataRouterContext.Provider> element"),Yn(e,void 0,{router:o.router,manifest:t,state:r,isStatic:a,onError:i})}function Do(e){return Wn(e.context)}function so({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:i,static:o=!1,useTransitions:u}){I(!lt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),y=p.useMemo(()=>({basename:d,navigator:i,static:o,useTransitions:u,future:{}}),[d,i,o,u]);typeof r=="string"&&(r=it(r));let{pathname:h="/",search:f="",hash:l="",state:g=null,key:w="default",mask:b}=r,T=p.useMemo(()=>{let N=Dt(h,d);return N==null?null:{location:{pathname:N,search:f,hash:l,state:g,key:w,mask:b},navigationType:a}},[d,h,f,l,g,w,a,b]);
2return me(T!=null,`<Router basename="${d}"> is not able to match the URL "${h}${f}${l}" because it does not start with the basename, so the <Router> won't render anything.`),T==null?null:p.createElement(Je.Provider,{value:y},p.createElement(xt.Provider,{children:t,value:T}))}function uo(){return{params:ua(),loaderData:ca(),actionData:da(),matches:ro()}}function xo(e){return function(){const r=uo();return p.createElement(e,r)}}function co(){return{params:ua(),loaderData:ca(),actionData:da(),error:fa()}}function Po(e){return function(){const r=co();return p.createElement(e,r)}}export{Zt as D,Je as N,Do as O,Te as R,oa as V,tr as a,po as b,go as c,Vn as d,ro as e,Zn as f,eo as g,Ro as h,Lt as i,ho as j,wo as k,Po as l,Ga as m,un as n,bo as o,vo as p,Eo as q,mo as r,Kt as s,Nr as t,ca as u,fa as v,xo as w,Un as x,Hr as y,st as z}; 3//# sourceMappingURL=components-BKduVlFH.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.