PageSourceSearch

https://takedownfestival.com/assets/chunk-UH6JLGW7-H-2xEM2c.js

js takedownfestival.com collected 2026-10-08 02:24:39 UTC 115,625 bytes, 51 lines download raw bytes

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

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.