PageSourceSearch

https://wishlistr-c85b8a13fe2a.herokuapp.com/assets/chunk-EPOLDU6W-RNTpEbCr.js

js wishlistr-c85b8a13fe2a.herokuapp.com collected 2026-10-03 14:53:26 UTC 127,509 bytes, 43 lines download raw bytes

vendor: 4,978 bytes, lines 1-9
1function Wa(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xt={exports:{}},J={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Kr;function Ya(){if(Kr)return J;Kr=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.iterator;function m(g){return g===null||typeof g!="object"?null:(g=d&&g[d]||g["@@iterator"],typeof g=="function"?g:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,b={};function E(g,C,H){this.props=g,this.context=C,this.refs=b,this.updater=H||y}E.prototype.isReactComponent={},E.prototype.setState=function(g,C){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,C,"setState")},E.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function L(){}L.prototype=E.prototype;function S(g,C,H){this.props=g,this.context=C,this.refs=b,this.updater=H||y}var O=S.prototype=new L;O.constructor=S,R(O,E.prototype),O.isPureReactComponent=!0;var $=Array.isArray,P=Object.prototype.hasOwnProperty,T={current:null},v={key:!0,ref:!0,__self:!0,__source:!0};function D(g,C,H){var K,U={},te=null,oe=null;if(C!=null)for(K in C.ref!==void 0&&(oe=C.ref),C.key!==void 0&&(te=""+C.key),C)P.call(C,K)&&!v.hasOwnProperty(K)&&(U[K]=C[K]);var ne=arguments.length-2;if(ne===1)U.children=H;else if(1<ne){for(var le=Array(ne),Re=0;Re<ne;Re++)le[Re]=arguments[Re+2];U.children=le}if(g&&g.defaultProps)for(K in ne=g.defaultProps,ne)U[K]===void 0&&(U[K]=ne[K]);return{$$typeof:e,type:g,key:te,ref:oe,props:U,_owner:T.current}}function A(g,C){return{$$typeof:e,type:g.type,key:C,ref:g.ref,props:g.props,_owner:g._owner}}function W(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function G(g){var C={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(H){return C[H]})}var re=/\/+/g;function se(g,C){return typeof g=="object"&&g!==null&&g.key!=null?G(""+g.key):C.toString(36)}function X(g,C,H,K,U){var te=typeof g;(te==="undefined"||te==="boolean")&&(g=null);var oe=!1;if(g===null)oe=!0;else switch(te){case"string":case"number":oe=!0;break;case"object":switch(g.$$typeof){case e:case t:oe=!0}}if(oe)return oe=g,U=U(oe),g=K===""?"."+se(oe,0):K,$(U)?(H="",g!=null&&(H=g.replace(re,"$&/")+"/"),X(U,C,H,"",function(Re){return Re})):U!=null&&(W(U)&&(U=A(U,H+(!U.key||oe&&oe.key===U.key?"":(""+U.key).replace(re,"$&/")+"/")+g)),C.push(U)),1;if(oe=0,K=K===""?".":K+":",$(g))for(var ne=0;ne<g.length;ne++){te=g[ne];var le=K+se(te,ne);oe+=X(te,C,H,le,U)}else if(le=m(g),typeof le=="function")for(g=le.call(g),ne=0;!(te=g.next()).done;)te=te.value,le=K+se(te,ne++),oe+=X(te,C,H,le,U);else if(te==="object")throw C=String(g),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.");return oe}function de(g,C,H){if(g==null)return g;var K=[],U=0;return X(g,K,"","",function(te){return C.call(H,te,U++)}),K}function Z(g){if(g._status===-1){var C=g._result;C=C(),C.then(function(H){(g._status===0||g._status===-1)&&(g._status=1,g._result=H)},function(H){(g._status===0||g._status===-1)&&(g._status=2,g._result=H)}),g._status===-1&&(g._status=0,g._result=C)}if(g._status===1)return g._result.default;throw g._result}var V={current:null},ee={transition:null},he={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:ee,ReactCurrentOwner:T};function ue(){throw Error("act(...) is not supported in production builds of React.")}return J.Children={map:de,forEach:function(g,C,H){de(g,function(){C.apply(this,arguments)},H)},count:function(g){var C=0;return de(g,function(){C++}),C},toArray:function(g){return de(g,function(C){return C})||[]},only:function(g){if(!W(g))throw Error("React.Children.only expected to receive a single React element child.");return g}},J.Component=E,J.Fragment=r,J.Profiler=a,J.PureComponent=S,J.StrictMode=n,J.Suspense=s,J.__SECRET_INT
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=he,J.act=ue,J.cloneElement=function(g,C,H){if(g==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+g+".");var K=R({},g.props),U=g.key,te=g.ref,oe=g._owner;if(C!=null){if(C.ref!==void 0&&(te=C.ref,oe=T.current),C.key!==void 0&&(U=""+C.key),g.type&&g.type.defaultProps)var ne=g.type.defaultProps;for(le in C)P.call(C,le)&&!v.hasOwnProperty(le)&&(K[le]=C[le]===void 0&&ne!==void 0?ne[le]:C[le])}var le=arguments.length-2;if(le===1)K.children=H;else if(1<le){ne=Array(le);for(var Re=0;Re<le;Re++)ne[Re]=arguments[Re+2];K.children=ne}return{$$typeof:e,type:g.type,key:U,ref:te,props:K,_owner:oe}},J.createContext=function(g){return g={$$typeof:i,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},g.Provider={$$typeof:o,_context:g},g.Consumer=g},J.createElement=D,J.createFactory=function(g){var C=D.bind(null,g);return C.type=g,C},J.createRef=function(){return{current:null}},J.forwardRef=function(g){return{$$typeof:l,render:g}},J.isValidElement=W,J.lazy=function(g){return{$$typeof:h,_payload:{_status:-1,_result:g},_init:Z}},J.memo=function(g,C){return{$$typeof:u,type:g,compare:C===void 0?null:C}},J.startTransition=function(g){var C=ee.transition;ee.transition={};try{g()}finally{ee.transition=C}},J.unstable_act=ue,J.useCallback=function(g,C){return V.current.useCallback(g,C)},J.useContext=function(g){return V.current.useContext(g)},J.useDebugValue=function(){},J.useDeferredValue=function(g){return V.current.useDeferredValue(g)},J.useEffect=function(g,C){return V.current.useEffect(g,C)},J.useId=function(){return V.current.useId()},J.useImperativeHandle=function(g,C,H){return V.current.useImperativeHandle(g,C,H)},J.useInsertionEffect=function(g,C){return V.current.useInsertionEffect(g,C)},J.useLayoutEffect=function(g,C){return V.current.useLayoutEffect(g,C)},J.useMemo=function(g,C){return V.current.useMemo(g,C)},J.useReducer=function(g,C,H){return V.current.useReducer(g,C,H)},J.useRef=function(g){return V.current.useRef(g)},J.useState=function(g){return V.current.useState(g)},J.useSyncExternalStore=function(g,C,H){return V.current.useSyncExternalStore(g,C,H)},J.useTransition=function(){return V.current.useTransition()},J.version="18.3.1",J}var Gr;function Ja(){return Gr||(Gr=1,Xt.exports=Ya()),Xt.exports}var c=Ja();const Ka=Va(c),Ga=Wa({__proto__:null,default:Ka},[c]);/**
10 * react-router v7.12.0
11 *
12 * Copyright (c) Remix Software Inc.
13 *
14 * This source code is licensed under the MIT license found in the
15 * LICENSE.md file in the root directory of this source tree.
16 *
17 * @license MIT
18 */var Pn=e=>{throw TypeError(e)},Xa=(e,t,r)=>t.has(e)||Pn("Cannot "+r),qt=(e,t,r)=>(Xa(e,t,"read from private field"),r?r.call(e):t.get(e)),qa=(e,t,r)=>t.has(e)?Pn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Xr="popstate";function ls(e={}){function t(n,a){let{pathname:o,search:i,hash:l}=n.location;return ht("",{pathname:o,search:i,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Te(a)}return Za(t,r,null,e)}function z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ie(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Qa(){return Math.random().toString(36).substring(2,10)}function qr(e,t){return{usr:e.state,key:e.key,idx:t}}function ht(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?je(t):t,state:r,key:t&&t.key||n||Qa()}}function Te({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function je(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function Za(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=h();u==null&&(u=0,i.replaceState({...i.state,idx:u},""));function h(){return(i.state||{idx:null}).idx}function d(){l="POP";let E=h(),L=E==null?null:E-u;u=E,s&&s({action:l,location:b.location,delta:L})}function m(E,L){l="PUSH";let S=ht(b.location,E,L);u=h()+1;let O=qr(S,u),$=b.createHref(S);try{i.pushState(O,"",$)}
18catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;a.location.assign($)}o&&s&&s({action:l,location:b.location,delta:1})}function y(E,L){l="REPLACE";let S=ht(b.location,E,L);u=h();let O=qr(S,u),$=b.createHref(S);i.replaceState(O,"",$),o&&s&&s({action:l,location:b.location,delta:0})}function R(E){return Mn(E)}let b={get action(){return l},get location(){return e(a,i)},listen(E){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Xr,d),s=E,()=>{a.removeEventListener(Xr,d),s=null}},createHref(E){return t(a,E)},createURL:R,encodeLocation(E){let L=R(E);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:m,replace:y,go(E){return i.go(E)}};return b}function Mn(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),z(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Te(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var ct,Qr=class{constructor(e){if(qa(this,ct,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(qt(this,ct).has(e))return qt(this,ct).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){qt(this,ct).set(e,t)}};ct=new WeakMap;var eo=new Set(["lazy","caseSensitive","path","id","index","children"]);function to(e){return eo.has(e)}var ro=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function no(e){return ro.has(e)}function ao(e){return e.index===!0}function mt(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let l=[...r,String(i)],s=typeof o.id=="string"?o.id:l.join("-");if(z(o.index!==!0||!o.children,"Cannot specify children on an index route"),z(a||!n[s],`Found a route id collision on i
18d "${s}".  Route id's must be globally unique within Data Router usages`),ao(o)){let u={...o,id:s};return n[s]=Zr(u,t(u)),u}else{let u={...o,id:s,children:void 0};return n[s]=Zr(u,t(u)),o.children&&(u.children=mt(o.children,t,l,n,a)),u}})}function Zr(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ie(e,t,r="/"){return dt(e,t,r,!1)}function dt(e,t,r,n){let a=typeof t=="string"?je(t):t,o=Se(a.pathname||"/",r);if(o==null)return null;let i=Tn(e);oo(i);let l=null;for(let s=0;l==null&&s<i.length;++s){let u=yo(o);l=po(i[s],u,n)}return l}function Dn(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Tn(e,t=[],r=[],n="",a=!1){let o=(i,l,s=a,u)=>{let h={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(n)&&s)return;z(h.relativePath.startsWith(n),`Absolute route path "${h.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(n.length)}let d=De([n,h.relativePath]),m=r.concat(h);i.children&&i.children.length>0&&(z(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),Tn(i.children,t,m,d,s)),!(i.path==null&&!i.index)&&t.push({path:d,score:ho(d,i.index),routesMeta:m})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let u of On(i.path))o(i,l,!0,u)}),t}function On(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=On(n.join("/")),l=[];return l.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&l.push(...i),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function oo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:mo(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var io=/^:[\w-]+$/,lo=3,so=2,uo=1,co=10,fo=-2,en=e=>e==="*";function ho(e,t){let r=e.split("/"),n=r.length;return r.some(en)&&(n+=fo),t&&(n+=so),r.filter(a=>!en(a)).reduce((a,o)=>a+(io.test(o)?lo:o===""?uo:co),n)}function mo(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 po(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],u=l===n.length-1,h=o==="/"?t:t.slice(o.length)||"/",d=It({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},h),m=s.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=It({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!d)return null;
18Object.assign(a,d.params),i.push({params:a,pathname:De([o,d.pathname]),pathnameBase:wo(De([o,d.pathnameBase])),route:m}),d.pathnameBase!=="/"&&(o=De([o,d.pathnameBase]))}return i}function It(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=_n(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((u,{paramName:h,isOptional:d},m)=>{if(h==="*"){let R=l[m]||"";i=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const y=l[m];return d&&!y?u[h]=void 0:u[h]=(y||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function _n(e,t=!1,r=!0){ie(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,s)=>(n.push({paramName:l,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function yo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ie(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Se(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 vo({basename:e,pathname:t}){return t==="/"?e:De([e,t])}var Fn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jt=e=>Fn.test(e);function go(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?je(e):e,o;if(r)if(jt(r))o=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),ie(!1,`Pathnames cannot have embedded double slashes - normalizing ${i} -> ${r}`)}r.startsWith("/")?o=tn(r.substring(1),"/"):o=tn(r,t)}else o=t;return{pathname:o,search:Eo(n),hash:Ro(a)}}function tn(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 Qt(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 <Link to="..."> and the router will parse it for you.`}function kn(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function wr(e){let t=kn(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Er(e,t,r,n=!1){let a;typeof e=="string"?a=je(e):(a={...e},z(!a.pathname||!a.pathname.includes("?"),Qt("?","pathname","search",a)),z(!a.pathname||!a.pathname.includes("#"),Qt("#","pathname","hash",a)),z(!a.search||!a.search.includes("#"),Qt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,l;if(i==null)l=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),d-=1;a.pathname=m.join("/")}l=d>=0?t[d]:"/"}let s=go(a,l),u=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||h)&&(s.pathname+="/"),s}var De=e=>e.join("/").replace(/\/\/+/g,"/"),wo=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Eo=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ro=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,bo=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function So(e,t){return new bo(e,typeof t=="number"?{status:t}:t)}var xo=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},Ue=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function Ke(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function rt(e){return e.map(t=>
18t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var In=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function $n(e,t){let r=e;if(typeof r!="string"||!Fn.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(In)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),l=Se(i.pathname,t);i.origin===o.origin&&l!=null?r=l+i.search+i.hash:a=!0}catch{ie(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var Ae=Symbol("Uninstrumented");function Co(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let l of i)o[l]&&r[l].push(o[l])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=et(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],l=r[`lazy.${o}`];if(typeof i=="function"&&l.length>0){let s=et(l,i,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[Ae]??o,l=et(r[a],i,(...s)=>rn(s[0]));l&&(a==="loader"&&i.hydrate===!0&&(l.hydrate=!0),l[Ae]=i,n[a]=l)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[Ae]??a,i=et(r.middleware,o,(...l)=>rn(l[0]));return i?(i[Ae]=o,i):a})),n}function Lo(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[Ae]??e.navigate,a=et(r.navigate,n,(...o)=>{let[i,l]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Te(i):".",...nn(e,l??{})}});a&&(a[Ae]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[Ae]??e.fetch,a=et(r.fetch,n,(...o)=>{let[i,,l,s]=o;return{href:l??".",fetcherKey:i,...nn(e,s??{})}});a&&(a[Ae]=n,e.fetch=a)}return e}function et(e,t,r){return e.length===0?null:async(...n)=>{let a=await Nn(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function Nn(e,t,r,n){let a=e[n],o;if(a){let i,l=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=Nn(e,t,r,n-1),o=await i,z(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(l,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await l(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function rn(e){let{request:t,context:r,params:n,unstable_pattern:a}=e;return{request:Po(t),params:{...n},unstable_pattern:a,context:Mo(r)}}function nn(e,t){return{currentUrl:Te(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 Po(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Mo(e){if(To(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Do=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function To(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Do}var An=["POST","PUT","PATCH","DELETE"],Oo=new Set(An),_o=["GET",...An],Fo=new Set(_o),jn=new Set([301,302,303,307,308]),ko=new Set([307,308]),Zt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Un={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Io=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),zn="remix-router-transitions",Hn=Symbol("ResetLoaderData");function ss(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";z(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Io,o=a;if(e.unstable_instrumentations){let f=e.unstable_instrumentations;o=p=>({...a(p),...Co(f.map(w=>
18w.route).filter(Boolean),p)})}let i={},l=mt(e.routes,o,void 0,i),s,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let h=e.dataStrategy||Uo,d={...e.future},m=null,y=new Set,R=null,b=null,E=null,L=e.hydrationData!=null,S=Ie(l,e.history.location,u),O=!1,$=null,P;if(S==null&&!e.patchRoutesOnNavigation){let f=Ce(404,{pathname:e.history.location.pathname}),{matches:p,route:w}=Ct(l);P=!0,S=p,$={[w.id]:f}}else if(S&&!e.hydrationData&&Et(S,l,e.history.location.pathname).active&&(S=null),S)if(S.some(f=>f.route.lazy))P=!1;else if(!S.some(f=>Rr(f.route)))P=!0;else{let f=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null;if(p){let w=S.findIndex(x=>p[x.route.id]!==void 0);P=S.slice(0,w+1).every(x=>!lr(x.route,f,p))}else P=S.every(w=>!lr(w.route,f,p))}else{P=!1,S=[];let f=Et(null,l,e.history.location.pathname);f.active&&f.matches&&(O=!0,S=f.matches)}let T,v={historyAction:e.history.action,location:e.history.location,matches:S,initialized:P,navigation:Zt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||$,fetchers:new Map,blockers:new Map},D="POP",A=null,W=!1,G,re=!1,se=new Map,X=null,de=!1,Z=!1,V=new Set,ee=new Map,he=0,ue=-1,g=new Map,C=new Set,H=new Map,K=new Map,U=new Set,te=new Map,oe,ne=null;function le(){if(m=e.history.listen(({action:f,location:p,delta:w})=>{if(oe){oe(),oe=void 0;return}ie(te.size===0||w!=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 x=Br({currentLocation:v.location,nextLocation:p,historyAction:f});if(x&&w!=null){let M=new Promise(k=>{oe=k});e.history.go(w*-1),wt(x,{state:"blocked",location:p,proceed(){wt(x,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),M.then(()=>e.history.go(w))},reset(){let k=new Map(v.blockers);k.set(x,lt),pe({blockers:k})}}),A==null||A.resolve(),A=null;return}return He(f,p)}),r){ai(t,se);let f=()=>oi(t,se);t.addEventListener("pagehide",f),X=()=>t.removeEventListener("pagehide",f)}return v.initialized||He("POP",v.location,{initialHydration:!0}),T}function Re(){m&&m(),X&&X(),y.clear(),G&&G.abort(),v.fetchers.forEach((f,p)=>Jt(p)),v.blockers.forEach((f,p)=>Hr(p))}function Ma(f){return y.add(f),()=>y.delete(f)}function pe(f,p={}){f.matches&&(f.matches=f.matches.map(M=>{let k=i[M.route.id],j=M.route;return j.element!==k.element||j.errorElement!==k.errorElement||j.hydrateFallbackElement!==k.hydrateFallbackElement?{...M,route:k}:M})),v={...v,...f};let w=[],x=[];v.fetchers.forEach((M,k)=>{M.state==="idle"&&(U.has(k)?w.push(k):x.push(k))}),U.forEach(M=>{!v.fetchers.has(M)&&!ee.has(M)&&w.push(M)}),[...y].forEach(M=>M(v,{deletedFetchers:w,newErrors:f.errors??null,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),w.forEach(M=>Jt(M)),x.forEach(M=>v.fetchers.delete(M))}function qe(f,p,{flushSync:w}={}){var B,I;let x=v.actionData!=null&&v.navigation.formMethod!=null&&ve(v.navigation.formMethod)&&v.navigation.state==="loading"&&((B=f.state)==null?void 0:B._isRedirect)!==!0,M;p.actionData?Object.keys(p.actionData).length>0?M=p.actionData:M=null:x?M=v.actionData:M=null;let k=p.loaderData?mn(v.loaderData,p.loaderData,p.matches||[],p.errors):v.loaderData,j=v.blockers;j.size>
180&&(j=new Map(j),j.forEach((Y,q)=>j.set(q,lt)));let _=de?!1:Vr(f,p.matches||v.matches),F=W===!0||v.navigation.formMethod!=null&&ve(v.navigation.formMethod)&&((I=f.state)==null?void 0:I._isRedirect)!==!0;s&&(l=s,s=void 0),de||D==="POP"||(D==="PUSH"?e.history.push(f,f.state):D==="REPLACE"&&e.history.replace(f,f.state));let N;if(D==="POP"){let Y=se.get(v.location.pathname);Y&&Y.has(f.pathname)?N={currentLocation:v.location,nextLocation:f}:se.has(f.pathname)&&(N={currentLocation:f,nextLocation:v.location})}else if(re){let Y=se.get(v.location.pathname);Y?Y.add(f.pathname):(Y=new Set([f.pathname]),se.set(v.location.pathname,Y)),N={currentLocation:v.location,nextLocation:f}}pe({...p,actionData:M,loaderData:k,historyAction:D,location:f,initialized:!0,navigation:Zt,revalidation:"idle",restoreScrollPosition:_,preventScrollReset:F,blockers:j},{viewTransitionOpts:N,flushSync:w===!0}),D="POP",W=!1,re=!1,de=!1,Z=!1,A==null||A.resolve(),A=null,ne==null||ne.resolve(),ne=null}async function Ir(f,p){if(A==null||A.resolve(),A=null,typeof f=="number"){A||(A=vn());let q=A.promise;return e.history.go(f),q}let w=ir(v.location,v.matches,u,f,p==null?void 0:p.fromRouteId,p==null?void 0:p.relative),{path:x,submission:M,error:k}=an(!1,w,p),j=v.location,_=ht(v.location,x,p&&p.state);_={..._,...e.history.encodeLocation(_)};let F=p&&p.replace!=null?p.replace:void 0,N="PUSH";F===!0?N="REPLACE":F===!1||M!=null&&ve(M.formMethod)&&M.formAction===v.location.pathname+v.location.search&&(N="REPLACE");let B=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,I=(p&&p.flushSync)===!0,Y=Br({currentLocation:j,nextLocation:_,historyAction:N});if(Y){wt(Y,{state:"blocked",location:_,proceed(){wt(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),Ir(f,p)},reset(){let q=new Map(v.blockers);q.set(Y,lt),pe({blockers:q})}});return}await He(N,_,{submission:M,pendingError:k,preventScrollReset:B,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:I,callSiteDefaultShouldRevalidate:p&&p.unstable_defaultShouldRevalidate})}function Da(){ne||(ne=vn()),Yt(),pe({revalidation:"loading"});let f=ne.promise;return v.navigation.state==="submitting"?f:v.navigation.state==="idle"?(He(v.historyAction,v.location,{startUninterruptedRevalidation:!0}),f):(He(D||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation,enableViewTransition:re===!0}),f)}async function He(f,p,w){G&&G.abort(),G=null,D=f,de=(w&&w.startUninterruptedRevalidation)===!0,Ua(v.location,v.matches),W=(w&&w.preventScrollReset)===!0,re=(w&&w.enableViewTransition)===!0;let x=s||l,M=w&&w.overrideNavigation,k=w!=null&&w.initialHydration&&v.matches&&v.matches.length>0&&!O?v.matches:Ie(x,p,u),j=(w&&w.flushSync)===!0;if(k&&v.initialized&&!Z&&Ko(v.location,p)&&!(w&&w.submission&&ve(w.submission.formMethod))){qe(p,{matches:k},{flushSync:j});return}let _=Et(k,x,p.pathname);if(_.active&&_.matches&&(k=_.matches),!k){let{error:fe,notFoundMatches:ge,route:ae}=Kt(p.pathname);qe(p,{matches:ge,loaderData:{},errors:{[ae.id]:fe}},{flushSync:j});return}G=new AbortController;let F=Ze(e.history,p,G.signal,w&&w.submission),N=e.getContext?await e.getContext():new Qr,B;if(w&&w.pendingError)B=[Ne(k).route.id,{type:"error",error:w.pendingError}];else if(w&&w.submission&&ve(w.submission.formMethod)){let fe=await Ta(F,p,w.submission,k,N,_.active,w&&w.initialHydration===!0,{replace:w.replace,flushSync:j});if(fe.shortCircuited)return;if(fe.pendingActionResult){let[ge,ae]=fe.pendingActionResult;if(be(ae)&&Ke(ae.error)&&ae.error.status===404){G=null,qe(p,{matches:fe.matches,loaderData:{},errors:{[ge]:ae.error}});return}}k=fe.matches||k,B=fe.pendingActionResult,M=er(p,w.submission),j=!1,_.active=!1,F=Ze(e.history,F.url,F.signal)}let{shortCircuited:I,matches:Y,loaderData:q,errors:me}=await Oa(F,p,k,N,_.active,M,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,j,B,w&&w.callSiteDefaultShouldRevalidate);I||(G=null,qe(p,{matches:Y||k,...pn(B),loaderData:q,errors:me}))}async function Ta(f,p,w,x,M,k,j,_={}){Yt();let F=ri(p,w);if(pe({navigation:F},{flushSync:_.flushSync===!0}),k){let I=await Rt(x,p.pathname,f.signal);if(I.type==="aborted")return{shortCircuited:!0};if(I.type==="error"){if(I.partialMatches.length===0){let{matches:q,route:me}=Ct(l);return{matches:q,pendingActionResult:[me.id,{type:"error",error:I.error}]}}let Y=Ne(I.partialMatches).route.id;return{matches:I.partialMatches,pendingActionResult:[Y,{type:"error",error:I.error}]}}else if(I.matches)x=I.matches;else{let{notFoundMatches:Y,error:q,route:me}=Kt(p.pathname);return{matches:Y,pendingActionResult:[me.id,{type:"error",error:q}]}}}let N,B=Ot(x,p);if(!B.route.action&&!B.route.lazy)N={type:"error",error:Ce(405,{method:f.method,pathname:p.pathname,routeId:B.route.id})};else{let I=tt(o,i,f,x,B,j?[]:n,M),Y=await at(f,I,M,null);if(N=Y[B.route.id],!N){for(let q of x)if(Y[q.route.id]){N=Y[q.route.id];break}}
18if(f.signal.aborted)return{shortCircuited:!0}}if(Je(N)){let I;return _&&_.replace!=null?I=_.replace:I=dn(N.response.headers.get("Location"),new URL(f.url),u,e.history)===v.location.pathname+v.location.search,await Be(f,N,!0,{submission:w,replace:I}),{shortCircuited:!0}}if(be(N)){let I=Ne(x,B.route.id);return(_&&_.replace)!==!0&&(D="PUSH"),{matches:x,pendingActionResult:[I.route.id,N,B.route.id]}}return{matches:x,pendingActionResult:[B.route.id,N]}}async function Oa(f,p,w,x,M,k,j,_,F,N,B,I,Y){let q=k||er(p,j),me=j||_||yn(q),fe=!de&&!N;if(M){if(fe){let ye=$r(I);pe({navigation:q,...ye!==void 0?{actionData:ye}:{}},{flushSync:B})}let Q=await Rt(w,p.pathname,f.signal);if(Q.type==="aborted")return{shortCircuited:!0};if(Q.type==="error"){if(Q.partialMatches.length===0){let{matches:Qe,route:Ye}=Ct(l);return{matches:Qe,loaderData:{},errors:{[Ye.id]:Q.error}}}let ye=Ne(Q.partialMatches).route.id;return{matches:Q.partialMatches,loaderData:{},errors:{[ye]:Q.error}}}else if(Q.matches)w=Q.matches;else{let{error:ye,notFoundMatches:Qe,route:Ye}=Kt(p.pathname);return{matches:Qe,loaderData:{},errors:{[Ye.id]:ye}}}}let ge=s||l,{dsMatches:ae,revalidatingFetchers:xe}=on(f,x,o,i,e.history,v,w,me,p,N?[]:n,N===!0,Z,V,U,H,C,ge,u,e.patchRoutesOnNavigation!=null,I,Y);if(ue=++he,!e.dataStrategy&&!ae.some(Q=>Q.shouldLoad)&&!ae.some(Q=>Q.route.middleware&&Q.route.middleware.length>0)&&xe.length===0){let Q=Ur();return qe(p,{matches:w,loaderData:{},errors:I&&be(I[1])?{[I[0]]:I[1].error}:null,...pn(I),...Q?{fetchers:new Map(v.fetchers)}:{}},{flushSync:B}),{shortCircuited:!0}}if(fe){let Q={};if(!M){Q.navigation=q;let ye=$r(I);ye!==void 0&&(Q.actionData=ye)}xe.length>0&&(Q.fetchers=_a(xe)),pe(Q,{flushSync:B})}xe.forEach(Q=>{Fe(Q.key),Q.controller&&ee.set(Q.key,Q.controller)});let We=()=>xe.forEach(Q=>Fe(Q.key));G&&G.signal.addEventListener("abort",We);let{loaderResults:ot,fetcherResults:$e}=await Nr(ae,xe,f,x);if(f.signal.aborted)return{shortCircuited:!0};G&&G.signal.removeEventListener("abort",We),xe.forEach(Q=>ee.delete(Q.key));let Me=Lt(ot);if(Me)return await Be(f,Me.result,!0,{replace:F}),{shortCircuited:!0};if(Me=Lt($e),Me)return C.add(Me.key),await Be(f,Me.result,!0,{replace:F}),{shortCircuited:!0};let{loaderData:Gt,errors:it}=hn(v,w,ot,I,xe,$e);N&&v.errors&&(it={...v.errors,...it});let Ve=Ur(),bt=zr(ue),St=Ve||bt||xe.length>0;return{matches:w,loaderData:Gt,errors:it,...St?{fetchers:new Map(v.fetchers)}:{}}}function $r(f){if(f&&!be(f[1]))return{[f[0]]:f[1].data};if(v.actionData)return Object.keys(v.actionData).length===0?null:v.actionData}function _a(f){return f.forEach(p=>{let w=v.fetchers.get(p.key),x=st(void 0,w?w.data:void 0);v.fetchers.set(p.key,x)}),new Map(v.fetchers)}async function Fa(f,p,w,x){Fe(f);let M=(x&&x.flushSync)===!0,k=s||l,j=ir(v.location,v.matches,u,w,p,x==null?void 0:x.relative),_=Ie(k,j,u),F=Et(_,k,j);if(F.active&&F.matches&&(_=F.matches),!_){_e(f,p,Ce(404,{pathname:j}),{flushSync:M});return}let{path:N,submission:B,error:I}=an(!0,j,x);if(I){_e(f,p,I,{flushSync:M});return}let Y=e.getContext?await e.getContext():new Qr,q=(x&&x.preventScrollReset)===!0;if(B&&ve(B.formMethod)){await ka(f,p,N,_,Y,F.active,M,q,B,x&&x.unstable_defaultShouldRevalidate);return}H.set(f,{routeId:p,path:N}),await Ia(f,p,N,_,Y,F.active,M,q,B)}async function ka(f,p,w,x,M,k,j,_,F,N){Yt(),H.delete(f);let B=v.fetchers.get(f);Oe(f,ni(F,B),{flushSync:j});let I=new AbortController,Y=Ze(e.history,w,I.signal,F);if(k){let ce=await Rt(x,new URL(Y.url).pathname,Y.signal,f);if(ce.type==="aborted")return;if(ce.type==="error"){_e(f,p,ce.error,{flushSync:j});return}else if(ce.matches)x=ce.matches;else{_e(f,p,Ce(404,{pathname:w}),{flushSync:j});return}}let q=Ot(x,w);if(!q.route.action&&!q.route.lazy){let ce=Ce(405,{method:F.formMethod,pathname:w,routeId:p});_e(f,p,ce,{flushSync:j});return}ee.set(f,I);let me=he,fe=tt(o,i,Y,x,q,n,M),ge=await at(Y,fe,M,f),ae=ge[q.route.id];if(!ae){for(let ce of fe)if(ge[ce.route.id]){ae=ge[ce.route.id];break}}if(Y.signal.aborted){ee.get(f)===I&&ee.delete(f);return}if(U.has(f)){if(Je(ae)||be(ae)){Oe(f,ke(void 0));return}}else{if(Je(ae))if(ee.delete(f),ue>me){Oe(f,ke(void 0));return}else return C.add(f),Oe(f,st(F)),Be(Y,ae,!1,{fetcherSubmission:F,preventScrollReset:_});if(be(ae)){_e(f,p,ae.error);return}}let xe=v.navigation.location||v.location,We=Ze(e.history,xe,I.signal),ot=s||l,$e=v.navigation.state!=="idle"?Ie(ot,v.navigation.location,u):v.matches;z($e,"Didn't find any matches after fetcher action");let Me=++he;g.set(f,Me);let Gt=st(F,ae.data);v.fetchers.set(f,Gt);let{dsMatches:it,revalidatingFetchers:Ve}=on(We,M,o,i,e.history,v,$e,F,xe,n,!1,Z,V,U,H,C,ot,u,e.patchRoutesOnNavigation!=null,[q.route.id,ae],N);Ve.filter(ce=>ce.key!==f).forEach(ce=>{let xt=ce.key,Jr=v.fetchers.get(xt),Ba=st(void 0,Jr?Jr.data:void 0);
18v.fetchers.set(xt,Ba),Fe(xt),ce.controller&&ee.set(xt,ce.controller)}),pe({fetchers:new Map(v.fetchers)});let bt=()=>Ve.forEach(ce=>Fe(ce.key));I.signal.addEventListener("abort",bt);let{loaderResults:St,fetcherResults:Q}=await Nr(it,Ve,We,M);if(I.signal.aborted)return;if(I.signal.removeEventListener("abort",bt),g.delete(f),ee.delete(f),Ve.forEach(ce=>ee.delete(ce.key)),v.fetchers.has(f)){let ce=ke(ae.data);v.fetchers.set(f,ce)}let ye=Lt(St);if(ye)return Be(We,ye.result,!1,{preventScrollReset:_});if(ye=Lt(Q),ye)return C.add(ye.key),Be(We,ye.result,!1,{preventScrollReset:_});let{loaderData:Qe,errors:Ye}=hn(v,$e,St,void 0,Ve,Q);zr(Me),v.navigation.state==="loading"&&Me>ue?(z(D,"Expected pending action"),G&&G.abort(),qe(v.navigation.location,{matches:$e,loaderData:Qe,errors:Ye,fetchers:new Map(v.fetchers)})):(pe({errors:Ye,loaderData:mn(v.loaderData,Qe,$e,Ye),fetchers:new Map(v.fetchers)}),Z=!1)}async function Ia(f,p,w,x,M,k,j,_,F){let N=v.fetchers.get(f);Oe(f,st(F,N?N.data:void 0),{flushSync:j});let B=new AbortController,I=Ze(e.history,w,B.signal);if(k){let ae=await Rt(x,new URL(I.url).pathname,I.signal,f);if(ae.type==="aborted")return;if(ae.type==="error"){_e(f,p,ae.error,{flushSync:j});return}else if(ae.matches)x=ae.matches;else{_e(f,p,Ce(404,{pathname:w}),{flushSync:j});return}}let Y=Ot(x,w);ee.set(f,B);let q=he,me=tt(o,i,I,x,Y,n,M),ge=(await at(I,me,M,f))[Y.route.id];if(ee.get(f)===B&&ee.delete(f),!I.signal.aborted){if(U.has(f)){Oe(f,ke(void 0));return}if(Je(ge))if(ue>q){Oe(f,ke(void 0));return}else{C.add(f),await Be(I,ge,!1,{preventScrollReset:_});return}if(be(ge)){_e(f,p,ge.error);return}Oe(f,ke(ge.data))}}async function Be(f,p,w,{submission:x,fetcherSubmission:M,preventScrollReset:k,replace:j}={}){w||(A==null||A.resolve(),A=null),p.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let _=p.response.headers.get("Location");z(_,"Expected a Location header on the redirect Response"),_=dn(_,new URL(f.url),u,e.history);let F=ht(v.location,_,{_isRedirect:!0});if(r){let me=!1;if(p.response.headers.has("X-Remix-Reload-Document"))me=!0;else if(jt(_)){const fe=Mn(_,!0);me=fe.origin!==t.location.origin||Se(fe.pathname,u)==null}if(me){j?t.location.replace(_):t.location.assign(_);return}}G=null;let N=j===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:B,formAction:I,formEncType:Y}=v.navigation;!x&&!M&&B&&I&&Y&&(x=yn(v.navigation));let q=x||M;if(ko.has(p.response.status)&&q&&ve(q.formMethod))await He(N,F,{submission:{...q,formAction:_},preventScrollReset:k||W,enableViewTransition:w?re:void 0});else{let me=er(F,x);await He(N,F,{overrideNavigation:me,fetcherSubmission:M,preventScrollReset:k||W,enableViewTransition:w?re:void 0})}}async function at(f,p,w,x){var j;let M,k={};try{M=await Ho(h,f,p,x,w,!1)}catch(_){return p.filter(F=>F.shouldLoad).forEach(F=>{k[F.route.id]={type:"error",error:_}}),k}if(f.signal.aborted)return k;if(!ve(f.method))for(let _ of p){if(((j=M[_.route.id])==null?void 0:j.type)==="error")break;!M.hasOwnProperty(_.route.id)&&!v.loaderData.hasOwnProperty(_.route.id)&&(!v.errors||!v.errors.hasOwnProperty(_.route.id))&&_.shouldCallHandler()&&(M[_.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${_.route.id}`)})}for(let[_,F]of Object.entries(M))if(Qo(F)){let N=F.result;k[_]={type:"redirect",response:Yo(N,f,_,p,u)}}else k[_]=await Vo(F);return k}async function Nr(f,p,w,x){let M=at(w,f,x,null),k=Promise.all(p.map(async F=>{if(F.matches&&F.match&&F.request&&F.controller){let B=(await at(F.request,F.matches,x,F.key))[F.match.route.id];return{[F.key]:B}}else return Promise.resolve({[F.key]:{type:"error",error:Ce(404,{pathname:F.path})}})})),j=await M,_=(await k).reduce((F,N)=>Object.assign(F,N),{});return{loaderResults:j,fetcherResults:_}}function Yt(){Z=!0,H.forEach((f,p)=>{ee.has(p)&&V.add(p),Fe(p)})}function Oe(f,p,w={}){v.fetchers.set(f,p),pe({fetchers:new Map(v.fetchers)},{flushSync:(w&&w.flushSync)===!0})}function _e(f,p,w,x={}){let M=Ne(v.matches,p);Jt(f),pe({errors:{[M.route.id]:w},fetchers:new Map(v.fetchers)},{flushSync:(x&&x.flushSync)===!0})}function Ar(f){return K.set(f,(K.get(f)||0)+1),U.has(f)&&U.delete(f),v.fetchers.get(f)||Un}function $a(f,p){Fe(f,p==null?void 0:p.reason),Oe(f,ke(null))}function Jt(f){let p=v.fetchers.get(f);ee.has(f)&&!(p&&p.state==="loading"&&g.has(f))&&Fe(f),H.delete(f),g.delete(f),C.delete(f),U.delete(f),V.delete(f),v.fetchers.delete(f)}function Na(f){let p=(K.get(f)||0)-1;p<=0?(K.delete(f),U.add(f)):K.set(f,p),pe({fetchers:new Map(v.fetchers)})}function Fe(f,p){let w=ee.get(f);w&&(w.abort(p),ee.delete(f))}function jr(f){for(let p of f){let w=Ar(p),x=ke(w.data);v.fetchers.set(p,x)}}function Ur(){let f=[],p=!1;for(let w of C){let x=v.fetchers.get(w);z(x,`Expected fetcher: ${w}`),x.state==="loading"&&(C.delete(w),f.push(w),p=!0)}return jr(f),p}function zr(f){let p=[];for(let[w,x]of g)if(x<f){let M=v.fetchers.get(w);z(M,`Expected fetcher: ${w}`),M.state==="loading"&&(Fe(w),g.delete(w),p.push(w))}return jr(p),p.length>0}function Aa(f,p){let w=v.blockers.get(f)||lt;return te.get(f)!==p&&te.set(f,p),w}function Hr(f){v.blockers.delete(f),te.delete(f)}function wt(f,p){let w=v.blockers.get(f)||lt;z(w.state==="unblocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="proceeding"||w.state==="blocked"&&p.state==="unblocked"||w.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${w.state} -> ${p.state}`);let x=new Map(v.blockers);x.set(f,p),pe({blockers:x})}function Br({currentLocation:f,nextLocation:p,historyAction:w}){if(te.size===0)return;te.size>1&&ie(!1,"A router only supports one blocker at a time");let x=Array.from(te.entries()),[M,k]=x[x.length-1],j=v.blockers.get(M);if(!(j&&j.state==="proceeding")&&k({currentLocation:f,nextLocation:p,historyAction:w}))return M}function Kt(f){let p=Ce(404,{pathname:f}),w=s||l,{matches:x,route:M}=Ct(w);return{notFoundMatches:x,route:M,error:p}}function ja(f,p,w){if(R=f,E=p,b=w||null,!L&&v.navigation===Zt){L=!0;let x=Vr(v.location,v.matches);x!=null&&pe({restoreScrollPosition:x})}return()=>{R=null,E=null,b=null}}function Wr(f,p){return b&&b(f,p.map(x=>Dn(x,v.loaderData)))||f.key}function Ua(f,p){if(R&&E){let w=Wr(f,p);R[w]=E()}}function Vr(f,p){if(R){let w=Wr(f,p),x=R[w];if(typeof x=="number")return x}return null}function Et(f,p,w){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:dt(p,w,u,!0)}}else return{active:!0,matches:dt(p,w,u,!0)||[]};return{active:!1,matches:null}}async function Rt(f,p,w,x){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let M=f;
18for(;;){let k=s==null,j=s||l,_=i;try{await e.patchRoutesOnNavigation({signal:w,path:p,matches:M,fetcherKey:x,patch:(B,I)=>{w.aborted||ln(B,I,j,_,o,!1)}})}catch(B){return{type:"error",error:B,partialMatches:M}}finally{k&&!w.aborted&&(l=[...l])}if(w.aborted)return{type:"aborted"};let F=Ie(j,p,u),N=null;if(F){if(Object.keys(F[0].params).length===0)return{type:"success",matches:F};if(N=dt(j,p,u,!0),!(N&&M.length<N.length&&Yr(M,N.slice(0,M.length))))return{type:"success",matches:F}}if(N||(N=dt(j,p,u,!0)),!N||Yr(M,N))return{type:"success",matches:null};M=N}}function Yr(f,p){return f.length===p.length&&f.every((w,x)=>w.route.id===p[x].route.id)}function za(f){i={},s=mt(f,o,void 0,i)}function Ha(f,p,w=!1){let x=s==null;ln(f,p,s||l,i,o,w),x&&(l=[...l],pe({}))}return T={get basename(){return u},get future(){return d},get state(){return v},get routes(){return l},get window(){return t},initialize:le,subscribe:Ma,enableScrollRestoration:ja,navigate:Ir,fetch:Fa,revalidate:Da,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:Ar,resetFetcher:$a,deleteFetcher:Na,dispose:Re,getBlocker:Aa,deleteBlocker:Hr,patchRoutes:Ha,_internalFetchControllers:ee,_internalSetRoutes:za,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){pe(f)}},e.unstable_instrumentations&&(T=Lo(T,e.unstable_instrumentations.map(f=>f.router).filter(Boolean))),T}function $o(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ir(e,t,r,n,a,o){let i,l;if(a){i=[];for(let u of t)if(i.push(u),u.route.id===a){l=u;break}}else i=t,l=t[t.length-1];let s=Er(n||".",wr(i),Se(e.pathname,r)||e.pathname,o==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&l){let u=br(s.search);if(l.route.index&&!u)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&u){let h=new URLSearchParams(s.search),d=h.getAll("index");h.delete("index"),d.filter(y=>y).forEach(y=>h.append("index",y));let m=h.toString();s.search=m?`?${m}`:""}}return r!=="/"&&(s.pathname=vo({basename:r,pathname:s.pathname})),Te(s)}function an(e,t,r){if(!r||!$o(r))return{path:t};if(r.formMethod&&!ti(r.formMethod))return{path:t,error:Ce(405,{method:r.formMethod})};let n=()=>({path:t,error:Ce(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=Kn(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ve(o))return n();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,[y,R])=>`${m}${y}=${R}
19`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!ve(o))return n();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return n()}}}z(typeof FormData=="function","FormData is not available in this environment");let l,s;if(r.formData)l=ur(r.formData),s=r.formData;else if(r.body instanceof FormData)l=ur(r.body),s=r.body;else if(r.body instanceof URLSearchParams)l=r.body,s=fn(l);else if(r.body==null)l=new URLSearchParams,s=new FormData;else try{l=new URLSearchParams(r.body),s=fn(l)}catch{return n()}let u={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ve(u.formMethod))return{path:t,submission:u};let h=je(t);return e&&h.search&&br(h.search)&&l.append("index",""),h.search=`?${l}`,{path:Te(h),submission:u}}function on(e,t,r,n,a,o,i,l,s,u,h,d,m,y,R,b,E,L,S,O,$){var de;let P=O?be(O[1])?O[1].error:O[1].data:void 0,T=a.createURL(o.location),v=a.createURL(s),D;if(h&&o.errors){let Z=Object.keys(o.errors)[0];D=i.findIndex(V=>V.route.id===Z)}else if(O&&be(O[1])){let Z=O[0];D=i.findIndex(V=>V.route.id===Z)-1}let A=O?O[1].statusCode:void 0,W=A&&A>=400,G={currentUrl:T,currentParams:((de=o.matches[0])==null?void 0:de.params)||{},nextUrl:v,nextParams:i[0].params,...l,actionResult:P,actionStatus:A},re=rt(i),se=i.map((Z,V)=>{let{route:ee}=Z,he=null;if(D!=null&&V>D?he=!1:ee.lazy?he=!0:Rr(ee)?h?he=lr(ee,o.loaderData,o.errors):No(o.loaderData,o.matches[V],Z)&&(he=!0):he=!1,he!==null)return sr(r,n,e,re,Z,u,t,he);let ue=!1;typeof $=="boolean"?ue=$:W?ue=!1:(d||T.pathname+T.search===v.pathname+v.search||T.search!==v.search||Ao(o.matches[V],Z))&&(ue=!0);let g={...G,defaultShouldRevalidate:ue},C=ft(Z,g);return sr(r,n,e,re,Z,u,t,C,g,$)}),X=[];return R.forEach((Z,V)=>{if(h||!i.some(U=>U.route.id===Z.routeId)||y.has(V))return;let ee=o.fetchers.get(V),he=ee&&ee.state!=="idle"&&ee.data===void 0,ue=Ie(E,Z.path,L);if(!ue){if(S&&he)return;X.push({key:V,routeId:Z.routeId,path:Z.path,matches:null,match:null,request:null,controller:null});return}if(b.has(V))return;let g=Ot(ue,Z.path),C=new AbortController,H=Ze(a,Z.path,C.signal),K=null;if(m.has(V))m.delete(V),K=tt(r,n,H,ue,g,u,t);else if(he)d&&(K=tt(r,n,H,ue,g,u,t));else{let U;typeof $=="boolean"?U=$:W?U=!1:U=d;let te={...G,defaultShouldRevalidate:U};ft(g,te)&&(K=tt(r,n,H,ue,g,u,t,te))}K&&X.push({key:V,routeId:Z.routeId,path:Z.path,matches:K,match:g,request:H,controller:C})}),{dsMatches:se,revalidatingFetchers:X}}function Rr(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function lr(e,t,r){if(e.lazy)return!0;
19if(!Rr(e))return!1;let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function No(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function Ao(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ft(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function ln(e,t,r,n,a,o){let i;if(e){let u=n[e];z(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r;let l=[],s=[];if(t.forEach(u=>{let h=i.find(d=>Bn(u,d));h?s.push({existingRoute:h,newRoute:u}):l.push(u)}),l.length>0){let u=mt(l,a,[e||"_","patch",String((i==null?void 0:i.length)||"0")],n);i.push(...u)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:h,newRoute:d}=s[u],m=h,[y]=mt([d],a,[],{},!0);Object.assign(m,{element:y.element?y.element:m.element,errorElement:y.errorElement?y.errorElement:m.errorElement,hydrateFallbackElement:y.hydrateFallbackElement?y.hydrateFallbackElement:m.hydrateFallbackElement})}}function Bn(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(o=>Bn(r,o))}):!1}var sn=new WeakMap,Wn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(z(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=sn.get(a);i||(i={},sn.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let u=to(e),d=a[e]!==void 0&&e!=="hasErrorBoundary";if(u)ie(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(d)ie(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let m=await o();m!=null&&(Object.assign(a,{[e]:m}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(m=>m===void 0)&&(a.lazy=void 0))})();return i[e]=s,s},un=new WeakMap;function jo(e,t,r,n,a){let o=r[e.id];if(z(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=un.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let d=(async()=>{z(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),y={};for(let R in m){let b=m[R];if(b===void 0)continue;let E=no(R),S=o[R]!==void 0&&R!=="hasErrorBoundary";E?ie(!E,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?ie(!S,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):y[R]=b}Object.assign(o,y),Object.assign(o,{...n(o),lazy:void 0})})();return un.set(o,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let i=Object.keys(e.lazy),l=[],s;for(let h of i){if(a&&a.includes(h))continue;let d=Wn({key:h,route:e,manifest:r,mapRouteProperties:n});d&&(l.push(d),h===t&&(s=d))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u==null||u.catch(()=>{}),s==null||s.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:s}}async function cn(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function Uo(e){return e.matches.some(t=>t.route.middleware)?Vn(e,()=>cn(e)):cn(e)}function Vn(e,t){return zo(e,t,n=>{if(ei(n))throw n;return n},Xo,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,l=Math.min(Math.max(i.findIndex(u=>u.route.id===a),0),Math.max(i.findIndex(u=>u.shouldCallHandler()),0)),s=Ne(i,i[l].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function zo(e,t,r,n,a){let{matches:o,request:i,params:l,context:s,unstable_pattern:u}=e,h=o.flatMap(m=>m.route.middleware?m.route.middleware.map(y=>[m.route.id,y]):[]);return await Yn({request:i,params:l,context:s,unstable_pattern:u},h,t,r,n,a)}async function Yn(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s)return await r();let[u,h]=s,d,m=async()=>
19{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await Yn(e,t,r,n,a,o,i+1)},d.value}catch(y){return d={value:await o(y,u,d)},d.value}};try{let y=await h(e,m),R=y!=null?n(y):void 0;return a(R)?R:d?R??d.value:(d={value:await m()},d.value)}catch(y){return await o(y,u,d)}}function Jn(e,t,r,n,a){let o=Wn({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=jo(n.route,ve(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function sr(e,t,r,n,a,o,i,l,s=null,u){let h=!1,d=Jn(e,t,r,a,o);return{...a,_lazyPromises:d,shouldLoad:l,shouldRevalidateArgs:s,shouldCallHandler(m){return h=!0,s?typeof u=="boolean"?ft(a,{...s,defaultShouldRevalidate:u}):typeof m=="boolean"?ft(a,{...s,defaultShouldRevalidate:m}):ft(a,s):l},resolve(m){let{lazy:y,loader:R,middleware:b}=a.route,E=h||l||m&&!ve(r.method)&&(y||R),L=b&&b.length>0&&!R&&!y;return E&&(ve(r.method)||!L)?Bo({request:r,unstable_pattern:n,match:a,lazyHandlerPromise:d==null?void 0:d.handler,lazyRoutePromise:d==null?void 0:d.route,handlerOverride:m,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function tt(e,t,r,n,a,o,i,l=null){return n.map(s=>s.route.id!==a.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:Jn(e,t,r,s,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:sr(e,t,r,rt(n),s,o,i,!0,l))}async function Ho(e,t,r,n,a,o){r.some(u=>{var h;return(h=u._lazyPromises)==null?void 0:h.middleware})&&await Promise.all(r.map(u=>{var h;return(h=u._lazyPromises)==null?void 0:h.middleware}));let i={request:t,unstable_pattern:rt(r),params:r[0].params,context:a,matches:r},s=await e({...i,fetcherKey:n,runClientMiddleware:u=>{let h=i;return Vn(h,()=>u({...h,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(u=>{var h,d;return[(h=u._lazyPromises)==null?void 0:h.handler,(d=u._lazyPromises)==null?void 0:d.route]}))}catch{}return s}async function Bo({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:a,handlerOverride:o,scopedContext:i}){let l,s,u=ve(e.method),h=u?"action":"loader",d=m=>{let y,R=new Promise((L,S)=>y=S);s=()=>y(),e.signal.addEventListener("abort",s);let b=L=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${r.route.id}]`)):m({request:e,unstable_pattern:t,params:r.params,context:i},...L!==void 0?[L]:[]),E=(async()=>{try{return{type:"data",result:await(o?o(S=>b(S)):b())}}catch(L){return{type:"error",result:L}}})();return Promise.race([E,R])};try{let m=u?r.route.action:r.route.loader;if(n||a)if(m){let y,[R]=await Promise.all([d(m).catch(b=>{y=b}),n,a]);if(y!==void 0)throw y;l=R}else{await n;let y=u?r.route.action:r.route.loader;if(y)[l]=await Promise.all([d(y),a]);else if(h==="action"){let R=new URL(e.url),b=R.pathname+R.search;throw Ce(405,{method:e.method,pathname:b,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(m)l=await d(m);else{let y=new URL(e.url),R=y.pathname+y.search;throw Ce(404,{pathname:R})}}catch(m){return{type:"error",result:m}}finally{s&&e.signal.removeEventListener("abort",s)}return l}async function Wo(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 Vo(e){var n,a,o,i,l;let{result:t,type:r}=e;if(Ut(t)){let s;try{s=await Wo(t)}catch(u){return{type:"error",error:u}}return r==="error"?{type:"error",error:new Ue(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:"data",data:s,statusCode:t.status,headers:t.headers}}return r==="error"?cr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(n=t.init)==null?void 0:n.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Go(t),statusCode:Ke(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:Ke(t)?t.status:void 0}:cr(t)?{type:"data",data:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Yo(e,t,r,n,a){let o=e.headers.get("Location");if(z(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!jt(o)){let i=n.slice(0,n.findIndex(l=>l.route.id===r)+1);
19o=ir(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function dn(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(jt(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let l=Se(i.pathname,r)!=null;if(i.origin===t.origin&&l)return i.pathname+i.search+i.hash}try{let o=n.createURL(e);if(a.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ze(e,t,r,n){let a=e.createURL(Kn(t)).toString(),o={signal:r};if(n&&ve(n.formMethod)){let{formMethod:i,formEncType:l}=n;o.method=i.toUpperCase(),l==="application/json"?(o.headers=new Headers({"Content-Type":l}),o.body=JSON.stringify(n.json)):l==="text/plain"?o.body=n.text:l==="application/x-www-form-urlencoded"&&n.formData?o.body=ur(n.formData):o.body=n.formData}return new Request(a,o)}function ur(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function fn(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Jo(e,t,r,n=!1,a=!1){let o={},i=null,l,s=!1,u={},h=r&&be(r[1])?r[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let m=d.route.id,y=t[m];if(z(!Je(y),"Cannot handle redirect results in processLoaderData"),be(y)){let R=y.error;if(h!==void 0&&(R=h,h=void 0),i=i||{},a)i[m]=R;else{let b=Ne(e,m);i[b.route.id]==null&&(i[b.route.id]=R)}n||(o[m]=Hn),s||(s=!0,l=Ke(y.error)?y.error.status:500),y.headers&&(u[m]=y.headers)}else o[m]=y.data,y.statusCode&&y.statusCode!==200&&!s&&(l=y.statusCode),y.headers&&(u[m]=y.headers)}),h!==void 0&&r&&(i={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:l||200,loaderHeaders:u}}function hn(e,t,r,n,a,o){let{loaderData:i,errors:l}=Jo(t,r,n);return a.filter(s=>!s.matches||s.matches.some(u=>u.shouldLoad)).forEach(s=>{let{key:u,match:h,controller:d}=s;if(d&&d.signal.aborted)return;let m=o[u];if(z(m,"Did not find corresponding fetcher result"),be(m)){let y=Ne(e.matches,h==null?void 0:h.route.id);l&&l[y.route.id]||(l={...l,[y.route.id]:m.error}),e.fetchers.delete(u)}else if(Je(m))z(!1,"Unhandled fetcher revalidation redirect");else{let y=ke(m.data);e.fetchers.set(u,y)}}),{loaderData:i,errors:l}}function mn(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==Hn).reduce((o,[i,l])=>(o[i]=l,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function pn(e){return e?be(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ne(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Ct(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:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(l="Unable to encode submission body")):e===403?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",l=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new Ue(e||500,i,new Error(l),!0)}function Lt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Je(a))return{key:n,result:a}}}function Kn(e){let t=typeof e=="string"?je(e):e;return Te({...t,hash:""})}function Ko(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Go(e){var t,r;return new Ue(((t=e.init)==null?void 0:t.status)??500,((r=e.init)==null?void 0:r.statusText)??"Internal Server Error",e.data)}function Xo(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&qo(r))}function qo(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Qo(e){return Ut(e.result)&&jn.has(e.result.status)}function be(e){return e.type==="error"}function Je(e){return(e&&e.type)==="redirect"}function cr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Ut(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Zo(e){return jn.has(e)}function ei(e){return Ut(e)&&Zo(e.status)&&e.headers.has("Location")}function ti(e){return Fo.has(e.toUpperCase())}function ve(e){return Oo.has(e.toUpperCase())}function br(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ot(e,t){let r=typeof t=="string"?je(t).search:t.search;if(e[e.length-1].route.index&&br(r||""))return e[e.length-1];let n=kn(e);return n[n.length-1]}function yn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;
19if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function er(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 ri(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 st(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 ni(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 ke(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 ai(e,t){try{let r=e.sessionStorage.getItem(zn);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function oi(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(zn,JSON.stringify(r))}catch(n){ie(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function vn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var ze=c.createContext(null);ze.displayName="DataRouter";var Ge=c.createContext(null);Ge.displayName="DataRouterState";var Gn=c.createContext(!1);function Xn(){return c.useContext(Gn)}var Sr=c.createContext({isTransitioning:!1});Sr.displayName="ViewTransition";var xr=c.createContext(new Map);xr.displayName="Fetchers";var $t=c.createContext(null);$t.displayName="Await";var Ee=c.createContext(null);Ee.displayName="Navigation";var zt=c.createContext(null);zt.displayName="Location";var Le=c.createContext({outlet:null,matches:[],isDataRoute:!1});Le.displayName="Route";var Cr=c.createContext(null);Cr.displayName="RouteError";var qn="REACT_ROUTER_ERROR",ii="REDIRECT",li="ROUTE_ERROR_RESPONSE";function si(e){if(e.startsWith(`${qn}:${ii}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function ui(e){if(e.startsWith(`${qn}:${li}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ue(t.status,t.statusText,t.data)}catch{}}function ci(e,{relative:t}={}){z(yt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=c.useContext(Ee),{hash:a,pathname:o,search:i}=vt(e,{relative:t}),l=o;return r!=="/"&&(l=o==="/"?r:De([r,o])),n.createHref({pathname:l,search:i,hash:a})}function yt(){return c.useContext(zt)!=null}function Pe(){return z(yt(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(zt).location}var Qn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Zn(e){c.useContext(Ee).static||c.useLayoutEffect(e)}function ea(){let{isDataRoute:e}=c.useContext(Le);return e?xi():di()}function di(){z(yt(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(ze),{basename:t,navigator:r}=c.useContext(Ee),{matches:n}=c.useContext(Le),{pathname:a}=Pe(),o=JSON.stringify(wr(n)),i=c.useRef(!1);return Zn(()=>{i.current=!0}),c.useCallback((s,u={})=>
19{if(ie(i.current,Qn),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=Er(s,JSON.parse(o),a,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:De([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,a,e])}var fi=c.createContext(null);function hi(e){let t=c.useContext(Le).outlet;return c.useMemo(()=>t&&c.createElement(fi.Provider,{value:e},t),[t,e])}function ta(){let{matches:e}=c.useContext(Le),t=e[e.length-1];return t?t.params:{}}function vt(e,{relative:t}={}){let{matches:r}=c.useContext(Le),{pathname:n}=Pe(),a=JSON.stringify(wr(r));return c.useMemo(()=>Er(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function mi(e,t,r,n,a){z(yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=c.useContext(Ee),{matches:i}=c.useContext(Le),l=i[i.length-1],s=l?l.params:{},u=l?l.pathname:"/",h=l?l.pathnameBase:"/",d=l&&l.route;{let S=d&&d.path||"";ia(u,!d||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${S}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
20
21Please change the parent <Route path="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let m=Pe(),y;y=m;let R=y.pathname||"/",b=R;if(h!=="/"){let S=h.replace(/^\//,"").split("/");b="/"+R.replace(/^\//,"").split("/").slice(S.length).join("/")}let E=Ie(e,{pathname:b});return ie(d||E!=null,`No routes matched location "${y.pathname}${y.search}${y.hash}" `),ie(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${y.pathname}${y.search}${y.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),wi(E&&E.map(S=>Object.assign({},S,{params:Object.assign({},s,S.params),pathname:De([h,o.encodeLocation?o.encodeLocation(S.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?h:De([h,o.encodeLocation?o.encodeLocation(S.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),i,r,n,a)}function pi(){let e=Mr(),t=Ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:o},"ErrorBoundary")," or"," ",c.createElement("code",{style:o},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:a},r):null,i)}var yi=c.createElement(pi,null),ra=class extends c.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}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=ui(e.digest);r&&(e=r)}let t=e!==void 0?c.createElement(Le.Provider,{value:this.props.routeContext},c.createElement(Cr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?c.createElement(vi,{error:e},t):t}};ra.contextType=Gn;var tr=new WeakMap;function vi({children:e,error:t}){let{basename:r}=c.useContext(Ee);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=si(t.digest);if(n){let a=tr.get(t);if(a)throw a;let o=$n(n.location,r);if(In&&!tr.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw tr.set(t,i),i}return c.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function gi({routeContext:e,match:t,children:r}){let n=c.useContext(ze);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(Le.Provider,{value:e},r)}function wi(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r==null?void 0:r.errors;if(i!=null){let h=o.findIndex(d=>d.route.id&&(i==null?void 0:i[d.route.id])!==void 0);z(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let l=!1,s=-1;if(r)for(let h=0;h<o.length;h++){let d=o[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(s=h),d.route.id){let{loaderData:m,errors:y}
21=r,R=d.route.loader&&!m.hasOwnProperty(d.route.id)&&(!y||y[d.route.id]===void 0);if(d.route.lazy||R){l=!0,s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}let u=r&&n?(h,d)=>{var m,y;n(h,{location:r.location,params:((y=(m=r.matches)==null?void 0:m[0])==null?void 0:y.params)??{},unstable_pattern:rt(r.matches),errorInfo:d})}:void 0;return o.reduceRight((h,d,m)=>{let y,R=!1,b=null,E=null;r&&(y=i&&d.route.id?i[d.route.id]:void 0,b=d.route.errorElement||yi,l&&(s<0&&m===0?(ia("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,E=null):s===m&&(R=!0,E=d.route.hydrateFallbackElement||null)));let L=t.concat(o.slice(0,m+1)),S=()=>{let O;return y?O=b:R?O=E:d.route.Component?O=c.createElement(d.route.Component,null):d.route.element?O=d.route.element:O=h,c.createElement(gi,{match:d,routeContext:{outlet:h,matches:L,isDataRoute:r!=null},children:O})};return r&&(d.route.ErrorBoundary||d.route.errorElement||m===0)?c.createElement(ra,{location:r.location,revalidation:r.revalidation,component:b,error:y,children:S(),routeC
21ontext:{outlet:null,matches:L,isDataRoute:!0},onError:u}):S()},null)}function Lr(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function na(e){let t=c.useContext(ze);return z(t,Lr(e)),t}function Xe(e){let t=c.useContext(Ge);return z(t,Lr(e)),t}function Ei(e){let t=c.useContext(Le);return z(t,Lr(e)),t}function gt(e){let t=Ei(e),r=t.matches[t.matches.length-1];return z(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ri(){return gt("useRouteId")}function bi(){return Xe("useNavigation").navigation}function us(){let e=na("useRevalidator"),t=Xe("useRevalidator"),r=c.useCallback(async()=>{await e.router.revalidate()},[e.router]);return c.useMemo(()=>({revalidate:r,state:t.revalidation}),[r,t.revalidation])}function Pr(){let{matches:e,loaderData:t}=Xe("useMatches");return c.useMemo(()=>e.map(r=>Dn(r,t)),[e,t])}function aa(){let e=Xe("useLoaderData"),t=gt("useLoaderData");return e.loaderData[t]}function cs(e){return Xe("useRouteLoaderData").loaderData[e]}function oa(){let e=Xe("useActionData"),t=gt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Mr(){var n;let e=c.useContext(Cr),t=Xe("useRouteError"),r=gt("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Si(){let e=c.useContext($t);return e==null?void 0:e._data}function xi(){let{router:e}=na("useNavigate"),t=gt("useNavigate"),r=c.useRef(!1);return Zn(()=>{r.current=!0}),c.useCallback(async(a,o={})=>{ie(r.current,Qn),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var gn={};function ia(e,t,r){!t&&!gn[e]&&(gn[e]=!0,ie(!1,r))}var wn={};function dr(e,t){!e&&!wn[t]&&(wn[t]=!0,console.warn(t))}var Ci="useOptimistic",En=Ga[Ci],Li=()=>{};function Pi(e){return En?En(e):[e,Li]}function ds(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ie(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:c.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ie(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:c.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ie(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:c.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var fs=["HydrateFallback","hydrateFallbackElement"],Mi=class{constructor(){this.status="pending",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 hs({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=Xn()||n;let[o,i]=c.useState(e.state),[l,s]=Pi(o),[u,h]=c.useState(),[d,m]=c.useState({isTransitioning:!1}),[y,R]=c.useState(),[b,E]=c.useState(),[L,S]=c.useState(),O=c.useRef(new Map),$=c.useCallback((D,{deletedFetchers:A,newErrors:W,flushSync:G,viewTransitionOpts:re})=>{W&&r&&Object.values(W).forEach(X=>{var de;return r(X,{location:D.location,params:((de=D.matches[0])==null?void 0:de.params)??{},unstable_pattern:rt(D.matches)})}),D.fetchers.forEach((X,de)=>{X.data!==void 0&&O.current.set(de,X.data)}),A.forEach(X=>O.current.delete(X)),dr(G===!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 se=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(dr(re==null||se,"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."),!re||!se){t&&G?t(()=>i(D)):n===!1?i(D):c.startTransition(()=>{n===!0&&s(X=>Rn(X,D)),i(D)});return}if(t&&G){t(()=>{b&&(y==null||y.resolve(),b.skipTransition()),m({isTransitioning:!0,flushSync:!0,currentLocation:re.currentLocation,nextLocation:re.nextLocation})});let X=e.window.document.startViewTransition(()=>{t(()=>i(D))});X.finished.finally(()=>{t(()=>{R(void 0),E(void 0),h(void 0),m({isTransitioning:!1})})}),t(()=>E(X));return}b?(y==null||y.resolve(),b.skipTransition(),S({state:D,currentLocation:re.currentLocation,nextLocation:re.nextLocation})):(h(D),m({isTransitioning:!0,flushSync:!1,currentLocation:re.currentLocation,nextLocation:re.nextLocation}))},[e.window,t,b,y,n,s,r]);c.useLayoutEffect(()=>e.subscribe($),[e,$]),c.useEffect(()=>{d.isTransitioning&&!d.flushSync&&R(new Mi)},[d]),c.useEffect(()=>{if(y&&u&&e.window){let D=u,A=y.promise,W=e.window.document.startViewTransition(async()=>{n===!1?i(D):c.startTransition(()=>{n===!0&&s(G=>Rn(G,D)),i(D)}),await A});W.finished.finally(()=>{R(void 0),E(void 0),h(void 0),m({isTransitioning:!1})}),E(W)}},[u,y,e.window,n,s]),c.useEffect(()=>{y&&u&&l.location.key===u.location.key&&y.resolve()},[y,b,l.location,u]),c.useEffect(()=>{!d.isTransitioning&&L&&(h(L.state),m({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}),S(void 0))},[d.isTransitioning,L]);let P=c.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:D=>e.navigate(D),push:(D,A,W)=>e.navigate(D,{state:A,preventScrollReset:W==null?void 0:W.preventScrollReset}),replace:(D,A,W)=>e.navigate(D,{replace:!0,state:A,preventScrollReset:W==null?void 0:W.preventScrollReset})}),[e]),T=e.basename||"/",v=c.useMemo(()=>({router:e,navigator:P,static:!1,basename:T,onError:r}),[e,P,T,r]);return c.createElement(c.Fragment,null,c.createElement(ze.Provider,{value:v},c.createElement(Ge.Provider,{value:l},c.createElement(xr.Provider,{value:O.current},c.createElement(Sr.Provider,{value:d},c.createElement(Oi,{basename:T,location:l.location,navigationType:l.historyAction,navigator:P,unstable_useTransitions:n},c.createElement(Di,{routes:e.routes,future:e.future,state:l,onError:r})))))),null)}function Rn(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}}var Di=c.memo(Ti);function Ti({routes:e,future:t,state:r,onError:n}){return mi(e,void 0,r,n,t)}function ms(e){return hi(e.context)}function Oi({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:i}){z(!yt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=c.useMemo(()=>({basename:l,navigator:a,static:o,unstable_useTransitions:i,future:{}}),[l,a,o,i]);typeof r=="string"&&(r=je(r));
21let{pathname:u="/",search:h="",hash:d="",state:m=null,key:y="default"}=r,R=c.useMemo(()=>{let b=Se(u,l);return b==null?null:{location:{pathname:b,search:h,hash:d,state:m,key:y},navigationType:n}},[l,u,h,d,m,y,n]);return ie(R!=null,`<Router basename="${l}"> is not able to match the URL "${u}${h}${d}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:c.createElement(Ee.Provider,{value:s},c.createElement(zt.Provider,{children:t,value:R}))}function ps({children:e,errorElement:t,resolve:r}){let n=c.useContext(ze),a=c.useContext(Ge),o=c.useCallback((i,l)=>{var s;n&&n.onError&&a&&n.onError(i,{location:a.location,params:((s=a.matches[0])==null?void 0:s.params)||{},unstable_pattern:rt(a.matches),errorInfo:l})},[n,a]);return c.createElement(_i,{resolve:r,errorElement:t,onError:o},c.createElement(Fi,null,e))}var _i=class extends c.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=0;if(!(r instanceof Promise))a=1,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});else if(this.state.error){a=2;let o=this.state.error;n=Promise.reject().catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>o})}else r._tracked?(n=r,a="_error"in n?2:"_data"in n?1:0):(a=0,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(o=>Object.defineProperty(r,"_data",{get:()=>o}),o=>{var i,l;(l=(i=this.props).onError)==null||l.call(i,o),Object.defineProperty(r,"_error",{get:()=>o})}));if(a===2&&!t)throw n._error;if(a===2)return c.createElement($t.Provider,{value:n,children:t});if(a===1)return c.createElement($t.Provider,{value:n,children:e});throw n}};function Fi({children:e}){let t=Si(),r=typeof e=="function"?e(t):e;return c.createElement(c.Fragment,null,r)}function ki(){return{params:ta(),loaderData:aa(),actionData:oa(),matches:Pr()}}function ys(e){return function(){const r=ki();return c.createElement(e,r)}}function Ii(){return{params:ta(),loaderData:aa(),actionData:oa(),error:Mr()}}function vs(e){return function(){const r=Ii();return c.createElement(e,r)}}var _t="get",Ft="application/x-www-form-urlencoded";function Ht(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function $i(e){return Ht(e)&&e.tagName.toLowerCase()==="button"}function Ni(e){return Ht(e)&&e.tagName.toLowerCase()==="form"}function Ai(e){return Ht(e)&&e.tagName.toLowerCase()==="input"}function ji(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ui(e,t){return e.button===0&&(!t||t==="_self")&&!ji(e)}function fr(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function zi(e,t){let r=fr(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}var Pt=null;function Hi(){if(Pt===null)try{new FormData(document.createElement("form"),0),Pt=!1}catch{Pt=!0}return Pt}var Bi=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rr(e){return e!=null&&!Bi.has(e)?(ie(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ft}"`),null):e}function Wi(e,t){let r,n,a,o,i;if(Ni(e)){let l=e.getAttribute("action");n=l?Se(l,t):null,r=e.getAttribute("method")||_t,a=rr(e.getAttribute("enctype"))||Ft,o=new FormData(e)}else if($i(e)||Ai(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||l.getAttribute("action");if(n=s?Se(s,t):null,r=e.getAttribute("formmethod")||l.getAttribute("method")||_t,a=rr(e.getAttribute("formenctype"))||rr(l.getAttribute("enctype"))||Ft,o=new FormData(l,e),!Hi()){let{name:u,type:h,value:d}=e;if(h==="image"){let m=u?`${u}.`:"";o.append(`${m}x`,"0"),o.append(`${m}y`,"0")}
21else u&&o.append(u,d)}}else{if(Ht(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=_t,n=null,a=Ft,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var Vi=-1,Yi=-2,Ji=-3,Ki=-4,Gi=-5,Xi=-6,qi=-7,Qi="B",Zi="D",la="E",el="M",tl="N",sa="P",rl="R",nl="S",al="Y",ol="U",il="Z",ua=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function ll(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split(`
22`);t=o.pop()||"";for(const i of o)n.enqueue(i)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var nr=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function hr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return bn.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,bn.call(this,n)}function bn(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,s=>{o=s}]];let l=[];for(;i.length>0;){const[s,u]=i.pop();switch(s){case qi:u(void 0);continue;case Gi:u(null);continue;case Yi:u(NaN);continue;case Xi:u(1/0);continue;case Ji:u(-1/0);continue;case Ki:u(-0);continue}if(t[s]){u(t[s]);continue}const h=r[s];if(!h||typeof h!="object"){t[s]=h,u(h);continue}if(Array.isArray(h))if(typeof h[0]=="string"){const[d,m,y]=h;switch(d){case Zi:u(t[s]=new Date(m));continue;case ol:u(t[s]=new URL(m));continue;case Qi:u(t[s]=BigInt(m));continue;case rl:u(t[s]=new RegExp(m,y));continue;case al:u(t[s]=Symbol.for(m));continue;case nl:const R=new Set;t[s]=R;for(let $=h.length-1;$>0;$--)i.push([h[$],P=>{R.add(P)}]);u(R);continue;case el:const b=new Map;t[s]=b;for(let $=h.length-2;$>0;$-=2){const P=[];i.push([h[$+1],T=>{P[1]=T}]),i.push([h[$],T=>{P[0]=T}]),l.push(()=>{b.set(P[0],P[1])})}u(b);continue;case tl:const E=Object.create(null);t[s]=E;for(const $ of Object.keys(m).reverse()){const P=[];i.push([m[$],T=>{P[1]=T}]),i.push([Number($.slice(1)),T=>{P[0]=T}]),l.push(()=>{E[P[0]]=P[1]})}u(E);continue;case sa:if(t[m])u(t[s]=t[m]);else{const $=new ua;n[m]=$,u(t[s]=$.promise)}continue;case la:const[,L,S]=h;let O=S&&nr&&nr[S]?new nr[S](L):new Error(L);t[s]=O,u(O);continue;case il:u(t[s]=t[m]);continue;default:if(Array.isArray(a)){const $=[],P=h.slice(1);for(let T=0;T<P.length;T++){const v=P[T];i.push([v,D=>{$[T]=D}])}l.push(()=>{for(const T of a){const v=T(h[0],...$);if(v){u(t[s]=v.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const d=[];t[s]=d;for(let m=0;m<h.length;m++){const y=h[m];y!==Vi&&i.push([y,R=>{d[m]=R}])}u(d);continue}else{const d={};t[s]=d;for(const m of Object.keys(h).reverse()){const y=[];i.push([h[m],R=>{y[1]=R}]),i.push([Number(m.slice(1)),R=>{y[0]=R}]),l.push(()=>{d[y[0]]=y[1]})}u(d);continue}}for(;l.length>0;)l.pop()();return o}async function sl(e,t){const{plugins:r}=t??{},n=new ua,a=e.pipeThrough(ll()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await ul.call(o,a);let l=n.promise;return i.done?n.resolve():l=cl.call(o,a).then(n.resolve).catch(s=>{for(const u of Object.values(o.deferred))u.reject(s);n.reject(s)}),{done:l.then(()=>a.closed),value:i.value}}async function ul(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:hr.call(this,r)}}async function cl(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case sa:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=hr.call(this,l);o.resolve(s);break}case la:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const i=r.slice(n+1);let l;try{l=JSON.parse(i)}catch{throw new SyntaxError}const s=hr.call(this,l);o.reject(s);break}default:throw new SyntaxError}t=await e.read()}}async function dl(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var fl={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},hl=/[&><\u2028\u2029]/g;function mr(e){return e.replace(hl,t=>fl[t])}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}
22var pr=Symbol("SingleFetchRedirect"),ca=class extends Error{},ml=202,pl=new Set([100,101,204,205]);function gs(e,t,r,n,a,o){let i=yl(e,l=>{let s=t.routes[l.route.id];we(s,"Route not found in manifest");let u=r[l.route.id];return{hasLoader:s.hasLoader,hasClientLoader:s.hasClientLoader,hasShouldRevalidate:!!(u!=null&&u.shouldRevalidate)}},Sl,n,a,o);return async l=>l.runClientMiddleware(i)}function yl(e,t,r,n,a,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:h}=l,d=e();if(s.method!=="GET")return vl(l,r,a,o);let m=u.some(y=>{let{hasLoader:R,hasClientLoader:b}=t(y);return y.shouldCallHandler()&&R&&!b});return!n&&!m?gl(l,t,r,a,o):h?Rl(l,r,a,o):wl(l,d,t,r,n,a,o,i)}}async function vl(e,t,r,n){let a=e.matches.find(l=>l.shouldCallHandler());we(a,"No action match found");let o,i=await a.resolve(async l=>await l(async()=>{let{data:u,status:h}=await t(e,r,n,[a.route.id]);return o=h,pt(u,a.route.id)}));return Ut(i.result)||Ke(i.result)||cr(i.result)?{[a.route.id]:i}:{[a.route.id]:{type:i.type,result:So(i.result,o)}}}async function gl(e,t,r,n,a){let o=e.matches.filter(l=>l.shouldCallHandler()),i={};return await Promise.all(o.map(l=>l.resolve(async s=>{try{let{hasClientLoader:u}=t(l),h=l.route.id,d=u?await s(async()=>{let{data:m}=await r(e,n,a,[h]);return pt(m,h)}):await s();i[l.route.id]={type:"data",result:d}}catch(u){i[l.route.id]={type:"error",result:u}}}))),i}async function wl(e,t,r,n,a,o,i,l=()=>!0){let s=new Set,u=!1,h=e.matches.map(()=>Sn()),d=Sn(),m={},y=Promise.all(e.matches.map(async(b,E)=>b.resolve(async L=>{h[E].resolve();let S=b.route.id,{hasLoader:O,hasClientLoader:$,hasShouldRevalidate:P}=r(b),T=!b.shouldRevalidateArgs||b.shouldRevalidateArgs.actionStatus==null||b.shouldRevalidateArgs.actionStatus<400;if(!b.shouldCallHandler(T)){u||(u=b.shouldRevalidateArgs!=null&&O&&P===!0);return}if(l(b)&&$){O&&(u=!0);try{let D=await L(async()=>{let{data:A}=await n(e,o,i,[S]);return pt(A,S)});m[S]={type:"data",result:D}}catch(D){m[S]={type:"error",result:D}}return}O&&s.add(S);try{let D=await L(async()=>{let A=await d.promise;return pt(A,S)});m[S]={type:"data",result:D}}catch(D){m[S]={type:"error",result:D}}})));if(await Promise.all(h.map(b=>b.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||s.size===0)&&!window.__reactRouterHdrActive)d.resolve({routes:{}});else{let b=a&&u&&s.size>0?[...s.keys()]:void 0;try{let E=await n(e,o,i,b);d.resolve(E.data)}catch(E){d.reject(E)}}return await y,await El(d.promise,e.matches,s,m),m}async function El(e,t,r,n){var a;try{let o,i=await e;if("routes"in i){for(let l of t)if(l.route.id in i.routes){let s=i.routes[l.route.id];if("error"in s){o=s.error,((a=n[l.route.id])==null?void 0:a.result)==null&&(n[l.route.id]={type:"error",result:o});break}}}o!==void 0&&Array.from(r.values()).forEach(l=>{n[l].result instanceof ca&&(n[l].result=o)})}catch{}}async function Rl(e,t,r,n){let a=e.matches.find(l=>l.shouldCallHandler());we(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async l=>l(async()=>{let{data:s}=await t(e,r,n,[o]);return pt(s,o)}));return{[a.route.id]:i}}function bl(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function da(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Se(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function Sl(e,t,r,n){let{request:a}=e,o=da(a.url,t,r,"data");a.method==="GET"&&(o=bl(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await dl(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new Ue(i.status,i.statusText,await i.text());if(i.status===204&&i.headers.has("X-Remix-Redirect"))return{status:ml,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:i.headers.get("X-Remix-Revalidate")==="true",reload:i.headers.get("X-Remix-Reload-Document")==="true",replace:i.headers.get("X-Remix-Replace")==="true"}}};if(pl.has(i.status)){let l={};
22return n&&a.method!=="GET"&&(l[n[0]]={data:void 0}),{status:i.status,data:{routes:l}}}we(i.body,"No response body to decode");try{let l=await xl(i.body,window),s;if(a.method==="GET"){let u=l.value;pr in u?s={redirect:u[pr]}:s={routes:u}}else{let u=l.value,h=n==null?void 0:n[0];we(h,"No routeId found for single fetch call decoding"),"redirect"in u?s={redirect:u}:s={routes:{[h]:u}}}return{status:i.status,data:s}}catch{throw new Error("Unable to decode turbo-stream response")}}function xl(e,t){return sl(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,i]=n,l=Error;a&&a in t&&typeof t[a]=="function"&&(l=t[a]);let s=new l(o);return s.stack=i,{value:s}}if(r==="ErrorResponse"){let[a,o,i]=n;return{value:new Ue(o,i,a)}}if(r==="SingleFetchRedirect")return{value:{[pr]:n[0]}};if(r==="SingleFetchClassInstance")return{value:n[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function pt(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:i,status:l}=e.redirect;throw xo(n,{status:l,headers:{...a?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...i?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new ca(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function Sn(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function fa(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Cl(e,t,r){let n=e.map(o=>{var s;let i=t[o.route.id],l=r.routes[o.route.id];return[l&&l.css?l.css.map(u=>({rel:"stylesheet",href:u})):[],((s=i==null?void 0:i.links)==null?void 0:s.call(i))||[]]}).flat(2),a=Tr(e,r);return ya(n,a)}function ha(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Ll(e){if(!e.css)return;let t=ha(e);await Promise.all(t.map(pa))}async function ma(e,t){if(!e.css&&!t.links||!Ol())return;let r=[];if(e.css&&r.push(...ha(e)),t.links&&r.push(...t.links()),r.length===0)return;let n=[];for(let a of r)!Dr(a)&&a.rel==="stylesheet"&&n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(pa))}async function pa(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function Dr(e){return e!=null&&typeof e.page=="string"}function Pl(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Ml(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await fa(o,r);return i.links?i.links():[]}return[]}));return ya(n.flat(1).filter(Pl).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function xn(e,t,r,n,a,o){let i=(s,u)=>r[u]?s.route.id!==r[u].route.id:!0,l=(s,u)=>{var h;return r[u].pathname!==s.pathname||((h=r[u].route.path)==null?void 0:h.endsWith("*"))&&r[u].params["*"]!==s.params["*"]};return o==="assets"?t.filter((s,u)=>i(s,u)||l(s,u)):o==="data"?t.filter((s,u)=>{var d;let h=n.routes[s.route.id];if(!h||!h.hasLoader)return!1;if(i(s,u)||l(s,u))return!0;
22if(s.route.shouldRevalidate){let m=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((d=r[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function Tr(e,t,{includeHydrateFallback:r}={}){return Dl(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function Dl(e){return[...new Set(e)]}function Tl(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ya(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!Dr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let l=JSON.stringify(Tl(o));return r.has(l)||(r.add(l),a.push({key:l,link:o})),a},[])}var Mt;function Ol(){if(Mt!==void 0)return Mt;let e=document.createElement("link");return Mt=e.relList.supports("preload"),e=null,Mt}function _l(){return c.createElement(yr,{title:"Loading...",renderScripts:!0},c.createElement("script",{dangerouslySetInnerHTML:{__html:`
23              console.log(
24                "💿 Hey developer 👋. You can provide a way better UX than this " +
25                "when your app is loading JS modules and/or running \`clientLoader\` " +
26                "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
27                "for more information."
28              );
29            `}}))}function va(e){let t={};return Object.values(e).forEach(r=>{if(r){let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}}),t}function Fl(e,t,r){let n=ga(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?_l:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>c.createElement(Ra,{error:Mr()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:c.createElement(t.Layout,null,c.createElement(n,null))}:{Component:n},...o?{errorElement:c.createElement(t.Layout,null,c.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:c.createElement(t.Layout,null,c.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function ws(e,t,r,n,a,o){return Or(t,r,n,a,o,"",va(t),e)}function Dt(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let n=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new Ue(400,"Bad Request",new Error(n),!0)}}function ar(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new Ue(405,"Method Not Allowed",new Error(n),!0)}function Or(e,t,r,n,a,o="",i=va(e),l){return(i[o]||[]).map(s=>{var S,O,$;let u=t[s.id];function h(P){return we(typeof P=="function","No single fetch function available for route handler"),P()}function d(P){return s.hasLoader?h(P):Promise.resolve(null)}function m(P){if(!s.hasAction)throw ar("action",s.id);return h(P)}function y(P){import(P)}function R(P){P.clientActionModule&&y(P.clientActionModule),P.clientLoaderModule&&y(P.clientLoaderModule)}async function b(P){let T=t[s.id],v=T?ma(s,T):Promise.resolve();try{return P()}finally{await v}}let E={id:s.id,index:s.index,path:s.path};if(u){Object.assign(E,{...E,...Fl(s,u,a),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:Cn(E.path,u,s,n,l)});let P=r&&r.loaderData&&s.id in r.loaderData,T=P?(S=r==null?void 0:r.loaderData)==null?void 0:S[s.id]:void 0,v=r&&r.errors&&s.id in r.errors,D=v?(O=r==null?void 0:r.errors)==null?void 0:O[s.id]:void 0,A=l==null&&((($=u.clientLoader)==null?void 0:$.hydrate)===!0||!s.hasLoader);E.loader=async({request:W,params:G,context:re,unstable_pattern:se},X)=>{try{return await b(async()=>(we(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:W,params:G,context:re,unstable_pattern:se,async serverLoader(){if
29(Dt("loader",s),A){if(P)return T;if(v)throw D}return d(X)}}):d(X)))}finally{A=!1}},E.loader.hydrate=$l(s.id,u.clientLoader,s.hasLoader,a),E.action=({request:W,params:G,context:re,unstable_pattern:se},X)=>b(async()=>{if(we(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(a)throw ar("clientAction",s.id);return m(X)}return u.clientAction({request:W,params:G,context:re,unstable_pattern:se,async serverAction(){return Dt("action",s),m(X)}})})}else{s.hasClientLoader||(E.loader=(v,D)=>b(()=>d(D))),s.hasClientAction||(E.action=(v,D)=>b(()=>{if(a)throw ar("clientAction",s.id);return m(D)}));let P;async function T(){return P?await P:(P=(async()=>{(s.clientLoaderModule||s.clientActionModule)&&await new Promise(D=>setTimeout(D,0));let v=Il(s,t);return R(s),await v})(),await P)}E.lazy={loader:s.hasClientLoader?async()=>{let{clientLoader:v}=s.clientLoaderModule?await import(s.clientLoaderModule):await T();return we(v,"No `clientLoader` export found"),(D,A)=>v({...D,async serverLoader(){return Dt("loader",s),d(A)}})}:void 0,action:s.hasClientAction?async()=>{let v=s.clientActionModule?import(s.clientActionModule):T();R(s);let{clientAction:D}=await v;return we(D,"No `clientAction` export found"),(A,W)=>D({...A,async serverAction(){return Dt("action",s),m(W)}})}:void 0,middleware:s.hasClientMiddleware?async()=>{let{clientMiddleware:v}=s.clientMiddlewareModule?await import(s.clientMiddlewareModule):await T();return we(v,"No `clientMiddleware` export found"),v}:void 0,shouldRevalidate:async()=>{let v=await T();return Cn(E.path,v,s,n,l)},handle:async()=>(await T()).handle,Component:async()=>(await T()).Component,ErrorBoundary:s.hasErrorBoundary?async()=>(await T()).ErrorBoundary:void 0}}let L=Or(e,t,r,n,a,s.id,i,l);return L.length>0&&(E.children=L),E})}function Cn(e,t,r,n,a){if(a)return kl(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let o=e?_n(e)[1].map(l=>l.paramName):[];const i=l=>o.some(s=>l.currentParams[s]!==l.nextParams[s]);if(t.shouldRevalidate){let l=t.shouldRevalidate;return s=>l({...s,defaultShouldRevalidate:i(s)})}else return l=>i(l)}return t.shouldRevalidate}function kl(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function Il(e,t){let r=fa(e,t),n=Ll(e),a=await r;return await Promise.all([n,ma(e,a)]),{Component:ga(a),ErrorBoundary:a.ErrorBoundary,clientMiddleware:a.clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}function ga(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function $l(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var kt=new Set,Nl=1e3,Nt=new Set,Al=7680;function _r(e,t){return e.mode==="lazy"&&t===!0}function jl({sri:e,...t},r){let n=new Set(r.state.matches.map(l=>l.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(l=>{let s=Ie(r.routes,l,r.basename);s&&s.forEach(u=>n.add(u.route.id))});let i=[...n].reduce((l,s)=>Object.assign(l,{[s]:t.routes[s]}),{});return{...t,routes:i,sri:e?!0:void 0}}function Es(e,t,r,n,a,o){if(_r(n,r))return async({path:i,patch:l,signal:s,fetcherKey:u})=>{Nt.has(i)||await wa([i],u?window.location.href:i,e,t,r,a,o,n.manifestPath,l,s)}}function Rs(e,t,r,n,a,o){c.useEffect(()=>{var h,d;if(!_r(a,n)||((d=(h=window.navigator)==null?void 0:h.connection)==null?void 0:d.saveData)===!0)return;function i(m){let y=m.tagName==="FORM"?m.getAttribute("action"):m.getAttribute("href");if(!y)return;let R=m.tagName==="A"?m.pathname:new URL(y,window.location.origin).pathname;Nt.has(R)||kt.add(R)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let m=Array.from(kt.keys()).filter(y=>Nt.has(y)?(kt.delete(y),!1):!0);if(m.length!==0)try{await wa(m,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(y){console.error("Failed to fetch manifest patches",y)}}let s=Hl(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[n,o,t,r,e,a])}function Ul(e,t){let r=e||"/__manifest";return t==null?r:`${t}${r}`.replace(/\/+/g,"/")}var or="react-router-manifest-version";async function wa(e,t,r,n,a,o,i,l,s,u){const h=new URLSearchParams;h.set("paths",e.sort().join(",")),h.set("version",r.version);
29let d=new URL(Ul(l,i),window.location.origin);if(d.search=h.toString(),d.toString().length>Al){kt.clear();return}let m;try{let E=await fetch(d,{signal:u});if(E.ok){if(E.status===204&&E.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}try{if(sessionStorage.getItem(or)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(or,r.version)}catch{}window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(E.status>=400)throw new Error(await E.text())}else throw new Error(`${E.status} ${E.statusText}`);try{sessionStorage.removeItem(or)}catch{}m=await E.json()}catch(E){if(u!=null&&u.aborted)return;throw E}let y=new Set(Object.keys(r.routes)),R=Object.values(m).reduce((E,L)=>(L&&!y.has(L.id)&&(E[L.id]=L),E),{});Object.assign(r.routes,R),e.forEach(E=>zl(E,Nt));let b=new Set;Object.values(R).forEach(E=>{E&&(!E.parentId||!R[E.parentId])&&b.add(E.parentId)}),b.forEach(E=>s(E||null,Or(R,n,null,a,o,E)))}function zl(e,t){if(t.size>=Nl){let r=t.values().next().value;t.delete(r)}t.add(e)}function Hl(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Fr(){let e=c.useContext(ze);return we(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Bt(){let e=c.useContext(Ge);return we(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Wt=c.createContext(void 0);Wt.displayName="FrameworkContext";function nt(){let e=c.useContext(Wt);return we(e,"You must render this element inside a <HydratedRouter> element"),e}function Bl(e,t){let r=c.useContext(Wt),[n,a]=c.useState(!1),[o,i]=c.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:h,onTouchStart:d}=t,m=c.useRef(null);c.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let b=L=>{L.forEach(S=>{i(S.isIntersecting)})},E=new IntersectionObserver(b,{threshold:.5});return m.current&&E.observe(m.current),()=>{E.disconnect()}}},[e]),c.useEffect(()=>{if(n){let b=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(b)}}},[n]);let y=()=>{a(!0)},R=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,m,{}]:[o,m,{onFocus:ut(l,y),onBlur:ut(s,R),onMouseEnter:ut(u,y),onMouseLeave:ut(h,R),onTouchStart:ut(d,y)}]:[!1,m,{}]}function ut(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function kr(e,t,r){if(r&&!At)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}var Ln="data-react-router-critical-css";function bs({nonce:e}){let{isSpaMode:t,manifest:r,routeModules:n,criticalCss:a}=nt(),{errors:o,matches:i}=Bt(),l=kr(i,o,t),s=c.useMemo(()=>Cl(l,n,r),[l,n,r]);return c.createElement(c.Fragment,null,typeof a=="string"?c.createElement("style",{[Ln]:"",dangerouslySetInnerHTML:{__html:a}}):null,typeof a=="object"?c.createElement("link",{[Ln]:"",rel:"stylesheet",href:a.href,nonce:e}):null,s.map(({key:u,link:h})=>Dr(h)?c.createElement(Ea,{key:u,nonce:e,...h}):c.createElement("link",{key:u,nonce:e,...h})))}function Ea({page:e,...t}){let{router:r}=Fr(),n=c.useMemo(()=>Ie(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(Vl,{page:e,matches:n,...t}):null}function Wl(e){let{manifest:t,routeModules:r}=nt(),[n,a]=c.useState([]);return c.useEffect(()=>{let o=!1;return Ml(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function Vl({page:e,matches:t,...r}){let n=Pe(),{future:a,manifest:o,routeModules:i}=nt(),{basename:l}=Fr(),{loaderData:s,matches:u}=Bt(),h=c.useMemo(()=>xn(e,t,u,o,n,"data"),[e,t,u,o,n]),d=c.useMemo(()=>xn(e,t,u,o,n,"assets"),[e,t,u,o,n]),m=c.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let b=new Set,E=!1;if(t.forEach(S=>{var $;let O=o.routes[S.route.id];!O||!O.hasLoader||(!h.some(P=>P.route.id===S.route.id)&&S.route.id in s&&(($=i[S.route.id])!=null&&$.shouldRevalidate)||O.hasClientLoader?E=!0:b.add(S.route.id))}),b.size===0)return[];let L=da(e,l,a.unstable_trailingSlashAwareDataRequests,"data");return E&&b.size>0&&L.searchParams.set("_routes",t.filter(S=>b.has(S.route.id)).map(S=>S.route.id).join(",")),[L.pathname+L.search]},[l,a.unstable_trailingSlashAwareDataRequests,s,n,o,h,t,e,i]),y=c.useMemo(()=>Tr(d,o),[d,o]),R=Wl(d);return c.createElement(c.Fragment,null,m.map(b=>c.createElement("link",{key:b,rel:"prefetch",as:"fetch",href:b,...r})),y.map(b=>c.createElement("link",{key:b,rel:"modulepreload",href:b,...r})),R.map(({key:b,link:E})=>c.createElement("link",{key:b,nonce:r.nonce,...E})))}
29function Ss(){let{isSpaMode:e,routeModules:t}=nt(),{errors:r,matches:n,loaderData:a}=Bt(),o=Pe(),i=kr(n,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,h=[];for(let d=0;d<i.length;d++){let m=i[d],y=m.route.id,R=a[y],b=m.params,E=t[y],L=[],S={id:y,data:R,loaderData:R,meta:[],params:m.params,pathname:m.pathname,handle:m.route.handle,error:l};if(h[d]=S,E!=null&&E.meta?L=typeof E.meta=="function"?E.meta({data:R,loaderData:R,params:b,location:o,matches:h,error:l}):Array.isArray(E.meta)?[...E.meta]:E.meta:u&&(L=[...u]),L=L||[],!Array.isArray(L))throw new Error("The route at "+m.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
30
31To reference the meta function API, see https://remix.run/route/meta`);S.meta=L,h[d]=S,s=[...L],u=s}return c.createElement(c.Fragment,null,s.flat().map(d=>{if(!d)return null;if("tagName"in d){let{tagName:m,...y}=d;if(!Yl(m))return console.warn(`A meta object uses an invalid tagName: ${m}. Expected either 'link' or 'meta'`),null;let R=m;return c.createElement(R,{key:JSON.stringify(y),...y})}if("title"in d)return c.createElement("title",{key:"title"},String(d.title));if("charset"in d&&(d.charSet??(d.charSet=d.charset),delete d.charset),"charSet"in d&&d.charSet!=null)return typeof d.charSet=="string"?c.createElement("meta",{key:"charSet",charSet:d.charSet}):null;if("script:ld+json"in d)try{let m=JSON.stringify(d["script:ld+json"]);return c.createElement("script",{key:`script:ld+json:${m}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:mr(m)}})}catch{return null}return c.createElement("meta",{key:JSON.stringify(d),...d})}))}function Yl(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var At=!1;function Jl(){At=!0}function Kl(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i}=nt(),{router:l,static:s,staticContext:u}=Fr(),{matches:h}=Bt(),d=Xn(),m=_r(o,i);a&&(a.didRenderScripts=!0);let y=kr(h,null,n);c.useEffect(()=>{Jl()},[]);let R=c.useMemo(()=>{var $;if(d)return null;let S=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",O=s?`${($=t.hmr)!=null&&$.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${m?"":`import ${JSON.stringify(t.url)}`};
32${y.map((P,T)=>{let v=`route${T}`,D=t.routes[P.route.id];we(D,`Route ${P.route.id} not found in manifest`);let{clientActionModule:A,clientLoaderModule:W,clientMiddlewareModule:G,hydrateFallbackModule:re,module:se}=D,X=[...A?[{module:A,varName:`${v}_clientAction`}]:[],...W?[{module:W,varName:`${v}_clientLoader`}]:[],...G?[{module:G,varName:`${v}_clientMiddleware`}]:[],...re?[{module:re,varName:`${v}_HydrateFallback`}]:[],{module:se,varName:`${v}_main`}];if(X.length===1)return`import * as ${v} from ${JSON.stringify(se)};`;let de=X.map(V=>`import * as ${V.varName} from "${V.module}";`).join(`
33`),Z=`const ${v} = {${X.map(V=>`...${V.varName}`).join(",")}};`;return[de,Z].join(`
34`)}).join(`
35`)}
36  ${m?`window.__reactRouterManifest = ${JSON.stringify(jl(t,l),null,2)};`:""}
37  window.__reactRouterRouteModules = {${y.map((P,T)=>`${JSON.stringify(P.route.id)}:route${T}`).join(",")}};
38
39import(${JSON.stringify(t.entry.module)});`:" ";return c.createElement(c.Fragment,null,c.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:S},type:void 0}),c.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:O},type:"module",async:!0}))},[]),b=At||d?[]:Gl(t.entry.imports.concat(Tr(y,t,{includeHydrateFallback:!0}))),E=typeof t.sri=="object"?t.sri:{};return dr(!d,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),At||d?null:c.createElement(c.Fragment,null,typeof t.sri=="object"?c.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:E})}}):null,m?null:c.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:E[t.url],suppressHydrationWarning:!0}),c.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:E[t.entry.module],suppressHydrationWarning:!0}),b.map(L=>c.createElement("link",{key:L,rel:"modulepreload",href:L,crossOrigin:e.crossOrigin,integrity:E[L],suppressHydrationWarning:!0})),R)}function Gl(e){return[...new Set(e)]}function Xl(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var xs=class extends c.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?c.createElement(Ra,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Ra({error:e,isOutsideRemixApp:t}){console.error(e);let r=c.createElement("script",{dangerouslySetInnerHTML:{__html:`
40        console.log(
41          "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
42        );
43      `}});if(Ke(e))return c.createElement(yr,{title:"Unhandled Thrown Response!"},c.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let n;if(e instanceof Error)n=e;else{let a=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);n=new Error(a)}
43return c.createElement(yr,{title:"Application Error!",isOutsideRemixApp:t},c.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),c.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function yr({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){var o;let{routeModules:a}=nt();return(o=a.root)!=null&&o.Layout&&!r?n:c.createElement("html",{lang:"en"},c.createElement("head",null,c.createElement("meta",{charSet:"utf-8"}),c.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),c.createElement("title",null,e)),c.createElement("body",null,c.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?c.createElement(Kl,null):null)))}var ql=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ql&&(window.__reactRouterVersion="7.12.0")}catch{}var ba=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sa=c.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,state:l,target:s,to:u,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:m,...y},R){let{basename:b,unstable_useTransitions:E}=c.useContext(Ee),L=typeof u=="string"&&ba.test(u),S=$n(u,b);u=S.to;let O=ci(u,{relative:a}),[$,P,T]=Bl(n,y),v=es(u,{replace:i,state:l,target:s,preventScrollReset:h,relative:a,viewTransition:d,unstable_defaultShouldRevalidate:m,unstable_useTransitions:E});function D(W){t&&t(W),W.defaultPrevented||v(W)}let A=c.createElement("a",{...y,...T,href:S.absoluteURL||O,onClick:S.isExternal||o?t:D,ref:Xl(R,P),target:s,"data-discover":!L&&r==="render"?"true":void 0});return $&&!L?c.createElement(c.Fragment,null,A,c.createElement(Ea,{page:O})):A});Sa.displayName="Link";var Ql=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:l,children:s,...u},h){let d=vt(i,{relative:u.relative}),m=Pe(),y=c.useContext(Ge),{navigator:R,basename:b}=c.useContext(Ee),E=y!=null&&is(d)&&l===!0,L=R.encodeLocation?R.encodeLocation(d).pathname:d.pathname,S=m.pathname,O=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;r||(S=S.toLowerCase(),O=O?O.toLowerCase():null,L=L.toLowerCase()),O&&b&&(O=Se(O,b)||O);const $=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let P=S===L||!a&&S.startsWith(L)&&S.charAt($)==="/",T=O!=null&&(O===L||!a&&O.startsWith(L)&&O.charAt(L.length)==="/"),v={isActive:P,isPending:T,isTransitioning:E},D=P?t:void 0,A;typeof n=="function"?A=n(v):A=[n,P?"active":null,T?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let W=typeof o=="function"?o(v):o;return c.createElement(Sa,{...u,"aria-current":D,className:A,ref:h,style:W,to:i,viewTransition:l},typeof s=="function"?s(v):s)});Ql.displayName="NavLink";var xa=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=_t,action:l,onSubmit:s,relative:u,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:m,...y},R)=>{let{unstable_useTransitions:b}=c.useContext(Ee),E=Pa(),L=ns(l,{relative:u}),S=i.toLowerCase()==="get"?"get":"post",O=typeof l=="string"&&ba.test(l),$=P=>{if(s&&s(P),P.defaultPrevented)return;P.preventDefault();let T=P.nativeEvent.submitter,v=(T==null?void 0:T.getAttribute("formmethod"))||i,D=()=>E(T||P.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:a,state:o,relative:u,preventScrollReset:h,viewTransition:d,unstable_defaultShouldRevalidate:m});b&&r!==!1?c.startTransition(()=>D()):D()};return c.createElement("form",{ref:R,method:S,action:L,onSubmit:n?s:$,...y,"data-discover":!O&&e==="render"?"true":void 0})});xa.displayName="Form";function Zl({getKey:e,storageKey:t,...r}){let n=c.useContext(Wt),{basename:a}=c.useContext(Ee),o=Pe(),i=Pr();as({getKey:e,storageKey:t});let l=c.useMemo(()=>{if(!n||!e)return null;let u=gr(o,i,a,e);return u!==o.key?u:null},[]);if(!n||n.isSpaMode)return null;let s=((u,h)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let m=JSON.parse(sessionStorage.getItem(u)||"{}")[h||window.history.state.key];typeof m=="number"&&window.scrollTo(0,m)}catch(d){console.error(d),sessionStorage.removeItem(u)}}).toString();return c.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${s})(${mr(JSON.stringify(t||vr))}, ${mr(JSON.stringify(l))})`}})}Zl.displayName="ScrollRestoration";function Ca(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vt(e){let t=c.useContext(ze);return z(t,Ca(e)),t}function La(e){let t=c.useContext(Ge);return z(t,Ca(e)),t}function es(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:i,unstable_defaultShouldRevalidate:l,unstable_useTransitions:s}={}){let u=ea(),h=Pe(),d=vt(e,{relative:o});return c.useCallback(m=>{if(Ui(m,t)){m.preventDefault();let y=r!==void 0?r:Te(h)===Te(d),R=()=>u(e,{replace:y,state:n,preventScrollReset:a,relative:o,viewTransition:i,unstable_defaultShouldRevalidate:l});s?c.startTransition(()=>R()):R()}},[h,u,d,r,n,t,e,a,o,i,l,s])}function Cs(e){ie(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=c.useRef(fr(e)),r=c.useRef(!1),n=Pe(),a=c.useMemo(()=>zi(n.search,r.current?null:t.current),[n.search]),o=ea(),i=c.useCallback((l,s)=>{const u=fr(typeof l=="function"?l(new URLSearchParams(a)):l);r.current=!0,o("?"+u,s)},[o,a]);return[a,i]}var ts=0,rs=()=>`__${String(++ts)}__`;function Pa(){let{router:e}=Vt("useSubmit"),{basename:t}=c.useContext(Ee),r=Ri(),n=e.fetch,a=e.navigate;return c.useCallback(async(o,i={})=>{let{action:l,method:s,encType:u,formData:h,body:d}=Wi(o,t);
43if(i.navigate===!1){let m=i.fetcherKey||rs();await n(m,r,i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:d,formMethod:i.method||s,formEncType:i.encType||u,flushSync:i.flushSync})}else await a(i.action||l,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:d,formMethod:i.method||s,formEncType:i.encType||u,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function ns(e,{relative:t}={}){let{basename:r}=c.useContext(Ee),n=c.useContext(Le);z(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...vt(e||".",{relative:t})},i=Pe();if(e==null){o.search=i.search;let l=new URLSearchParams(o.search),s=l.getAll("index");if(s.some(h=>h==="")){l.delete("index"),s.filter(d=>d).forEach(d=>l.append("index",d));let h=l.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:De([r,o.pathname])),Te(o)}function Ls({key:e}={}){var P;let{router:t}=Vt("useFetcher"),r=La("useFetcher"),n=c.useContext(xr),a=c.useContext(Le),o=(P=a.matches[a.matches.length-1])==null?void 0:P.route.id;z(n,"useFetcher must be used inside a FetchersContext"),z(a,"useFetcher must be used inside a RouteContext"),z(o!=null,'useFetcher can only be used on routes that contain a unique "id"');let i=c.useId(),[l,s]=c.useState(e||i);e&&e!==l&&s(e);let{deleteFetcher:u,getFetcher:h,resetFetcher:d,fetch:m}=t;c.useEffect(()=>(h(l),()=>u(l)),[u,h,l]);let y=c.useCallback(async(T,v)=>{z(o,"No routeId available for fetcher.load()"),await m(l,o,T,v)},[l,o,m]),R=Pa(),b=c.useCallback(async(T,v)=>{await R(T,{...v,navigate:!1,fetcherKey:l})},[l,R]),E=c.useCallback(T=>d(l,T),[d,l]),L=c.useMemo(()=>{let T=c.forwardRef((v,D)=>c.createElement(xa,{...v,navigate:!1,fetcherKey:l,ref:D}));return T.displayName="fetcher.Form",T},[l]),S=r.fetchers.get(l)||Un,O=n.get(l);return c.useMemo(()=>({Form:L,submit:b,load:y,reset:E,...S,data:O}),[L,b,y,E,S,O])}var vr="react-router-scroll-positions",Tt={};function gr(e,t,r,n){let a=null;return n&&(r!=="/"?a=n({...e,pathname:Se(e.pathname,r)||e.pathname},t):a=n(e,t)),a==null&&(a=e.key),a}function as({getKey:e,storageKey:t}={}){let{router:r}=Vt("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=La("useScrollRestoration"),{basename:o}=c.useContext(Ee),i=Pe(),l=Pr(),s=bi();c.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),os(c.useCallback(()=>{if(s.state==="idle"){let u=gr(i,l,o,e);Tt[u]=window.scrollY}try{sessionStorage.setItem(t||vr,JSON.stringify(Tt))}catch(u){ie(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[s.state,e,o,i,l,t])),typeof document<"u"&&(c.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||vr);u&&(Tt=JSON.parse(u))}catch{}},[t]),c.useLayoutEffect(()=>{let u=r==null?void 0:r.enableScrollRestoration(Tt,()=>window.scrollY,e?(h,d)=>gr(h,d,o,e):void 0);return()=>u&&u()},[r,o,e]),c.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(i.hash){let u=document.getElementById(decodeURIComponent(i.hash.slice(1)));if(u){u.scrollIntoView();return}}}catch{ie(!1,`"${i.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[i,n,a]))}function os(e,t){let{capture:r}={};c.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function is(e,{relative:t}={}){let r=c.useContext(Sr);z(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Vt("useViewTransitionState"),a=vt(e,{relative:t});if(!r.isTransitioning)return!1;let o=Se(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Se(r.nextLocation.pathname,n)||r.nextLocation.pathname;return It(a.pathname,i)!=null||It(a.pathname,o)!=null}export{ps as A,Es as B,gs as C,ls as D,Ue as E,xa as F,ws as G,ds as H,fs as I,bs as L,Ss as M,pl as N,ms as O,Ka as R,Zl as S,Kl as a,oa as b,Ls as c,us as d,vs as e,bi as f,Cs as g,Mr as h,ea as i,Pa as j,cs as k,Ja as l,Ie as m,Ke as n,z as o,Rs as p,Wt as q,c as r,$l as s,xs as t,aa as u,hs as v,ys as w,xl as x,Or as y,ss as z};

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.