PageSourceSearch

https://app.backstagebaton.com/assets/chunk-QUQL4437-BmAooogr.js

js backstagebaton.com collected 2026-10-07 08:48:24 UTC 128,638 bytes, 26 lines download raw bytes

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

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.