vendor: 4,955 bytes, lines 1-9
1function Ra(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 ba(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 Ur;function Sa(){if(Ur)return W;Ur=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,L,H){this.props=v,this.context=L,this.refs=P,this.updater=H||g}E.prototype.isReactComponent={},E.prototype.setState=function(v,L){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,L,"setState")},E.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function b(){}b.prototype=E.prototype;function x(v,L,H){this.props=v,this.context=L,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,C=Object.prototype.hasOwnProperty,y={current:null},M={key:!0,ref:!0,__self:!0,__source:!0};function I(v,L,H){var K,X={},Q=null,ue=null;if(L!=null)for(K in L.ref!==void 0&&(ue=L.ref),L.key!==void 0&&(Q=""+L.key),L)C.call(L,K)&&!M.hasOwnProperty(K)&&(X[K]=L[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,L){return{$$typeof:e,type:v.type,key:L,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 L={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(H){return L[H]})}var he=/\/+/g;function se(v,L){return typeof v=="object"&&v!==null&&v.key!=null?ie(""+v.key):L.toString(36)}function Y(v,L,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,L,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)),L.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,L,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,L,H,ne,X);else if(Q==="object")throw L=String(v),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return ue}function ee(v,L,H){if(v==null)return v;var K=[],X=0;return Y(v,K,"","",function(Q){return L.call(H,Q,X++)}),K}function q(v){if(v._status===-1){var L=v._result;L=L(),L.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=L)}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,L,H){ee(v,function(){L.apply(this,arguments)},H)},count:function(v){var L=0;return ee(v,function(){L++}),L},toArray:function(v){return ee(v,function(L){return L})||[]},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_INT
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=me,W.act=pe,W.cloneElement=function(v,L,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(L!=null){if(L.ref!==void 0&&(Q=L.ref,ue=y.current),L.key!==void 0&&(X=""+L.key),v.type&&v.type.defaultProps)var le=v.type.defaultProps;for(ne in L)C.call(L,ne)&&!M.hasOwnProperty(ne)&&(K[ne]=L[ne]===void 0&&le!==void 0?le[ne]:L[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 L=I.bind(null,v);return L.type=v,L},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,L){return{$$typeof:u,type:v,compare:L===void 0?null:L}},W.startTransition=function(v){var L=de.transition;de.transition={};try{v()}finally{de.transition=L}},W.unstable_act=pe,W.useCallback=function(v,L){return J.current.useCallback(v,L)},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,L){return J.current.useEffect(v,L)},W.useId=function(){return J.current.useId()},W.useImperativeHandle=function(v,L,H){return J.current.useImperativeHandle(v,L,H)},W.useInsertionEffect=function(v,L){return J.current.useInsertionEffect(v,L)},W.useLayoutEffect=function(v,L){return J.current.useLayoutEffect(v,L)},W.useMemo=function(v,L){return J.current.useMemo(v,L)},W.useReducer=function(v,L,H){return J.current.useReducer(v,L,H)},W.useRef=function(v){return J.current.useRef(v)},W.useState=function(v){return J.current.useState(v)},W.useSyncExternalStore=function(v,L,H){return J.current.useSyncExternalStore(v,L,H)},W.useTransition=function(){return J.current.useTransition()},W.version="18.3.1",W}var Hr;function xa(){return Hr||(Hr=1,Bt.exports=Sa()),Bt.exports}var c=xa();const Ca=ba(c),Ml=Ra({__proto__:null,default:Ca},[c]);/** 10 * react-router v7.9.4 11 * 12 * Copyright (c) Remix Software Inc. 13 * 14 * This source code is licensed under the MIT license found in the 15 * LICENSE.md file in the root directory of this source tree. 16 * 17 * @license MIT 18 */var hn=e=>{throw TypeError(e)},La=(e,t,r)=>t.has(e)||hn("Cannot "+r),Wt=(e,t,r)=>(La(e,t,"read from private field"),r?r.call(e):t.get(e)),Pa=(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),zr="popstate";function Dl(e={}){function t(n,a){let{pathname:o,search:i,hash:s}=n.location;return it("",{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 Da(t,r,null,e)}function z(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 Ma(){return Math.random().toString(36).substring(2,10)}function Br(e,t){return{usr:e.state,key:e.key,idx:t}}function it(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||Ma()}}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 Da(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=it(P.location,E,b);u=d()+1;let T=Br(x,u),F=P.createHref(x);try{i.pushState(T,"",F)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(F)}o&&l&&l({action:s,location:P.location,delta:1})}function g(E,b){s="REPLACE";let x=it(P.location,E,b);u=d();let T=Br(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(zr,h),l=E,()=>{a.removeEventListener(zr,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),z(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 ot,Wr=class{constructor(e){if(Pa(this,ot,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Wt(this,ot).has(e))return Wt(this,ot).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Wt(this,ot).set(e,t)}};ot=new WeakMap;var Ta=new Set(["lazy","caseSensitive","path","id","index","children"]);function _a(e){return Ta.has(e)}var Fa=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function ka(e){return Fa.has(e)}function Oa(e){return e.index===!0}function lt(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(z(o.index!==!0||!o.children,"Cannot specify children on an index route"),z(a||!n[l],`Found a route id collision on i
18d "${l}". Route id's must be globally unique within Data Router usages`),Oa(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=lt(o.children,t,s,n,a)),u}})}function Fe(e,t,r="/"){return Ct(e,t,r,!1)}function Ct(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);Aa(i);let s=null;for(let l=0;s==null&&l<i.length;++l){let u=Va(o);s=Wa(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;z(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&&(z(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:za(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 Aa(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ba(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var $a=/^:[\w-]+$/,Ia=3,Na=2,ja=1,Ua=10,Ha=-2,Vr=e=>e==="*";function za(e,t){let r=e.split("/"),n=r.length;return r.some(Vr)&&(n+=Ha),t&&(n+=Na),r.filter(a=>!Vr(a)).reduce((a,o)=>a+($a.test(o)?Ia:o===""?ja:Ua),n)}function Ba(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 Wa(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=Tt({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),m=l.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=Tt({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:Ga(Pe([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=Pe([o,h.pathnameBase]))}return i}function Tt(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 Va(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 Ya({basename:e,pathname:t}){return t==="/"?e:Pe([e,t])}function Ja(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?$e(e):e;return{pathname:r?r.startsWith("/")?r:Ka(r,t):t,search:Xa(n),hash:qa(a)}}function Ka(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},z(!a.pathname||!a.pathname.includes("?"),Vt("?","pathname","search",a)),z(!a.pathname||!a.pathname.includes("#"),Vt("#","pathname","hash",a)),z(!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=Ja(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,"/"),Ga=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Xa=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Qa=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Za(e,t){return new Qa(e,typeof t=="number"?{status:t}:t)}var eo=(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"],to=new Set(En),ro=["GET",...En],no=new Set(ro),ao=new Set([301,302,303,307,308]),oo=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},rt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},io=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fr=e=>io.test(e),lo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),bn="remix-router-transitions",Sn=Symbol("ResetLoaderData");function Tl(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";z(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||lo,o={},i=lt(e.routes,a,void 0,o),s,l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let u=e.dataStrategy||ho,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}=wt(i);F=!0,b=p,T={[w.id]:f}}else if(b&&!e.hydrationData&&mt(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=mt(null,i,e.history.location.pathname);f.active&&f.matches&&(x=!0,b=f.matches)}let C,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,L=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=$r({currentLocation:y.location,nextLocation:p,historyAction:f});if(S&&w!=null){let D=new Promise(O=>{X=O});e.history.go(w*-1),ht(S,{state:"blocked",location:p,proceed(){ht(S,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),D.then(()=>e.history.go(w))},reset(){let O=new Map(y.blockers);O.set(S,rt),Z({blockers:O})}});return}return Ne(f,p)}),r){Mo(t,ie);let f=()=>Do(t,ie);t.addEventListener("pagehide",f),he=()=>t.removeEventListener("pagehide",f)}return y.initialized||Ne("POP",y.location,{initialHydration:!0}),C}function le(){h&&h(),he&&he(),m.clear(),N&&N.abort(),y.fetchers.forEach((f,p)=>Ut(p)),y.blockers.forEach((f,p)=>Ar(p))}function ne(f){return m.add(f),()=>m.delete(f)}function Z(f,p={}){f.matches&&(f.matches=f.matches.map(D=>{let O=o[D.route.id],A=D.route;return A.element!==O.element||A.errorElement!==O.errorElement||A.hydrateFallbackElement!==O.hydrateFallbackElement?{...D,route:O}:D})),y={...y,...f};let w=[],S=[];y.fetchers.forEach((D,O)=>{D.state==="idle"&&(H.has(O)?w.push(O):S.push(O))}),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,k;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 O=p.loaderData?tn(y.loaderData,p.loaderData,p.matches||[],p.errors):y.loaderData,A=y.blockers;A.size>0&&(A=new Map(A),A.forEach((B,te)=>A.set(te,rt)));let _=se?!1:Nr(f,p.matches||y.matches),$=I===!0||y.navigation.formMethod!=null&&we(y.navigation.formMethod)&&((k=f.state)==null?void 0:k._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 B=ie.get(y.location.pathname);B&&B.has(f.pathname)?U={currentLocation:y.location,nextLocation:f}:ie.has(f.pathname)&&(U={currentLocation:f,nextLocation:y.location})}else if(V){let B=ie.get(y.location.pathname);B?B.add(f.pathname):(B=new Set([f.pathname]),ie.set(y.location.pathname,B)),U={currentLocation:y.location,nextLocation:f}}Z({...p,actionData:D,loaderData:O,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 Mr(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:O}=Yr(!1,w,p),A=y.location,_=it(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,k=(p&&p.flushSync)===!0,B=$r({currentLocation:A,nextLocation:_,historyAction:U});if(B){ht(B,{state:"blocked",location:_,proceed(){ht(B,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),Mr(f,p)},reset(){let te=new Map(y.blockers);te.set(B,rt),Z({blockers:te})}});return}await Ne(U,_,{submission:D,pendingError:O,preventScrollReset:j,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:k})}function ia(){Q||(Q=To()),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,va(y.location,y.matches),I=(w&&w.preventScrollReset)===!0,V=(w&&w.enableViewTransition)===!0;let S=s||i,D=w&&w.overrideNavigation,O=w!=null&&w.initialHydration&&y.matches&&y.matches.length>0&&!x?y.matches:Fe(S,p,l),A=(w&&w.flushSync)===!0;if(O&&y.initialized&&!Y&&Ro(y.location,p)&&!(w&&w.submission&&we(w.submission.formMethod))){Ye(p,{matches:O},{flushSync:A});return}let _=mt(O,S,p.pathname);if(_.active&&_.matches&&(O=_.matches),!O){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 Wr,j;if(w&&w.pendingError)j=[Oe(O).route.id,{type:"error",error:w.pendingError}];else if(w&&w.submission&&we(w.submission.formMethod)){let ve=await la($,p,w.submission,O,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}}O=ve.matches||O,j=ve.pendingActionResult,D=Jt(p,w.submission),A=!1,_.active=!1,$=Ke(e.history,$.url,$.signal)}let{shortCircuited:k,matches:B,loaderData:te,errors:fe}=await sa($,p,O,U,_.active,D,w&&w.submission,w&&w.fetcherSubmission,w&&w.replace,w&&w.initialHydration===!0,A,j);k||(N=null,Ye(p,{matches:B||O,...rn(j),loaderData:te,errors:fe}))}async function la(f,p,w,S,D,O,A,_={}){jt();let $=Lo(p,w);if(Z({navigation:$},{flushSync:_.flushSync===!0}),O){let k=await pt(S,p.pathname,f.signal);if(k.type==="aborted")return{shortCircuited:!0};if(k.type==="error"){if(k.partialMatches.length===0){let{matches:te,route:fe}=wt(i);return{matches:te,pendingActionResult:[fe.id,{type:"error",error:k.error}]}}let B=Oe(k.partialMatches).route.id;return{matches:k.partialMatches,pendingActionResult:[B,{type:"error",error:k.error}]}}else if(k.matches)S=k.matches;else{let{notFoundMatches:B,error:te,route:fe}=Ht(p.pathname);return{matches:B,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 k=Ge(a,o,f,S,j,A?[]:n,D),B=await Ze(f,k,D,null);if(U=B[j.route.id],!U){for(let te of S)if(B[te.route.id]){U=B[te.route.id];break}}if(f.signal.aborted)return{shortCircuited:!0}}if(Be(U)){let k;return _&&_.replace!=null?k=_.replace:k=Qr(U.response.headers.get("Location"),new URL(f.url),l)===y.location.pathname+y.location.search,await je(f,U,!0,{submission:w,replace:k}),{shortCircuited:!0}}if(Ee(U)){let k=Oe(S,j.route.id);return(_&&_.replace)!==!0&&(M="PUSH"),{matches:S,pendingActionResult:[k.route.id,U,j.route.id]}}return{matches:S,pendingActionResult:[j.route.id,U]}}async function sa(f,p,w,S,D,O,A,_,$,U,j,k){let B=O||Jt(p,A),te=A||_||nn(B),fe=!se&&!U;if(D){if(fe){let ye=Dr(k);Z({navigation:B,...ye!==void 0?{actionData:ye}:{}},{flushSync:j})}let G=await pt(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}=wt(i);return{matches:Je,loaderData:{},errors:{[ze.id]:G.error}}}let ye=Oe(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}=Jr(f,S,a,o,e.history,y,w,te,p,U?[]:n,U===!0,Y,ee,H,v,pe,ve,l,e.patchRoutesOnNavigation!=null,k);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:k&&Ee(k[1])?{[k[0]]:k[1].error}:null,...rn(k),...G?{fetchers:new Map(y.fetchers)}:{}},{flushSync:j}),{shortCircuited:!0}}if(fe){let G={};if(!D){G.navigation=B;let ye=Dr(k);ye!==void 0&&(G.actionData=ye)}re.length>0&&(G.fetchers=ua(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:et,fetcherResults:ke}=await Tr(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 Le=Et(et);if(Le)return await je(f,Le.result,!0,{replace:$}),{shortCircuited:!0};
18if(Le=Et(ke),Le)return pe.add(Le.key),await je(f,Le.result,!0,{replace:$}),{shortCircuited:!0};let{loaderData:zt,errors:tt}=en(y,w,et,k,re,ke);U&&y.errors&&(tt={...y.errors,...tt});let He=kr(),yt=Or(de),vt=He||yt||re.length>0;return{matches:w,loaderData:zt,errors:tt,...vt?{fetchers:new Map(y.fetchers)}:{}}}function Dr(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 ua(f){return f.forEach(p=>{let w=y.fetchers.get(p.key),S=nt(void 0,w?w.data:void 0);y.fetchers.set(p.key,S)}),new Map(y.fetchers)}async function ca(f,p,w,S){Te(f);let D=(S&&S.flushSync)===!0,O=s||i,A=Qt(y.location,y.matches,l,w,p,S==null?void 0:S.relative),_=Fe(O,A,l),$=mt(_,O,A);if($.active&&$.matches&&(_=$.matches),!_){De(f,p,be(404,{pathname:A}),{flushSync:D});return}let{path:U,submission:j,error:k}=Yr(!0,A,S);if(k){De(f,p,k,{flushSync:D});return}let B=e.getContext?await e.getContext():new Wr,te=(S&&S.preventScrollReset)===!0;if(j&&we(j.formMethod)){await da(f,p,U,_,B,$.active,D,te,j);return}v.set(f,{routeId:p,path:U}),await fa(f,p,U,_,B,$.active,D,te,j)}async function da(f,p,w,S,D,O,A,_,$){jt(),v.delete(f);let U=y.fetchers.get(f);Me(f,Po($,U),{flushSync:A});let j=new AbortController,k=Ke(e.history,w,j.signal,$);if(O){let ce=await pt(S,new URL(k.url).pathname,k.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 B=Lt(S,w);if(!B.route.action&&!B.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,k,S,B,n,D),ae=(await Ze(k,fe,D,f))[B.route.id];if(k.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,nt($)),je(k,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),et=s||i,ke=y.navigation.state!=="idle"?Fe(et,y.navigation.location,l):y.matches;z(ke,"Didn't find any matches after fetcher action");let Le=++J;me.set(f,Le);let zt=nt($,ae.data);y.fetchers.set(f,zt);let{dsMatches:tt,revalidatingFetchers:He}=Jr(Ue,D,a,o,e.history,y,ke,$,re,n,!1,Y,ee,H,v,pe,et,l,e.patchRoutesOnNavigation!=null,[B.route.id,ae]);He.filter(ce=>ce.key!==f).forEach(ce=>{let gt=ce.key,jr=y.fetchers.get(gt),Ea=nt(void 0,jr?jr.data:void 0);y.fetchers.set(gt,Ea),Te(gt),ce.controller&&q.set(gt,ce.controller)}),Z({fetchers:new Map(y.fetchers)});let yt=()=>He.forEach(ce=>Te(ce.key));j.signal.addEventListener("abort",yt);let{loaderResults:vt,fetcherResults:G}=await Tr(tt,He,Ue,D);if(j.signal.aborted)return;if(j.signal.removeEventListener("abort",yt),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=Et(vt);if(ye)return je(Ue,ye.result,!1,{preventScrollReset:_});if(ye=Et(G),ye)return pe.add(ye.key),je(Ue,ye.result,!1,{preventScrollReset:_});let{loaderData:Je,errors:ze}=en(y,ke,vt,void 0,He,G);Or(Le),y.navigation.state==="loading"&&Le>de?(z(M,"Expected pending action"),N&&N.abort(),Ye(y.navigation.location,{matches:ke,loaderData:Je,errors:ze,fetchers:new Map(y.fetchers)})):(Z({errors:ze,loaderData:tn(y.loaderData,Je,ke,ze),fetchers:new Map(y.fetchers)}),Y=!1)}async function fa(f,p,w,S,D,O,A,_,$){let U=y.fetchers.get(f);Me(f,nt($,U?U.data:void 0),{flushSync:A});let j=new AbortController,k=Ke(e.history,w,j.signal);if(O){let re=await pt(S,new URL(k.url).pathname,k.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 B=Lt(S,w);q.set(f,j);let te=J,fe=Ge(a,o,k,S,B,n,D),ae=(await Ze(k,fe,D,f))[B.route.id];if(q.get(f)===j&&q.delete(f),!k.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(k,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:O,replace:A}={}){p.response.headers.has("X-Remix-Revalidate")&&(Y=!0);let _=p.response.headers.get("Location");z(_,"Expected a Location header on the redirect Response"),_=Qr(_,new URL(f.url),l);let $=it(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:k,formEncType:B}=y.navigation;!S&&!D&&j&&k&&B&&(S=nn(y.navigation));let te=S||D;if(oo.has(p.response.status)&&te&&we(te.formMethod))await Ne(U,$,{submission:{...te,formAction:_},preventScrollReset:O||I,enableViewTransition:w?V:void 0});else{let fe=Jt($,S);await Ne(U,$,{overrideNavigation:fe,fetcherSubmission:D,preventScrollReset:O||I,enableViewTransition:w?V:void 0})}}async function Ze(f,p,w,S){let D,O={};try{D=await po(u,f,p,S,w,!1)}catch(A){return p.filter(_=>
18_.shouldLoad).forEach(_=>{O[_.route.id]={type:"error",error:A}}),O}if(f.signal.aborted)return O;for(let[A,_]of Object.entries(D))if(xo(_)){let $=_.result;O[A]={type:"redirect",response:wo($,f,A,p,l)}}else O[A]=await go(_);return O}async function Tr(f,p,w,S){let D=Ze(w,f,S,null),O=Promise.all(p.map(async $=>{if($.matches&&$.match&&$.request&&$.controller){let j=(await Ze($.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 O).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=Oe(y.matches,p);Ut(f),Z({errors:{[D.route.id]:w},fetchers:new Map(y.fetchers)},{flushSync:(S&&S.flushSync)===!0})}function _r(f){return L.set(f,(L.get(f)||0)+1),H.has(f)&&H.delete(f),y.fetchers.get(f)||Rn}function ha(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 ma(f){let p=(L.get(f)||0)-1;p<=0?(L.delete(f),H.add(f)):L.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 Fr(f){for(let p of f){let w=_r(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);z(S,`Expected fetcher: ${w}`),S.state==="loading"&&(pe.delete(w),f.push(w),p=!0)}return Fr(f),p}function Or(f){let p=[];for(let[w,S]of me)if(S<f){let D=y.fetchers.get(w);z(D,`Expected fetcher: ${w}`),D.state==="loading"&&(Te(w),me.delete(w),p.push(w))}return Fr(p),p.length>0}function pa(f,p){let w=y.blockers.get(f)||rt;return K.get(f)!==p&&K.set(f,p),w}function Ar(f){y.blockers.delete(f),K.delete(f)}function ht(f,p){let w=y.blockers.get(f)||rt;z(w.state==="unblocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="blocked"||w.state==="blocked"&&p.state==="proceeding"||w.state==="blocked"&&p.state==="unblocked"||w.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${w.state} -> ${p.state}`);let S=new Map(y.blockers);S.set(f,p),Z({blockers:S})}function $r({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,O]=S[S.length-1],A=y.blockers.get(D);if(!(A&&A.state==="proceeding")&&O({currentLocation:f,nextLocation:p,historyAction:w}))return D}function Ht(f){let p=be(404,{pathname:f}),w=s||i,{matches:S,route:D}=wt(w);return{notFoundMatches:S,route:D,error:p}}function ya(f,p,w){if(g=f,P=p,R=w||null,!E&&y.navigation===Yt){E=!0;let S=Nr(y.location,y.matches);S!=null&&Z({restoreScrollPosition:S})}return()=>{g=null,P=null,R=null}}function Ir(f,p){return R&&R(f,p.map(S=>pn(S,y.loaderData)))||f.key}function va(f,p){if(g&&P){let w=Ir(f,p);g[w]=P()}}function Nr(f,p){if(g){let w=Ir(f,p),S=g[w];if(typeof S=="number")return S}return null}function mt(f,p,w){if(e.patchRoutesOnNavigation)if(f){if(Object.keys(f[0].params).length>0)return{active:!0,matches:Ct(p,w,l,!0)}}else return{active:!0,matches:Ct(p,w,l,!0)||[]};return{active:!1,matches:null}}async function pt(f,p,w,S){if(!e.patchRoutesOnNavigation)return{type:"success",matches:f};let D=f;
18for(;;){let O=s==null,A=s||i,_=o;try{await e.patchRoutesOnNavigation({signal:w,path:p,matches:D,fetcherKey:S,patch:(j,k)=>{w.aborted||Kr(j,k,A,_,a,!1)}})}catch(j){return{type:"error",error:j,partialMatches:D}}finally{O&&!w.aborted&&(i=[...i])}if(w.aborted)return{type:"aborted"};let $=Fe(A,p,l);if($)return{type:"success",matches:$};let U=Ct(A,p,l,!0);if(!U||D.length===U.length&&D.every((j,k)=>j.route.id===U[k].route.id))return{type:"success",matches:null};D=U}}function ga(f){o={},s=lt(f,a,void 0,o)}function wa(f,p,w=!1){let S=s==null;Kr(f,p,s||i,o,a,w),S&&(i=[...i],Z({}))}return C={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:ya,navigate:Mr,fetch:ca,revalidate:ia,createHref:f=>e.history.createHref(f),encodeLocation:f=>e.history.encodeLocation(f),getFetcher:_r,resetFetcher:ha,deleteFetcher:ma,dispose:le,getBlocker:pa,deleteBlocker:Ar,patchRoutes:wa,_internalFetchControllers:q,_internalSetRoutes:ga,_internalSetStateDoNotUseOrYouWillBreakYourApp(f){Z(f)}},C}function so(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=Ya({basename:r,pathname:l.pathname})),Ae(l)}function Yr(e,t,r){if(!r||!so(r))return{path:t};if(r.formMethod&&!Co(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()}}}z(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=Zr(s);else if(r.body==null)s=new URLSearchParams,l=new FormData;else try{s=new URLSearchParams(r.body),l=Zr(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 Jr(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,C=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>=400,V={currentUrl:C,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):uo(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||C.pathname+C.search===y.pathname+y.search||C.search!==y.search||co(o.matches[ee],Y),me={...V,defaultShouldRevalidate:de},pe=_t(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);
19if(!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),L=null;if(m.has(ee))m.delete(ee),L=Ge(r,n,v,de,me,u,t);else if(J)h&&(L=Ge(r,n,v,de,me,u,t));else{let H={...V,defaultShouldRevalidate:N?!1:h};_t(me,H)&&(L=Ge(r,n,v,de,me,u,t,H))}L&&he.push({key:ee,routeId:Y.routeId,path:Y.path,matches:L,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 uo(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function co(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function _t(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Kr(e,t,r,n,a,o){let i;if(e){let u=n[e];z(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),i=u.children}else i=r;let 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=lt(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]=lt([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 Gr=new WeakMap,Cn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(z(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=Gr.get(a);i||(i={},Gr.set(a,i));let s=i[e];if(s)return s;let l=(async()=>{let u=_a(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},Xr=new WeakMap;function fo(e,t,r,n,a){let o=r[e.id];if(z(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let d=Xr.get(o);if(d)return{lazyRoutePromise:d,lazyHandlerPromise:d};let h=(async()=>{z(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=ka(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 Xr.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=Cn({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 ho(e){return e.matches.some(t=>t.route.middleware)?Ln(e,()=>qr(e)):qr(e)}function Ln(e,t){return mo(e,t,n=>n,bo,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=Oe(i,i[s].route.id).route.id;return Promise.resolve({[l]:{type:"error",result:n}})}}}async function mo(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=Cn({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=fo(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"?_t(n,{...s,defaultShouldRevalidate:d}):_t(n,s):i},resolve(d){let{lazy:h,loader:m,middleware:g}=n.route,R=l||i||d&&!we(r.method)&&(h||m),P=g&&g.length>0&&!m&&!h;return R&&!P?yo({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 po(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 Ln(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 yo({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 vo(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 go(e){var n,a,o,i,s,l;let{result:t,type:r}=e;if(mr(t)){let u;
19try{u=await vo(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 wo(e,t,r,n,a){let o=e.headers.get("Location");if(z(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!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 Qr(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 Zr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Eo(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(z(!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=Oe(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 en(e,t,r,n,a,o){let{loaderData:i,errors:s}=Eo(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(z(m,"Did not find corresponding fetcher result"),Ee(m)){let g=Oe(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))z(!1,"Unhandled fetcher revalidation redirect");else{let g=_e(m.data);e.fetchers.set(u,g)}}),{loaderData:i,errors:s}}function tn(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 rn(e){return e?Ee(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Oe(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 wt(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 Et(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 Ro(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function bo(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&So(r))}function So(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function xo(e){return mr(e.result)&&ao.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 Co(e){return no.has(e.toUpperCase())}function we(e){return to.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 nn(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 Lo(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 nt(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 Po(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 Mo(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 Do(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 To(){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 _o=c.createContext(!1);function Fo(){return c.useContext(_o)}var yr=c.createContext({isTransitioning:!1});yr.displayName="ViewTransition";var vr=c.createContext(new Map);vr.displayName="Fetchers";var Ft=c.createContext(null);Ft.displayName="Await";var Se=c.createContext(null);Se.displayName="Navigation";var ut=c.createContext(null);ut.displayName="Location";var xe=c.createContext({outlet:null,matches:[],isDataRoute:!1});xe.displayName="Route";var gr=c.createContext(null);gr.displayName="RouteError";function ko(e,{relative:t}={}){z(ct(),"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}=dt(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:Pe([r,o])),n.createHref({pathname:s,search:i,hash:a})}function ct(){return c.useContext(ut)!=null}function Ce(){return z(ct(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(ut).location}function _l(){return c.useContext(ut).navigationType}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?Jo():Oo()}function Oo(){z(ct(),"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}=Ce(),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 Ao=c.createContext(null);function $o(e){let t=c.useContext(xe).outlet;return c.useMemo(()=>t&&c.createElement(Ao.Provider,{value:e},t),[t,e])}function kn(){let{matches:e}=c.useContext(xe),t=e[e.length-1];return t?t.params:{}}function dt(e,{relative:t}={}){let{matches:r}=c.useContext(xe),{pathname:n}=Ce(),a=JSON.stringify(cr(r));return c.useMemo(()=>dr(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Io(e,t,r,n,a){z(ct(),"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||"";In(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=Ce(),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.`),zo(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 No(){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 jo=c.createElement(No,null),Uo=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 Ho({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 zo(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);z(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||jo,s&&(l<0&&h===0?(In("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(Ho,{match:d,routeContext:{outlet:u,matches:E,isDataRoute:r!=null},children:x})};return r&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?c.createElement(Uo,{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 On(e){let t=c.useContext(Ie);return z(t,wr(e)),t}function qe(e){let t=c.useContext(Xe);return z(t,wr(e)),t}function Bo(e){let t=c.useContext(xe);return z(t,wr(e)),t}function ft(e){let t=Bo(e),r=t.matches[t.matches.length-1];return z(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Wo(){return ft("useRouteId")}function Vo(){return qe("useNavigation").navigation}function Fl(){let e=On("useRevalidator"),t=qe("useRevalidator"),r=c.useCallback(async()=>{await e.router.revalidate()},[e.router]);return c.useMemo(()=>({revalidate:r,state:t.revalidation}),[r,t.revalidation])}function Er(){let{matches:e,loaderData:t}=qe("useMatches");return c.useMemo(()=>e.map(r=>pn(r,t)),[e,t])}function An(){let e=qe("useLoaderData"),t=ft("useLoaderData");return e.loaderData[t]}function $n(){let e=qe("useActionData"),t=ft("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Rr(){var n;let e=c.useContext(gr),t=qe("useRouteError"),r=ft("useRouteError");return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function Yo(){let e=c.useContext(Ft);return e==null?void 0:e._data}function Jo(){let{router:e}=On("useNavigate"),t=ft("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 an={};function In(e,t,r){!t&&!an[e]&&(an[e]=!0,oe(!1,r))}var on={};function nr(e,t){!e&&!on[t]&&(on[t]=!0,console.warn(t))}function kl(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 Ol=["HydrateFallback","hydrateFallbackElement"],Ko=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 Al({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(C=>{a(y=>(C.errors&&r&&Object.entries(C.errors).forEach(([M,I])=>{var N;((N=y.errors)==null?void 0:N[M])!==I&&r(I)}),C))},[r]),b=c.useCallback((C,{deletedFetchers:y,flushSync:M,viewTransitionOpts:I})=>{C.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(C)):c.startTransition(()=>E(C));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(C))});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:C,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(i(C),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 Ko)},[s]),c.useEffect(()=>{if(u&&o&&e.window){let C=o,y=u.promise,M=e.window.document.startViewTransition(async()=>{c.startTransition(()=>E(C)),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:C=>e.navigate(C),push:(C,y,M)=>e.navigate(C,{state:y,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(C,y,M)=>e.navigate(C,{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(Qo,{basename:T,location:n.location,navigationType:n.historyAction,navigator:x},c.createElement(Go,{routes:e.routes,future:e.future,state:n,unstable_onError:r})))))),null)}var Go=c.memo(Xo);function Xo({routes:e,future:t,state:r,unstable_onError:n}){return Io(e,void 0,r,n,t)}function $l(e){return $o(e.context)}function qo(e){z(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Qo({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1}){z(!ct(),"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(ut.Provider,{children:t,value:g}))}function Il({children:e,errorElement:t,resolve:r}){let n=c.useContext(Ie);return c.createElement(Zo,{resolve:r,errorElement:t,unstable_onError:n==null?void 0:n.unstable_onError},c.createElement(ei,null,e))}var Zo=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(Ft.Provider,{value:n,children:t});if(a===1)return c.createElement(Ft.Provider,{value:n,children:e});throw n}};function ei({children:e}){let t=Yo(),r=typeof e=="function"?e(t):e;return c.createElement(c.Fragment,null,r)}function ln(e,t=[]){let r=[];return c.Children.forEach(e,(n,a)=>{if(!c.isValidElement(n))return;let o=[...t,a];if(n.type===c.Fragment){r.push.apply(r,ln(n.props.children,o));return}z(n.type===qo,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),z(!n.props.index||!n.props.children,"An index route cannot have child routes.");let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=ln(n.props.children,o)),r.push(i)}),r}function ti(){return{params:kn(),loaderData:An(),actionData:$n(),matches:Er()}}function Nl(e){return function(){const r=ti();return c.createElement(e,r)}}function ri(){return{params:kn(),loaderData:An(),actionData:$n(),error:Rr()}}function jl(e){return function(){const r=ri();return c.createElement(e,r)}}var Pt="get",Mt="application/x-www-form-urlencoded";function At(e){return e!=null&&typeof e.tagName=="string"}function ni(e){return At(e)&&e.tagName.toLowerCase()==="button"}function ai(e){return At(e)&&e.tagName.toLowerCase()==="form"}function oi(e){return At(e)&&e.tagName.toLowerCase()==="input"}function ii(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function li(e,t){return e.button===0&&(!t||t==="_self")&&!ii(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 si(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 Rt=null;function ui(){if(Rt===null)try{new FormData(document.createElement("form"),0),Rt=!1}catch{Rt=!0}return Rt}var ci=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kt(e){return e!=null&&!ci.has(e)?(oe(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Mt}"`),null):e}function di(e,t){let r,n,a,o,i;if(ai(e)){let s=e.getAttribute("action");n=s?Re(s,t):null,r=e.getAttribute("method")||Pt,a=Kt(e.getAttribute("enctype"))||Mt,o=new FormData(e)}else if(ni(e)||oi(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")||Pt,a=Kt(e.getAttribute("formenctype"))||Kt(s.getAttribute("enctype"))||Mt,o=new FormData(s,e),!ui()){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")}
21else 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=Pt,n=null,a=Mt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var fi=-1,hi=-2,mi=-3,pi=-4,yi=-5,vi=-6,gi=-7,wi="B",Ei="D",Nn="E",Ri="M",bi="N",jn="P",Si="R",xi="S",Ci="Y",Li="U",Pi="Z",Un=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Mi(){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 gi:u(void 0);continue;case yi:u(null);continue;case hi:u(NaN);continue;case vi:u(1/0);continue;case mi:u(-1/0);continue;case pi: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 Ei:u(t[l]=new Date(m));continue;case Li:u(t[l]=new URL(m));continue;case wi:u(t[l]=BigInt(m));continue;case Si:u(t[l]=new RegExp(m,g));continue;case Ci:u(t[l]=Symbol.for(m));continue;case xi:const R=new Set;t[l]=R;for(let F=d.length-1;F>0;F--)i.push([d[F],C=>{R.add(C)}]);u(R);continue;case Ri:const P=new Map;t[l]=P;for(let F=d.length-2;F>0;F-=2){const C=[];i.push([d[F+1],y=>{C[1]=y}]),i.push([d[F],y=>{C[0]=y}]),s.push(()=>{P.set(C[0],C[1])})}u(P);continue;case bi:const E=Object.create(null);t[l]=E;for(const F of Object.keys(m).reverse()){const C=[];i.push([m[F],y=>{C[1]=y}]),i.push([Number(F.slice(1)),y=>{C[0]=y}]),s.push(()=>{E[C[0]]=C[1]})}u(E);continue;case jn:if(t[m])u(t[l]=t[m]);else{const F=new Un;n[m]=F,u(t[l]=F.promise)}continue;case Nn:const[,b,x]=d;let T=x&&Gt&&Gt[x]?new Gt[x](b):new Error(b);t[l]=T,u(T);continue;case Pi:u(t[l]=t[m]);continue;default:if(Array.isArray(a)){const F=[],C=d.slice(1);for(let y=0;y<C.length;y++){const M=C[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!==fi&&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 Di(e,t){const{plugins:r}=t??{},n=new Un,a=e.pipeThrough(Mi()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await Ti.call(o,a);let s=n.promise;return i.done?n.resolve():s=_i.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 Ti(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 _i(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case jn:{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 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.reject(l);break}default:throw new SyntaxError}t=await e.read()}}async function Fi(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 ki={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},Oi=/[&><\u2028\u2029]/g;function Ai(e){return e.replace(Oi,t=>ki[t])}function ge(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}
22var ir=Symbol("SingleFetchRedirect"),Hn=class extends Error{},$i=202,Ii=new Set([100,101,204,205]);function Ul(e,t,r,n,a){let o=Ni(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)}},Vi,n,a);return async i=>i.runClientMiddleware(o)}function Ni(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 ji(i,r,a);let h=l.some(m=>{let{hasLoader:g,hasClientLoader:R}=t(m);return m.unstable_shouldCallHandler()&&g&&!R});return!n&&!h?Ui(i,t,r,a):u?Bi(i,r,a):Hi(i,d,t,r,n,a,o)}}async function ji(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,st(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:Za(o.result,a)}}}async function Ui(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 st(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 Hi(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),C=!R.unstable_shouldRevalidateArgs||R.unstable_shouldRevalidateArgs.actionStatus==null||R.unstable_shouldRevalidateArgs.actionStatus<400;if(!R.unstable_shouldCallHandler(C)){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 st(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 st(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 zi(d.promise,e.matches,s,h),h}async function zi(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 Hn&&(n[s].result=o)})}catch{}}async function Bi(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 st(s,a)}));return{[n.route.id]:o}}function Wi(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 zn(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 Vi(e,t,r){let{request:n}=e,a=zn(n.url,t,"data");n.method==="GET"&&(a=Wi(a),r&&a.searchParams.set("_routes",r.join(",")));let o=await fetch(a,await Fi(n));if(o.status>=400&&!o.headers.has("X-Remix-Response"))throw new We(o.status,o.statusText,await o.text());if(o.status===204&&o.headers.has("X-Remix-Redirect"))return{status:$i,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(Ii.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 Yi(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 Yi(e,t){return Di(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 st(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:i,status:s}=e.redirect;throw eo(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 Hn(`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 Bn(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ji(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 Jn(n,a)}function Wn(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Ki(e){if(!e.css)return;let t=Wn(e);await Promise.all(t.map(Yn))}async function Vn(e,t){if(!e.css&&!t.links||!Zi())return;let r=[];if(e.css&&r.push(...Wn(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(Yn))}async function Yn(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 Gi(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 Xi(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await Bn(o,r);return i.links?i.links():[]}return[]}));return Jn(n.flat(1).filter(Gi).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 qi(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 qi(e){return[...new Set(e)]}function Qi(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Jn(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(Qi(o));return r.has(s)||(r.add(s),a.push({key:s,link:o})),a},[])}var bt;function Zi(){if(bt!==void 0)return bt;let e=document.createElement("link");return bt=e.relList.supports("preload"),e=null,bt}function el(){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 Kn(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 tl(e,t,r){let n=Gn(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?el: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 Hl(e,t,r,n,a,o){return xr(t,r,n,a,o,"",Kn(t),e)}function St(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=Kn(e),s){return(i[o]||[]).map(l=>{var x,T,F;let u=t[l.id];function d(C){return ge(typeof C=="function","No single fetch function available for route handler"),C()}function h(C){return l.hasLoader?d(C):Promise.resolve(null)}function m(C){if(!l.hasAction)throw Xt("action",l.id);return d(C)}function g(C){import(C)}function R(C){C.clientActionModule&&g(C.clientActionModule),C.clientLoaderModule&&g(C.clientLoaderModule)}async function P(C){let y=t[l.id],M=y?Vn(l,y):Promise.resolve();try{return C()}finally{await M}}let E={id:l.id,index:l.index,path:l.path};if(u){Object.assign(E,{...E,...tl(l,u,a),middleware:u.clientMiddleware,handle:u.handle,shouldRevalidate:dn(E.path,u,l,n,s)});let C=r&&r.loaderData&&l.id in r.loaderData,y=C?(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(St("loader",l),N){if(C)return y;if(M)throw I}return h(se)}}):h(se)))}finally{N=!1}},E.loader.hydrate=al(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 St("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 C;async function y(){return C?await C:(C=(async()=>{(l.clientLoaderModule||l.clientActionModule)&&await new Promise(I=>setTimeout(I,0));let M=nl(l,t);return R(l),await M})(),await C)}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 St("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 St("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 rl(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 rl(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function nl(e,t){let r=Bn(e,t),n=Ki(e),a=await r;return await Promise.all([n,Vn(e,a)]),{Component:Gn(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 Gn(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function al(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Dt=new Set,ol=1e3,kt=new Set,il=7680;function Cr(e,t){return e.mode==="lazy"&&t===!0}function ll({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 zl(e,t,r,n,a,o){if(Cr(n,r))return async({path:i,patch:s,signal:l,fetcherKey:u})=>{kt.has(i)||await Xn([i],u?window.location.href:i,e,t,r,a,o,n.manifestPath,s,l)}}function Bl(e,t,r,n,a,o){c.useEffect(()=>{var d,h;if(!Cr(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;kt.has(R)||Dt.add(R)}async function s(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let m=Array.from(Dt.keys()).filter(g=>kt.has(g)?(Dt.delete(g),!1):!0);if(m.length!==0)try{await Xn(m,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(g){console.error("Failed to fetch manifest patches",g)}}let l=cl(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 sl(e,t){let r=e||"/__manifest";return t==null?r:`${t}${r}`.replace(/\/+/g,"/")}var qt="react-router-manifest-version";async function Xn(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(sl(s,i),window.location.origin);if(h.search=d.toString(),h.toString().length>il){Dt.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=>ul(E,kt));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 ul(e,t){if(t.size>=ol){let r=t.values().next().value;t.delete(r)}t.add(e)}function cl(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function Lr(){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 dl(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:at(s,g),onBlur:at(l,R),onMouseEnter:at(u,g),onMouseLeave:at(d,R),onTouchStart:at(h,g)}]:[!1,m,{}]}function at(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 Wl({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(()=>Ji(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(qn,{key:u,nonce:e,...d}):c.createElement("link",{key:u,nonce:e,...d})))}function qn({page:e,...t}){let{router:r}=Lr(),n=c.useMemo(()=>Fe(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(hl,{page:e,matches:n,...t}):null}function fl(e){let{manifest:t,routeModules:r}=Qe(),[n,a]=c.useState([]);return c.useEffect(()=>{let o=!1;return Xi(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function hl({page:e,matches:t,...r}){let n=Ce(),{manifest:a,routeModules:o}=Qe(),{basename:i}=Lr(),{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=zn(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=fl(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 Vl(){let{isSpaMode:e,routeModules:t}=Qe(),{errors:r,matches:n,loaderData:a}=$t(),o=Ce(),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(!ml(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:Ai(m)}})}catch{return null}return c.createElement("meta",{key:JSON.stringify(h),...h})}))}function ml(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Ot=!1;function pl(){Ot=!0}function yl(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i}=Qe(),{router:s,static:l,staticContext:u}=Lr(),{matches:d}=$t(),h=Fo(),m=Cr(o,i);a&&(a.didRenderScripts=!0);let g=Pr(d,null,n);c.useEffect(()=>{pl()},[]);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((C,y)=>{let M=`route${y}`,I=t.routes[C.route.id];ge(I,`Route ${C.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(ll(t,s),null,2)};`:""} 37 window.__reactRouterRouteModules = {${g.map((C,y)=>`${JSON.stringify(C.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?[]:vl(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 vl(e){return[...new Set(e)]}function gl(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Yl=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(yl,null):null)))}var Zn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Zn&&(window.__reactRouterVersion="7.9.4")}catch{}var ea=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ta=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"&&ea.test(u),E,b=!1;if(typeof u=="string"&&P&&(E=u,Zn))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=ko(u,{relative:a}),[T,F,C]=dl(n,m),y=Rl(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,...C,href:E||x,onClick:b||o?t:M,ref:gl(g,F),target:l,"data-discover":!P&&r==="render"?"true":void 0});return T&&!P?c.createElement(c.Fragment,null,I,c.createElement(qn,{page:x})):I});ta.displayName="Link";var wl=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=dt(i,{relative:u.relative}),m=Ce(),g=c.useContext(Xe),{navigator:R,basename:P}=c.useContext(Se),E=g!=null&&Pl(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 C=x===b||!a&&x.startsWith(b)&&x.charAt(F)==="/",y=T!=null&&(T===b||!a&&T.startsWith(b)&&T.charAt(b.length)==="/"),M={isActive:C,isPending:y,isTransitioning:E},I=C?t:void 0,N;typeof n=="function"?N=n(M):N=[n,C?"active":null,y?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let V=typeof o=="function"?o(M):o;return c.createElement(ta,{...u,"aria-current":I,className:N,ref:d,style:V,to:i,viewTransition:s},typeof l=="function"?l(M):l)});wl.displayName="NavLink";var ra=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=Pt,action:s,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:h,...m},g)=>{let R=oa(),P=xl(s,{relative:u}),E=i.toLowerCase()==="get"?"get":"post",b=typeof s=="string"&&ea.test(s),x=T=>{if(l&&l(T),T.defaultPrevented)return;T.preventDefault();let F=T.nativeEvent.submitter,C=(F==null?void 0:F.getAttribute("formmethod"))||i;R(F||T.currentTarget,{fetcherKey:t,method:C,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})});ra.displayName="Form";function El({getKey:e,storageKey:t,...r}){let n=c.useContext(It),{basename:a}=c.useContext(Se),o=Ce(),i=Er();Cl({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)})`}})}El.displayName="ScrollRestoration";function na(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 z(t,na(e)),t}function aa(e){let t=c.useContext(Xe);return z(t,na(e)),t}function Rl(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:i}={}){let s=Fn(),l=Ce(),u=dt(e,{relative:o});return c.useCallback(d=>
43{if(li(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 Jl(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=Ce(),a=c.useMemo(()=>si(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 bl=0,Sl=()=>`__${String(++bl)}__`;function oa(){let{router:e}=Nt("useSubmit"),{basename:t}=c.useContext(Se),r=Wo();return c.useCallback(async(n,a={})=>{let{action:o,method:i,encType:s,formData:l,body:u}=di(n,t);if(a.navigate===!1){let d=a.fetcherKey||Sl();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 xl(e,{relative:t}={}){let{basename:r}=c.useContext(Se),n=c.useContext(xe);z(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...dt(e||".",{relative:t})},i=Ce();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 Kl({key:e}={}){var b;let{router:t}=Nt("useFetcher"),r=aa("useFetcher"),n=c.useContext(vr),a=c.useContext(xe),o=(b=a.matches[a.matches.length-1])==null?void 0:b.route.id;z(n,"useFetcher must be used inside a FetchersContext"),z(a,"useFetcher must be used inside a RouteContext"),z(o!=null,'useFetcher can only be used on routes that contain a unique "id"');let i=c.useId(),[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)=>{z(o,"No routeId available for fetcher.load()"),await t.fetch(s,o,x,T)},[s,o,t]),d=oa(),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(ra,{...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])}var sr="react-router-scroll-positions",xt={};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 Cl({getKey:e,storageKey:t}={}){let{router:r}=Nt("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=aa("useScrollRestoration"),{basename:o}=c.useContext(Se),i=Ce(),s=Er(),l=Vo();c.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Ll(c.useCallback(()=>{if(l.state==="idle"){let u=ur(i,s,o,e);xt[u]=window.scrollY}try{sessionStorage.setItem(t||sr,JSON.stringify(xt))}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&&(xt=JSON.parse(u))}catch{}},[t]),c.useLayoutEffect(()=>{let u=r==null?void 0:r.enableScrollRestoration(xt,()=>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 Ll(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 Pl(e,{relative:t}={}){let r=c.useContext(yr);z(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=dt(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 Tt(a.pathname,i)!=null||Tt(a.pathname,o)!=null}export{Il as A,zl as B,Ul as C,Dl as D,We as E,ra as F,Hl as G,kl as H,Ol as I,ln as J,_l as K,ta as L,jl as M,Ii as N,$l as O,Wl as P,Vl as Q,Ca as R,El as S,yl as T,$n as a,Vo as b,Fn as c,An as d,Kl as e,Ce as f,kn as g,oa as h,Fl as i,xa as j,Ml as k,ba as l,Fe as m,Ve as n,z as o,Bl as p,It as q,c as r,al as s,Yl as t,Jl as u,Al as v,Nl as w,Yi as x,xr as y,Tl 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.