import{a as Zt}from"https://cdn.shopify.com/oxygen-v2/26437/10785/22343/1653408/build/_shared/chunk-H7QMOPDN.js";function C(){return C=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ue(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function er(){return Math.random().toString(36).substr(2,8)}function gt(e,t){return{usr:e.state,key:e.key,idx:t}}function Te(e,t,r,n){return r===void 0&&(r=null),C({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ce(t):t,{state:r,key:t&&t.key||n||er()})}function je(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 ce(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 tr(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:s=!1}=n,d=a.history,c=B.Pop,f=null,h=p();h==null&&(h=0,d.replaceState(C({},d.state,{idx:h}),""));function p(){return(d.state||{idx:null}).idx}function x(){c=B.Pop;let v=p(),P=v==null?null:v-h;h=v,f&&f({action:c,location:R.location,delta:P})}function S(v,P){c=B.Push;let k=Te(R.location,v,P);r&&r(k,v),h=p()+1;let W=gt(k,h),l=R.createHref(k);try{d.pushState(W,"",l)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;a.location.assign(l)}s&&f&&f({action:c,location:R.location,delta:1})}function O(v,P){c=B.Replace;let k=Te(R.location,v,P);r&&r(k,v),h=p();let W=gt(k,h),l=R.createHref(k);d.replaceState(W,"",l),s&&f&&f({action:c,location:R.location,delta:0})}function E(v){let P=a.location.origin!=="null"?a.location.origin:a.location.href,k=typeof v=="string"?v:je(v);return T(P,"No window.location.(origin|href) available to create URL for href: "+k),new URL(k,P)}let R={get action(){return c},get location(){return e(a,d)},listen(v){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(mt,x),f=v,()=>{a.removeEventListener(mt,x),f=null}},createHref(v){return t(a,v)},createURL:E,encodeLocation(v){let P=E(v);return{pathname:P.pathname,search:P.search,hash:P.hash}},push:S,replace:O,go(v){return d.go(v)}};return R}function nr(e){return e.index===!0}function Ze(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,s)=>{let d=[...r,s],c=typeof a.id=="string"?a.id:d.join("-");if(T(a.index!==!0||!a.children,"Cannot specify children on an index route"),T(!n[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),nr(a)){let f=C({},a,t(a),{id:c});return n[c]=f,f}else{let f=C({},a,t(a),{id:c,children:void 0});return n[c]=f,a.children&&(f.children=Ze(a.children,t,d,n)),f}})}function Pe(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ce(t):t,a=He(n.pathname||"/",r);if(a==null)return null;let s=Tt(e);or(s);let d=null;for(let c=0;d==null&&c{let f={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:d,route:s};f.relativePath.startsWith("/")&&(T(f.relativePath.startsWith(n),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(n.length));let h=Me([n,f.relativePath]),p=r.concat(f);s.children&&s.children.length>0&&(T(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),Tt(s.children,t,p,h)),!(s.path==null&&!s.index)&&t.push({path:h,score:fr(h,s.index),routesMeta:p})};return e.forEach((s,d)=>{var c;if(s.path===""||!((c=s.path)!=null&&c.includes("?")))a(s,d);else for(let f of jt(s.path))a(s,d,f)}),t}function jt(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 d=jt(n.join("/")),c=[];return c.push(...d.map(f=>f===""?s:[s,f].join("/"))),a&&c.push(...d),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function or(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:hr(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}function fr(e,t){let r=e.split("/"),n=r.length;return r.some(yt)&&(n+=cr),t&&(n+=sr),r.filter(a=>!yt(a)).reduce((a,s)=>a+(ir.test(s)?lr:s===""?dr:ur),n)}function hr(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 pr(e,t){let{routesMeta:r}=e,n={},a="/",s=[];for(let d=0;d{if(p==="*"){let S=c[x]||"";d=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}return h[p]=vr(c[x]||"",p),h},{}),pathname:s,pathnameBase:d,pattern:e}}function gr(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ue(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,(d,c)=>(n.push(c),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function yr(e){try{return decodeURI(e)}catch(t){return ue(!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 vr(e,t){try{return decodeURIComponent(e)}catch(r){return ue(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function He(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function wr(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ce(e):e;return{pathname:r?r.startsWith("/")?r:br(r,t):t,search:Sr(n),hash:xr(a)}}function br(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 Xe(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 Ut(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Rr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ce(e):(a=C({},e),T(!a.pathname||!a.pathname.includes("?"),Xe("?","pathname","search",a)),T(!a.pathname||!a.pathname.includes("#"),Xe("#","pathname","hash",a)),T(!a.search||!a.search.includes("#"),Xe("#","search","hash",a)));let s=e===""||a.pathname==="",d=s?"/":a.pathname,c;if(n||d==null)c=r;else{let x=t.length-1;if(d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),x-=1;a.pathname=S.join("/")}c=x>=0?t[x]:"/"}let f=wr(a,c),h=d&&d!=="/"&&d.endsWith("/"),p=(s||d===".")&&r.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}function Er(e){return e instanceof Promise&&e._tracked===!0}function Lr(e){if(!Er(e))return e;if(e._error)throw e._error;return e._data}function Pr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Xr(e){let 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;T(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=i=>({hasErrorBoundary:o(i)})}else a=Fr;let s={},d=Ze(e.routes,a,void 0,s),c,f=e.basename||"/",h=C({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),p=null,x=new Set,S=null,O=null,E=null,R=e.hydrationData!=null,v=Pe(d,e.history.location,f),P=null;if(v==null){let o=V(404,{pathname:e.history.location.pathname}),{matches:i,route:u}=Lt(d);v=i,P={[u.id]:o}}let k=!v.some(o=>o.route.lazy)&&(!v.some(o=>o.route.loader)||e.hydrationData!=null),W,l={historyAction:e.history.action,location:e.history.location,matches:v,initialized:k,navigation:qe,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||P,fetchers:new Map,blockers:new Map},M=B.Pop,$=!1,I,X=!1,Y=new Map,q=null,fe=!1,ne=!1,Ue=[],Ce=[],z=new Map,Fe=0,ve=-1,he=new Map,Q=new Set,pe=new Map,ae=new Map,oe=new Map,Be=!1;function zt(){if(p=e.history.listen(o=>{let{action:i,location:u,delta:m}=o;if(Be){Be=!1;return}ue(oe.size===0||m!=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 b=ct({currentLocation:l.location,nextLocation:u,historyAction:i});if(b&&m!=null){Be=!0,e.history.go(m*-1),Ie(b,{state:"blocked",location:u,proceed(){Ie(b,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),e.history.go(m)},reset(){let w=new Map(l.blockers);w.set(b,Se),K({blockers:w})}});return}return ie(i,u)}),r){$r(t,Y);let o=()=>Vr(t,Y);t.addEventListener("pagehide",o),q=()=>t.removeEventListener("pagehide",o)}return l.initialized||ie(B.Pop,l.location),W}function Ht(){p&&p(),q&&q(),x.clear(),I&&I.abort(),l.fetchers.forEach((o,i)=>Ke(i)),l.blockers.forEach((o,i)=>ut(i))}function Bt(o){return x.add(o),()=>x.delete(o)}function K(o,i){l=C({},l,o),x.forEach(u=>u(l,{unstable_viewTransitionOpts:i}))}function we(o,i){var u,m;let b=l.actionData!=null&&l.navigation.formMethod!=null&&G(l.navigation.formMethod)&&l.navigation.state==="loading"&&((u=o.state)==null?void 0:u._isRedirect)!==!0,w;i.actionData?Object.keys(i.actionData).length>0?w=i.actionData:w=null:b?w=l.actionData:w=null;let D=i.loaderData?Et(l.loaderData,i.loaderData,i.matches||[],i.errors):l.loaderData,y=l.blockers;y.size>0&&(y=new Map(y),y.forEach((F,L)=>y.set(L,Se)));let g=$===!0||l.navigation.formMethod!=null&&G(l.navigation.formMethod)&&((m=o.state)==null?void 0:m._isRedirect)!==!0;c&&(d=c,c=void 0),fe||M===B.Pop||(M===B.Push?e.history.push(o,o.state):M===B.Replace&&e.history.replace(o,o.state));let j;if(M===B.Pop){let F=Y.get(l.location.pathname);F&&F.has(o.pathname)?j={currentLocation:l.location,nextLocation:o}:Y.has(o.pathname)&&(j={currentLocation:o,nextLocation:l.location})}else if(X){let F=Y.get(l.location.pathname);F?F.add(o.pathname):(F=new Set([o.pathname]),Y.set(l.location.pathname,F)),j={currentLocation:l.location,nextLocation:o}}K(C({},i,{actionData:w,loaderData:D,historyAction:M,location:o,initialized:!0,navigation:qe,revalidation:"idle",restoreScrollPosition:ht(o,i.matches||l.matches),preventScrollReset:g,blockers:y}),j),M=B.Pop,$=!1,X=!1,fe=!1,ne=!1,Ue=[],Ce=[]}async function at(o,i){if(typeof o=="number"){e.history.go(o);return}let u=et(l.location,l.matches,f,h.v7_prependBasename,o,i?.fromRouteId,i?.relative),{path:m,submission:b,error:w}=wt(h.v7_normalizeFormMethod,!1,u,i),D=l.location,y=Te(l.location,m,i&&i.state);y=C({},y,e.history.encodeLocation(y));let g=i&&i.replace!=null?i.replace:void 0,j=B.Push;g===!0?j=B.Replace:g===!1||b!=null&&G(b.formMethod)&&b.formAction===l.location.pathname+l.location.search&&(j=B.Replace);let F=i&&"preventScrollReset"in i?i.preventScrollReset===!0:void 0,L=ct({currentLocation:D,nextLocation:y,historyAction:j});if(L){Ie(L,{state:"blocked",location:y,proceed(){Ie(L,{state:"proceeding",proceed:void 0,reset:void 0,location:y}),at(o,i)},reset(){let U=new Map(l.blockers);U.set(L,Se),K({blockers:U})}});return}return await ie(j,y,{submission:b,pendingError:w,preventScrollReset:F,replace:i&&i.replace,enableViewTransition:i&&i.unstable_viewTransition})}function kt(){if(ke(),K({revalidation:"loading"}),l.navigation.state!=="submitting"){if(l.navigation.state==="idle"){ie(l.historyAction,l.location,{startUninterruptedRevalidation:!0});return}ie(M||l.historyAction,l.navigation.location,{overrideNavigation:l.navigation})}}async function ie(o,i,u){I&&I.abort(),I=null,M=o,fe=(u&&u.startUninterruptedRevalidation)===!0,Xt(l.location,l.matches),$=(u&&u.preventScrollReset)===!0,X=(u&&u.enableViewTransition)===!0;let m=c||d,b=u&&u.overrideNavigation,w=Pe(m,i,f);if(!w){let U=V(404,{pathname:i.pathname}),{matches:N,route:le}=Lt(m);We(),we(i,{matches:N,loaderData:{},errors:{[le.id]:U}});return}if(l.initialized&&!ne&&zr(l.location,i)&&!(u&&u.submission&&G(u.submission.formMethod))){we(i,{matches:w});return}I=new AbortController;let D=Ee(e.history,i,I.signal,u&&u.submission),y,g;if(u&&u.pendingError)g={[ge(w).route.id]:u.pendingError};else if(u&&u.submission&&G(u.submission.formMethod)){let U=await Kt(D,i,u.submission,w,{replace:u.replace});if(U.shortCircuited)return;y=U.pendingActionData,g=U.pendingActionError,b=Qe(i,u.submission),D=new Request(D.url,{signal:D.signal})}let{shortCircuited:j,loaderData:F,errors:L}=await Wt(D,i,w,b,u&&u.submission,u&&u.fetcherSubmission,u&&u.replace,y,g);j||(I=null,we(i,C({matches:w},y?{actionData:y}:{},{loaderData:F,errors:L})))}async function Kt(o,i,u,m,b){b===void 0&&(b={}),ke();let w=Kr(i,u);K({navigation:w});let D,y=rt(m,i);if(!y.route.action&&!y.route.lazy)D={type:_.error,error:V(405,{method:o.method,pathname:i.pathname,routeId:y.route.id})};else if(D=await xe("action",o,y,m,s,a,f),o.signal.aborted)return{shortCircuited:!0};if(ye(D)){let g;return b&&b.replace!=null?g=b.replace:g=D.location===l.location.pathname+l.location.search,await be(l,D,{submission:u,replace:g}),{shortCircuited:!0}}if(Ae(D)){let g=ge(m,y.route.id);return(b&&b.replace)!==!0&&(M=B.Push),{pendingActionData:{},pendingActionError:{[g.route.id]:D.error}}}if(de(D))throw V(400,{type:"defer-action"});return{pendingActionData:{[y.route.id]:D.data}}}async function Wt(o,i,u,m,b,w,D,y,g){let j=m||Qe(i,b),F=b||w||At(j),L=c||d,[U,N]=bt(e.history,l,u,F,i,ne,Ue,Ce,pe,Q,L,f,y,g);if(We(A=>!(u&&u.some(J=>J.route.id===A))||U&&U.some(J=>J.route.id===A)),ve=++Fe,U.length===0&&N.length===0){let A=st();return we(i,C({matches:u,loaderData:{},errors:g||null},y?{actionData:y}:{},A?{fetchers:new Map(l.fetchers)}:{})),{shortCircuited:!0}}if(!fe){N.forEach(J=>{let re=l.fetchers.get(J.key),Ge=Le(void 0,re?re.data:void 0);l.fetchers.set(J.key,Ge)});let A=y||l.actionData;K(C({navigation:j},A?Object.keys(A).length===0?{actionData:null}:{actionData:A}:{},N.length>0?{fetchers:new Map(l.fetchers)}:{}))}N.forEach(A=>{z.has(A.key)&&te(A.key),A.controller&&z.set(A.key,A.controller)});let le=()=>N.forEach(A=>te(A.key));I&&I.signal.addEventListener("abort",le);let{results:se,loaderResults:Re,fetcherResults:$e}=await it(l.matches,u,U,N,o);if(o.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",le),N.forEach(A=>z.delete(A.key));let Z=Pt(se);if(Z){if(Z.idx>=U.length){let A=N[Z.idx-U.length].key;Q.add(A)}return await be(l,Z.result,{replace:D}),{shortCircuited:!0}}let{loaderData:ee,errors:Ne}=xt(l,u,U,Re,g,N,$e,ae);ae.forEach((A,J)=>{A.subscribe(re=>{(re||A.done)&&ae.delete(J)})});let Ve=st(),Ye=dt(ve),Je=Ve||Ye||N.length>0;return C({loaderData:ee,errors:Ne},Je?{fetchers:new Map(l.fetchers)}:{})}function ot(o){return l.fetchers.get(o)||Cr}function $t(o,i,u,m){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.");z.has(o)&&te(o);let b=c||d,w=et(l.location,l.matches,f,h.v7_prependBasename,u,i,m?.relative),D=Pe(b,w,f);if(!D){Oe(o,i,V(404,{pathname:w}));return}let{path:y,submission:g,error:j}=wt(h.v7_normalizeFormMethod,!0,w,m);if(j){Oe(o,i,j);return}let F=rt(D,y);if($=(m&&m.preventScrollReset)===!0,g&&G(g.formMethod)){Vt(o,i,y,F,D,g);return}pe.set(o,{routeId:i,path:y}),Yt(o,i,y,F,D,g)}async function Vt(o,i,u,m,b,w){if(ke(),pe.delete(o),!m.route.action&&!m.route.lazy){let H=V(405,{method:w.formMethod,pathname:u,routeId:i});Oe(o,i,H);return}let D=l.fetchers.get(o),y=Wr(w,D);l.fetchers.set(o,y),K({fetchers:new Map(l.fetchers)});let g=new AbortController,j=Ee(e.history,u,g.signal,w);z.set(o,g);let F=Fe,L=await xe("action",j,m,b,s,a,f);if(j.signal.aborted){z.get(o)===g&&z.delete(o);return}if(ye(L))if(z.delete(o),ve>F){let H=me(void 0);l.fetchers.set(o,H),K({fetchers:new Map(l.fetchers)});return}else{Q.add(o);let H=Le(w);return l.fetchers.set(o,H),K({fetchers:new Map(l.fetchers)}),be(l,L,{fetcherSubmission:w})}if(Ae(L)){Oe(o,i,L.error);return}if(de(L))throw V(400,{type:"defer-action"});let U=l.navigation.location||l.location,N=Ee(e.history,U,g.signal),le=c||d,se=l.navigation.state!=="idle"?Pe(le,l.navigation.location,f):l.matches;T(se,"Didn't find any matches after fetcher action");let Re=++Fe;he.set(o,Re);let $e=Le(w,L.data);l.fetchers.set(o,$e);let[Z,ee]=bt(e.history,l,se,w,U,ne,Ue,Ce,pe,Q,le,f,{[m.route.id]:L.data},void 0);ee.filter(H=>H.key!==o).forEach(H=>{let De=H.key,pt=l.fetchers.get(De),Qt=Le(void 0,pt?pt.data:void 0);l.fetchers.set(De,Qt),z.has(De)&&te(De),H.controller&&z.set(De,H.controller)}),K({fetchers:new Map(l.fetchers)});let Ne=()=>ee.forEach(H=>te(H.key));g.signal.addEventListener("abort",Ne);let{results:Ve,loaderResults:Ye,fetcherResults:Je}=await it(l.matches,se,Z,ee,N);if(g.signal.aborted)return;g.signal.removeEventListener("abort",Ne),he.delete(o),z.delete(o),ee.forEach(H=>z.delete(H.key));let A=Pt(Ve);if(A){if(A.idx>=Z.length){let H=ee[A.idx-Z.length].key;Q.add(H)}return be(l,A.result)}let{loaderData:J,errors:re}=xt(l,l.matches,Z,Ye,void 0,ee,Je,ae);if(l.fetchers.has(o)){let H=me(L.data);l.fetchers.set(o,H)}let Ge=dt(Re);l.navigation.state==="loading"&&Re>ve?(T(M,"Expected pending action"),I&&I.abort(),we(l.navigation.location,{matches:se,loaderData:J,errors:re,fetchers:new Map(l.fetchers)})):(K(C({errors:re,loaderData:Et(l.loaderData,J,se,re)},Ge||ee.length>0?{fetchers:new Map(l.fetchers)}:{})),ne=!1)}async function Yt(o,i,u,m,b,w){let D=l.fetchers.get(o),y=Le(w,D?D.data:void 0);l.fetchers.set(o,y),K({fetchers:new Map(l.fetchers)});let g=new AbortController,j=Ee(e.history,u,g.signal);z.set(o,g);let F=Fe,L=await xe("loader",j,m,b,s,a,f);if(de(L)&&(L=await _t(L,j.signal,!0)||L),z.get(o)===g&&z.delete(o),j.signal.aborted)return;if(ye(L))if(ve>F){let N=me(void 0);l.fetchers.set(o,N),K({fetchers:new Map(l.fetchers)});return}else{Q.add(o),await be(l,L);return}if(Ae(L)){let N=ge(l.matches,i);l.fetchers.delete(o),K({fetchers:new Map(l.fetchers),errors:{[N.route.id]:L.error}});return}T(!de(L),"Unhandled fetcher deferred data");let U=me(L.data);l.fetchers.set(o,U),K({fetchers:new Map(l.fetchers)})}async function be(o,i,u){let{submission:m,fetcherSubmission:b,replace:w}=u===void 0?{}:u;i.revalidate&&(ne=!0);let D=Te(o.location,i.location,{_isRedirect:!0});if(T(D,"Expected a location on the redirect navigation"),r){let U=!1;if(i.reloadDocument)U=!0;else if(Ft.test(i.location)){let N=e.history.createURL(i.location);U=N.origin!==t.location.origin||He(N.pathname,f)==null}if(U){w?t.location.replace(i.location):t.location.assign(i.location);return}}I=null;let y=w===!0?B.Replace:B.Push,{formMethod:g,formAction:j,formEncType:F}=o.navigation;!m&&!b&&g&&j&&F&&(m=At(o.navigation));let L=m||b;if(Ur.has(i.status)&&L&&G(L.formMethod))await ie(y,D,{submission:C({},L,{formAction:i.location}),preventScrollReset:$});else{let U=Qe(D,m);await ie(y,D,{overrideNavigation:U,fetcherSubmission:b,preventScrollReset:$})}}async function it(o,i,u,m,b){let w=await Promise.all([...u.map(g=>xe("loader",b,g,i,s,a,f)),...m.map(g=>g.matches&&g.match&&g.controller?xe("loader",Ee(e.history,g.path,g.controller.signal),g.match,g.matches,s,a,f):{type:_.error,error:V(404,{pathname:g.path})})]),D=w.slice(0,u.length),y=w.slice(u.length);return await Promise.all([Mt(o,u,D,D.map(()=>b.signal),!1,l.loaderData),Mt(o,m.map(g=>g.match),y,m.map(g=>g.controller?g.controller.signal:null),!0)]),{results:w,loaderResults:D,fetcherResults:y}}function ke(){ne=!0,Ue.push(...We()),pe.forEach((o,i)=>{z.has(i)&&(Ce.push(i),te(i))})}function Oe(o,i,u){let m=ge(l.matches,i);Ke(o),K({errors:{[m.route.id]:u},fetchers:new Map(l.fetchers)})}function Ke(o){let i=l.fetchers.get(o);z.has(o)&&!(i&&i.state==="loading"&&he.has(o))&&te(o),pe.delete(o),he.delete(o),Q.delete(o),l.fetchers.delete(o)}function te(o){let i=z.get(o);T(i,"Expected fetch controller: "+o),i.abort(),z.delete(o)}function lt(o){for(let i of o){let u=ot(i),m=me(u.data);l.fetchers.set(i,m)}}function st(){let o=[],i=!1;for(let u of Q){let m=l.fetchers.get(u);T(m,"Expected fetcher: "+u),m.state==="loading"&&(Q.delete(u),o.push(u),i=!0)}return lt(o),i}function dt(o){let i=[];for(let[u,m]of he)if(m0}function Jt(o,i){let u=l.blockers.get(o)||Se;return oe.get(o)!==i&&oe.set(o,i),u}function ut(o){l.blockers.delete(o),oe.delete(o)}function Ie(o,i){let u=l.blockers.get(o)||Se;T(u.state==="unblocked"&&i.state==="blocked"||u.state==="blocked"&&i.state==="blocked"||u.state==="blocked"&&i.state==="proceeding"||u.state==="blocked"&&i.state==="unblocked"||u.state==="proceeding"&&i.state==="unblocked","Invalid blocker state transition: "+u.state+" -> "+i.state);let m=new Map(l.blockers);m.set(o,i),K({blockers:m})}function ct(o){let{currentLocation:i,nextLocation:u,historyAction:m}=o;if(oe.size===0)return;oe.size>1&&ue(!1,"A router only supports one blocker at a time");let b=Array.from(oe.entries()),[w,D]=b[b.length-1],y=l.blockers.get(w);if(!(y&&y.state==="proceeding")&&D({currentLocation:i,nextLocation:u,historyAction:m}))return w}function We(o){let i=[];return ae.forEach((u,m)=>{(!o||o(m))&&(u.cancel(),i.push(m),ae.delete(m))}),i}function Gt(o,i,u){if(S=o,E=i,O=u||null,!R&&l.navigation===qe){R=!0;let m=ht(l.location,l.matches);m!=null&&K({restoreScrollPosition:m})}return()=>{S=null,E=null,O=null}}function ft(o,i){return O&&O(o,i.map(m=>ar(m,l.loaderData)))||o.key}function Xt(o,i){if(S&&E){let u=ft(o,i);S[u]=E()}}function ht(o,i){if(S){let u=ft(o,i),m=S[u];if(typeof m=="number")return m}return null}function qt(o){s={},c=Ze(o,a,void 0,s)}return W={get basename(){return f},get state(){return l},get routes(){return d},get window(){return t},initialize:zt,subscribe:Bt,enableScrollRestoration:Gt,navigate:at,fetch:$t,revalidate:kt,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:ot,deleteFetcher:Ke,dispose:Ht,getBlocker:Jt,deleteBlocker:ut,_internalFetchControllers:z,_internalActiveDeferreds:ae,_internalSetRoutes:qt},W}function Or(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function et(e,t,r,n,a,s,d){let c,f;if(s!=null&&d!=="path"){c=[];for(let p of t)if(c.push(p),p.route.id===s){f=p;break}}else c=t,f=t[t.length-1];let h=Rr(a||".",Ut(c).map(p=>p.pathnameBase),He(e.pathname,r)||e.pathname,d==="path");return a==null&&(h.search=e.search,h.hash=e.hash),(a==null||a===""||a===".")&&f&&f.route.index&&!nt(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(h.pathname=h.pathname==="/"?r:Me([r,h.pathname])),je(h)}function wt(e,t,r,n){if(!n||!Or(n))return{path:r};if(n.formMethod&&!kr(n.formMethod))return{path:r,error:V(405,{method:n.formMethod})};let a=()=>({path:r,error:V(400,{type:"invalid-body"})}),s=n.formMethod||"get",d=e?s.toUpperCase():s.toLowerCase(),c=Nt(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!G(d))return a();let S=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((O,E)=>{let[R,v]=E;return""+O+R+"="+v+` `},""):String(n.body);return{path:r,submission:{formMethod:d,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:S}}}else if(n.formEncType==="application/json"){if(!G(d))return a();try{let S=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:d,formAction:c,formEncType:n.formEncType,formData:void 0,json:S,text:void 0}}}catch{return a()}}}T(typeof FormData=="function","FormData is not available in this environment");let f,h;if(n.formData)f=tt(n.formData),h=n.formData;else if(n.body instanceof FormData)f=tt(n.body),h=n.body;else if(n.body instanceof URLSearchParams)f=n.body,h=St(f);else if(n.body==null)f=new URLSearchParams,h=new FormData;else try{f=new URLSearchParams(n.body),h=St(f)}catch{return a()}let p={formMethod:d,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(G(p.formMethod))return{path:r,submission:p};let x=ce(r);return t&&x.search&&nt(x.search)&&f.append("index",""),x.search="?"+f,{path:je(x),submission:p}}function Ir(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function bt(e,t,r,n,a,s,d,c,f,h,p,x,S,O){let E=O?Object.values(O)[0]:S?Object.values(S)[0]:void 0,R=e.createURL(t.location),v=e.createURL(a),P=O?Object.keys(O)[0]:void 0,W=Ir(r,P).filter((M,$)=>{if(M.route.lazy)return!0;if(M.route.loader==null)return!1;if(Nr(t.loaderData,t.matches[$],M)||d.some(Y=>Y===M.route.id))return!0;let I=t.matches[$],X=M;return Rt(M,C({currentUrl:R,currentParams:I.params,nextUrl:v,nextParams:X.params},n,{actionResult:E,defaultShouldRevalidate:s||R.pathname+R.search===v.pathname+v.search||R.search!==v.search||It(I,X)}))}),l=[];return f.forEach((M,$)=>{if(!r.some(fe=>fe.route.id===M.routeId))return;let I=Pe(p,M.path,x);if(!I){l.push({key:$,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let X=t.fetchers.get($),Y=rt(I,M.path),q=!1;h.has($)?q=!1:c.includes($)?q=!0:X&&X.state!=="idle"&&X.data===void 0?q=s:q=Rt(Y,C({currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:r[r.length-1].params},n,{actionResult:E,defaultShouldRevalidate:s})),q&&l.push({key:$,routeId:M.routeId,path:M.path,matches:I,match:Y,controller:new AbortController})}),[W,l]}function Nr(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function It(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Rt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function Dt(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];T(a,"No route found in manifest");let s={};for(let d in n){let f=a[d]!==void 0&&d!=="hasErrorBoundary";ue(!f,'Route "'+a.id+'" has a static property "'+d+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+d+'" will be ignored.')),!f&&!rr.has(d)&&(s[d]=n[d])}Object.assign(a,s),Object.assign(a,C({},t(a),{lazy:void 0}))}async function xe(e,t,r,n,a,s,d,c){c===void 0&&(c={});let f,h,p,x=E=>{let R,v=new Promise((P,k)=>R=k);return p=()=>R(),t.signal.addEventListener("abort",p),Promise.race([E({request:t,params:r.params,context:c.requestContext}),v])};try{let E=r.route[e];if(r.route.lazy)if(E){let R,v=await Promise.all([x(E).catch(P=>{R=P}),Dt(r.route,s,a)]);if(R)throw R;h=v[0]}else if(await Dt(r.route,s,a),E=r.route[e],E)h=await x(E);else if(e==="action"){let R=new URL(t.url),v=R.pathname+R.search;throw V(405,{method:t.method,pathname:v,routeId:r.route.id})}else return{type:_.data,data:void 0};else if(E)h=await x(E);else{let R=new URL(t.url),v=R.pathname+R.search;throw V(404,{pathname:v})}T(h!==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(E){f=_.error,h=E}finally{p&&t.signal.removeEventListener("abort",p)}if(Br(h)){let E=h.status;if(jr.has(E)){let P=h.headers.get("Location");if(T(P,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ft.test(P))P=et(new URL(t.url),n.slice(0,n.indexOf(r)+1),d,!0,P);else if(!c.isStaticRequest){let k=new URL(t.url),W=P.startsWith("//")?new URL(k.protocol+P):new URL(P),l=He(W.pathname,d)!=null;W.origin===k.origin&&l&&(P=W.pathname+W.search+W.hash)}if(c.isStaticRequest)throw h.headers.set("Location",P),h;return{type:_.redirect,status:E,location:P,revalidate:h.headers.get("X-Remix-Revalidate")!==null,reloadDocument:h.headers.get("X-Remix-Reload-Document")!==null}}if(c.isRouteRequest)throw{type:f===_.error?_.error:_.data,response:h};let R,v=h.headers.get("Content-Type");return v&&/\bapplication\/json\b/.test(v)?R=await h.json():R=await h.text(),f===_.error?{type:f,error:new ze(E,h.statusText,R),headers:h.headers}:{type:_.data,data:R,statusCode:h.status,headers:h.headers}}if(f===_.error)return{type:f,error:h};if(Hr(h)){var S,O;return{type:_.deferred,deferredData:h,statusCode:(S=h.init)==null?void 0:S.status,headers:((O=h.init)==null?void 0:O.headers)&&new Headers(h.init.headers)}}return{type:_.data,data:h}}function Ee(e,t,r,n){let a=e.createURL(Nt(t)).toString(),s={signal:r};if(n&&G(n.formMethod)){let{formMethod:d,formEncType:c}=n;s.method=d.toUpperCase(),c==="application/json"?(s.headers=new Headers({"Content-Type":c}),s.body=JSON.stringify(n.json)):c==="text/plain"?s.body=n.text:c==="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 St(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function _r(e,t,r,n,a){let s={},d=null,c,f=!1,h={};return r.forEach((p,x)=>{let S=t[x].route.id;if(T(!ye(p),"Cannot handle redirect results in processLoaderData"),Ae(p)){let O=ge(e,S),E=p.error;n&&(E=Object.values(n)[0],n=void 0),d=d||{},d[O.route.id]==null&&(d[O.route.id]=E),s[S]=void 0,f||(f=!0,c=Pr(p.error)?p.error.status:500),p.headers&&(h[S]=p.headers)}else de(p)?(a.set(S,p.deferredData),s[S]=p.deferredData.data):s[S]=p.data,p.statusCode!=null&&p.statusCode!==200&&!f&&(c=p.statusCode),p.headers&&(h[S]=p.headers)}),n&&(d=n,s[Object.keys(n)[0]]=void 0),{loaderData:s,errors:d,statusCode:c||200,loaderHeaders:h}}function xt(e,t,r,n,a,s,d,c){let{loaderData:f,errors:h}=_r(t,r,n,a,c);for(let p=0;pn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Lt(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 V(e,t){let{pathname:r,routeId:n,method:a,type:s}=t===void 0?{}:t,d="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(d="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?(d="Forbidden",c='Route "'+n+'" does not match URL "'+r+'"'):e===404?(d="Not Found",c='No route matches URL "'+r+'"'):e===405&&(d="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 ze(e||500,d,new Error(c),!0)}function Pt(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(ye(r))return{result:r,idx:t}}}function Nt(e){let t=typeof e=="string"?ce(e):e;return je(C({},t,{hash:""}))}function zr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function de(e){return e.type===_.deferred}function Ae(e){return e.type===_.error}function ye(e){return(e&&e.type)===_.redirect}function Hr(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 Br(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function kr(e){return Tr.has(e.toLowerCase())}function G(e){return Mr.has(e.toLowerCase())}async function Mt(e,t,r,n,a,s){for(let d=0;dx.route.id===f.route.id),p=h!=null&&!It(h,f)&&(s&&s[f.route.id])!==void 0;if(de(c)&&(a||p)){let x=n[d];T(x,"Expected an AbortSignal for revalidating fetcher deferred result"),await _t(c,x,a).then(S=>{S&&(r[d]=S||r[d])})}}}async function _t(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:_.data,data:e.deferredData.unwrappedData}}catch(a){return{type:_.error,error:a}}return{type:_.data,data:e.deferredData.data}}}function nt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function rt(e,t){let r=typeof t=="string"?ce(t).search:t.search;if(e[e.length-1].route.index&&nt(r||""))return e[e.length-1];let n=Ut(e);return n[n.length-1]}function At(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:s,json:d}=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(d!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:d,text:void 0}}}function Qe(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 Kr(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 Le(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 Wr(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 $r(e,t){try{let r=e.sessionStorage.getItem(Ot);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 Vr(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Ot,JSON.stringify(r))}catch(n){ue(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}var B,mt,_,rr,ir,lr,sr,dr,ur,cr,yt,Me,Dr,Sr,xr,_e,vt,Gr,ze,Ct,Mr,Ar,Tr,jr,Ur,qe,Cr,Se,Ft,Fr,Ot,qr,Yr=Zt(()=>{(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(B||(B={}));mt="popstate";(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(_||(_={}));rr=new Set(["lazy","caseSensitive","path","id","index","children"]);ir=/^:\w+$/,lr=3,sr=2,dr=1,ur=10,cr=-2,yt=e=>e==="*";Me=e=>e.join("/").replace(/\/\/+/g,"/"),Dr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Sr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,_e=class extends Error{},vt=class{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],T(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((s,d)=>n=d),this.controller=new AbortController;let a=()=>n(new _e("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((s,d)=>{let[c,f]=d;return Object.assign(s,{[c]:this.trackPromise(c,f)})},{}),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 _e)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 T(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]:Lr(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};Gr=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,C({},n,{headers:a}))},ze=class{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}};Ct=["post","put","patch","delete"],Mr=new Set(Ct),Ar=["get",...Ct],Tr=new Set(Ar),jr=new Set([301,302,303,307,308]),Ur=new Set([307,308]),qe={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Cr={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Se={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ft=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fr=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Ot="remix-router-transitions";qr=Symbol("deferred")});export{B as a,Jr as b,T as c,je as d,ce as e,Pe as f,ar as g,mr as h,He as i,Ut as j,Rr as k,Me as l,_e as m,vt as n,Gr as o,ze as p,Pr as q,Xr as r,Yr as s}; /*! Bundled license information: @remix-run/router/dist/router.js: (** * @remix-run/router v1.10.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT *) */