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