1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`58d6214076a908f9a2757ad8d7581f83b194e39b`}}catch{}})();import{i as e}from"./chunk-DhYv7lCv.js";import{t}from"./react-DJZuz1_Q.js";import{t as n}from"./preload-helper-BHy0x5cg.js";var r=e(t(),1),i=e=>{throw TypeError(e)},a=(e,t,n)=>t.has(e)||i(`Cannot `+n),o=(e,t,n)=>(a(e,t,`read from private field`),n?n.call(e):t.get(e)),s=(e,t,n)=>t.has(e)?i(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),c=`popstate`;function l(e={}){function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return m(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:h(t)}return _(t,n,null,e)}function u(e,t){if(e===!1||e==null)throw Error(t)}function d(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function f(){return Math.random().toString(36).substring(2,10)}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function m(e,t,n=null,r){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?g(t):t,state:n,key:t&&t.key||r||f()}}function h({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function g(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function _(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,l=null,u=d();u??(u=0,o.replaceState({...o.state,idx:u},``));function d(){return(o.state||{idx:null}).idx}function f(){s=`POP`;let e=d(),t=e==null?null:e-u;u=e,l&&l({action:s,location:y.location,delta:t})}function h(e,t){s=`PUSH`;let r=m(y.location,e,t);n&&n(r,e),u=d()+1;let c=p(r,u),f=y.createHref(r);try{o.pushState(c,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&l&&l({action:s,location:y.location,delta:1})}function g(e,t){s=`REPLACE`;let r=m(y.location,e,t);n&&n(r,e),u=d();let i=p(r,u),c=y.createHref(r);o.replaceState(i,``,c),a&&l&&l({action:s,location:y.location,delta:0})}function _(e){return v(e)}let y={get action(){return s},get location(){return e(i,o)},listen(e){if(l)throw Error(`A history only accepts one active listener`);return i.addEventListener(c,f),l=e,()=>{i.removeEventListener(c,f),l=null}},createHref(e){return t(i,e)},createURL:_,encodeLocation(e){let t=_(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:g,go(e){return o.go(e)}};return y}function v(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),u(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:h(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function y(e){return{defaultValue:e}}var b,x=class{constructor(e){if(s(this,b,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(o(this,b).has(e))return o(this,b).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){o(this,b).set(e,t)}};b=new WeakMap;var S=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function C(e){return S.has(e)}var w=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function T(e){return w.has(e)}function E(e){return e.index===!0}function ee(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(u(e.index!==!0||!e.children,`Cannot specify children on an index route`),u(i||!r[s],`Found a route id collision on i
1d "${s}". Route id's must be globally unique within Data Router usages`),E(e)){let n={...e,...t(e),id:s};return r[s]=n,n}else{let n={...e,...t(e),id:s,children:void 0};return r[s]=n,e.children&&(n.children=ee(e.children,t,o,r,i)),n}})}function D(e,t,n=`/`){return O(e,t,n,!1)}function O(e,t,n,r){let i=R((typeof t==`string`?g(t):t).pathname||`/`,n);if(i==null)return null;let a=A(e);te(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ce(i);o=se(a[e],t,r)}return o}function k(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function A(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;u(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=B([r,c.relativePath]),d=n.concat(c);e.children&&e.children.length>0&&(u(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),A(e.children,t,d,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:F(l,e.index),routesMeta:d})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);
1else for(let n of j(e.path))a(e,t,!0,n)}),t}function j(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=j(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function te(e){e.sort((e,t)=>e.score===t.score?oe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var M=/^:[\w-]+$/,N=3,ne=2,P=1,re=10,ie=-2,ae=e=>e===`*`;function F(e,t){let n=e.split(`/`),r=n.length;return n.some(ae)&&(r+=ie),t&&(r+=ne),n.filter(e=>!ae(e)).reduce((e,t)=>e+(M.test(t)?N:t===``?P:re),r)}function oe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function se(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=I({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=I({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
1Object.assign(i,u.params),o.push({params:i,pathname:B([a,u.pathname]),pathnameBase:V(B([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=B([a,u.pathnameBase]))}return o}function I(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=L(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function L(e,t=!1,n=!0){d(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 r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`)).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ce(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return d(!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 R(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function le({basename:e,pathname:t}){return t===`/`?e:B([e,t])}function z(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?g(e):e;return{pathname:n?n.startsWith(`/`)?n:ue(n,t):t,search:he(r),hash:ge(i)}}function ue(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function de(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function pe(e){let t=fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function me(e,t,n,r=!1){let i;typeof e==`string`?i=g(e):(i={...e},u(!i.pathname||!i.pathname.includes(`?`),de(`?`,`pathname`,`search`,i)),u(!i.pathname||!i.pathname.includes(`#`),de(`#`,`pathname`,`hash`,i)),u(!i.search||!i.search.includes(`#`),de(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=z(i,s),l=o&&o!==`/`&&o.endsWith(`/`),d=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||d)&&(c.pathname+=`/`),c}var B=e=>e.join(`/`).replace(/\/\/+/g,`/`),V=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),he=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ge=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,_e=class{constructor(e,t){this.type=`DataWithResponseInit`,this.data=e,this.init=t||null}};function ve(e,t){return new _e(e,typeof t==`number`?{status:t}:t)}var ye=(e,t=302)=>{let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let r=new Headers(n.headers);return r.set(`Location`,e),new Response(null,{...n,headers:r})},H=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function be(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var xe=[`POST`,`PUT`,`PATCH`,`DELETE`],Se=new Set(xe),Ce=[`GET`,...xe],we=new Set(Ce),Te=new Set([301,302,303,307,308]),Ee=new Set([307,308]),De={
1state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Oe={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ke={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Ae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,je=e=>Ae.test(e),Me=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ne=`remix-router-transitions`,Pe=Symbol(`ResetLoaderData`);function Fe(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;u(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Me,a={},o=ee(e.routes,i,void 0,a),s,c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Ye,f={...e.future},p=null,h=new Set,g=null,_=null,y=null,b=e.hydrationData!=null,S=D(o,e.history.location,c),C=!1,w=null,T;if(S==null&&!e.patchRoutesOnNavigation){let t=K(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=gt(o);T=!0,S=n,w={[r.id]:t}}else if(S&&!e.hydrationData&&dt(S,o,e.history.location.pathname).active&&(S=null),S)if(S.some(e=>e.route.lazy))T=!1;else if(!S.some(e=>ze(e.route)))T=!0;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=S.findIndex(e=>n[e.route.id]!==void 0);T=S.slice(0,e+1).every(e=>!Be(e.route,t,n))}else T=S.every(e=>!Be(e.route,t,n))}else{T=!1,S=[];let t=dt(null,o,e.history.location.pathname);t.active&&t.matches&&(C=!0,S=t.matches)}let E,A={historyAction:e.history.action,location:e.history.location,matches:S,initialized:T,navigation:De,restoreScrollPosition:e.hydrationData==null?null:!1,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||w,fetchers:new Map,blockers:new Map},j=`POP`,te=!1,M,N=!1,ne=new Map,P=null,re=!1,ie=!1,ae=new Set,F=new Map,oe=0,se=-1,I=new Map,L=new Set,ce=new Map,le=new Map,z=new Set,ue=new Map,de,fe=null;function pe(){if(p=e.history.listen(({action:t,location:n,delta:r})=>{if(de){de(),de=void 0;return}d(ue.size===0||r!=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 i=$e({currentLocation:A.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{de=e});e.history.go(r*-1),Qe(i,{state:`blocked`,location:n,proceed(){Qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(A.blockers);e.set(i,ke),V({blockers:e})}});return}return ve(t,n)}),n){Pt(t,ne);let e=()=>Ft(t,ne);t.addEventListener(`pagehide`,e),P=()=>t.removeEventListener(`pagehide`,e)}return A.initialized||ve(`POP`,A.location,{initialHydration:!0}),E}function me(){p&&p(),P&&P(),h.clear(),M&&M.abort(),A.fetchers.forEach((e,t)=>We(t)),A.blockers.forEach((e,t)=>Ze(t))}function B(e){return h.add(e),()=>h.delete(e)}function V(e,t={}){e.matches&&=e.matches.map(e=>{let t=a[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),A={...A,...e};let n=[],r=[];A.fetchers.forEach((e,t)=>{e.state===`idle`&&(z.has(t)?n.push(t):r.push(t))}),z.forEach(e=>{!A.fetchers.has(e)&&!F.has(e)&&n.push(e)}),[...h].forEach(e=>e(A,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>We(e)),r.forEach(e=>A.fetchers.delete(e))}function he(t,n,{flushSync:r}={}){let i=A.actionData!=null&&A.navigation.formMethod!=null&&J(A.navigation.formMethod)&&A.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?A.actionData:null;
1let c=n.loaderData?pt(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,l=A.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,ke)));let u=re?!1:ut(t,n.matches||A.matches),d=te===!0||A.navigation.formMethod!=null&&J(A.navigation.formMethod)&&t.state?._isRedirect!==!0;s&&=(o=s,void 0),re||j===`POP`||(j===`PUSH`?e.history.push(t,t.state):j===`REPLACE`&&e.history.replace(t,t.state));let f;if(j===`POP`){let e=ne.get(A.location.pathname);e&&e.has(t.pathname)?f={currentLocation:A.location,nextLocation:t}:ne.has(t.pathname)&&(f={currentLocation:t,nextLocation:A.location})}else if(N){let e=ne.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),ne.set(A.location.pathname,e)),f={currentLocation:A.location,nextLocation:t}}V({...n,actionData:a,loaderData:c,historyAction:j,location:t,initialized:!0,navigation:De,revalidation:`idle`,restoreScrollPosition:u,preventScrollReset:d,blockers:l},{viewTransitionOpts:f,flushSync:r===!0}),j=`POP`,te=!1,N=!1,re=!1,ie=!1,fe?.resolve(),fe=null}async function ge(t,n){if(typeof t==`number`){e.history.go(t);return}let{path:r,submission:i,error:a}=Le(!1,Ie(A.location,A.matches,c,t,n?.fromRouteId,n?.relative),n),o=A.location,s=m(A.location,r,n&&n.state);s={...s,...e.history.encodeLocation(s)};let l=n&&n.replace!=null?n.replace:void 0,u=`PUSH`;l===!0?u=`REPLACE`:l===!1||i!=null&&J(i.formMethod)&&i.formAction===A.location.pathname+A.location.search&&(u=`REPLACE`);let d=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,f=(n&&n.flushSync)===!0,p=$e({currentLocation:o,nextLocation:s,historyAction:u});if(p){Qe(p,{state:`blocked`,location:s,proceed(){Qe(p,{state:`proceeding`,proceed:void 0,reset:void 0,location:s}),ge(t,n)},reset(){let e=new Map(A.blockers);e.set(p,ke),V({blockers:e})}});return}await ve(u,s,{submission:i,pendingError:a,preventScrollReset:d,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:f})}function _e(){fe||=It(),Fe(),V({revalidation:`loading`});let e=fe.promise;return A.navigation.state===`submitting`?e:A.navigation.state===`idle`?(ve(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),e):(ve(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:N===!0}),e)}async function ve(t,n,r){M&&M.abort(),M=null,j=t,re=(r&&r.startUninterruptedRevalidation)===!0,lt(A.location,A.matches),te=(r&&r.preventScrollReset)===!0,N=(r&&r.enableViewTransition)===!0;let i=s||o,a=r&&r.overrideNavigation,l=r?.initialHydration&&A.matches&&A.matches.length>0&&!C?A.matches:D(i,n,c),u=(r&&r.flushSync)===!0;if(l&&A.initialized&&!ie&&yt(A.location,n)&&!(r&&r.submission&&J(r.submission.formMethod))){he(n,{matches:l},{flushSync:u});return}let d=dt(l,i,n.pathname);if(d.active&&d.matches&&(l=d.matches),!l){let{error:e,notFoundMatches:t,route:r}=et(n.pathname);he(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:u});return}M=new AbortController;let f=ct(e.history,n,M.signal,r&&r.submission),p=e.getContext?await e.getContext():new x,m;if(r&&r.pendingError)m=[ht(l).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&J(r.submission.formMethod)){let t=await ye(f,n,r.submission,l,p,d.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:u});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;if(q(r)&&be(r.error)&&r.error.status===404){M=null,he(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}l=t.matches||l,m=t.pendingActionResult,a=At(n,r.submission),u=!1,d.active=!1,f=ct(e.history,f.url,f.signal)}let{shortCircuited:h,matches:g,loaderData:_,errors:v}=await H(f,n,l,p,d.active,a,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,u,m);h||(M=null,he(n,{matches:g||l,...mt(m),loaderData:_,errors:v}))}async function ye(e,t,n,s,l,u,d,f={}){if(Fe(),V({navigation:jt(t,n)},{flushSync:f.flushSync===!0}),u){let n=await vt(s,t.pathname,e.signal);if(n.type===`aborted`)return{shortCircuited:!0};if(n.type===`error`){if(n.partialMatches.length===0){let{matches:e,route:t}=gt(o);return{matches:e,pendingActionResult:[t.id,{type:`error`,error:n.error}]}}let e=ht(n.partialMatches).route.id;return{matches:n.partialMatches,pendingActionResult:[e,{type:`error`,error:n.error}]}}else if(n.matches)s=n.matches;else{let{notFoundMatches:e,error:n,route:r}=et(t.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:n}]}}}let p,m=Ot(s,t);if(!m.route.action&&!m.route.lazy)p={type:`error`,error:K(405,{method:e.method,pathname:t.pathname,routeId:m.route.id})};else{let t=await Ne(e,tt(i,a,e,s,m,d?[]:r,l),l,null);if(p=t[m.route.id],!p){for(let e of s)if(t[e.route.id]){p=t[e.route.id];break}}if(e.signal.aborted)return{shortCircuited:!0}}if(Ct(p)){let t;return t=f&&f.replace!=null?f.replace:st(p.response.headers.get(`Location`),new URL(e.url),c)===A.location.pathname+A.location.search,await Ae(e,p,!0,{submission:n,replace:t}),{shortCircuited:!0}}
1if(q(p)){let e=ht(s,m.route.id);return(f&&f.replace)!==!0&&(j=`PUSH`),{matches:s,pendingActionResult:[e.route.id,p,m.route.id]}}return{matches:s,pendingActionResult:[m.route.id,p]}}async function H(t,n,l,u,d,f,p,m,h,g,_,v){let y=f||At(n,p),b=p||m||kt(y),x=!re&&!g;if(d){if(x){let e=xe(v);V({navigation:y,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await vt(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=gt(o);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=ht(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)l=e.matches;else{let{error:e,notFoundMatches:t,route:r}=et(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let S=s||o,{dsMatches:C,revalidatingFetchers:w}=Re(t,u,i,a,e.history,A,l,b,n,g?[]:r,g===!0,ie,ae,z,ce,L,S,c,e.patchRoutesOnNavigation!=null,v);if(se=++oe,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&w.length===0){let e=qe();return he(n,{matches:l,loaderData:{},errors:v&&q(v[1])?{[v[0]]:v[1].error}:null,...mt(v),...e?{fetchers:new Map(A.fetchers)}:{}},{flushSync:_}),{shortCircuited:!0}}if(x){let e={};if(!d){e.navigation=y;let t=xe(v);t!==void 0&&(e.actionData=t)}w.length>0&&(e.fetchers=Se(w)),V(e,{flushSync:_})}w.forEach(e=>{G(e.key),e.controller&&F.set(e.key,e.controller)});let T=()=>w.forEach(e=>G(e.key));M&&M.signal.addEventListener(`abort`,T);let{loaderResults:E,fetcherResults:ee}=await Pe(C,w,t,u);if(t.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener(`abort`,T),w.forEach(e=>F.delete(e.key));let D=_t(E);if(D)return await Ae(t,D.result,!0,{replace:h}),{shortCircuited:!0};if(D=_t(ee),D)return L.add(D.key),await Ae(t,D.result,!0,{replace:h}),{shortCircuited:!0};let{loaderData:O,errors:k}=ft(A,l,E,v,w,ee);g&&A.errors&&(k={...A.errors,...k});let j=qe(),te=Je(se),N=j||te||w.length>0;return{matches:l,loaderData:O,errors:k,...N?{fetchers:new Map(A.fetchers)}:{}}}function xe(e){if(e&&!q(e[1]))return{[e[0]]:e[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Se(e){return e.forEach(e=>{let t=A.fetchers.get(e.key),n=Mt(void 0,t?t.data:void 0);A.fetchers.set(e.key,n)}),new Map(A.fetchers)}async function Ce(t,n,r,i){G(t);let a=(i&&i.flushSync)===!0,l=s||o,u=Ie(A.location,A.matches,c,r,n,i?.relative),d=D(l,u,c),f=dt(d,l,u);if(f.active&&f.matches&&(d=f.matches),!d){W(t,n,K(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Le(!0,u,i);if(h){W(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new x,_=(i&&i.preventScrollReset)===!0;if(m&&J(m.formMethod)){await we(t,n,p,d,g,f.active,a,_,m);return}ce.set(t,{routeId:n,path:p}),await Te(t,n,p,d,g,f.active,a,_,m)}async function we(t,n,l,d,f,p,m,h,g){Fe(),ce.delete(t),U(t,Nt(g,A.fetchers.get(t)),{flushSync:m});let _=new AbortController,v=ct(e.history,l,_.signal,g);if(p){let e=await vt(d,new URL(v.url).pathname,v.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){W(t,n,e.error,{flushSync:m});return}else if(e.matches)d=e.matches;else{W(t,n,K(404,{pathname:l}),{flushSync:m});return}}let y=Ot(d,l);if(!y.route.action&&!y.route.lazy){W(t,n,K(405,{method:g.formMethod,pathname:l,routeId:n}),{flushSync:m});return}F.set(t,_);let b=oe,x=(await Ne(v,tt(i,a,v,d,y,r,f),f,t))[y.route.id];if(v.signal.aborted){F.get(t)===_&&F.delete(t);return}if(z.has(t)){if(Ct(x)||q(x)){U(t,Y(void 0));return}}else{if(Ct(x))if(F.delete(t),se>b){U(t,Y(void 0));return}else return L.add(t),U(t,Mt(g)),Ae(v,x,!1,{fetcherSubmission:g,preventScrollReset:h});if(q(x)){W(t,n,x.error);return}}let S=A.navigation.location||A.location,C=ct(e.history,S,_.signal),w=s||o,T=A.navigation.state===`idle`?A.matches:D(w,A.navigation.location,c);u(T,`Didn't find any matches after fetcher action`);let E=++oe;I.set(t,E);let ee=Mt(g,x.data);A.fetchers.set(t,ee);let{dsMatches:O,revalidatingFetchers:k}=Re(C,f,i,a,e.history,A,T,g,S,r,!1,ie,ae,z,ce,L,w,c,e.patchRoutesOnNavigation!=null,[y.route.id,x]);k.filter(e=>
1e.key!==t).forEach(e=>{let t=e.key,n=A.fetchers.get(t),r=Mt(void 0,n?n.data:void 0);A.fetchers.set(t,r),G(t),e.controller&&F.set(t,e.controller)}),V({fetchers:new Map(A.fetchers)});let te=()=>k.forEach(e=>G(e.key));_.signal.addEventListener(`abort`,te);let{loaderResults:N,fetcherResults:ne}=await Pe(O,k,C,f);if(_.signal.aborted)return;if(_.signal.removeEventListener(`abort`,te),I.delete(t),F.delete(t),k.forEach(e=>F.delete(e.key)),A.fetchers.has(t)){let e=Y(x.data);A.fetchers.set(t,e)}let P=_t(N);if(P)return Ae(C,P.result,!1,{preventScrollReset:h});if(P=_t(ne),P)return L.add(P.key),Ae(C,P.result,!1,{preventScrollReset:h});let{loaderData:re,errors:R}=ft(A,T,N,void 0,k,ne);Je(E),A.navigation.state===`loading`&&E>se?(u(j,`Expected pending action`),M&&M.abort(),he(A.navigation.location,{matches:T,loaderData:re,errors:R,fetchers:new Map(A.fetchers)})):(V({errors:R,loaderData:pt(A.loaderData,re,T,R),fetchers:new Map(A.fetchers)}),ie=!1)}async function Te(t,n,o,s,c,l,u,d,f){let p=A.fetchers.get(t);U(t,Mt(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=ct(e.history,o,m.signal);if(l){let e=await vt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){W(t,n,e.error,{flushSync:u});return}else if(e.matches)s=e.matches;else{W(t,n,K(404,{pathname:o}),{flushSync:u});return}}let g=Ot(s,o);F.set(t,m);let _=oe,v=(await Ne(h,tt(i,a,h,s,g,r,c),c,t))[g.route.id];if(F.get(t)===m&&F.delete(t),!h.signal.aborted){if(z.has(t)){U(t,Y(void 0));return}if(Ct(v))if(se>_){U(t,Y(void 0));return}else{L.add(t),await Ae(h,v,!1,{preventScrollReset:d});return}if(q(v)){W(t,n,v.error);return}U(t,Y(v.data))}}async function Ae(e,r,i,{submission:a,fetcherSubmission:o,preventScrollReset:s,replace:l}={}){r.response.headers.has(`X-Remix-Revalidate`)&&(ie=!0);let d=r.response.headers.get(`Location`);u(d,`Expected a Location header on the redirect Response`),d=st(d,new URL(e.url),c);let f=m(A.location,d,{_isRedirect:!0});if(n){let e=!1;if(r.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(je(d)){let n=v(d,!0);e=n.origin!==t.location.origin||R(n.pathname,c)==null}if(e){l?t.location.replace(d):t.location.assign(d);return}}M=null;let p=l===!0||r.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:h,formAction:g,formEncType:_}=A.navigation;!a&&!o&&h&&g&&_&&(a=kt(A.navigation));let y=a||o;Ee.has(r.response.status)&&y&&J(y.formMethod)?await ve(p,f,{submission:{...y,formAction:d},preventScrollReset:s||te,enableViewTransition:i?N:void 0}):await ve(p,f,{overrideNavigation:At(f,a),fetcherSubmission:o,preventScrollReset:s||te,enableViewTransition:i?N:void 0})}async function Ne(e,t,n,r){let i,a={};try{i=await nt(l,e,t,r,n,!1)}catch(e){return t.filter(e=>e.shouldLoad).forEach(t=>{a[t.route.id]={type:`error`,error:e}}),a}if(e.signal.aborted)return a;for(let[n,r]of Object.entries(i))if(St(r)){let i=r.result;a[n]={type:`redirect`,response:ot(i,e,n,t,c)}}else a[n]=await at(r);return a}async function Pe(e,t,n,r){let i=Ne(n,e,r,null),a=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ne(e.request,e.matches,r,e.key))[e.match.route.id];return{[e.key]:t}}else return Promise.resolve({[e.key]:{type:`error`,error:K(404,{pathname:e.path})}})}));return{loaderResults:await i,fetcherResults:(await a).reduce((e,t)=>Object.assign(e,t),{})}}function Fe(){ie=!0,ce.forEach((e,t)=>{F.has(t)&&ae.add(t),G(t)})}function U(e,t,n={}){A.fetchers.set(e,t),V({fetchers:new Map(A.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function W(e,t,n,r={}){let i=ht(A.matches,t);We(e),V({errors:{[i.route.id]:n},fetchers:new Map(A.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Ve(e){return le.set(e,(le.get(e)||0)+1),z.has(e)&&z.delete(e),A.fetchers.get(e)||Oe}function He(e,t){G(e,t?.reason),U(e,Y(null))}function We(e){let t=A.fetchers.get(e);F.has(e)&&!(t&&t.state===`loading`&&I.has(e))&&G(e),ce.delete(e),I.delete(e),L.delete(e),z.delete(e),ae.delete(e),A.fetchers.delete(e)}function Ge(e){let t=(le.get(e)||0)-1;t<=0?(le.delete(e),z.add(e)):le.set(e,t),V({fetchers:new Map(A.fetchers)})}function G(e,t){let n=F.get(e);n&&(n.abort(t),F.delete(e))}function Ke(e){for(let t of e){let e=Y(Ve(t).data);A.fetchers.set(t,e)}}function qe(){let e=[],t=!1;for(let n of L){let r=A.fetchers.get(n);u(r,`Expected fetcher: ${n}`),r.state===`loading`&&(L.delete(n),e.push(n),t=!0)}return Ke(e),t}function Je(e){let t=[];for(let[n,r]of I)if(r<e){let e=A.fetchers.get(n);u(e,`Expected fetcher: ${n}`),e.state===`loading`&&(G(n),I.delete(n),t.push(n))}return Ke(t),t.length>0}function Xe(e,t){let n=A.blockers.get(e)||ke;return ue.get(e)!==t&&ue.set(e,t),n}function Ze(e){A.blockers.delete(e),ue.delete(e)}function Qe(e,t){let n=A.blockers.get(e)||ke;u(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(A.blockers);r.set(e,t),V({blockers:r})}function $e({currentLocation:e,nextLocation:t,historyAction:n}){if(ue.size===0)return;ue.size>1&&d(!1,`A router only supports one blocker at a time`);let r=Array.from(ue.entries()),[i,a]=r[r.length-1],o=A.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function et(e){let t=K(404,{pathname:e}),{matches:n,route:r}=gt(s||o);return{notFoundMatches:n,route:r,error:t}}function rt(e,t,n){if(g=e,y=t,_=n||null,!b&&A.navigation===De){b=!0;let e=ut(A.location,A.matches);e!=null&&V({restoreScrollPosition:e})}return()=>{g=null,y=null,_=null}}function it(e,t){return _&&_(e,t.map(e=>k(e,A.loaderData)))||e.key}function lt(e,t){if(g&&y){let n=it(e,t);g[n]=y()}}function ut(e,t){if(g){let n=it(e,t),r=g[n];if(typeof r==`number`)return r}return null}function dt(t,n,r){if(e.patchRoutesOnNavigation)if(t){if(Object.keys(t[0].params).length>0)return{active:!0,matches:O(n,r,c,!0)}}else return{active:!0,matches:O(n,r,c,!0)||[]};return{active:!1,matches:null}}async function vt(t,n,r,l){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let u=t;for(;;){let t=s==null,d=s||o,f=a;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:u,fetcherKey:l,patch:(e,t)=>{r.aborted||Ue(e,t,d,f,i,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:u}}finally{t&&!r.aborted&&(o=[...o])}if(r.aborted)return{type:`aborted`};let p=D(d,n,c);if(p)return{type:`success`,matches:p};let m=O(d,n,c,!0);if(!m||u.length===m.length&&u.every((e,t)=>e.route.id===m[t].route.id))return{type:`success`,matches:null};u=m}}function bt(e){a={},s=ee(e,i,void 0,a)}function xt(e,t,n=!1){let r=s==null;Ue(e,t,s||o,a,i,n),r&&(o=[...o],V({}))}return E={get basename(){return c},get future(){return f},get state(){return A},get routes(){return o},get window(){return t},initialize:pe,subscribe:B,enableScrollRestoration:rt,navigate:ge,fetch:Ce,revalidate:_e,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ve,resetFetcher:He,deleteFetcher:Ge,dispose:me,getBlocker:Xe,deleteBlocker:Ze,patchRoutes:xt,_internalFetchControllers:F,_internalSetRoutes:bt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){V(e)}},E}function U(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`
1in e&&e.body!==void 0)}function Ie(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=me(r||`.`,pe(o),R(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=Dt(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=le({basename:n,pathname:c.pathname})),h(c)}function Le(e,t,n){if(!n||!U(n))return{path:t};if(n.formMethod&&!Et(n.formMethod))return{path:t,error:K(405,{method:n.formMethod})};let r=()=>({path:t,error:K(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=vt(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!J(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n} 2`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}else if(n.formEncType===`application/json`){if(!J(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}u(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=lt(n.formData),s=n.formData;else if(n.body instanceof FormData)o=lt(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=ut(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=ut(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(J(c.formMethod))return{path:t,submission:c};let l=g(t);return e&&l.search&&Dt(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:h(l),submission:c}}function Re(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){let b=y?q(y[1])?y[1].error:y[1].data:void 0,x=i.createURL(a.location),S=i.createURL(c),C;if(u&&a.errors){let e=Object.keys(a.errors)[0];C=o.findIndex(t=>t.route.id===e)}else if(y&&q(y[1])){let e=y[0];C=o.findIndex(t=>t.route.id===e)-1}let w=y?y[1].statusCode:void 0,T=w&&w>=400,E={currentUrl:x,currentParams:a.matches[0]?.params||{},nextUrl:S,nextParams:o[0].params,...s,actionResult:b,actionStatus:w},ee=o.map((i,o)=>{let{route:s}=i,c=null;if(C!=null&&o>C?c=!1:s.lazy?c=!0:ze(s)?u?c=Be(s,a.loaderData,a.errors):W(a.loaderData,a.matches[o],i)&&(c=!0):c=!1,c!==null)return et(n,r,e,i,l,t,c);let f=T?!1:d||x.pathname+x.search===S.pathname+S.search||x.search!==S.search||Ve(a.matches[o],i),p={...E,defaultShouldRevalidate:f};return et(n,r,e,i,l,t,He(i,p),p)}),O=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,y=D(g,e.path,_);if(!y){if(v&&m)return;O.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let b=Ot(y,e.path),x=new AbortController,S=ct(i,e.path,x.signal),C=null;if(f.has(s))f.delete(s),C=tt(n,r,S,y,b,l,t);else if(m)d&&(C=tt(n,r,S,y,b,l,t));else{let e={...E,defaultShouldRevalidate:T?!1:d};He(b,e)&&(C=tt(n,r,S,y,b,l,t,e))}C&&O.push({key:s,routeId:e.routeId,path:e.path,matches:C,match:b,request:S,controller:x})}),{dsMatches:ee,revalidatingFetchers:O}}function ze(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Be(e,t,n){if(e.lazy)return!0;if(!ze(e))return!1;let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function W(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Ve(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function He(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Ue(e,t,n,r,i,a){let o;if(e){let t=r[e];u(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n;let s=[],c=[];
2if(t.forEach(e=>{let t=o.find(t=>We(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ee(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=ee([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}}function We(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((e,n)=>t.children?.some(t=>We(e,t))):!1}var Ge=new WeakMap,G=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(u(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=Ge.get(i);o||(o={},Ge.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=C(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)d(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)d(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Ke=new WeakMap;function qe(e,t,n,r,i){let a=n[e.id];if(u(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Ke.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{u(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=T(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?d(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?d(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Ke.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=G({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Je(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Ye(e){return e.matches.some(e=>e.route.middleware)?Xe(e,()=>Je(e)):Je(e)}function Xe(e,t){return Ze(e,t,e=>e,bt,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=ht(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.unstable_shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function Ze(e,t,n,r,i){let{matches:a,request:o,params:s,context:c}=e,l=a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await Qe({request:o,params:s,context:c},l,t,n,r,i)}async function Qe(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Qe(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function $e(e,t,n,r,i){let a=G({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=qe(r.route,J(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function et(e,t,n,r,i,a,o,s=null){let c=!1,l=$e(e,t,n,r,i);return{...r,_lazyPromises:l,shouldLoad:o,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler(e){return c=!0,s?typeof e==`boolean`?He(r,{...s,defaultShouldRevalidate:e}):He(r,s):o},resolve(e){let{lazy:t,loader:i,middleware:s}=r.route,u=c||o||e&&!J(n.method)&&(t||i),d=s&&s.length>0&&!i&&!t;return u&&!d?rt({request:n,match:r,lazyHandlerPromise:l?.handler,lazyRoutePromise:l?.route,handlerOverride:e,scopedContext:a}):Promise.resolve({type:`data`,result:void 0})}}}function tt(e,t,n,r,i,a,o,s=null){return r.map(r=>r.route.id===i.route.id?et(e,t,n,r,a,o,!0,s):{...r,shouldLoad:!1,unstable_shouldRevalidateArgs:s,unstable_shouldCallHandler:()=>!1,_lazyPromises:$e(e,t,n,r,a),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function nt(e,t,n,r,i,a){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let o={request:t,params:n[0].params,context:i,matches:n},s=a?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>
2{let t=o;return Xe(t,()=>e({...t,fetcherKey:r,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},c=await e({...o,fetcherKey:r,runClientMiddleware:s});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return c}async function rt({request:e,match:t,lazyHandlerPromise:n,lazyRoutePromise:r,handlerOverride:i,scopedContext:a}){let o,s,c=J(e.method),l=c?`action`:`loader`,u=n=>{let r,o=new Promise((e,t)=>r=t);s=()=>r(),e.signal.addEventListener(`abort`,s);let c=r=>typeof n==`function`?n({request:e,params:t.params,context:a},...r===void 0?[]:[r]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${l}" [routeId: ${t.route.id}]`)),u=(async()=>{try{return{type:`data`,result:await(i?i(e=>c(e)):c())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([u,o])};try{let i=c?t.route.action:t.route.loader;if(n||r)if(i){let e,[t]=await Promise.all([u(i).catch(t=>{e=t}),n,r]);if(e!==void 0)throw e;o=t}else{await n;let i=c?t.route.action:t.route.loader;if(i)[o]=await Promise.all([u(i),r]);else if(l===`action`){let n=new URL(e.url),r=n.pathname+n.search;throw K(405,{method:e.method,pathname:r,routeId:t.route.id})}else return{type:`data`,result:void 0}}else if(i)o=await u(i);else{let t=new URL(e.url);throw K(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{s&&e.signal.removeEventListener(`abort`,s)}return o}async function it(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 at(e){let{result:t,type:n}=e;if(Tt(t)){let e;try{e=await it(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new H(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?wt(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:new H(t.init?.status||500,void 0,t.data),statusCode:be(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:be(t)?t.status:void 0}:wt(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function ot(e,t,n,r,i){let a=e.headers.get(`Location`);if(u(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!je(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Ie(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}function st(e,t,n){if(je(e)){let r=e,i=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r),a=R(i.pathname,n)!=null;if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}return e}function ct(e,t,n,r){let i=e.createURL(vt(t)).toString(),a={signal:n};if(r&&J(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):t===`text/plain`?a.body=r.text:t===`application/x-www-form-urlencoded`&&r.formData?a.body=lt(r.formData):a.body=r.formData}return new Request(i,a)}function lt(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function ut(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function dt(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},d=n&&q(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let f=n.route.id,p=t[f];if(u(!Ct(p),`Cannot handle redirect results in processLoaderData`),q(p)){let t=p.error;if(d!==void 0&&(t=d,d=void 0),o||={},i)o[f]=t;else{let n=ht(e,f);o[n.route.id]??(o[n.route.id]=t)}r||(a[f]=Pe),c||(c=!0,s=be(p.error)?p.error.status:500),p.headers&&(l[f]=p.headers)}else a[f]=p.data,p.statusCode&&p.statusCode!==200&&!c&&(s=p.statusCode),p.headers&&(l[f]=p.headers)}),d!==void 0&&n&&(o={[n[0]]:d},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function ft(e,t,n,r,i,a){let{loaderData:o,errors:s}=dt(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>
2e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let o=a[n];if(u(o,`Did not find corresponding fetcher result`),q(o)){let t=ht(e.matches,r?.route.id);s&&s[t.route.id]||(s={...s,[t.route.id]:o.error}),e.fetchers.delete(n)}else if(Ct(o))u(!1,`Unhandled fetcher revalidation redirect`);else{let t=Y(o.data);e.fetchers.set(n,t)}}),{loaderData:o,errors:s}}function pt(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Pe).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function mt(e){return e?q(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ht(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function gt(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function K(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new H(e||500,o,Error(s),!0)}function _t(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Ct(r))return{key:n,result:r}}}function vt(e){return h({...typeof e==`string`?g(e):e,hash:``})}function yt(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function bt(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&xt(t))}function xt(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function St(e){return Tt(e.result)&&Te.has(e.result.status)}function q(e){return e.type===`error`}function Ct(e){return(e&&e.type)===`redirect`}function wt(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Tt(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Et(e){return we.has(e.toUpperCase())}function J(e){return Se.has(e.toUpperCase())}function Dt(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Ot(e,t){let n=typeof t==`string`?g(t).search:t.search;if(e[e.length-1].route.index&&Dt(n||``))return e[e.length-1];let r=fe(e);return r[r.length-1]}function kt(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function At(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 jt(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 Mt(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 Nt(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 Y(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 Pt(e,t){try{let n=e.sessionStorage.getItem(Ne);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Ft(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ne,JSON.stringify(n))}catch(e){d(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function It(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Lt=r.createContext(null);Lt.displayName=`DataRouter`;var Rt=r.createContext(null);Rt.displayName=`DataRouterState`;var zt=r.createContext(!1);function Bt(){return r.useContext(zt)}var Vt=r.createContext({isTransitioning:!1});Vt.displayName=`ViewTransition`;var Ht=r.createContext(new Map);Ht.displayName=`Fetchers`;var Ut=r.createContext(null);Ut.displayName=`Await`;var X=r.createContext(null);X.displayName=`Navigation`;var Wt=r.createContext(null);Wt.displayName=`Location`;var Z=r.createContext({outlet:null,matches:[],isDataRoute:!1});Z.displayName=`Route`;var Gt=r.createContext(null);Gt.displayName=`RouteError`;function Kt(e,{relative:t}={}){u(qt(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:i}=r.useContext(X),{hash:a,pathname:o,search:s}=tn(e,{relative:t}),c=o;
2return n!==`/`&&(c=o===`/`?n:B([n,o])),i.createHref({pathname:c,search:s,hash:a})}function qt(){return r.useContext(Wt)!=null}function Q(){return u(qt(),`useLocation() may be used only in the context of a <Router> component.`),r.useContext(Wt).location}var Jt=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Yt(e){r.useContext(X).static||r.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=r.useContext(Z);return e?Sn():Zt()}function Zt(){u(qt(),`useNavigate() may be used only in the context of a <Router> component.`);let e=r.useContext(Lt),{basename:t,navigator:n}=r.useContext(X),{matches:i}=r.useContext(Z),{pathname:a}=Q(),o=JSON.stringify(pe(i)),s=r.useRef(!1);return Yt(()=>{s.current=!0}),r.useCallback((r,i={})=>{if(d(s.current,Jt),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=me(r,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:B([t,c.pathname])),(i.replace?n.replace:n.push)(c,i.state,i)},[t,n,o,a,e])}var Qt=r.createContext(null);function $t(e){let t=r.useContext(Z).outlet;return r.useMemo(()=>t&&r.createElement(Qt.Provider,{value:e},t),[t,e])}function en(){let{matches:e}=r.useContext(Z),t=e[e.length-1];return t?t.params:{}}function tn(e,{relative:t}={}){let{matches:n}=r.useContext(Z),{pathname:i}=Q(),a=JSON.stringify(pe(n));return r.useMemo(()=>me(e,JSON.parse(a),i,t===`path`),[e,a,i,t])}function nn(e,t,n,i,a){u(qt(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:o}=r.useContext(X),{matches:s}=r.useContext(Z),c=s[s.length-1],l=c?c.params:{},f=c?c.pathname:`/`,p=c?c.pathnameBase:`/`,m=c&&c.route;{let e=m&&m.path||``;wn(f,!m||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (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. 3 4Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let h=Q(),_;if(t){let e=typeof t==`string`?g(t):t;u(p===`/`||e.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`),_=e}else _=h;let v=_.pathname||`/`,y=v;if(p!==`/`){let e=p.replace(/^\//,``).split(`/`);y=`/`+v.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let b=D(e,{pathname:y});d(m||b!=null,`No routes matched location "${_.pathname}${_.search}${_.hash}" `),d(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${_.pathname}${_.search}${_.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.`);let x=cn(b&&b.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:B([p,o.encodeLocation?o.encodeLocation(e.pathname.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?p:B([p,o.encodeLocation?o.encodeLocation(e.pathnameBase.replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),s,n,i,a);return t&&x?r.createElement(Wt.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,..._},navigationType:`POP`}},x):x}function rn(){let e=xn(),t=be(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i=`rgba(200,200,200, 0.5)`,a={padding:`0.5rem`,backgroundColor:i},o={padding:`2px 4px`,backgroundColor:i},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=r.createElement(r.Fragment,null,r.createElement(`p`,null,`ð¿ Hey developer ð`),r.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,r.createElement(`code`,{style:o},`ErrorBoundary`),` or`,` `,r.createElement(`code`,{style:o},`errorElement`),` prop on your route.`)),r.createElement(r.Fragment,null,r.createElement(`h2`,null,`Unexpected Application
4Error!`),r.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?r.createElement(`pre`,{style:a},n):null,s)}var an=r.createElement(rn,null),on=class extends r.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?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.unstable_onError?this.props.unstable_onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){return this.state.error===void 0?this.props.children:r.createElement(Z.Provider,{value:this.props.routeContext},r.createElement(Gt.Provider,{value:this.state.error,children:this.props.component}))}};function sn({routeContext:e,match:t,children:n}){let i=r.useContext(Lt);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),r.createElement(Z.Provider,{value:e},n)}function cn(e,t=[],n=null,i=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n?.errors;if(s!=null){let e=o.findIndex(e=>e.route.id&&s?.[e.route.id]!==void 0);u(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(`,`)}`),o=o.slice(0,Math.min(o.length,e+1))}let c=!1,l=-1;if(n)for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,o=l>=0?o.slice(0,l+1):[o[0]];break}}}return o.reduceRight((e,a,u)=>{let d,f=!1,p=null,m=null;n&&(d=s&&a.route.id?s[a.route.id]:void 0,p=a.route.errorElement||an,c&&(l<0&&u===0?(wn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):l===u&&(f=!0,m=a.route.hydrateFallbackElement||null)));let h=t.concat(o.slice(0,u+1)),g=()=>{let t;return t=d?p:f?m:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(sn,{match:a,routeContext:{outlet:e,matches:h,isDataRoute:n!=null},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?r.createElement(on,{location:n.location,revalidation:n.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},unstable_onError:i}):g()},null)}function ln(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function un(e){let t=r.useContext(Lt);return u(t,ln(e)),t}function dn(e){let t=r.useContext(Rt);return u(t,ln(e)),t}function fn(e){let t=r.useContext(Z);return u(t,ln(e)),t}function pn(e){let t=fn(e),n=t.matches[t.matches.length-1];return u(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function mn(){return pn(`useRouteId`)}function hn(){return dn(`useNavigation`).navigation}function gn(){let e=un(`useRevalidator`),t=dn(`useRevalidator`),n=r.useCallback(async()=>{await e.router.revalidate()},[e.router]);return r.useMemo(()=>({revalidate:n,state:t.revalidation}),[n,t.revalidation])}function _n(){let{matches:e,loaderData:t}=dn(`useMatches`);return r.useMemo(()=>e.map(e=>k(e,t)),[e,t])}function vn(){let e=dn(`useLoaderData`),t=pn(`useLoaderData`);return e.loaderData[t]}function yn(e){return dn(`useRouteLoaderData`).loaderData[e]}function bn(){let e=dn(`useActionData`),t=pn(`useLoaderData`);return e.actionData?e.actionData[t]:void 0}function xn(){let e=r.useContext(Gt),t=dn(`useRouteError`),n=pn(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Sn(){let{router:e}=un(`useNavigate`),t=pn(`useNavigate`),n=r.useRef(!1);return Yt(()=>{n.current=!0}),r.useCallback(async(r,i={})=>{d(n.current,Jt),n.current&&(typeof r==`number`?e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Cn={};function wn(e,t,n){!t&&!Cn[e]&&(Cn[e]=!0,d(!1,n))}var Tn={};function En(e,t){!e&&!Tn[t]&&(Tn[t]=!0,console.warn(t))}function Dn(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&d(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:r.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&d(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:r.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&d(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:r.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var On=[`HydrateFallback`,`hydrateFallbackElement`],kn=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>
4{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function An({router:e,flushSync:t,unstable_onError:n}){let[i,a]=r.useState(e.state),[o,s]=r.useState(),[c,l]=r.useState({isTransitioning:!1}),[u,d]=r.useState(),[f,p]=r.useState(),[m,h]=r.useState(),g=r.useRef(new Map),_=r.useCallback(e=>{a(t=>(e.errors&&n&&Object.entries(e.errors).forEach(([e,r])=>{t.errors?.[e]!==r&&n(r)}),e))},[n]),v=r.useCallback((n,{deletedFetchers:i,flushSync:a,viewTransitionOpts:o})=>{n.fetchers.forEach((e,t)=>{e.data!==void 0&&g.current.set(t,e.data)}),i.forEach(e=>g.current.delete(e)),En(a===!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 c=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(En(o==null||c,"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."),!o||!c){t&&a?t(()=>_(n)):r.startTransition(()=>_(n));return}if(t&&a){t(()=>{f&&(u&&u.resolve(),f.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>_(n))});r.finished.finally(()=>{t(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),t(()=>p(r));return}f?(u&&u.resolve(),f.skipTransition(),h({state:n,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(s(n),l({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))},[e.window,t,f,u,_]);r.useLayoutEffect(()=>e.subscribe(v),[e,v]),r.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new kn)},[c]),r.useEffect(()=>{if(u&&o&&e.window){let t=o,n=u.promise,i=e.window.document.startViewTransition(async()=>{r.startTransition(()=>_(t)),await n});i.finished.finally(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(i)}},[o,u,e.window,_]),r.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,f,i.location,o]),r.useEffect(()=>{!c.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),h(void 0))},[c.isTransitioning,m]);let y=r.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),b=e.basename||`/`,x=r.useMemo(()=>({router:e,navigator:y,static:!1,basename:b,unstable_onError:n}),[e,y,b,n]);return r.createElement(r.Fragment,null,r.createElement(Lt.Provider,{value:x},r.createElement(Rt.Provider,{value:i},r.createElement(Ht.Provider,{value:g.current},r.createElement(Vt.Provider,{value:c},r.createElement(Pn,{basename:b,location:i.location,navigationType:i.historyAction,navigator:y},r.createElement(jn,{routes:e.routes,future:e.future,state:i,unstable_onError:n})))))),null)}var jn=r.memo(Mn);function Mn({routes:e,future:t,state:n,unstable_onError:r}){return nn(e,void 0,n,r,t)}function Nn(e){return $t(e.context)}function Pn({basename:e=`/`,children:t=null,location:n,navigationType:i=`POP`,navigator:a,static:o=!1}){u(!qt(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=r.useMemo(()=>({basename:s,navigator:a,static:o,future:{}}),[s,a,o]);typeof n==`string`&&(n=g(n));let{pathname:l=`/`,search:f=``,hash:p=``,state:m=null,key:h=`default`}=n,_=r.useMemo(()=>{let e=R(l,s);return e==null?null:{location:{pathname:e,search:f,hash:p,state:m,key:h},navigationType:i}},[s,l,f,p,m,h,i]);return d(_!=null,`<Router basename="${s}"> is not able to match the URL "${l}${f}${p}
4" because it does not start with the basename, so the <Router> won't render anything.`),_==null?null:r.createElement(X.Provider,{value:c},r.createElement(Wt.Provider,{children:t,value:_}))}function Fn(){return{params:en(),loaderData:vn(),actionData:bn(),matches:_n()}}function In(e){return function(){let t=Fn();return r.createElement(e,t)}}var Ln=`get`,Rn=`application/x-www-form-urlencoded`;function zn(e){return e!=null&&typeof e.tagName==`string`}function Bn(e){return zn(e)&&e.tagName.toLowerCase()===`button`}function Vn(e){return zn(e)&&e.tagName.toLowerCase()===`form`}function Hn(e){return zn(e)&&e.tagName.toLowerCase()===`input`}function Un(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wn(e,t){return e.button===0&&(!t||t===`_self`)&&!Un(e)}function Gn(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Kn(e,t){let n=Gn(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var qn=null;function Jn(){if(qn===null)try{new FormData(document.createElement(`form`),0),qn=!1}catch{qn=!0}return qn}var Yn=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Xn(e){return e!=null&&!Yn.has(e)?(d(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Rn}"`),null):e}function Zn(e,t){let n,r,i,a,o;if(Vn(e)){let o=e.getAttribute(`action`);r=o?R(o,t):null,n=e.getAttribute(`method`)||Ln,i=Xn(e.getAttribute(`enctype`))||Rn,a=new FormData(e)}else if(Bn(e)||Hn(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?R(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Ln,i=Xn(e.getAttribute(`formenctype`))||Xn(o.getAttribute(`enctype`))||Rn,a=new FormData(o,e),!Jn()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(zn(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Ln,r=null,i=Rn,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Qn=-1,$n=-2,er=-3,tr=-4,nr=-5,rr=-6,ir=-7,ar=`B`,or=`D`,sr=`E`,cr=`M`,lr=`N`,ur=`P`,dr=`R`,fr=`S`,pr=`Y`,mr=`U`,hr=`Z`,gr=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function _r(){let e=new TextDecoder,t=``;return new TransformStream({transform(n,r){let i=e.decode(n,{stream:!0}),a=(t+i).split(` 5`);t=a.pop()||``;for(let e of a)r.enqueue(e)},flush(e){t&&e.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var vr=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function yr(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return br.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let r=n.length;for(let t of e)n.push(t);return t.length=n.length,br.call(this,r)}function br(e){let{hydrated:t,values:n,deferred:r,plugins:i}=this,a,o=[[e,e=>{a=e}]],s=[];for(;o.length>0;){let[e,a]=o.pop();switch(e){case ir:a(void 0);continue;case nr:a(null);continue;case $n:a(NaN);continue;case rr:a(1/0);continue;case er:a(-1/0);continue;case tr:a(-0);continue}if(t[e]){a(t[e]);continue}let c=n[e];if(!c||typeof c!=`object`){t[e]=c,a(c);continue}if(Array.isArray(c))if(typeof c[0]==`string`){let[n,l,u]=c;switch(n){case or:a(t[e]=new Date(l));continue;case mr:a(t[e]=new URL(l));continue;case ar:a(t[e]=BigInt(l));continue;case dr:a(t[e]=new RegExp(l,u));continue;case pr:a(t[e]=Symbol.for(l));continue;case fr:let n=new Set;t[e]=n;for(let e=c.length-1;e>0;e--)o.push([c[e],e=>{n.add(e)}]);a(n);continue;case cr:let d=new Map;t[e]=d;for(let e=c.length-2;e>0;e-=2){let t=[];o.push([c[e+1],e=>{t[1]=e}]),o.push([c[e],e=>{t[0]=e}]),s.push(()=>{d.set(t[0],t[1])})}a(d);continue;case lr:let f=Object.create(null);t[e]=f;for(let e of Object.keys(l).reverse()){let t=[];o.push([l[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{f[t[0]]=t[1]})}a(f);continue;case ur:if(t[l])a(t[e]=t[l]);else{let n=new gr;r[l]=n,a(t[e]=n.promise)}continue;case sr:let[,p,m]=c,h=m&&vr&&vr[m]?new vr[m](p):Error(p);t[e]=h,a(h);continue;case hr:a(t[e]=t[l]);continue;default:if(Array.isArray(i)){let n=[],r=c.slice(1);for(let e=0;e<r.length;e++){let t=r[e];o.push([t,t=>{n[e]=t}])}s.push(()=>{for(let r of i){let i=r(c[0],...n);if(i){a(t[e]=i.value);return}}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];t[e]=n;for(let e=0;e<c.length;e++){let t=c[e];t!==Qn&&o.push([t,t=>{n[e]=t}])}a(n);continue}else{let n={};t[e]=n;for(let e of Object.keys(c).reverse()){let t=[];o.push([c[e],e=>{t[1]=e}]),o.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{n[t[0]]=t[1]})}a(n);continue}}for(;s.length>0;)s.pop()();return a}
5async function xr(e,t){let{plugins:n}=t??{},r=new gr,i=e.pipeThrough(_r()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await Sr.call(a,i),s=r.promise;return o.done?r.resolve():s=Cr.call(a,i).then(r.resolve).catch(e=>{for(let t of Object.values(a.deferred))t.reject(e);r.reject(e)}),{done:s.then(()=>i.closed),value:o.value}}async function Sr(e){let t=await e.read();if(!t.value)throw SyntaxError();let n;try{n=JSON.parse(t.value)}catch{throw SyntaxError()}return{done:t.done,value:yr.call(this,n)}}async function Cr(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case ur:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=yr.call(this,a);r.resolve(o);break}case sr:{let e=n.indexOf(`:`),t=Number(n.slice(1,e)),r=this.deferred[t];if(!r)throw Error(`Deferred ID ${t} not found in stream`);let i=n.slice(e+1),a;try{a=JSON.parse(i)}catch{throw SyntaxError()}let o=yr.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}async function wr(e){let t={signal:e.signal};if(e.method!==`GET`){t.method=e.method;let n=e.headers.get(`Content-Type`);n&&/\bapplication\/json\b/.test(n)?(t.headers={"Content-Type":n},t.body=JSON.stringify(await e.json())):n&&/\btext\/plain\b/.test(n)?(t.headers={"Content-Type":n},t.body=await e.text()):n&&/\bapplication\/x-www-form-urlencoded\b/.test(n)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var Tr={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Er=/[&><\u2028\u2029]/g;function Dr(e){return e.replace(Er,e=>Tr[e])}function $(e,t){if(e===!1||e==null)throw Error(t)}var Or=Symbol(`SingleFetchRedirect`),kr=class extends Error{},Ar=new Set([100,101,204,205]);function jr(e,t,n,r,i){let a=Mr(e,e=>{let r=t.routes[e.route.id];$(r,`Route not found in manifest`);let i=n[e.route.id];return{hasLoader:r.hasLoader,hasClientLoader:r.hasClientLoader,hasS
5houldRevalidate:!!i?.shouldRevalidate}},Br,r,i);return async e=>e.runClientMiddleware(a)}function Mr(e,t,n,r,i,a=()=>!0){return async o=>{let{request:s,matches:c,fetcherKey:l}=o,u=e();if(s.method!==`GET`)return Nr(o,n,i);let d=c.some(e=>{let{hasLoader:n,hasClientLoader:r}=t(e);return e.unstable_shouldCallHandler()&&n&&!r});return!r&&!d?Pr(o,t,n,i):l?Lr(o,n,i):Fr(o,u,t,n,r,i,a)}}async function Nr(e,t,n){let r=e.matches.find(e=>e.unstable_shouldCallHandler());$(r,`No action match found`);let i,a=await r.resolve(async a=>await a(async()=>{let{data:a,status:o}=await t(e,n,[r.route.id]);return i=o,Hr(a,r.route.id)}));return Tt(a.result)||be(a.result)||wt(a.result)?{[r.route.id]:a}:{[r.route.id]:{type:a.type,result:ve(a.result,i)}}}async function Pr(e,t,n,r){let i=e.matches.filter(e=>e.unstable_shouldCallHandler()),a={};return await Promise.all(i.map(i=>i.resolve(async o=>{try{let{hasClientLoader:s}=t(i),c=i.route.id,l=s?await o(async()=>{let{data:t}=await n(e,r,[c]);return Hr(t,c)}):await o();a[i.route.id]={type:`data`,result:l}}catch(e){a[i.route.id]={type:`error`,result:e}}}))),a}async function Fr(e,t,n,r,i,a,o=()=>!0){let s=new Set,c=!1,l=e.matches.map(()=>Ur()),u=Ur(),d={},f=Promise.all(e.matches.map(async(t,i)=>t.resolve(async f=>{l[i].resolve();let p=t.route.id,{hasLoader:m,hasClientLoader:h,hasShouldRevalidate:g}=n(t),_=!t.unstable_shouldRevalidateArgs||t.unstable_shouldRevalidateArgs.actionStatus==null||t.unstable_shouldRevalidateArgs.actionStatus<400;if(!t.unstable_shouldCallHandler(_)){c||=t.unstable_shouldRevalidateArgs!=null&&m&&g===!0;return}if(o(t)&&h){m&&(c=!0);try{d[p]={type:`data`,result:await f(async()=>{let{data:t}=await r(e,a,[p]);return Hr(t,p)})}}catch(e){d[p]={type:`error`,result:e}}return}m&&s.add(p);try{d[p]={type:`data`,result:await f(async()=>Hr(await u.promise,p))}}catch(e){d[p]={type:`error`,result:e}}})));if(await Promise.all(l.map(e=>e.promise)),(!t.state.initialized&&t.state.navigation.state===`idle`||s.size===0)&&!window.__reactRouterHdrActive)u.resolve({routes:{}});else{let t=i&&c&&s.size>0?[...s.keys()]:void 0;try{let n=await r(e,a,t);u.resolve(n.data)}catch(e){u.reject(e)}}return await f,await Ir(u.promise,e.matches,s,d),d}async function Ir(e,t,n,r){try{let i,a=await e;if(`routes`in a){for(let e of t)if(e.route.id in a.routes){let t=a.routes[e.route.id];if(`error`in t){i=t.error,r[e.route.id]?.result??(r[e.route.id]={type:`error`,result:i});break}}}i!==void 0&&Array.from(n.values()).forEach(e=>{r[e].result instanceof kr&&(r[e].result=i)})}catch{}}async function Lr(e,t,n){let r=e.matches.find(e=>e.unstable_shouldCallHandler());$(r,`No fetcher match found`);let i=r.route.id,a=await r.resolve(async r=>r(async()=>{let{data:r}=await t(e,n,[i]);return Hr(r,i)}));return{[r.route.id]:a}}function Rr(e){let t=e.searchParams.getAll(`index`);e.searchParams.delete(`index`);let n=[];for(let e of t)e&&n.push(e);for(let t of n)e.searchParams.append(`index`,t);return e}function zr(e,t,n){let r=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return r.pathname===`/`?r.pathname=`_root.${n}`:t&&R(r.pathname,t)===`/`?r.pathname=`${t.replace(/\/$/,``)}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,``)}.${n}`,r}async function Br(e,t,n){let{request:r}=e,i=zr(r.url,t,`data`);r.method===`GET`&&(i=Rr(i),n&&i.searchParams.set(`_routes`,n.join(`,`)));let a=await fetch(i,await wr(r));if(a.status>=400&&!a.headers.has(`X-Remix-Response`))throw new H(a.status,a.statusText,await a.text());if(a.status===204&&a.headers.has(`X-Remix-Redirect`))return{status:202,data:{redirect:{redirect:a.headers.get(`X-Remix-Redirect`),status:Number(a.headers.get(`X-Remix-Status`)||`302`),revalidate:a.headers.get(`X-Remix-Revalidate`)===`true`,reload:a.headers.get(`X-Remix-Reload-Document`)===`true`,replace:a.headers.get(`X-Remix-Replace`)===`true`}}};if(Ar.has(a.status)){let e={};return n&&r.method!==`GET`&&(e[n[0]]={data:void 0}),{status:a.status,data:{routes:e}}}$(a.body,`No response body to decode`);try{let e=await Vr(a.body,window),t;if(r.method===`GET`){let n=e.value;t=Or in n?{redirect:n[Or]}:{routes:n}}else{let r=e.value,i=n?.[0];$(i,`No routeId found for single fetch call decoding`),t=`redirect`in r?{redirect:r}:{routes:{[i]:r}}}return{status:a.status,data:t}}catch{throw Error(`Unable to decode turbo-stream response`)}}function Vr(e,t){return xr(e,{plugins:[(e,...n)=>{if(e===`SanitizedError`){let[e,r,i]=n,a=Error;e&&e in t&&typeof t[e]==`function`&&(a=t[e]);let o=new a(r);return o.stack=i,{value:o}}if(e===`ErrorResponse`){let[e,t,r]=n;return{value:new H(t,r,e)}
5}if(e===`SingleFetchRedirect`)return{value:{[Or]:n[0]}};if(e===`SingleFetchClassInstance`)return{value:n[0]};if(e===`SingleFetchFallback`)return{value:void 0}}]})}function Hr(e,t){if(`redirect`in e){let{redirect:t,revalidate:n,reload:r,replace:i,status:a}=e.redirect;throw ye(t,{status:a,headers:{...n?{"X-Remix-Revalidate":`yes`}:null,...r?{"X-Remix-Reload-Document":`yes`}:null,...i?{"X-Remix-Replace":`yes`}:null}})}let n=e.routes[t];if(n==null)throw new kr(`No result found for routeId "${t}"`);if(`error`in n)throw n.error;if(`data`in n)return n.data;throw Error(`Invalid response found for routeId "${t}"`)}function Ur(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}async function Wr(e,t){if(e.id in t)return t[e.id];try{let r=await n(()=>import(e.module),[]);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Gr(e,t,n){return ri(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i&&i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.()||[]]}).flat(2),ei(e,n))}function Kr(e){return e.css?e.css.map(e=>({rel:`stylesheet`,href:e})):[]}async function qr(e){if(!e.css)return;let t=Kr(e);await Promise.all(t.map(Yr))}async function Jr(e,t){if(!e.css&&!t.links||!ai())return;let n=[];if(e.css&&n.push(...Kr(e)),t.links&&n.push(...t.links()),n.length===0)return;let r=[];for(let e of n)!Xr(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});await Promise.all(r.map(Yr))}async function Yr(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let n=document.createElement(`link`);Object.assign(n,e);function r(){document.head.contains(n)&&document.head.removeChild(n)}n.onload=()=>{r(),t()},n.onerror=()=>{r(),t()},document.head.appendChild(n)})}function Xr(e){return e!=null&&typeof e.page==`string`}function Zr(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 Qr(e,t,n){return ri((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Wr(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Zr).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function $r(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function ei(e,t,{includeHydrateFallback:n}={}){return ti(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function ti(e){return[...new Set(e)]}function ni(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ri(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Xr(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ni(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}var ii;function ai(){if(ii!==void 0)return ii;let e=document.createElement(`link`);return ii=e.relList.supports(`preload`),e=null,ii}function oi(){return r.createElement(Qi,{title:`Loading...`,render
5Scripts:!0},r.createElement(`script`,{dangerouslySetInnerHTML:{__html:` 6 console.log( 7 "ð¿ Hey developer ð. You can provide a way better UX than this " + 8 "when your app is loading JS modules and/or running \`clientLoader\` " + 9 "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " + 10 "for more information." 11 ); 12 `}}))}function si(e){let t={};return Object.values(e).forEach(e=>{if(e){let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}}),t}function ci(e,t,n){let i=gi(t),a=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?oi:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>r.createElement(Zi,{error:xn()}):void 0;return e.id===`root`&&t.Layout?{...i?{element:r.createElement(t.Layout,null,r.createElement(i,null))}:{Component:i},...o?{errorElement:r.createElement(t.Layout,null,r.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:r.createElement(t.Layout,null,r.createElement(a,null))}:{HydrateFallback:a}}:{Component:i,ErrorBoundary:o,HydrateFallback:a}}function li(e,t,n,r,i,a){return fi(t,n,r,i,a,``,si(t),e)}function ui(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 H(400,`Bad Request`,Error(n),!0)}}function di(e,t){let n=e===`clientAction`?`a`:`an`,r=`Route "${t}" does not have ${n} ${e}, but you are trying to submit to it. To fix this, please add ${n} \`${e}\` function to the route`;throw console.error(r),new H(405,`Method Not Allowed`,Error(r),!0)}function fi(e,t,r,i,a,o=``,s=si(e),c){return(s[o]||[]).map(o=>{let l=t[o.id];function u(e){return $(typeof e==`function`,`No single fetch function available for route handler`),e()}function d(e){return o.hasLoader?u(e):Promise.resolve(null)}function f(e){if(!o.hasAction)throw di(`action`,o.id);return u(e)}function p(e){n(()=>import(e),[])}function m(e){e.clientActionModule&&p(e.clientActionModule),e.clientLoaderModule&&p(e.clientLoaderModule)}async function h(e){let n=t[o.id],r=n?Jr(o,n):Promise.resolve();try{return e()}finally{await r}}let g={id:o.id,index:o.index,path:o.path};if(l){Object.assign(g,{...g,...ci(o,l,a),middleware:l.clientMiddleware,handle:l.handle,shouldRevalidate:pi(g.path,l,o,i,c)});let e=r&&r.loaderData&&o.id in r.loaderData,t=e?r?.loaderData?.[o.id]:void 0,n=r&&r.errors&&o.id in r.errors,s=n?r?.errors?.[o.id]:void 0,u=c==null&&(l.clientLoader?.hydrate===!0||!o.hasLoader);g.loader=async({request:r,params:i,context:a},c)=>{try{return await h(async()=>($(l,"No `routeModule` available for critical-route loader"),l.clientLoader?l.clientLoader({request:r,params:i,context:a,async serverLoader(){if
12(ui(`loader`,o),u){if(e)return t;if(n)throw s}return d(c)}}):d(c)))}finally{u=!1}},g.loader.hydrate=_i(o.id,l.clientLoader,o.hasLoader,a),g.action=({request:e,params:t,context:n},r)=>h(async()=>{if($(l,"No `routeModule` available for critical-route action"),!l.clientAction){if(a)throw di(`clientAction`,o.id);return f(r)}return l.clientAction({request:e,params:t,context:n,async serverAction(){return ui(`action`,o),f(r)}})})}else{o.hasClientLoader||(g.loader=(e,t)=>h(()=>d(t))),o.hasClientAction||(g.action=(e,t)=>h(()=>{if(a)throw di(`clientAction`,o.id);return f(t)}));let e;async function r(){return e||=(async()=>{(o.clientLoaderModule||o.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=hi(o,t);return m(o),await e})(),await e}g.lazy={loader:o.hasClientLoader?async()=>{let{clientLoader:e}=o.clientLoaderModule?await n(()=>import(o.clientLoaderModule),[]):await r();return $(e,"No `clientLoader` export found"),(t,n)=>e({...t,async serverLoader(){return ui(`loader`,o),d(n)}})}:void 0,action:o.hasClientAction?async()=>{let e=o.clientActionModule?n(()=>import(o.clientActionModule),[]):r();m(o);let{clientAction:t}=await e;return $(t,"No `clientAction` export found"),(e,n)=>t({...e,async serverAction(){return ui(`action`,o),f(n)}})}:void 0,middleware:o.hasClientMiddleware?async()=>{let{clientMiddleware:e}=o.clientMiddlewareModule?await n(()=>import(o.clientMiddlewareModule),[]):await r();return $(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await r();return pi(g.path,e,o,i,c)},handle:async()=>(await r()).handle,Component:async()=>(await r()).Component,ErrorBoundary:o.hasErrorBoundary?async()=>(await r()).ErrorBoundary:void 0}}let _=fi(e,t,r,i,a,o.id,s,c);return _.length>0&&(g.children=_),g})}function pi(e,t,n,r,i){if(i)return mi(n.id,t.shouldRevalidate,i);if(!r&&n.hasLoader&&!n.hasClientLoader){let n=e?L(e)[1].map(e=>e.paramName):[],r=e=>n.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:r(t)})}else return e=>r(e)}if(r&&t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:!0})}return t.shouldRevalidate}function mi(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function hi(e,t){let n=Wr(e,t),r=qr(e),i=await n;return await Promise.all([r,Jr(e,i)]),{Component:gi(i),ErrorBoundary:i.ErrorBoundary,clientMiddleware:i.clientMiddleware,clientAction:i.clientAction,clientLoader:i.clientLoader,handle:i.handle,links:i.links,meta:i.meta,shouldRevalidate:i.shouldRevalidate}}function gi(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function _i(e,t,n,r){return r&&e!==`root`||t!=null&&(t.hydrate===!0||n!==!0)}var vi=new Set,yi=1e3,bi=new Set,xi=7680;function Si(e,t){return e.mode===`lazy`&&t===!0}function Ci({sri:e,...t},n){let r=new Set(n.state.matches.map(e=>e.route.id)),i=n.state.location.pathname.split(`/`).filter(Boolean),a=[`/`];for(i.pop();i.length>0;)a.push(`/${i.join(`/`)}`),i.pop();a.forEach(e=>{let t=D(n.routes,e,n.basename);t&&t.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((e,n)=>Object.assign(e,{[n]:t.routes[n]}),{});return{...t,routes:o,sri:e?!0:void 0}}function wi(e,t,n,r,i,a){if(Si(r,n))return async({path:o,patch:s,signal:c,fetcherKey:l})=>{bi.has(o)||await Oi([o],l?window.location.href:o,e,t,n,i,a,r.manifestPath,s,c)}}function Ti(e,t,n,i,a,o){r.useEffect(()=>{if(!Si(a,i)||window.navigator?.connection?.saveData===!0)return;function r(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=e.tagName===`A`?e.pathname:new URL(t,window.location.origin).pathname;bi.has(n)||vi.add(n)}async function s(){document.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(r);let s=Array.from(vi.keys()).filter(e=>bi.has(e)?(vi.delete(e),!1):!0);if(s.length!==0)try{await Oi(s,null,t,n,i,o,e.basename,a.manifestPath,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}let c=Ai(s,100);s();let l=new MutationObserver(()=>c());return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[i,o,t,n,e,a])}function Ei(e,t){let n=e||`/__manifest`;return t==null?n:`${t}${n}`.replace(/\/+/g,`/`)}var Di=`react-router-manifest-version`;async function Oi(e,t,n,r,i,a,o,s,c,l){let u=new URLSearchParams;u.set(`paths`,e.sort().join(`,`)),u.set(`version`,n.version);let d=new URL(Ei(s,o),window.location.origin);if(d.search=u.toString(),d.toString().length>xi){vi.clear();return}let f;try{let e=await fetch(d,{signal:l});if(e.ok){if(e.status===204&&e.headers.has(`X-Remix-Reload-Document`)){if(!t){console.warn(`Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a
12new document navigation to sync up with the latest manifest.`);return}try{if(sessionStorage.getItem(Di)===n.version){console.error(`Unable to discover routes due to manifest version mismatch.`);return}sessionStorage.setItem(Di,n.version)}catch{}window.location.href=t,console.warn(`Detected manifest version mismatch, reloading...`),await new Promise(()=>{})}else if(e.status>=400)throw Error(await e.text())}else throw Error(`${e.status} ${e.statusText}`);try{sessionStorage.removeItem(Di)}catch{}f=await e.json()}catch(e){if(l?.aborted)return;throw e}let p=new Set(Object.keys(n.routes)),m=Object.values(f).reduce((e,t)=>(t&&!p.has(t.id)&&(e[t.id]=t),e),{});Object.assign(n.routes,m),e.forEach(e=>ki(e,bi));let h=new Set;Object.values(m).forEach(e=>{e&&(!e.parentId||!m[e.parentId])&&h.add(e.parentId)}),h.forEach(e=>c(e||null,fi(m,r,null,i,a,e)))}function ki(e,t){if(t.size>=yi){let e=t.values().next().value;t.delete(e)}t.add(e)}function Ai(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function ji(){let e=r.useContext(Lt);return $(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Mi(){let e=r.useContext(Rt);return $(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ni=r.createContext(void 0);Ni.displayName=`FrameworkContext`;function Pi(){let e=r.useContext(Ni);return $(e,`You must render this element inside a <HydratedRouter> element`),e}function Fi(e,t){let n=r.useContext(Ni),[i,a]=r.useState(!1),[o,s]=r.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=r.useRef(null);r.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(i){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[i]);let m=()=>{a(!0)},h=()=>{a(!1),s(!1)};return n?e===`intent`?[o,p,{onFocus:Ii(c,m),onBlur:Ii(l,h),onMouseEnter:Ii(u,m),onMouseLeave:Ii(d,h),onTouchStart:Ii(f,m)}]:[o,p,{}]:[!1,p,{}]}function Ii(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Li(e,t,n){if(n&&!Gi)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}var Ri=`data-react-router-critical-css`;function zi({nonce:e}){let{isSpaMode:t,manifest:n,routeModules:i,criticalCss:a}=Pi(),{errors:o,matches:s}=Mi(),c=Li(s,o,t),l=r.useMemo(()=>Gr(c,i,n),[c,i,n]);return r.createElement(r.Fragment,null,typeof a==`string`?r.createElement(`style`,{[Ri]:``,dangerouslySetInnerHTML:{__html:a}}):null,typeof a==`object`?r.createElement(`link`,{[Ri]:``,rel:`stylesheet`,href:a.href,nonce:e}):null,l.map(({key:t,link:n})=>Xr(n)?r.createElement(Bi,{key:t,nonce:e,...n}):r.createElement(`link`,{key:t,nonce:e,...n})))}function Bi({page:e,...t}){let{router:n}=ji(),i=r.useMemo(()=>D(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?r.createElement(Hi,{page:e,matches:i,...t}):null}function Vi(e){let{manifest:t,routeModules:n}=Pi(),[i,a]=r.useState([]);return r.useEffect(()=>{let r=!1;return Qr(e,t,n).then(e=>{r||a(e)}),()=>{r=!0}},[e,t,n]),i}function Hi({page:e,matches:t,...n}){let i=Q(),{manifest:a,routeModules:o}=Pi(),{basename:s}=ji(),{loaderData:c,matches:l}=Mi(),u=r.useMemo(()=>$r(e,t,l,a,i,`data`),[e,t,l,a,i]),d=r.useMemo(()=>$r(e,t,l,a,i,`assets`),[e,t,l,a,i]),f=r.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let n=new Set,r=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?r=!0:n.add(e.route.id))}),n.size===0)return[];let l=zr(e,s,`data`);return r&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[s,c,i,a,u,t,e,o]),p=r.useMemo(()=>ei(d,a),[d,a]),m=Vi(d);return r.createElement(r.Fragment,null,f.map(e=>r.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),p.map(e=>r.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),m.map(({key:e,link:t})=>r.createElement(`link`,{key:e,nonce:n.nonce,...t})))}
12function Ui(){let{isSpaMode:e,routeModules:t}=Pi(),{errors:n,matches:i,loaderData:a}=Mi(),o=Q(),s=Li(i,n,e),c=null;n&&(c=n[s[s.length-1].route.id]);let l=[],u=null,d=[];for(let e=0;e<s.length;e++){let n=s[e],r=n.route.id,i=a[r],f=n.params,p=t[r],m=[],h={id:r,data:i,loaderData:i,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:c};if(d[e]=h,p?.meta?m=typeof p.meta==`function`?p.meta({data:i,loaderData:i,params:f,location:o,matches:d,error:c}):Array.isArray(p.meta)?[...p.meta]:p.meta:u&&(m=[...u]),m||=[],!Array.isArray(m))throw Error(`The route at `+n.route.path+` returns an invalid value. All route meta functions must return an array of meta objects. 13 14To reference the meta function API, see https://remix.run/route/meta`);h.meta=m,d[e]=h,l=[...m],u=l}return r.createElement(r.Fragment,null,l.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!Wi(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let i=t;return r.createElement(i,{key:JSON.stringify(n),...n})}if(`title`in e)return r.createElement(`title`,{key:`title`},String(e.title));if(`charset`in e&&(e.charSet??=e.charset,delete e.charset),`charSet`in e&&e.charSet!=null)return typeof e.charSet==`string`?r.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return r.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:Dr(t)}})}catch{return null}return r.createElement(`meta`,{key:JSON.stringify(e),...e})}))}function Wi(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}var Gi=!1;function Ki(){Gi=!0}function qi(e){let{manifest:t,serverHandoffString:n,isSpaMode:i,renderMeta:a,routeDiscovery:o,ssr:s}=Pi(),{router:c,static:l,staticContext:u}=ji(),{matches:d}=Mi(),f=Bt(),p=Si(o,s);a&&(a.didRenderScripts=!0);let m=Li(d,null,i);r.useEffect(()=>{Ki()},[]);let h=r.useMemo(()=>{if(f)return null;let i=u?`window.__reactRouterContext = ${n};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:` `,a=l?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${p?``:`import ${JSON.stringify(t.url)}`}; 15${m.map((e,n)=>{let r=`route${n}`,i=t.routes[e.route.id];$(i,`Route ${e.route.id} not found in manifest`);let{clientActionModule:a,clientLoaderModule:o,clientMiddlewareModule:s,hydrateFallbackModule:c,module:l}=i,u=[...a?[{module:a,varName:`${r}_clientAction`}]:[],...o?[{module:o,varName:`${r}_clientLoader`}]:[],...s?[{module:s,varName:`${r}_clientMiddleware`}]:[],...c?[{module:c,varName:`${r}_HydrateFallback`}]:[],{module:l,varName:`${r}_main`}];return u.length===1?`import * as ${r} from ${JSON.stringify(l)};`:[u.map(e=>`import * as ${e.varName} from "${e.module}";`).join(` 16`),`const ${r} = {${u.map(e=>`...${e.varName}`).join(`,`)}};`].join(` 17`)}).join(` 18`)} 19 ${p?`window.__reactRouterManifest = ${JSON.stringify(Ci(t,c),null,2)};`:``} 20 window.__reactRouterRouteModules = {${m.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}}; 21 22import(${JSON.stringify(t.entry.module)});`:` `;return r.createElement(r.Fragment,null,r.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:void 0}),r.createElement(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a},type:`module`,async:!0}))},[]),g=Gi||f?[]:Ji(t.entry.imports.concat(ei(m,t,{includeHydrateFallback:!0}))),_=typeof t.sri==`object`?t.sri:{};return En(!f,`The <Scripts /> element is a no-op when using RSC and can be safely removed.`),Gi||f?null:r.createElement(r.Fragment,null,typeof t.sri==`object`?r.createElement(`script`,{"rr-importmap":``,type:`importmap`,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:_})}}):null,p?null:r.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin,integrity:_[t.url],suppressHydrationWarning:!0}),r.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin,integrity:_[t.entry.module],suppressHydrationWarning:!0}),g.map(t=>r.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin,integrity:_[t],suppressHydrationWarning:!0})),h)}function Ji(e){return[...new Set(e)]}function Yi(...e){return t=>
22{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Xi=class extends r.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||t.error,location:t.location}:{error:e.error||null,location:e.location}}render(){return this.state.error?r.createElement(Zi,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Zi({error:e,isOutsideRemixApp:t}){console.error(e);let n=r.createElement(`script`,{dangerouslySetInnerHTML:{__html:` 23 console.log( 24 "ð¿ Hey developer ð. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information." 25 ); 26 `}});if(be(e))return r.createElement(Qi,{title:`Unhandled Thrown Response!`},r.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),n);let i;if(e instanceof Error)i=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);i=Error(t)}return r.createElement(Qi,{title:`Application Error!`,isOutsideRemixApp:t},r.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),r.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},i.stack),n)}function Qi({title:e,renderScripts:t,isOutsideRemixApp:n,children:i}){let{routeModules:a}=Pi();return a.root?.Layout&&!n?i:r.createElement(`html`,{lang:`en`},r.createElement(`head`,null,r.createElement(`meta`,{charSet:`utf-8`}),r.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),r.createElement(`title`,null,e)),r.createElement(`body`,null,r.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},i,t?r.createElement(qi,null):null)))}var $i=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{$i&&(window.__reactRouterVersion=`7.9.4`)}catch{}function ea({basename:e,children:t,history:n}){let[i,a]=r.useState({action:n.action,location:n.location}),o=r.useCallback(e=>{r.startTransition(()=>a(e))},[a]);return r.useLayoutEffect(()=>n.listen(o),[n,o]),r.createElement(Pn,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n})}ea.displayName=`unstable_HistoryRouter`;var ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,na=r.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:i,reloadDocument:a,replace:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:f,...p},m){let{basename:h}=r.useContext(X),g=typeof l==`string`&&ta.test(l),_,v=!1;if(typeof l==`string`&&g&&(_=l,$i))try{let e=new URL(window.location.href),t=l.startsWith(`//`)?new URL(e.protocol+l):new URL(l),n=R(t.pathname,h);t.origin===e.origin&&n!=null?l=n+t.search+t.hash:v=!0}catch{d(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=Kt(l,{relative:i}),[b,x,S]=Fi(n,p),C=la(l,{replace:o,state:s,target:c,preventScrollReset:u,relative:i,viewTransition:f});function w(t){e&&e(t),t.defaultPrevented||C(t)}let T=r.createElement(`a`,{...p,...S,href:_||y,onClick:v||a?e:w,ref:Yi(m,x),target:c,"data-discover":!g&&t===`render`?`true`:void 0});return b&&!g?r.createElement(r.Fragment,null,T,r.createElement(Bi,{page:y})):T});na.displayName=`Link`;var ra=r.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:i=!1,style:a,to:o,viewTransition:s,children:c,...l},u){let d=tn(o,{relative:l.relative}),f=Q(),p=r.useContext(Rt),{navigator:m,basename:h}=r.useContext(X),g=p!=null&&xa(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=R(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!i&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!i&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(
26Boolean).join(` `);let E=typeof a==`function`?a(C):a;return r.createElement(na,{...l,"aria-current":w,className:T,ref:u,style:E,to:o,viewTransition:s},typeof c==`function`?c(C):c)});ra.displayName=`NavLink`;var ia=r.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:i,replace:a,state:o,method:s=Ln,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,...p},m)=>{let h=pa(),g=ma(c,{relative:u}),_=s.toLowerCase()===`get`?`get`:`post`,v=typeof c==`string`&&ta.test(c);return r.createElement(`form`,{ref:m,method:_,action:g,onSubmit:i?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,i=r?.getAttribute(`formmethod`)||s;h(r||e.currentTarget,{fetcherKey:t,method:i,navigate:n,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f})},...p,"data-discover":!v&&e===`render`?`true`:void 0})});ia.displayName=`Form`;function aa({getKey:e,storageKey:t,...n}){let i=r.useContext(Ni),{basename:a}=r.useContext(X),o=Q(),s=_n();ya({getKey:e,storageKey:t});let c=r.useMemo(()=>{if(!i||!e)return null;let t=va(o,s,a,e);return t===o.key?null:t},[]);if(!i||i.isSpaMode)return null;let l=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];
26typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return r.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${l})(${JSON.stringify(t||ga)}, ${JSON.stringify(c)})`}})}aa.displayName=`ScrollRestoration`;function oa(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sa(e){let t=r.useContext(Lt);return u(t,oa(e)),t}function ca(e){let t=r.useContext(Rt);return u(t,oa(e)),t}function la(e,{target:t,replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s}={}){let c=Xt(),l=Q(),u=tn(e,{relative:o});return r.useCallback(r=>{Wn(r,t)&&(r.preventDefault(),c(e,{replace:n===void 0?h(l)===h(u):n,state:i,preventScrollReset:a,relative:o,viewTransition:s}))},[l,c,u,n,i,t,e,a,o,s])}function ua(e){d(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=r.useRef(Gn(e)),n=r.useRef(!1),i=Q(),a=r.useMemo(()=>Kn(i.search,n.current?null:t.current),[i.search]),o=Xt();return[a,r.useCallback((e,t)=>{let r=Gn(typeof e==`function`?e(new URLSearchParams(a)):e);n.current=!0,o(`?`+r,t)},[o,a])]}var da=0,fa=()=>`__${String(++da)}__`;function pa(){let{router:e}=sa(`useSubmit`),{basename:t}=r.useContext(X),n=mn();return r.useCallback(async(r,i={})=>{let{action:a,method:o,encType:s,formData:c,body:l}=Zn(r,t);if(i.navigate===!1){let t=i.fetcherKey||fa();await e.fetch(t,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:l,formMethod:i.method||o,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:l,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function ma(e,{relative:t}={}){let{basename:n}=r.useContext(X),i=r.useContext(Z);u(i,`useFormAction must be used inside a RouteContext`);let[a]=i.matches.slice(-1),o={...tn(e||`.`,{relative:t})},s=Q();if(e==null){o.search=s.search;let e=new URLSearchParams(o.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();o.search=n?`?${n}`:``}}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(o.pathname=o.pathname===`/`?n:B([n,o.pathname])),h(o)}function ha(){let e=ca(`useFetchers`);return Array.from(e.fetchers.entries()).map(([e,t])=>({...t,key:e}))}var ga=`react-router-scroll-positions`,_a={};function va(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:R(e.pathname,n)||e.pathname},t)),i??=e.key,i}function ya({getKey:e,storageKey:t}={}){let{router:n}=sa(`useScrollRestoration`),{restoreScrollPosition:i,preventScrollReset:a}=ca(`useScrollRestoration`),{basename:o}=r.useContext(X),s=Q(),c=_n(),l=hn();r.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),ba(r.useCallback(()=>{if(l.state===`idle`){let t=va(s,c,o,e);_a[t]=window.scrollY}try{sessionStorage.setItem(t||ga,JSON.stringify(_a))}catch(e){d(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[l.state,e,o,s,c,t])),typeof document<`u`&&(r.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||ga);e&&(_a=JSON.parse(e))}catch{}},[t]),r.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(_a,()=>window.scrollY,e?(t,n)=>va(t,n,o,e):void 0);return()=>t&&t()},[n,o,e]),r.useLayoutEffect(()=>{if(i!==!1){if(typeof i==`number`){window.scrollTo(0,i);return}try{if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{d(!1,`"${s.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[s,i,a]))}function ba(e,t){let{capture:n}=t||{};r.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function xa(e,{relative:t}={}){let n=r.useContext(Vt);u(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=sa(`useViewTransitionState`),a=tn(e,{relative:t});if(!n.isTransitioning)return!1;let o=R(n.currentLocation.pathname,i)||n.currentLocation.pathname,s=R(n.nextLocation.pathname,i)||n.nextLocation.pathname;return I(a.pathname,s)!=null||I(a.pathname,o)!=null}export{Q as A,be as C,ha as D,_i as E,xn as F,yn as I,ua as L,Xt as M,hn as N,Ti as O,gn as P,In as R,u as S,D as T,Fe as _,Ui as a,jr as b,Nn as c,qi as d,aa as f,y as g,li as h,zi as i,_n as j,vn as k,Xi as l,fi as m,Ni as n,Ar as o,l as p,na as r,ra as s,H as t,An as u,Vr as v,Dn as w,On as x,wi as y};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.