PageSourceSearch

https://storefront-008.beyourahi.workers.dev/assets/chunk-QFMPRPBF-glidRs8r.js

js storefront-008.beyourahi.workers.dev collected 2026-10-03 08:11:10 UTC 131,300 bytes, 51 lines download raw bytes

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