PageSourceSearch

https://shortmac.com/assets/chunk-QFMPRPBF-DA8DzgAN.js

js shortmac.com collected 2026-10-06 13:16:37 UTC 125,572 bytes, 26 lines download raw bytes

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

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.