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