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