PageSourceSearch

https://shopmando.com/assets/chunk-TMI4QPZX-D9QXhwIA.js

js shopmando.com collected 2026-10-03 21:21:37 UTC 118,751 bytes, 43 lines download raw bytes

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