PageSourceSearch

https://subscribe.swaroopch.com/assets/components-CDo3yjgw.js

js swaroopch.com collected 2026-09-24 08:37:19 UTC 111,945 bytes, 37 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="abef39d0-fff7-571e-91fb-9b9b9082516f")}catch(e){}}();
3import{s as e}from"./jsx-runtime-D4ePz0Hl.js";import{t}from"./react-BXH-GOAS.js";import{t as n}from"./react-dom-D0cDl6Cl.js";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}var i;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(i||={});var a=`popstate`;function o(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return d(``,{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:f(t)}return m(t,n,null,e)}function s(e,t){if(e===!1||e==null)throw Error(t)}function c(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function l(){return Math.random().toString(36).substr(2,8)}function u(e,t){return{usr:e.state,key:e.key,idx:t}}function d(e,t,n,i){return n===void 0&&(n=null),r({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?p(t):t,{state:n,key:t&&t.key||i||l()})}function f(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function p(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function m(e,t,n,o){o===void 0&&(o={});let{window:c=document.defaultView,v5Compat:l=!1}=o,p=c.history,m=i.Pop,h=null,g=_();g??(g=0,p.replaceState(r({},p.state,{idx:g}),``));function _(){return(p.state||{idx:null}).idx}function v(){m=i.Pop;let e=_(),t=e==null?null:e-g;g=e,h&&h({action:m,location:S.location,delta:t})}function y(e,t){m=i.Push;let r=d(S.location,e,t);n&&n(r,e),g=_()+1;let a=u(r,g),o=S.createHref(r);try{p.pushState(a,``,o)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;c.location.assign(o)}l&&h&&h({action:m,location:S.location,delta:1})}function b(e,t){m=i.Replace;let r=d(S.location,e,t);n&&n(r,e),g=_();let a=u(r,g),o=S.createHref(r);p.replaceState(a,``,o),l&&h&&h({action:m,location:S.location,delta:0})}function x(e){let t=c.location.origin===`null`?c.location.href:c.location.origin,n=typeof e==`string`?e:f(e);return n=n.replace(/ $/,`%20`),s(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}let S={get action(){return m},get location(){return e(c,p)},listen(e){if(h)throw Error(`A history only accepts one active listener`);return c.addEventListener(a,v),h=e,()=>{c.removeEventListener(a,v),h=null}},createHref(e){return t(c,e)},createURL:x,encodeLocation(e){let t=x(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:y,replace:b,go(e){return p.go(e)}};return S}var h;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(h||={});var g=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function _(e){return e.index===!0}function v(e,t,n,i){return n===void 0&&(n=[]),i===void 0&&(i={}),e.map((e,a)=>{let o=[...n,String(a)],c=typeof e.id==`string`?e.id:o.join(`-`);if(s(e.index!==!0||!e.children,`Cannot specify children on an index route`),s(!i[c],`Found a route id collision on i
3d "`+c+`".  Route id's must be globally unique within Data Router usages`),_(e)){let n=r({},e,t(e),{id:c});return i[c]=n,n}else{let n=r({},e,t(e),{id:c,children:void 0});return i[c]=n,e.children&&(n.children=v(e.children,t,o,i)),n}})}function y(e,t,n){return n===void 0&&(n=`/`),b(e,t,n,!1)}function b(e,t,n,r){let i=F((typeof t==`string`?p(t):t).pathname||`/`,n);if(i==null)return null;let a=S(e);w(a);let o=null,s=P(i);for(let e=0;o==null&&e<a.length;++e)o=j(a[e],s,r);return o}function x(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function S(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(s(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let c=L([r,o.relativePath]),l=n.concat(o);e.children&&e.children.length>0&&(s(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+c+`".`)),S(e.children,t,l,c)),!(e.path==null&&!e.index)&&t.push({path:c,score:k(c,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of C(e.path))i(e,t,n)}),t}function C(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=C(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 w(e){e.sort((e,t)=>e.score===t.score?A(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var T=/^:[\w-]+$/,E=3,ee=2,D=1,te=10,ne=-2,O=e=>e===`*`;function k(e,t){let n=e.split(`/`),r=n.length;return n.some(O)&&(r+=ne),t&&(r+=ee),n.filter(e=>!O(e)).reduce((e,t)=>e+(T.test(t)?E:t===``?D:te),r)}function A(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 j(e,t,n){n===void 0&&(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=M({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=M({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
3Object.assign(i,u.params),o.push({params:i,pathname:L([a,u.pathname]),pathnameBase:de(L([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=L([a,u.pathnameBase]))}return o}function M(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=N(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,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return i&&!c?e[r]=void 0:e[r]=(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function N(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),c(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?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function P(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return c(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function F(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)||`/`}var re=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ie=e=>re.test(e);function ae(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?p(e):e,a;if(n)if(ie(n))a=n;else{if(n.includes(`//`)){let e=n;n=ue(n),c(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?oe(n.substring(1),`/`):oe(n,t)}else a=t;return{pathname:a,search:fe(r),hash:pe(i)}}function oe(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 se(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 ce(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function I(e,t){let n=ce(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function le(e,t,n,i){i===void 0&&(i=!1);let a;typeof e==`string`?a=p(e):(a=r({},e),s(!a.pathname||!a.pathname.includes(`?`),se(`?`,`pathname`,`search`,a)),s(!a.pathname||!a.pathname.includes(`#`),se(`#`,`pathname`,`hash`,a)),s(!a.search||!a.search.includes(`#`),se(`#`,`search`,`hash`,a)));let o=e===``||a.pathname===``,c=o?`/`:a.pathname,l;if(c==null)l=n;else{let e=t.length-1;if(!i&&c.startsWith(`..`)){let t=c.split(`/`);for(;t[0]===`..`;)t.shift(),--e;a.pathname=t.join(`/`)}l=e>=0?t[e]:`/`}let u=ae(a,l),d=c&&c!==`/`&&c.endsWith(`/`),f=(o||c===`.`)&&n.endsWith(`/`);return!u.pathname.endsWith(`/`)&&(d||f)&&(u.pathname+=`/`),u}var ue=e=>e.replace(/\/\/+/g,`/`),L=e=>ue(e.join(`/`)),de=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),fe=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,pe=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,R=class{constructor(e,t){this.type=`DataWithResponseInit`,this.data=e,this.init=t||null}};function me(e,t){return new R(e,typeof t==`number`?{status:t}:t)}var z=class extends Error{},he=class{constructor(e,t){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],s(e&&typeof e==`object`&&!Array.isArray(e),`defer() only accepts plain objects`);let n;this.abortPromise=new Promise((e,t)=>
3n=t),this.controller=new AbortController;let r=()=>n(new z(`Deferred data aborted`));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener(`abort`,r),this.controller.signal.addEventListener(`abort`,r),this.data=Object.entries(e).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:this.trackPromise(n,r)})},{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let n=Promise.race([t,this.abortPromise]).then(t=>this.onSettle(n,e,void 0,t),t=>this.onSettle(n,e,t));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(e,t,n,r){if(this.controller.signal.aborted&&n instanceof z)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),n===void 0&&r===void 0){let n=Error(`Deferred data for key "`+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)}return r===void 0?(Object.defineProperty(e,"_error",{get:()=>n}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:()=>r}),this.emit(!1,t),r)}emit(e,t){this.subscribers.forEach(n=>n(e,t))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((e,t)=>this.pendingKeysSet.delete(t)),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let n=()=>this.cancel();e.addEventListener(`abort`,n),t=await new Promise(t=>{this.subscribe(r=>{e.removeEventListener(`abort`,n),(r||this.done)&&t(r)})})}return t}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return s(this.data!==null&&this.done,`Can only unwrap data on initialized and settled deferreds`),Object.entries(this.data).reduce((e,t)=>{let[n,r]=t;return Object.assign(e,{[n]:_e(r)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}};function ge(e){return e instanceof Promise&&e._tracked===!0}function _e(e){if(!ge(e))return e;if(e._error)throw e._error;return e._data}var ve=function(e,t){t===void 0&&(t=302);let n=t;typeof n==`number`?n={status:n}:n.status===void 0&&(n.status=302);let i=new Headers(n.headers);return i.set(`Location`,e),new Response(null,r({},n,{headers:i}))},B=class{constructor(e,t,n,r){r===void 0&&(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 ye(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var be=[`post`,`put`,`patch`,`delete`],xe=new Set(be),Se=[`get`,...be],Ce=new Set(Se),we=new Set([301,302,303,307,308]),Te=new Set([307,308]),Ee={state:`idle`,location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},De={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Oe={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),je=`remix-router-transitions`;function Me(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,a=!n;s(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=Ae;let l={},u=v(e.routes,o,void 0,l),f,p=e.basename||`/`,m=e.dataStrategy||Ge,g=e.patchRoutesOnNavigation,_=r({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),S=null,C=new Set,w=null,T=null,E=null,ee=e.hydrationData!=null,D=y(u,e.history.location,p),te=!1,ne=null;if(D==null&&!g){let t=U(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=rt(u);D=n,ne={[r.id]:t}}D&&!e.hydrationData&&Nt(D,u,e.history.location.pathname).active&&(D=null);let O;
3if(!D){if(O=!1,D=[],_.v7_partialHydration){let t=Nt(null,u,e.history.location.pathname);t.active&&t.matches&&(te=!0,D=t.matches)}}else if(D.some(e=>e.route.lazy))O=!1;else if(!D.some(e=>e.route.loader))O=!0;else if(_.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null;if(n){let e=D.findIndex(e=>n[e.route.id]!==void 0);O=D.slice(0,e+1).every(e=>!Re(e.route,t,n))}else O=D.every(e=>!Re(e.route,t,n))}else O=e.hydrationData!=null;let k,A={historyAction:e.history.action,location:e.history.location,matches:D,initialized:O,navigation:Ee,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||ne,fetchers:new Map,blockers:new Map},j=i.Pop,M=!1,N,P=!1,re=new Map,ie=null,ae=!1,oe=!1,se=[],ce=new Set,I=new Map,le=0,ue=-1,L=new Map,de=new Set,fe=new Map,pe=new Map,R=new Set,me=new Map,z=new Map,he;function ge(){if(S=e.history.listen(t=>{let{action:n,location:r,delta:i}=t;if(he){he(),he=void 0;return}c(z.size===0||i!=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 a=Ot({currentLocation:A.location,nextLocation:r,historyAction:n});if(a&&i!=null){let t=new Promise(e=>{he=e});e.history.go(i*-1),q(a,{state:`blocked`,location:r,proceed(){q(a,{state:`proceeding`,proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(i))},reset(){let e=new Map(A.blockers);e.set(a,Oe),B({blockers:e})}});return}return Ce(n,r)}),n){Tt(t,re);let e=()=>Et(t,re);t.addEventListener(`pagehide`,e),ie=()=>t.removeEventListener(`pagehide`,e)}return A.initialized||Ce(i.Pop,A.location,{initialHydration:!0}),k}function _e(){S&&S(),ie&&ie(),C.clear(),N&&N.abort(),A.fetchers.forEach((e,t)=>at(t)),A.blockers.forEach((e,t)=>Dt(t))}function ve(e){return C.add(e),()=>C.delete(e)}function B(e,t){t===void 0&&(t={}),A=r({},A,e);let n=[],i=[];_.v7_fetcherPersist&&A.fetchers.forEach((e,t)=>{e.state===`idle`&&(R.has(t)?i.push(t):n.push(t))}),R.forEach(e=>{!A.fetchers.has(e)&&!I.has(e)&&i.push(e)}),[...C].forEach(e=>e(A,{deletedFetchers:i,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),_.v7_fetcherPersist?(n.forEach(e=>A.fetchers.delete(e)),i.forEach(e=>at(e))):i.forEach(e=>R.delete(e))}function be(t,n,a){let{flushSync:o}=a===void 0?{}:a,s=A.actionData!=null&&A.navigation.formMethod!=null&&G(A.navigation.formMethod)&&A.navigation.state===`loading`&&t.state?._isRedirect!==!0,c;c=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:s?A.actionData:null;let l=n.loaderData?et(A.loaderData,n.loaderData,n.matches||[],n.errors):A.loaderData,d=A.blockers;d.size>0&&(d=new Map(d),d.forEach((e,t)=>d.set(t,Oe)));let p=M===!0||A.navigation.formMethod!=null&&G(A.navigation.formMethod)&&t.state?._isRedirect!==!0;f&&=(u=f,void 0),ae||j===i.Pop||(j===i.Push?e.history.push(t,t.state):j===i.Replace&&e.history.replace(t,t.state));let m;if(j===i.Pop){let e=re.get(A.location.pathname);e&&e.has(t.pathname)?m={currentLocation:A.location,nextLocation:t}:re.has(t.pathname)&&(m={currentLocation:t,nextLocation:A.location})}else if(P){let e=re.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),re.set(A.location.pathname,e)),m={currentLocation:A.location,nextLocation:t}}B(r({},n,{actionData:c,loaderData:l,historyAction:j,location:t,initialized:!0,navigation:Ee,revalidation:`idle`,restoreScrollPosition:Mt(t,n.matches||A.matches),preventScrollReset:p,blockers:d}),{viewTransitionOpts:m,flushSync:o===!0}),j=i.Pop,M=!1,P=!1,ae=!1,oe=!1,se=[]}async function xe(t,n){if(typeof t==`number`){e.history.go(t);return}
3let a=Pe(A.location,A.matches,p,_.v7_prependBasename,t,_.v7_relativeSplatPath,n?.fromRouteId,n?.relative),{path:o,submission:s,error:c}=Fe(_.v7_normalizeFormMethod,!1,a,n),l=A.location,u=d(A.location,o,n&&n.state);u=r({},u,e.history.encodeLocation(u));let f=n&&n.replace!=null?n.replace:void 0,m=i.Push;f===!0?m=i.Replace:f===!1||s!=null&&G(s.formMethod)&&s.formAction===A.location.pathname+A.location.search&&(m=i.Replace);let h=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,g=(n&&n.flushSync)===!0,v=Ot({currentLocation:l,nextLocation:u,historyAction:m});if(v){q(v,{state:`blocked`,location:u,proceed(){q(v,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),xe(t,n)},reset(){let e=new Map(A.blockers);e.set(v,Oe),B({blockers:e})}});return}return await Ce(m,u,{submission:s,pendingError:c,preventScrollReset:h,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:g})}function Se(){if(qe(),B({revalidation:`loading`}),A.navigation.state!==`submitting`){if(A.navigation.state===`idle`){Ce(A.historyAction,A.location,{startUninterruptedRevalidation:!0});return}Ce(j||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:P===!0})}}async function Ce(t,n,i){N&&N.abort(),N=null,j=t,ae=(i&&i.startUninterruptedRevalidation)===!0,jt(A.location,A.matches),M=(i&&i.preventScrollReset)===!0,P=(i&&i.enableViewTransition)===!0;let a=f||u,o=i&&i.overrideNavigation,s=i!=null&&i.initialHydration&&A.matches&&A.matches.length>0&&!te?A.matches:y(a,n,p),c=(i&&i.flushSync)===!0;if(s&&A.initialized&&!oe&&ot(A.location,n)&&!(i&&i.submission&&G(i.submission.formMethod))){be(n,{matches:s},{flushSync:c});return}let l=Nt(s,a,n.pathname);if(l.active&&l.matches&&(s=l.matches),!s){let{error:e,notFoundMatches:t,route:r}=kt(n.pathname);be(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:c});return}N=new AbortController;let d=Ze(e.history,n,N.signal,i&&i.submission),m;if(i&&i.pendingError)m=[nt(s).route.id,{type:h.error,error:i.pendingError}];else if(i&&i.submission&&G(i.submission.formMethod)){let t=await we(d,n,i.submission,s,l.active,{replace:i.replace,flushSync:c});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,r]=t.pendingActionResult;
3if(W(r)&&ye(r.error)&&r.error.status===404){N=null,be(n,{matches:t.matches,loaderData:{},errors:{[e]:r.error}});return}}s=t.matches||s,m=t.pendingActionResult,o=bt(n,i.submission),c=!1,l.active=!1,d=Ze(e.history,d.url,d.signal)}let{shortCircuited:g,matches:_,loaderData:v,errors:b}=await je(d,n,s,l.active,o,i&&i.submission,i&&i.fetcherSubmission,i&&i.replace,i&&i.initialHydration===!0,c,m);g||(N=null,be(n,r({matches:_||s},tt(m),{loaderData:v,errors:b})))}async function we(t,n,r,a,o,s){if(s===void 0&&(s={}),qe(),B({navigation:xt(n,r)},{flushSync:s.flushSync===!0}),o){let e=await X(a,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=nt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:h.error,error:e.error}]}}else if(e.matches)a=e.matches;else{let{notFoundMatches:e,error:t,route:r}=kt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:h.error,error:t}]}}}let c,l=vt(a,n);if(!l.route.action&&!l.route.lazy)c={type:h.error,error:U(405,{method:t.method,pathname:n.pathname,routeId:l.route.id})};else if(c=(await Ue(`action`,A,t,[l],a,null))[l.route.id],t.signal.aborted)return{shortCircuited:!0};if(lt(c)){let n;return n=s&&s.replace!=null?s.replace:Xe(c.response.headers.get(`Location`),new URL(t.url),p,e.history)===A.location.pathname+A.location.search,await Ve(t,c,!0,{submission:r,replace:n}),{shortCircuited:!0}}if(ct(c))throw U(400,{type:`defer-action`});if(W(c)){let e=nt(a,l.route.id);return(s&&s.replace)!==!0&&(j=i.Push),{matches:a,pendingActionResult:[e.route.id,c]}}return{matches:a,pendingActionResult:[l.route.id,c]}}async function je(t,n,i,a,o,s,c,l,d,m,h){let g=o||bt(n,s),v=s||c||yt(g),y=!ae&&(!_.v7_partialHydration||!d);if(a){if(y){let e=Me(h);B(r({navigation:g},e===void 0?{}:{actionData:e}),{flushSync:m})}let e=await X(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){let t=nt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}else if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=kt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let b=f||u,[x,S]=Le(e.history,A,i,v,n,_.v7_partialHydration&&d===!0,_.v7_skipActionErrorRevalidation,oe,se,ce,R,fe,de,b,p,h);if(J(e=>!(i&&i.some(t=>t.route.id===e))||x&&x.some(t=>t.route.id===e)),ue=++le,x.length===0&&S.length===0){let e=pt();return be(n,r({matches:i,loaderData:{},errors:h&&W(h[1])?{[h[0]]:h[1].error}:null},tt(h),e?{fetchers:new Map(A.fetchers)}:{}),{flushSync:m}),{shortCircuited:!0}}if(y){let e={};if(!a){e.navigation=g;let t=Me(h);t!==void 0&&(e.actionData=t)}S.length>0&&(e.fetchers=Ne(S)),B(e,{flushSync:m})}S.forEach(e=>{dt(e.key),e.controller&&I.set(e.key,e.controller)});let C=()=>S.forEach(e=>dt(e.key));N&&N.signal.addEventListener(`abort`,C);let{loaderResults:w,fetcherResults:T}=await We(A,i,x,S,t);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,C),S.forEach(e=>I.delete(e.key));let E=it(w);if(E)return await Ve(t,E.result,!0,{replace:l}),{shortCircuited:!0};if(E=it(T),E)return de.add(E.key),await Ve(t,E.result,!0,{replace:l}),{shortCircuited:!0};let{loaderData:ee,errors:D}=$e(A,i,w,h,S,T,me);me.forEach((e,t)=>{e.subscribe(n=>{(n||e.done)&&me.delete(t)})}),_.v7_partialHydration&&d&&A.errors&&(D=r({},A.errors,D));let te=pt(),ne=_t(ue),O=te||ne||S.length>0;return r({matches:i,loaderData:ee,errors:D},O?{fetchers:new Map(A.fetchers)}:{})}function Me(e){if(e&&!W(e[1]))return{[e[0]]:e[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function Ne(e){return e.forEach(e=>{let t=A.fetchers.get(e.key),n=St(void 0,t?t.data:void 0);A.fetchers.set(e.key,n)}),new Map(A.fetchers)}function Ie(e,t,n,r){if(a)throw Error(`router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.`);dt(e);let i=(r&&r.flushSync)===!0,o=f||u,s=Pe(A.location,A.matches,p,_.v7_prependBasename,n,_.v7_relativeSplatPath,t,r?.relative),c=y(o,s,p),l=Nt(c,o,s);if(l.active&&l.matches&&(c=l.matches),!c){H(e,t,U(404,{pathname:s}),{flushSync:i});return}let{path:d,submission:m,error:h}=Fe(_.v7_normalizeFormMethod,!0,s,r);if(h){H(e,t,h,{flushSync:i});return}let g=vt(c,d),v=(r&&r.preventScrollReset)===!0;if(m&&G(m.formMethod)){ze(e,t,d,g,c,l.active,i,v,m);return}fe.set(e,{routeId:t,path:d}),Be(e,t,d,g,c,l.active,i,v,m)}async function ze(t,n,r,i,a,o,c,l,d){qe(),fe.delete(t);function m(e){return!e.route.action&&!e.route.lazy?(H(t,n,U(405,{method:d.formMethod,pathname:r,routeId:n}),{flushSync:c}),!0):!1}if(!o&&m(i))return;V(t,Ct(d,A.fetchers.get(t)),{flushSync:c});let h=new AbortController,g=Ze(e.history,r,h.signal,d);if(o){let e=await X(a,new URL(g.url).pathname,g.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){H(t,n,e.error,{flushSync:c});return}else if(!e.matches){H(t,n,U(404,{pathname:r}),{flushSync:c});return}else if(a=e.matches,i=vt(a,r),m(i))return}I.set(t,h);let v=le,b=(await Ue(`action`,A,g,[i],a,t))[i.route.id];if(g.signal.aborted){I.get(t)===h&&I.delete(t);return}if(_.v7_fetcherPersist&&R.has(t)){if(lt(b)||W(b)){V(t,wt(void 0));return}}else{if(lt(b))if(I.delete(t),ue>v){V(t,wt(void 0));return}else return de.add(t),V(t,St(d)),Ve(g,b,!1,{fetcherSubmission:d,preventScrollReset:l});if(W(b)){H(t,n,b.error);return}}if(ct(b))throw U(400,{type:`defer-action`});let x=A.navigation.location||A.location,S=Ze(e.history,x,h.signal),C=f||u,w=A.navigation.state===`idle`?A.matches:y(C,A.navigation.location,p);s(w,`Didn't find any matches after fetcher action`);let T=++le;L.set(t,T);let E=St(d,b.data);A.fetchers.set(t,E);let[ee,D]=Le(e.history,A,w,d,x,!1,_.v7_skipActionErrorRevalidation,oe,se,ce,R,fe,de,C,p,[i.route.id,b]);D.filter(e=>
3e.key!==t).forEach(e=>{let t=e.key,n=A.fetchers.get(t),r=St(void 0,n?n.data:void 0);A.fetchers.set(t,r),dt(t),e.controller&&I.set(t,e.controller)}),B({fetchers:new Map(A.fetchers)});let te=()=>D.forEach(e=>dt(e.key));h.signal.addEventListener(`abort`,te);let{loaderResults:ne,fetcherResults:O}=await We(A,w,ee,D,S);if(h.signal.aborted)return;h.signal.removeEventListener(`abort`,te),L.delete(t),I.delete(t),D.forEach(e=>I.delete(e.key));let k=it(ne);if(k)return Ve(S,k.result,!1,{preventScrollReset:l});if(k=it(O),k)return de.add(k.key),Ve(S,k.result,!1,{preventScrollReset:l});let{loaderData:M,errors:P}=$e(A,w,ne,void 0,D,O,me);if(A.fetchers.has(t)){let e=wt(b.data);A.fetchers.set(t,e)}_t(T),A.navigation.state===`loading`&&T>ue?(s(j,`Expected pending action`),N&&N.abort(),be(A.navigation.location,{matches:w,loaderData:M,errors:P,fetchers:new Map(A.fetchers)})):(B({errors:P,loaderData:et(A.loaderData,M,w,P),fetchers:new Map(A.fetchers)}),oe=!1)}async function Be(t,n,r,i,a,o,c,l,u){let d=A.fetchers.get(t);V(t,St(u,d?d.data:void 0),{flushSync:c});let f=new AbortController,p=Ze(e.history,r,f.signal);if(o){let e=await X(a,new URL(p.url).pathname,p.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){H(t,n,e.error,{flushSync:c});return}else if(e.matches)a=e.matches,i=vt(a,r);else{H(t,n,U(404,{pathname:r}),{flushSync:c});return}}I.set(t,f);let m=le,h=(await Ue(`loader`,A,p,[i],a,t))[i.route.id];if(ct(h)&&(h=await gt(h,p.signal,!0)||h),I.get(t)===f&&I.delete(t),!p.signal.aborted){if(R.has(t)){V(t,wt(void 0));return}if(lt(h))if(ue>m){V(t,wt(void 0));return}else{de.add(t),await Ve(p,h,!1,{preventScrollReset:l});return}if(W(h)){H(t,n,h.error);return}s(!ct(h),`Unhandled fetcher deferred data`),V(t,wt(h.data))}}async function Ve(a,o,c,l){let{submission:u,fetcherSubmission:f,preventScrollReset:m,replace:h}=l===void 0?{}:l;o.response.headers.has(`X-Remix-Revalidate`)&&(oe=!0);let g=o.response.headers.get(`Location`);s(g,`Expected a Location header on the redirect Response`),g=Xe(g,new URL(a.url),p,e.history);let _=d(A.location,g,{_isRedirect:!0});if(n){let n=!1;if(o.response.headers.has(`X-Remix-Reload-Document`))n=!0;else if(ke.test(g)){let r=e.history.createURL(g);n=r.origin!==t.location.origin||F(r.pathname,p)==null}if(n){h?t.location.replace(g):t.location.assign(g);return}}N=null;let v=h===!0||o.response.headers.has(`X-Remix-Replace`)?i.Replace:i.Push,{formMethod:y,formAction:b,formEncType:x}=A.navigation;!u&&!f&&y&&b&&x&&(u=yt(A.navigation));let S=u||f;Te.has(o.response.status)&&S&&G(S.formMethod)?await Ce(v,_,{submission:r({},S,{formAction:g}),preventScrollReset:m||M,enableViewTransition:c?P:void 0}):await Ce(v,_,{overrideNavigation:bt(_,u),fetcherSubmission:f,preventScrollReset:m||M,enableViewTransition:c?P:void 0})}async function Ue(e,t,n,r,i,a){let s,c={};try{s=await Ke(m,e,t,n,r,i,a,l,o)}catch(e){return r.forEach(t=>{c[t.route.id]={type:h.error,error:e}}),c}for(let[e,t]of Object.entries(s))if(st(t)){let r=t.result;c[e]={type:h.redirect,response:Ye(r,n,e,i,p,_.v7_relativeSplatPath)}}else c[e]=await Je(t);return c}async function We(t,n,r,i,a){let o=t.matches,s=Ue(`loader`,t,a,r,n,null),c=Promise.all(i.map(async n=>{if(n.matches&&n.match&&n.controller){let r=(await Ue(`loader`,t,Ze(e.history,n.path,n.controller.signal),[n.match],n.matches,n.key))[n.match.route.id];return{[n.key]:r}}else return Promise.resolve({[n.key]:{type:h.error,error:U(404,{pathname:n.path})}})})),l=await s,u=(await c).reduce((e,t)=>Object.assign(e,t),{});return await Promise.all([mt(n,l,a.signal,o,t.loaderData),ht(n,u,i)]),{loaderResults:l,fetcherResults:u}}function qe(){oe=!0,se.push(...J()),fe.forEach((e,t)=>{I.has(t)&&ce.add(t),dt(t)})}function V(e,t,n){n===void 0&&(n={}),A.fetchers.set(e,t),B({fetchers:new Map(A.fetchers)},{flushSync:(n&&n.flushSync)===!0})}function H(e,t,n,r){r===void 0&&(r={});let i=nt(A.matches,t);at(e),B({errors:{[i.route.id]:n},fetchers:new Map(A.fetchers)},{flushSync:(r&&r.flushSync)===!0})}function Qe(e){return pe.set(e,(pe.get(e)||0)+1),R.has(e)&&R.delete(e),A.fetchers.get(e)||De}function at(e){let t=A.fetchers.get(e);I.has(e)&&!(t&&t.state===`loading`&&L.has(e))&&dt(e),fe.delete(e),L.delete(e),de.delete(e),_.v7_fetcherPersist&&R.delete(e),ce.delete(e),A.fetchers.delete(e)}function ut(e){let t=(pe.get(e)||0)-1;t<=0?(pe.delete(e),R.add(e),_.v7_fetcherPersist||at(e)):pe.set(e,t),B({fetchers:new Map(A.fetchers)})}function dt(e){let t=I.get(e);t&&(t.abort(),I.delete(e))}function ft(e){for(let t of e){let e=wt(Qe(t).data);A.fetchers.set(t,e)}}function pt(){let e=[],t=!1;for(let n of de){let r=A.fetchers.get(n);s(r,`Expected fetcher: `+n),r.state===`loading`&&(de.delete(n),e.push(n),t=!0)}return ft(e),t}function _t(e){let t=[];for(let[n,r]of L)if(r<e){let e=A.fetchers.get(n);s(e,`Expected fetcher: `+n),e.state===`loading`&&(dt(n),L.delete(n),t.push(n))}return ft(t),t.length>0}function K(e,t){let n=A.blockers.get(e)||Oe;return z.get(e)!==t&&z.set(e,t),n}function Dt(e){A.blockers.delete(e),z.delete(e)}function q(e,t){let n=A.blockers.get(e)||Oe;s(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),B({blockers:r})}function Ot(e){let{currentLocation:t,nextLocation:n,historyAction:r}=e;if(z.size===0)return;z.size>1&&c(!1,`A router only supports one blocker at a time`);let i=Array.from(z.entries()),[a,o]=i[i.length-1],s=A.blockers.get(a);if(!(s&&s.state===`proceeding`)&&o({currentLocation:t,nextLocation:n,historyAction:r}))return a}function kt(e){let t=U(404,{pathname:e}),{matches:n,route:r}=rt(f||u);return J(),{notFoundMatches:n,route:r,error:t}}function J(e){let t=[];return me.forEach((n,r)=>{(!e||e(r))&&(n.cancel(),t.push(r),me.delete(r))}),t}function At(e,t,n){if(w=e,E=t,T=n||null,!ee&&A.navigation===Ee){ee=!0;let e=Mt(A.location,A.matches);e!=null&&B({restoreScrollPosition:e})}return()=>{w=null,E=null,T=null}}function Y(e,t){return T&&T(e,t.map(e=>x(e,A.loaderData)))||e.key}function jt(e,t){if(w&&E){let n=Y(e,t);w[n]=E()}}function Mt(e,t){if(w){let n=Y(e,t),r=w[n];if(typeof r==`number`)return r}return null}function Nt(e,t,n){if(g){if(!e)return{active:!0,matches:b(t,n,p,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:b(t,n,p,!0)}}return{active:!1,matches:null}}async function X(e,t,n,r){if(!g)return{type:`success`,matches:e};let i=e;for(;;){let e=f==null,a=f||u,s=l;try{await g({signal:n,path:t,matches:i,fetcherKey:r,patch:(e,t)=>{n.aborted||He(e,t,a,s,o)}})}catch(e){return{type:`error`,error:e,partialMatches:i}}finally{e&&!n.aborted&&(u=[...u])}if(n.aborted)return{type:`aborted`};let c=y(a,t,p);if(c)return{type:`success`,matches:c};let d=b(a,t,p,!0);if(!d||i.length===d.length&&i.every((e,t)=>e.route.id===d[t].route.id))return{type:`success`,matches:null};i=d}}function Pt(e){l={},f=v(e,o,void 0,l)}function Ft(e,t){let n=f==null;He(e,t,f||u,l,o),n&&(u=[...u],B({}))}return k={get basename(){return p},get future(){return _},get state(){return A},get routes(){return u},get window(){return t},initialize:ge,subscribe:ve,enableScrollRestoration:At,navigate:xe,fetch:Ie,revalidate:Se,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Qe,deleteFetcher:ut,dispose:_e,getBlocker:K,deleteBlocker:Dt,patchRoutes:Ft,_internalFetchControllers:I,_internalActiveDeferreds:me,_internalSetRoutes:Pt},k}function Ne(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`
3in e&&e.body!==void 0)}function Pe(e,t,n,r,i,a,o,s){let c,l;if(o){c=[];for(let e of t)if(c.push(e),e.route.id===o){l=e;break}}else c=t,l=t[t.length-1];let u=le(i||`.`,I(c,a),F(e.pathname,n)||e.pathname,s===`path`);if(i??(u.search=e.search,u.hash=e.hash),(i==null||i===``||i===`.`)&&l){let e=_t(u.search);if(l.route.index&&!e)u.search=u.search?u.search.replace(/^\?/,`?index&`):`?index`;else if(!l.route.index&&e){let e=new URLSearchParams(u.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();u.search=n?`?`+n:``}}return r&&n!==`/`&&(u.pathname=u.pathname===`/`?n:L([n,u.pathname])),f(u)}function Fe(e,t,n,r){if(!r||!Ne(r))return{path:n};if(r.formMethod&&!pt(r.formMethod))return{path:n,error:U(405,{method:r.formMethod})};let i=()=>({path:n,error:U(400,{type:`invalid-body`})}),a=r.formMethod||`get`,o=e?a.toUpperCase():a.toLowerCase(),c=at(n);if(r.body!==void 0){if(r.formEncType===`text/plain`){if(!G(o))return i();let e=typeof r.body==`string`?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,t)=>{let[n,r]=t;return``+e+n+`=`+r+`
4`},``):String(r.body);return{path:n,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if(r.formEncType===`application/json`){if(!G(o))return i();try{let e=typeof r.body==`string`?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:c,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch{return i()}}}s(typeof FormData==`function`,`FormData is not available in this environment`);let l,u;if(r.formData)l=V(r.formData),u=r.formData;else if(r.body instanceof FormData)l=V(r.body),u=r.body;else if(r.body instanceof URLSearchParams)l=r.body,u=H(l);else if(r.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(r.body),u=H(l)}catch{return i()}let d={formMethod:o,formAction:c,formEncType:r&&r.formEncType||`application/x-www-form-urlencoded`,formData:u,json:void 0,text:void 0};if(G(d.formMethod))return{path:n,submission:d};let m=p(n);return t&&m.search&&_t(m.search)&&l.append(`index`,``),m.search=`?`+l,{path:f(m),submission:d}}function Ie(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(e=>e.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Le(e,t,n,i,a,o,s,c,l,u,d,f,p,m,h,g){let _=g?W(g[1])?g[1].error:g[1].data:void 0,v=e.createURL(t.location),b=e.createURL(a),x=n;o&&t.errors?x=Ie(n,Object.keys(t.errors)[0],!0):g&&W(g[1])&&(x=Ie(n,g[0]));let S=g?g[1].statusCode:void 0,C=s&&S&&S>=400,w=x.filter((e,n)=>{let{route:a}=e;if(a.lazy)return!0;if(a.loader==null)return!1;if(o)return Re(a,t.loaderData,t.errors);if(ze(t.loaderData,t.matches[n],e)||l.some(t=>t===e.route.id))return!0;let s=t.matches[n],u=e;return Ve(e,r({currentUrl:v,currentParams:s.params,nextUrl:b,nextParams:u.params},i,{actionResult:_,actionStatus:S,defaultShouldRevalidate:C?!1:c||v.pathname+v.search===b.pathname+b.search||v.search!==b.search||Be(s,u)}))}),T=[];return f.forEach((e,a)=>{if(o||!n.some(t=>t.route.id===e.routeId)||d.has(a))return;let s=y(m,e.path,h);if(!s){T.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}let l=t.fetchers.get(a),f=vt(s,e.path),g=!1;p.has(a)?g=!1:u.has(a)?(u.delete(a),g=!0):g=l&&l.state!==`idle`&&l.data===void 0?c:Ve(f,r({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:n[n.length-1].params},i,{actionResult:_,actionStatus:S,defaultShouldRevalidate:C?!1:c})),g&&T.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:f,controller:new AbortController})}),[w,T]}function Re(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader==`function`&&e.loader.hydrate===!0?!0:!r&&!i}function ze(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function Be(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Ve(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function He(e,t,n,r,i){let a;if(e){let t=r[e];s(t,`No route found to patch children into: routeId = `+e),t.children||=[],a=t.children}else a=n;let o=v(t.filter(e=>!a.some(t=>Ue(e,t))),i,[e||`_`,`patch`,String(a?.length||`0`)],r);a.push(...o)}function Ue(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=>Ue(e,t))):!1}async function We(e,t,n){if(!e.lazy)return;let i=await e.lazy();if(!e.lazy)return;let a=n[e.id];s(a,`No route found in manifest`);let o={};for(let e in i){let t=a[e]!==void 0&&e!==`hasErrorBoundary`;c(!t,`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.`)),!t&&!g.has(e)&&(o[e]=i[e])}Object.assign(a,o),Object.assign(a,r({},t(a),{lazy:void 0}))}async function Ge(e){let{matches:t}=e,n=t.filter(e=>e.shouldLoad);return(await Promise.all(n.map(e=>e.resolve()))).reduce((e,t,r)=>Object.assign(e,{[n[r].route.id]:t}),{})}async function Ke(e,t,n,i,a,o,s,c,l,u){let d=o.map(e=>e.route.lazy?We(e.route,l,c):void 0),f=await e({matches:o.map((e,n)=>{let o=d[n],s=a.some(t=>t.route.id===e.route.id);return r({},e,{shouldLoad:s,resolve:async n=>(n&&i.method===`GET`&&(e.route.lazy||e.route.loader)&&(s=!0),s?qe(t,i,e,o,n,u):Promise.resolve({type:h.data,result:void 0}))})}),request:i,params:o[0].params,fetcherKey:s,context:u});try{await Promise.all(d)}catch{}return f}async function qe(e,t,n,r,i,a){let o,c,l=r=>{let o,s=new Promise((e,t)=>
4o=t);c=()=>o(),t.signal.addEventListener(`abort`,c);let l=i=>typeof r==`function`?r({request:t,params:n.params,context:a},...i===void 0?[]:[i]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean `+(`"`+e+`" [routeId: `+n.route.id+`]`))),u=(async()=>{try{return{type:`data`,result:await(i?i(e=>l(e)):l())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([u,s])};try{let i=n.route[e];if(r)if(i){let e,[t]=await Promise.all([l(i).catch(t=>{e=t}),r]);if(e!==void 0)throw e;o=t}else if(await r,i=n.route[e],i)o=await l(i);else if(e===`action`){let e=new URL(t.url),r=e.pathname+e.search;throw U(405,{method:t.method,pathname:r,routeId:n.route.id})}else return{type:h.data,result:void 0};else if(i)o=await l(i);else{let e=new URL(t.url);throw U(404,{pathname:e.pathname+e.search})}s(o.result!==void 0,`You defined `+(e===`action`?`an action`:`a loader`)+` for route `+(`"`+n.route.id+`" but didn't return anything from your \``+e+"` ")+"function. Please return a value or `null`.")}catch(e){return{type:h.error,result:e}}finally{c&&t.signal.removeEventListener(`abort`,c)}return o}async function Je(e){let{result:t,type:n}=e;if(ft(t)){let e;try{let n=t.headers.get(`Content-Type`);e=n&&/\bapplication\/json\b/.test(n)?t.body==null?null:await t.json():await t.text()}catch(e){return{type:h.error,error:e}}return n===h.error?{type:h.error,error:new B(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:h.data,data:e,statusCode:t.status,headers:t.headers}}if(n===h.error){if(ut(t)){var r;if(t.data instanceof Error){var i;return{type:h.error,error:t.data,statusCode:t.init?.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:h.error,error:new B(t.init?.status||500,void 0,t.data),statusCode:ye(t)?t.status:void 0,headers:(r=t.init)!=null&&r.headers?new Headers(t.init.headers):void 0}}return{type:h.error,error:t,statusCode:ye(t)?t.status:void 0}}if(dt(t))return{type:h.deferred,deferredData:t,statusCode:t.init?.status,headers:t.init?.headers&&new Headers(t.init.headers)};if(ut(t)){var a;return{type:h.data,data:t.data,statusCode:t.init?.status,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:h.data,data:t}}function Ye(e,t,n,r,i,a){let o=e.headers.get(`Location`);if(s(o,`Redirects returned/thrown from loaders/actions must have a Location header`),!ke.test(o)){let s=r.slice(0,r.findIndex(e=>e.route.id===n)+1);o=Pe(new URL(t.url),s,i,!0,o,a),e.headers.set(`Location`,o)}return e}function Xe(e,t,n,r){let i=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];if(ke.test(e)){let r=e,a=r.startsWith(`//`)?new URL(t.protocol+r):new URL(r);if(i.includes(a.protocol))throw Error(`Invalid redirect location`);let o=F(a.pathname,n)!=null;if(a.origin===t.origin&&o)return ue(a.pathname)+a.search+a.hash}try{let t=r.createURL(e);if(i.includes(t.protocol))throw Error(`Invalid redirect location`)}catch{}return e}function Ze(e,t,n,r){let i=e.createURL(at(t)).toString(),a={signal:n};if(r&&G(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=V(r.formData):a.body=r.formData}return new Request(i,a)}function V(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function H(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Qe(e,t,n,r,i){let a={},o=null,c,l=!1,u={},d=n&&W(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(s(!lt(p),`Cannot handle redirect results in processLoaderData`),W(p)){let t=p.error;if(d!==void 0&&(t=d,d=void 0),o||={},i)o[f]=t;else{let n=nt(e,f);o[n.route.id]??(o[n.route.id]=t)}a[f]=void 0,l||(l=!0,c=ye(p.error)?p.error.status:500),p.headers&&(u[f]=p.headers)}else ct(p)?(r.set(f,p.deferredData),a[f]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!l&&(c=p.statusCode),p.headers&&(u[f]=p.headers)):(a[f]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(c=p.statusCode),p.headers&&(u[f]=p.headers))}),d!==void 0&&n&&(o={[n[0]]:d},a[n[0]]=void 0),{loaderData:a,errors:o,statusCode:c||200,loaderHeaders:u}}function $e(e,t,n,i,a,o,c){let{loaderData:l,errors:u}=Qe(t,n,i,c,!1);return a.forEach(t=>{let{key:n,match:i,controller:a}=t,c=o[n];if(s(c,`Did not find corresponding fetcher result`),!(a&&a.signal.aborted))if(W(c)){let t=nt(e.matches,i?.route.id);u&&u[t.route.id]||(u=r({},u,{[t.route.id]:c.error})),e.fetchers.delete(n)}else if(lt(c))s(!1,`Unhandled fetcher revalidation redirect`);else if(ct(c))s(!1,`Unhandled fetcher deferred data`);else{let t=wt(c.data);e.fetchers.set(n,t)}}),{loaderData:l,errors:u}}function et(e,t,n,i){let a=r({},t);for(let r of n){let n=r.route.id;if(t.hasOwnProperty(n)?t[n]!==void 0&&(a[n]=t[n]):e[n]!==void 0&&r.route.loader&&(a[n]=e[n]),i&&i.hasOwnProperty(n))break}return a}function tt(e){return e?W(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function nt(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 rt(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 U(e,t){let{pathname:n,routeId:r,method:i,type:a,message:o}=t===void 0?{}:t,s=`Unknown Server Error`,c=`Unknown @remix-run/router error`;return e===400?(s=`Bad Request`,i&&n&&r?c=`You made a `+i+` request to "`+n+`" but `+('did not provide a `loader` for route "'+r+`", `)+`so there is no way to handle the request.`:a===`defer-action`?c=`defer() is not supported in actions`:a===`invali
4d-body`&&(c=`Unable to encode submission body`)):e===403?(s=`Forbidden`,c=`Route "`+r+`" does not match URL "`+n+`"`):e===404?(s=`Not Found`,c=`No route matches URL "`+n+`"`):e===405&&(s=`Method Not Allowed`,i&&n&&r?c=`You made a `+i.toUpperCase()+` request to "`+n+`" but `+('did not provide an `action` for route "'+r+`", `)+`so there is no way to handle the request.`:i&&(c=`Invalid request method "`+i.toUpperCase()+`"`)),new B(e||500,s,Error(c),!0)}function it(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(lt(r))return{key:n,result:r}}}function at(e){let t=typeof e==`string`?p(e):e;return f(r({},t,{hash:``}))}function ot(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash?!0:t.hash!==``}function st(e){return ft(e.result)&&we.has(e.result.status)}function ct(e){return e.type===h.deferred}function W(e){return e.type===h.error}function lt(e){return(e&&e.type)===h.redirect}function ut(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function dt(e){let t=e;return t&&typeof t==`object`&&typeof t.data==`object`&&typeof t.subscribe==`function`&&typeof t.cancel==`function`&&typeof t.resolveData==`function`}function ft(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function pt(e){return Ce.has(e.toLowerCase())}function G(e){return xe.has(e.toLowerCase())}async function mt(e,t,n,r,i){let a=Object.entries(t);for(let o=0;o<a.length;o++){let[s,c]=a[o],l=e.find(e=>e?.route.id===s);if(!l)continue;let u=r.find(e=>e.route.id===l.route.id),d=u!=null&&!Be(u,l)&&(i&&i[l.route.id])!==void 0;ct(c)&&d&&await gt(c,n,!1).then(e=>{e&&(t[s]=e)})}}async function ht(e,t,n){for(let r=0;r<n.length;r++){let{key:i,routeId:a,controller:o}=n[r],c=t[i];e.find(e=>e?.route.id===a)&&ct(c)&&(s(o,`Expected an AbortController for revalidating fetcher deferred result`),await gt(c,o.signal,!0).then(e=>{e&&(t[i]=e)}))}}async function gt(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:h.data,data:e.deferredData.unwrappedData}}catch(e){return{type:h.error,error:e}}return{type:h.data,data:e.deferredData.data}}}function _t(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function vt(e,t){let n=typeof t==`string`?p(t).search:t.search;if(e[e.length-1].route.index&&_t(n||``))return e[e.length-1];let r=ce(e);return r[r.length-1]}function yt(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 bt(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 xt(e,t){return{state:`submitting`,location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function St(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Ct(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 wt(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 Tt(e,t){try{let n=e.sessionStorage.getItem(je);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 Et(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(je,JSON.stringify(n))}catch(e){c(!1,`Failed to save applied view transitions in sessionStorage (`+e+`).`)}}}var K=e(t());function Dt(){return Dt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dt.apply(null,arguments)}var q=K.createContext(null),Ot=K.createContext(null),kt=K.createContext(null),J=K.createContext(null),At=K.createContext(null),Y=K.createContext({outlet:null,matches:[],isDataRoute:!1}),jt=K.createContext(null);function Mt(e,t){let{relative:n}=t===void 0?{}:t;!Nt()&&s(!1);let{basename:r,navigator:i}=K.useContext(J),{hash:a,pathname:o,search:c}=Ht(e,{relative:n}),l=o;return r!==`/`&&(l=o===`/`?r:L([r,o])),i.createHref({pathname:l,search:c,hash:a})}function Nt(){return K.useContext(At)!=null}function X(){return!Nt()&&s(!1),K.useContext(At).location}function Pt(){return K.useContext(At).navigationType}function Ft(e){K.useContext(J).static||K.useLayoutEffect(e)}function It(){let{isDataRoute:e}=K.useContext(Y);
4return e?dn():Lt()}function Lt(){!Nt()&&s(!1);let e=K.useContext(q),{basename:t,future:n,navigator:r}=K.useContext(J),{matches:i}=K.useContext(Y),{pathname:a}=X(),o=JSON.stringify(I(i,n.v7_relativeSplatPath)),c=K.useRef(!1);return Ft(()=>{c.current=!0}),K.useCallback(function(n,i){if(i===void 0&&(i={}),!c.current)return;if(typeof n==`number`){r.go(n);return}let s=le(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(s.pathname=s.pathname===`/`?t:L([t,s.pathname])),(i.replace?r.replace:r.push)(s,i.state,i)},[t,r,o,a,e])}var Rt=K.createContext(null);function zt(){return K.useContext(Rt)}function Bt(e){let t=K.useContext(Y).outlet;return t&&K.createElement(Rt.Provider,{value:e},t)}function Vt(){let{matches:e}=K.useContext(Y),t=e[e.length-1];return t?t.params:{}}function Ht(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=K.useContext(J),{matches:i}=K.useContext(Y),{pathname:a}=X(),o=JSON.stringify(I(i,r.v7_relativeSplatPath));return K.useMemo(()=>le(e,JSON.parse(o),a,n===`path`),[e,o,a,n])}function Ut(e,t,n,r){!Nt()&&s(!1);let{navigator:a}=K.useContext(J),{matches:o}=K.useContext(Y),c=o[o.length-1],l=c?c.params:{};c&&c.pathname;let u=c?c.pathnameBase:`/`;c&&c.route;let d=X(),f;if(t){let e=typeof t==`string`?p(t):t;!(u===`/`||e.pathname?.startsWith(u))&&s(!1),f=e}else f=d;let m=f.pathname||`/`,h=m;if(u!==`/`){let e=u.replace(/^\//,``).split(`/`);h=`/`+m.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=y(e,{pathname:h}),_=Jt(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:L([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?u:L([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,n,r);return t&&_?K.createElement(At.Provider,{value:{location:Dt({pathname:`/`,search:``,hash:``,state:null,key:`default`},f),navigationType:i.Pop}},_):_}function Wt(){let e=cn(),t=ye(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return K.createElement(K.Fragment,null,K.createElement(`h2`,null,`Unexpected Application Error!`),K.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?K.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Gt=K.createElement(Wt,null),Kt=class extends K.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){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:K.createElement(Y.Provider,{value:this.props.routeContext},K.createElement(jt.Provider,{value:this.state.error,children:this.props.component}))}};function qt(e){let{routeContext:t,match:n,children:r}=e,i=K.useContext(q);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),K.createElement(Y.Provider,{value:t},r)}function Jt(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&s(!1),a=a.slice(0,Math.min(a.length,e+1))}let c=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){c=!0,a=l>=0?a.slice(0,l+1):[a[0]];break}}}
4return a.reduceRight((e,r,i)=>{let s,u=!1,d=null,f=null;n&&(s=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||Gt,c&&(l<0&&i===0?(pn(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):l===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=s?d:u?f:r.route.Component?K.createElement(r.route.Component,null):r.route.element?r.route.element:e,K.createElement(qt,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?K.createElement(Kt,{location:n.location,revalidation:n.revalidation,component:d,error:s,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Yt=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(Yt||{}),Z=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}(Z||{});function Xt(e){let t=K.useContext(q);return!t&&s(!1),t}function Zt(e){let t=K.useContext(Ot);return!t&&s(!1),t}function Qt(e){let t=K.useContext(Y);return!t&&s(!1),t}function $t(e){let t=Qt(e),n=t.matches[t.matches.length-1];return!n.route.id&&s(!1),n.route.id}function en(){return $t(Z.UseRouteId)}function tn(){return Zt(Z.UseNavigation).navigation}function nn(){let e=Xt(Yt.UseRevalidator),t=Zt(Z.UseRevalidator);return K.useMemo(()=>({revalidate:e.router.revalidate,state:t.revalidation}),[e.router.revalidate,t.revalidation])}function rn(){let{matches:e,loaderData:t}=Zt(Z.UseMatches);return K.useMemo(()=>e.map(e=>x(e,t)),[e,t])}function an(){let e=Zt(Z.UseLoaderData),t=$t(Z.UseLoaderData);if(e.errors&&e.errors[t]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+`)`);return}return e.loaderData[t]}function on(e){return Zt(Z.UseRouteLoaderData).loaderData[e]}function sn(){let e=Zt(Z.UseActionData),t=$t(Z.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function cn(){let e=K.useContext(jt),t=Zt(Z.UseRouteError),n=$t(Z.UseRouteError);return e===void 0?t.errors?.[n]:e}function ln(){return K.useContext(kt)?._data}function un(){return K.useContext(kt)?._error}function dn(){let{router:e}=Xt(Yt.UseNavigateStable),t=$t(Z.UseNavigateStable),n=K.useRef(!1);return Ft(()=>{n.current=!0}),K.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,Dt({fromRouteId:t},i)))},[e,t])}var fn={};function pn(e,t,n){!t&&!fn[e]&&(fn[e]=!0)}var mn=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function hn(e,t){e?.v7_startTransition===void 0&&mn(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&mn(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&mn(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&mn(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&mn(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&mn(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}function gn(e){return Bt(e.context)}function _n(e){let{basename:t=`/`,children:n=null,location:r,navigationType:a=i.Pop,navigator:o,static:c=!1,future:l}=e;Nt()&&s(!1);let u=t.replace(/^\/*/,`/`),d=K.useMemo(()=>({basename:u,navigator:o,static:c,future:Dt({v7_relativeSplatPath:!1},l)}),[u,l,o,c]);typeof r==`string`&&(r=p(r));let{pathname:f=`/`,search:m=``,hash:h=``,state:g=null,key:_=`default`}=r,v=K.useMemo(()=>{let e=F(f,u);return e==null?null:{location:{pathname:e,search:m,hash:h,state:g,key:_},navigationType:a}},[u,f,m,h,g,_,a]);return v==null?null:K.createElement(J.Provider,{value:d},K.createElement(At.Provider,{children:n,value:v}))}function vn(e){let{children:t,errorElement:n,resolve:r}=e;return K.createElement(bn,{resolve:r,errorElement:n},K.createElement(xn,null,t))}
4var Q=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(Q||{}),yn=new Promise(()=>{}),bn=class extends K.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error(`<Await> caught the following error during render`,e,t)}render(){let{children:e,errorElement:t,resolve:n}=this.props,r=null,i=Q.pending;if(!(n instanceof Promise))i=Q.success,r=Promise.resolve(),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_data",{get:()=>n});else if(this.state.error){i=Q.error;let e=this.state.error;r=Promise.reject().catch(()=>{}),Object.defineProperty(r,"_tracked",{get:()=>!0}),Object.defineProperty(r,"_error",{get:()=>e})}else n._tracked?(r=n,i=`_error`in r?Q.error:`_data`in r?Q.success:Q.pending):(i=Q.pending,Object.defineProperty(n,"_tracked",{get:()=>!0}),r=n.then(e=>Object.defineProperty(n,"_data",{get:()=>e}),e=>Object.defineProperty(n,"_error",{get:()=>e})));if(i===Q.error&&r._error instanceof z)throw yn;if(i===Q.error&&!t)throw r._error;if(i===Q.error)return K.createElement(kt.Provider,{value:r,children:t});if(i===Q.success)return K.createElement(kt.Provider,{value:r,children:e});throw r}};function xn(e){let{children:t}=e,n=ln(),r=typeof t==`function`?t(n):t;return K.createElement(K.Fragment,null,r)}function Sn(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:K.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:K.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:K.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}var Cn=e(n());function wn(){return wn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wn.apply(null,arguments)}function Tn(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var En=`get`,Dn=`application/x-www-form-urlencoded`;function On(e){return e!=null&&typeof e.tagName==`string`}function kn(e){return On(e)&&e.tagName.toLowerCase()===`button`}function An(e){return On(e)&&e.tagName.toLowerCase()===`form`}function jn(e){return On(e)&&e.tagName.toLowerCase()===`input`}function Mn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nn(e,t){return e.button===0&&(!t||t===`_self`)&&!Mn(e)}function Pn(e){return e===void 0&&(e=``),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 Fn(e,t){let n=Pn(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var In=null;function Ln(){if(In===null)try{new FormData(document.createElement(`form`),0),In=!1}catch{In=!0}return In}var Rn=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function zn(e){return e!=null&&!Rn.has(e)?null:e}function Bn(e,t){let n,r,i,a,o;if(An(e)){let o=e.getAttribute(`action`);r=o?F(o,t):null,n=e.getAttribute(`method`)||En,i=zn(e.getAttribute(`enctype`))||Dn,a=new FormData(e)}else if(kn(e)||jn(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?F(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||En,i=zn(e.getAttribute(`formenctype`))||zn(o.getAttribute(`enctype`))||Dn,a=new FormData(o,e),!Ln()){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(On(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=En,r=null,i=Dn,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Vn=[`onClick`,`relative`,`reloadDocument`,`replace`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`],Hn=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],Un=[`fetcherKey`,`navigate`,`reloadDocument`,`replace`,`state`,`method`,`action`,`onSubmit`,`relative`,`preventScrollReset`,`viewTransition`],Wn=`6`;try{window.__reactRouterVersion=Wn}catch{}var Gn=K.createContext({isTransitioning:!1}),Kn=K.createContext(new Map),qn=K.startTransition,Jn=Cn.flushSync,Yn=K.useId;function Xn(e){qn?qn(e):e()}function Zn(e){Jn?Jn(e):e()}var Qn=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 $n(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=K.useState(n.state),[o,s]=K.useState(),[c,l]=K.useState({isTransitioning:!1}),[u,d]=K.useState(),[f,p]=K.useState(),[m,h]=K.useState(),g=K.useRef(new Map),{v7_startTransition:_}=r||{},v=K.useCallback(e=>{_?Xn(e):e()},[_]),y=K.useCallback((e,t)=>{let{deletedFetchers:r,flushSync:i,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{e.data!==void 0&&g.current.set(t,e.data)}),r.forEach(e=>g.current.delete(e));let c=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!=`function`;if(!o||c){i?Zn(()=>a(e)):v(()=>a(e));return}if(i){Zn(()=>{f&&(u&&u.resolve(),f.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});let t=n.window.document.startViewTransition(()=>{Zn(()=>a(e))});t.finished.finally(()=>{Zn(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),Zn(()=>p(t));return}f?(u&&u.resolve(),f.skipTransition(),h({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(s(e),l({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))},[n.window,f,u,g,v]);K.useLayoutEffect(()=>n.subscribe(y),[n,y]),K.useEffect(()=>{c.isTransitioning&&!c.flushSync&&d(new Qn)},[c]),K.useEffect(()=>{if(u&&o&&n.window){let e=o,t=u.promise,r=n.window.document.startViewTransition(async()=>{v(()=>a(e)),await t});r.finished.finally(()=>{d(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(r)}},[v,o,u,n.window]),K.useEffect(()=>{u&&o&&i.location.key===o.location.key&&u.resolve()},[u,f,i.location,o]),K.useEffect(()=>{!c.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),h(void 0))},[c.isTransitioning,m]),K.useEffect(()=>{},[]);let b=K.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:r?.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:r?.preventScrollReset})}),[n]),x=n.basename||`/`,S=K.useMemo(()=>({router:n,navigator:b,static:!1,basename:x}),[n,b,x]),C=K.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return K.useEffect(()=>hn(r,n.future),[r,n.future]),K.createElement(K.Fragment,null,K.createElement(q.Provider,{value:S},K.createElement(Ot.Provider,{value:i},K.createElement(Kn.Provider,{value:g.current},K.createElement(Gn.Provider,{value:c},K.createElement(_n,{basename:x,location:i.location,navigationType:i.historyAction,navigator:b,future:C},i.initialized||n.future.v7_partialHydration?K.createElement(er,{routes:n.routes,future:n.future,state:i}):t))))),null)}var er=K.memo(tr);function tr(e){let{routes:t,future:n,state:r}=e;return Ut(t,void 0,r,n)}var nr=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,rr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ir=K.forwardRef(function(e,t){let{onClick:n,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u}=e,d=Tn(e,Vn),{basename:f}=K.useContext(J),p,m=!1;if(typeof c==`string`&&rr.test(c)&&(p=c,nr))try{let e=new URL(window.location.href),t=c.startsWith(`//`)?new URL(e.protocol+c):new URL(c),n=F(t.pathname,f);t.origin===e.origin&&n!=null?c=n+t.search+t.hash:m=!0}catch{}let h=Mt(c,{relative:r}),g=dr(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u});function _(e){n&&n(e),e.defaultPrevented||g(e)}return K.createElement(`a`,wn({},d,{href:p||h,onClick:m||i?n:_,ref:t,target:s}))}),ar=K.forwardRef(function(e,t){let{"aria-current":n=`page`,caseSensitive:r=!1,className:i=``,end:a=!1,style:o,to:s,viewTransition:c,children:l}=e,u=Tn(e,Hn),d=Ht(s,{relative:u.relative}),f=X(),p=K.useContext(Ot),{navigator:m,basename:h}=K.useContext(J),g=p!=null&&yr(d)&&c===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=F(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!a&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!a&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?n:void 0,T;T=typeof i==`function`?i(C):[i,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(
4Boolean).join(` `);let E=typeof o==`function`?o(C):o;return K.createElement(ir,wn({},u,{"aria-current":w,className:T,ref:t,style:E,to:s,viewTransition:c}),typeof l==`function`?l(C):l)}),or=K.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:o,method:s=En,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f}=e,p=Tn(e,Un),m=gr(),h=_r(c,{relative:u}),g=s.toLowerCase()===`get`?`get`:`post`;return K.createElement(`form`,wn({ref:t,method:g,action:h,onSubmit:i?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,i=t?.getAttribute(`formmethod`)||s;m(t||e.currentTarget,{fetcherKey:n,method:i,navigate:r,replace:a,state:o,relative:u,preventScrollReset:d,viewTransition:f})}},p))}),sr;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(sr||={});var cr;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(cr||={});function lr(e){let t=K.useContext(q);return!t&&s(!1),t}function ur(e){let t=K.useContext(Ot);return!t&&s(!1),t}function dr(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=It(),l=X(),u=Ht(e,{relative:o});return K.useCallback(t=>{Nn(t,n)&&(t.preventDefault(),c(e,{replace:r===void 0?f(l)===f(u):r,state:i,preventScrollReset:a,relative:o,viewTransition:s}))},[l,c,u,r,i,n,e,a,o,s])}function fr(e){let t=K.useRef(Pn(e)),n=K.useRef(!1),r=X(),i=K.useMemo(()=>Fn(r.search,n.current?null:t.current),[r.search]),a=It();return[i,K.useCallback((e,t)=>{let r=Pn(typeof e==`function`?e(i):e);n.current=!0,a(`?`+r,t)},[a,i])]}function pr(){if(typeof document>`u`)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}var mr=0,hr=()=>`__`+String(++mr)+`__`;function gr(){let{router:e}
4=lr(sr.UseSubmit),{basename:t}=K.useContext(J),n=en();return K.useCallback(function(r,i){i===void 0&&(i={}),pr();let{action:a,method:o,encType:s,formData:c,body:l}=Bn(r,t);if(i.navigate===!1){let t=i.fetcherKey||hr();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 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 _r(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=K.useContext(J),i=K.useContext(Y);!i&&s(!1);let[a]=i.matches.slice(-1),o=wn({},Ht(e||`.`,{relative:n})),c=X();if(e==null){o.search=c.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`),r!==`/`&&(o.pathname=o.pathname===`/`?r:L([r,o.pathname])),f(o)}function vr(e){let{key:t}=e===void 0?{}:e,{router:n}=lr(sr.UseFetcher),r=ur(cr.UseFetcher),i=K.useContext(Kn),a=K.useContext(Y),o=a.matches[a.matches.length-1]?.route.id;!i&&s(!1),!a&&s(!1),o??s(!1);let c=Yn?Yn():``,[l,u]=K.useState(t||c);t&&t!==l?u(t):l||u(hr()),K.useEffect(()=>(n.getFetcher(l),()=>{n.deleteFetcher(l)}),[n,l]);let d=K.useCallback((e,t)=>{!o&&s(!1),n.fetch(l,o,e,t)},[l,o,n]),f=gr(),p=K.useCallback((e,t)=>{f(e,wn({},t,{navigate:!1,fetcherKey:l}))},[l,f]),m=K.useMemo(()=>K.forwardRef((e,t)=>K.createElement(or,wn({},e,{navigate:!1,fetcherKey:l,ref:t}))),[l]),h=r.fetchers.get(l)||De,g=i.get(l);return K.useMemo(()=>wn({Form:m,submit:p,load:d},h,{data:g}),[m,p,d,h,g])}function yr(e,t){t===void 0&&(t={});let n=K.useContext(Gn);n??s(!1);let{basename:r}=lr(sr.useViewTransitionState),i=Ht(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=F(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=F(n.nextLocation.pathname,r)||n.nextLocation.pathname;return M(i.pathname,o)!=null||M(i.pathname,a)!=null}var br=-1,xr=-2,Sr=-3,Cr=-4,wr=-5,Tr=-6,Er=-7,Dr=`B`,Or=`D`,kr=`E`,Ar=`M`,jr=`N`,Mr=`P`,Nr=`R`,Pr=`S`,Fr=`Y`,Ir=`U`,Lr=`Z`,Rr=class{promise;resolve;reject;
4constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function zr(){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 Br=typeof window<`u`?window:typeof globalThis<`u`?globalThis:void 0;function Vr(e){let{hydrated:t,values:n}=this;if(typeof e==`number`)return Hr.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,Hr.call(this,r)}function Hr(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 Er:a(void 0);continue;case wr:a(null);continue;case xr:a(NaN);continue;case Tr:a(1/0);continue;case Sr:a(-1/0);continue;case Cr: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 Ir:a(t[e]=new URL(l));continue;case Dr:a(t[e]=BigInt(l));continue;case Nr:a(t[e]=new RegExp(l,u));continue;case Fr:a(t[e]=Symbol.for(l));continue;case Pr:let n=new Set;t[e]=n;for(let e=1;e<c.length;e++)o.push([c[e],e=>{n.add(e)}]);a(n);continue;case Ar:let d=new Map;t[e]=d;for(let e=1;e<c.length;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 jr: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 Mr:if(t[l])a(t[e]=t[l]);else{let n=new Rr;r[l]=n,a(t[e]=n.promise)}continue;case kr:let[,p,m]=c,h=m&&Br&&Br[m]?new Br[m](p):Error(p);t[e]=h,a(h);continue;case Lr: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!==br&&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}async function Ur(e,t){let{plugins:n}=t??{},r=new Rr,i=e.pipeThrough(zr()).getReader(),a={values:[],hydrated:[],deferred:{},plugins:n},o=await Wr.call(a,i),s=r.promise;return o.done?r.resolve():s=Gr.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 Wr(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:Vr.call(this,n)}}async function Gr(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let n=t.value;switch(n[0]){case Mr:{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=Vr.call(this,a);r.resolve(o);break}case kr:{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=Vr.call(this,a);r.reject(o);break}default:throw SyntaxError()}t=await e.read()}}var Kr=Symbol(`SingleFetchRedirect`);function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$.apply(this,arguments)}function qr(e,t){if(e===!1||e==null)throw Error(t)}var Jr=`modulepreload`,Yr=function(e){return`/`+e},Xr={},Zr=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Yr(t,n),t in Xr)return;Xr[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Jr,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n
5)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function Qr(e,t){if(e.id in t)return t[e.id];try{let n=await Zr(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__remixContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $r(e,t,n){return di(e.map(e=>{let r=t[e.route.id],i=n.routes[e.route.id];return[i.css?i.css.map(e=>({rel:`stylesheet`,href:e})):[],r?.links?.call(r)||[]]}).flat(2),ci(e,n))}async function ei(e,t){if(!e.css&&!t.links||!mi())return;let n=[e.css?.map(e=>({rel:`stylesheet`,href:e}))??[],t.links?.call(t)??[]].flat(1);if(n.length===0)return;let r=[];for(let e of n)!ni(e)&&e.rel===`stylesheet`&&r.push({...e,rel:`preload`,as:`style`});let i=r.filter(e=>(!e.media||window.matchMedia(e.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`));await Promise.all(i.map(ti))}async function ti(e){return new Promise(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 ni(e){return e!=null&&typeof e.page==`string`}function ri(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 ii(e,t,n){return di((await Promise.all(e.map(async e=>{let r=await Qr(t.routes[e.route.id],n);return r.links?r.links():[]}))).flat(1).filter(ri).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ai(e,t,n,r,i,a,o){let s=fi(e),c=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,l=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return o===`data`&&(a.v3_singleFetch||i.search!==s.search)?t.filter((t,o)=>{if(!r.routes[t.route.id].hasLoader)return!1;if(c(t,o)||l(t,o))return!0;let u=a.v3_singleFetch||i.search!==s.search;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:u});if(typeof r==`boolean`)return r}return u}):t.filter((e,t)=>{let n=r.routes[e.route.id];return(o===`assets`||n.hasLoader)&&(c(e,t)||l(e,t))})}function oi(e,t,n){let r=fi(e);return li(t.filter(e=>n.routes[e.route.id].hasLoader&&!n.routes[e.route.id].hasClientLoader).map(e=>{let{pathname:t,search:n}=r,i=new URLSearchParams(n);return i.set(`_data`,e.route.id),`${t}?${i}`}))}function si(e,t){return li(e.map(e=>{let n=t.routes[e.route.id],r=[n.module];return n.imports&&(r=r.concat(n.imports)),r}).flat(1))}function ci(e,t){return li(e.map(e=>{let n=t.routes[e.route.id],r=[n.module];return n.imports&&(r=r.concat(n.imports)),r}).flat(1))}function li(e){return[...new Set(e)]}function ui(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function di(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!ni(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ui(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function fi(e){let t=p(e);return t.search===void 0&&(t.search=``),t}var pi;function mi(){if(pi!==void 0)return pi;let e=document.createElement(`link`);return pi=e.relList.supports(`preload`),e=null,pi}var hi={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},gi=/[&><\u2028\u2029]/g;function _i(e){return e.replace(gi,e=>hi[e])}function vi(e){return{__html:e}}function yi(e){return e.headers.get(`X-Remix-Catch`)!=null}function bi(e){return e.headers.get(`X-Remix-Error`)!=null}function xi(e){return wi(e)&&e.status>=400&&e.headers.get(`X-Remix-Error`)==null&&e.headers.get(`X-Remix-Catch`)==null&&e.headers.get(`X-Remix-Response`)==null}function Si(e){return e.headers.get(`X-Remix-Redirect`)!=null}function Ci(e){var t;return!!((t=e.headers.get(`Content-Type`))!=null&&t.match(/text\/remix-deferred/))}function wi(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Ti(e){let t=e;return t&&typeof t==`object`&&typeof t.data==`object`&&typeof t.subscribe==`function`&&typeof t.cancel==`function`&&typeof t.resolveData==`function`}async function Ei(e,t,n=0){let r=new URL(e.url);r.searchParams.set(`_data`,t),n>0&&await new Promise(e=>setTimeout(e,5**n*10));let i=await Di(e),a=window.__remixRevalidation,o=await fetch(r.href,i).catch(r=>{if(typeof a==`number`&&a===window.__remixRevalidation&&r?.name===`TypeError`&&n<3)return Ei(e,t,n+1);throw r});
5if(bi(o)){let e=await o.json(),t=Error(e.message);return t.stack=e.stack,t}if(xi(o)){let e=await o.text(),t=Error(e);return t.stack=void 0,t}return o}async function Di(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 Oi=`__deferred_promise:`;async function ki(e){if(!e)throw Error(`parseDeferredReadableStream requires stream argument`);let t,n={};try{let r=Ai(e),i=(await r.next()).value;if(!i)throw Error(`no critical data`);let a=JSON.parse(i);if(typeof a==`object`&&a)for(let[e,r]of Object.entries(a))typeof r!=`string`||!r.startsWith(Oi)||(t||={},t[e]=new Promise((t,r)=>{n[e]={resolve:r=>{t(r),delete n[e]},reject:t=>{r(t),delete n[e]}}}));return(async()=>{try{for await(let e of r){let[t,...r]=e.split(`:`),i=r.join(`:`),a=JSON.parse(i);if(t===`data`)for(let[e,t]of Object.entries(a))n[e]&&n[e].resolve(t);else if(t===`error`)for(let[e,t]of Object.entries(a)){let r=Error(t.message);r.stack=t.stack,n[e]&&n[e].reject(r)}}for(let[e,t]of Object.entries(n))t.reject(new z(`Deferred ${e} will never be resolved`))}catch(e){for(let t of Object.values(n))t.reject(e)}})(),new he({...a,...t})}catch(e){for(let t of Object.values(n))t.reject(e);throw e}}async function*Ai(e){let t=e.getReader(),n=[],r=[],i=!1,a=new TextEncoder,o=new TextDecoder,s=async()=>{if(r.length>0)return r.shift();for(;!i&&r.length===0;){let e=await t.read();if(e.done){i=!0;break}n.push(e.value);try{let e=o.decode(ji(...n)).split(`
6
7`);if(e.length>=2&&(r.push(...e.slice(0,-1)),n=[a.encode(e.slice(-1).join(`
8
9`))]),r.length>0)break}catch{continue}}return r.length>0||n.length>0&&(r=o.decode(ji(...n)).split(`
10
11`).filter(e=>e),n=[]),r.shift()},c=await s();for(;c;)yield c,c=await s()}function ji(...e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t}function Mi(e,t,n){return async({request:r,matches:i,fetcherKey:a})=>[`POST`,`PUT`,`PATCH`,`DELETE`].includes(r.method)?Ni(r,i):a?Fi(r,i):Pi(e,t,n(),r,i)}async function Ni(e,t){let n=t.find(e=>e.shouldLoad);qr(n,`No action match found`);let r,i=await n.resolve(async t=>await t(async()=>{let{data:t,status:i}=await zi(Ri(e.url),await Di(e));return r=i,Hi(t,n.route.id)}));return wi(i.result)||ye(i.result)?{[n.route.id]:i}:{[n.route.id]:{type:i.type,result:me(i.result,r)}}}async function Pi(e,t,n,r,i){let a=new Set,o=!1,s=i.map(()=>Ui()),c=Promise.all(s.map(e=>e.promise)),l=Ui(),u=Li(Ri(r.url)),d=await Di(r),f={},p=Promise.all(i.map(async(r,i)=>r.resolve(async c=>{if(s[i].resolve(),!r.shouldLoad){var p;if(!n.state.initialized)return;if(r.route.id in n.state.loaderData&&e.routes[r.route.id]&&(p=t[r.route.id])!=null&&p.shouldRevalidate){e.routes[r.route.id].hasLoader&&(o=!0);return}}if(e.routes[r.route.id].hasClientLoader){e.routes[r.route.id].hasLoader&&(o=!0);try{let e=await Ii(c,u,d,r.route.id);f[r.route.id]={type:`data`,result:e}}catch(e){f[r.route.id]={type:`error`,result:e}}return}e.routes[r.route.id].hasLoader&&a.add(r.route.id);try{let e=await c(async()=>Vi(await l.promise,r.route.id));f[r.route.id]={type:`data`,result:e}}catch(e){f[r.route.id]={type:`error`,result:e}}})));if(await c,(!n.state.initialized||a.size===0)&&!window.__remixHdrActive)l.resolve({});else try{o&&a.size>0&&u.searchParams.set(`_routes`,i.filter(e=>a.has(e.route.id)).map(e=>e.route.id).join(`,`));let e=await zi(u,d);l.resolve(e.data)}catch(e){l.reject(e)}return await p,f}async function Fi(e,t){let n=t.find(e=>e.shouldLoad);qr(n,`No fetcher match found`);let r=await n.resolve(async t=>Ii(t,Li(Ri(e.url)),await Di(e),n.route.id));return{[n.route.id]:r}}function Ii(e,t,n,r){return e(async()=>{let e=new URL(t);e.searchParams.set(`_routes`,r);let{data:i}=await zi(e,n);return Vi(i,r)})}function Li(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 Ri(e){let t=typeof e==`string`?new URL(e,typeof window>
11`u`?`server://singlefetch/`:window.location.origin):e;return t.pathname===`/`?t.pathname=`_root.data`:t.pathname=`${t.pathname.replace(/\/$/,``)}.data`,t}async function zi(e,t){let n=await fetch(e,t);if(new Set([100,101,204,205]).has(n.status))return!t.method||t.method===`GET`?{status:n.status,data:{}}:{status:n.status,data:{data:null}};qr(n.body,`No response body to decode`);try{let e=await Bi(n.body,window);return{status:n.status,data:e.value}}catch(t){throw console.error(t),Error(`Unable to decode turbo-stream response from URL: ${e.toString()}`)}}function Bi(e,t){return Ur(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 B(t,r,e)}}if(e===`SingleFetchRedirect`)return{value:{[Kr]:n[0]}}},(e,t)=>{if(e===`SingleFetchFallback`)return{value:void 0};if(e===`SingleFetchClassInstance`)return{value:t}}]})}function Vi(e,t){let n=e[Kr];return n?Hi(n,t):e[t]===void 0?null:Hi(e[t],t)}function Hi(e,t){if(`error`in e)throw e.error;if(`redirect`in e){let t={};throw e.revalidate&&(t[`X-Remix-Revalidate`]=`yes`),e.reload&&(t[`X-Remix-Reload-Document`]=`yes`),e.replace&&(t[`X-Remix-Replace`]=`yes`),ve(e.redirect,{status:e.status,headers:t})}else if(`data`in e)return e.data;else throw Error(`No response found for routeId "${t}"`)}function Ui(){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 Wi=class extends K.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?K.createElement(Gi,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function Gi({error:e,isOutsideRemixApp:t}){console.error(e);let n=K.createElement(`script`,{dangerouslySetInnerHTML:{__html:`
12        console.log(
13          "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."
14        );
15      `}});if(ye(e))return K.createElement(Ki,{title:`Unhandled Thrown Response!`},K.createElement(`h1`,{style:{fontSize:`24px`}},e.status,` `,e.statusText),n);let r;if(e instanceof Error)r=e;else{let t=e==null?`Unknown Error`:typeof e==`object`&&`toString`in e?e.toString():JSON.stringify(e);r=Error(t)}return K.createElement(Ki,{title:`Application Error!`,isOutsideRemixApp:t},K.createElement(`h1`,{style:{fontSize:`24px`}},`Application Error`),K.createElement(`pre`,{style:{padding:`2rem`,background:`hsla(10, 50%, 50%, 0.1)`,color:`red`,overflow:`auto`}},r.stack),n)}function Ki({title:e,renderScripts:t,isOutsideRemixApp:n,children:r}){var i;let{routeModules:a}=Ca();return(i=a.root)!=null&&i.Layout&&!n?r:K.createElement(`html`,{lang:`en`},K.createElement(`head`,null,K.createElement(`meta`,{charSet:`utf-8`}),K.createElement(`meta`,{name:`viewport`,content:`width=device-width,initial-scale=1,viewport-fit=cover`}),K.createElement(`title`,null,e)),K.createElement(`body`,null,K.createElement(`main`,{style:{fontFamily:`system-ui, sans-serif`,padding:`2rem`}},r,t?K.createElement(Ba,null):null)))}function qi(){return K.createElement(Ki,{title:`Loading...`,renderScripts:!0},K.createElement(`script`,{dangerouslySetInnerHTML:{__html:`
16              console.log(
17                "💿 Hey developer 👋. You can provide a way better UX than this " +
18                "when your app is loading JS modules and/or running \`clientLoader\` " +
19                "functions. Check out https://remix.run/route/hydrate-fallback " +
20                "for more information."
21              );
22            `}}))}function Ji(e){let t={};return Object.values(e).forEach(e=>{let n=e.parentId||``;t[n]||(t[n]=[]),t[n].push(e)}),t}function Yi(e,t,n){let r=oa(t),i=t.HydrateFallback&&(!n||e.id===`root`)?t.HydrateFallback:e.id===`root`?qi:void 0,a=t.
22ErrorBoundary?t.ErrorBoundary:e.id===`root`?()=>K.createElement(Gi,{error:cn()}):void 0;return e.id===`root`&&t.Layout?{...r?{element:K.createElement(t.Layout,null,K.createElement(r,null))}:{Component:r},...a?{errorElement:K.createElement(t.Layout,null,K.createElement(a,null))}:{ErrorBoundary:a},...i?{hydrateFallbackElement:K.createElement(t.Layout,null,K.createElement(i,null))}:{HydrateFallback:i}}:{Component:r,ErrorBoundary:a,HydrateFallback:i}}function Xi(e,t,n,r,i,a){return $i(t,n,r,i,a,``,Ji(t),e)}function Zi(e,t,n){if(n){let n=`You cannot call ${e===`action`?`serverAction()`:`serverLoader()`} in SPA Mode (routeId: "${t.id}")`;throw console.error(n),new B(400,`Bad Request`,Error(n),!0)}let r=`You are trying to call ${e===`action`?`serverAction()`:`serverLoader()`} on a route that does not have a server ${e} (routeId: "${t.id}")`;if(e===`loader`&&!t.hasLoader||e===`action`&&!t.hasAction)throw console.error(r),new B(400,`Bad Request`,Error(r),!0)}function Qi(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 B(405,`Method Not Allowed`,Error(r),!0)}function $i(e,t,n,r,i,a=``,o=Ji(e),s){return(o[a]||[]).map(a=>{let c=t[a.id];async function l(e,t,n){if(typeof n==`function`)return await n();let r=await ra(e,a);return t?ia(r):r}function u(e,t,n){return a.hasLoader?l(e,t,n):Promise.resolve(null)}function d(e,t,n){if(!a.hasAction)throw Qi(`action`,a.id);return l(e,t,n)}async function f(e){let n=t[a.id],r=n?ei(a,n):Promise.resolve();try{return e()}finally{await r}}let p={id:a.id,index:a.index,path:a.path};if(c){Object.assign(p,{...p,...Yi(a,c,i),handle:c.handle,shouldRevalidate:ea(r,c,a.id,s)});let e=n?.loaderData?.[a.id],t=n?.errors?.[a.id],o=s==null&&(c.clientLoader?.hydrate===!0||!a.hasLoader);p.loader=async({request:n,params:r},s)=>{try{return await f(async()=>(qr(c,"No `routeModule` available for critical-route loader"),c.clientLoader?c.clientLoader({request:n,params:r,async serverLoader(){if
22(Zi(`loader`,a,i),o){if(e!==void 0)return e;if(t!==void 0)throw t;return null}return u(n,!0,s)}}):i?null:u(n,!1,s)))}finally{o=!1}},p.loader.hydrate=sa(a,c,i),p.action=({request:e,params:t},n)=>f(async()=>{if(qr(c,"No `routeModule` available for critical-route action"),!c.clientAction){if(i)throw Qi(`clientAction`,a.id);return d(e,!1,n)}return c.clientAction({request:e,params:t,async serverAction(){return Zi(`action`,a,i),d(e,!0,n)}})})}else a.hasClientLoader||(p.loader=({request:e},t)=>f(()=>i?Promise.resolve(null):u(e,!1,t))),a.hasClientAction||(p.action=({request:e},t)=>f(()=>{if(i)throw Qi(`clientAction`,a.id);return d(e,!1,t)})),p.lazy=async()=>{let e=await na(a,t),n={...e};if(e.clientLoader){let t=e.clientLoader;n.loader=(e,n)=>t({...e,async serverLoader(){return Zi(`loader`,a,i),u(e.request,!0,n)}})}if(e.clientAction){let t=e.clientAction;n.action=(e,n)=>t({...e,async serverAction(){return Zi(`action`,a,i),d(e.request,!0,n)}})}return{...n.loader?{loader:n.loader}:{},...n.action?{action:n.action}:{},hasErrorBoundary:n.hasErrorBoundary,shouldRevalidate:ea(r,n,a.id,s),handle:n.handle,Component:n.Component,ErrorBoundary:n.ErrorBoundary}};let m=$i(e,t,n,r,i,a.id,o,s);return m.length>0&&(p.children=m),p})}function ea(e,t,n,r){if(r)return ta(n,t.shouldRevalidate,r);if(e.v3_singleFetch&&t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:!0})}return t.shouldRevalidate}function ta(e,t,n){let r=!1;return i=>r?t?t(i):i.defaultShouldRevalidate:(r=!0,n.has(e))}async function na(e,t){let n=await Qr(e,t);return await ei(e,n),{Component:oa(n),ErrorBoundary:n.ErrorBoundary,clientAction:n.clientAction,clientLoader:n.clientLoader,handle:n.handle,links:n.links,meta:n.meta,shouldRevalidate:n.shouldRevalidate}}async function ra(e,t){let n=await Ei(e,t.id);if(n instanceof Error)throw n;if(Si(n))throw aa(n);if(yi(n))throw n;return Ci(n)&&n.body?await ki(n.body):n}function ia(e){if(Ti(e))return e.data;if(wi(e)){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.json():e.text()}return e}function aa(e){let t=parseInt(e.headers.get(`X-Remix-Status`),10)||302,n=e.headers.get(`X-Remix-Redirect`),r={},i=e.headers.get(`X-Remix-Revalidate`);i&&(r[`X-Remix-Revalidate`]=i);let a=e.headers.get(`X-Remix-Reload-Document`);a&&(r[`X-Remix-Reload-Document`]=a);let o=e.headers.get(`X-Remix-Replace`);return o&&(r[`X-Remix-Replace`]=o),ve(n,{status:t,headers:r})}function oa(e){if(e.default!=null&&!(typeof e.default==`object`&&Object.keys(e.default).length===0))return e.default}function sa(e,t,n){return n&&e.id!==`root`||t.clientLoader!=null&&(t.clientLoader.hydrate===!0||e.hasLoader!==!0)}var ca=new Set,la=1e3,ua=new Set,da=7680;function fa(e,t){return e.v3_lazyRouteDiscovery===!0&&!t}function pa(e,t){let n=new Set(t.state.matches.map(e=>e.route.id)),r=t.state.location.pathname.split(`/`).filter(Boolean),i=[`/`];for(r.pop();r.length>0;)i.push(`/${r.join(`/`)}`),r.pop();i.forEach(e=>{let r=y(t.routes,e,t.basename);r&&r.forEach(e=>n.add(e.route.id))});let a=[...n].reduce((t,n)=>Object.assign(t,{[n]:e.routes[n]}),{});return{...e,routes:a}}function ma(e,t,n,r,i){if(fa(n,r))return async({path:a,patch:o,signal:s,fetcherKey:c})=>{ua.has(a)||await _a([a],c?window.location.href:a,e,t,n,r,i,o,s)}}function ha(e,t,n,r,i){K.useEffect(()=>{if(!fa(r,i)||navigator.connection?.saveData===!0)return;function a(e){let t=e.tagName===`FORM`?e.getAttribute(`action`):e.getAttribute(`href`);if(!t)return;let n=new URL(t,window.location.origin);ua.has(n.pathname)||ca.add(n.pathname)}async function o(){let a=Array.from(ca.keys()).filter(e=>ua.has(e)?(ca.delete(e),!1):!0);if(a.length!==0)try{await _a(a,null,t,n,r,i,e.basename,e.patchRoutes)}catch(e){console.error(`Failed to fetch manifest patches`,e)}}document.body.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(e=>a(e)),o();let s=ya(o,100);function c(e){return e.nodeType===Node.ELEMENT_NODE}let l=new MutationObserver(e=>{let t=new Set;e.forEach(e=>{[e.target,...e.addedNodes].forEach(e=>{c(e)&&((e.tagName===`A`&&e.getAttribute(`data-discover`)||e.tagName===`FORM`&&e.getAttribute(`data-discover`))&&t.add(e),e.tagName!==`A`&&e.querySelectorAll(`a[data-discover], form[data-discover]`).forEach(e
22=>t.add(e)))})}),t.forEach(e=>a(e)),s()});return l.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`data-discover`,`href`,`action`]}),()=>l.disconnect()},[r,i,t,n,e])}var ga=`remix-manifest-version`;async function _a(e,t,n,r,i,a,o,s,c){let l=`${o??`/`}/__manifest`.replace(/\/+/g,`/`),u=new URL(l,window.location.origin);if(e.sort().forEach(e=>u.searchParams.append(`p`,e)),u.searchParams.set(`version`,n.version),u.toString().length>da){ca.clear();return}let d;try{let e=await fetch(u,{signal:c});if(!e.ok)throw Error(`${e.status} ${e.statusText}`);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 new document navigation to sync up with the latest manifest.`);return}if(sessionStorage.getItem(ga)===n.version){console.error(`Unable to discover routes due to manifest version mismatch.`);return}throw sessionStorage.setItem(ga,n.version),window.location.href=t,Error(`Detected manifest version mismatch, reloading...`)}else if(e.status>=400)throw Error(await e.text());sessionStorage.removeItem(ga),d=await e.json()}catch(e){if(c!=null&&c.aborted)return;throw e}let f=new Set(Object.keys(n.routes)),p=Object.values(d).reduce((e,t)=>f.has(t.id)?e:Object.assign(e,{[t.id]:t}),{});Object.assign(n.routes,p),e.forEach(e=>va(e,ua));let m=new Set;Object.values(p).forEach(e=>{(!e.parentId||!p[e.parentId])&&m.add(e.parentId)}),m.forEach(e=>s(e||null,$i(p,r,null,i,a,e)))}function va(e,t){if(t.size>=la){let e=t.values().next().value;typeof e==`string`&&t.delete(e)}t.add(e)}function ya(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function ba(){let e=K.useContext(q);return qr(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function xa(){let e=K.useContext(Ot);return qr(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Sa=K.createContext(void 0);Sa.displayName=`Remix`;function Ca(){let e=K.useContext(Sa);return qr(e,`You must render this element inside a <Remix> element`),e}function wa(e,t){let[n,r]=K.useState(!1),[i,a]=K.useState(!1),{onFocus:o,onBlur:s,onMouseEnter:c,onMouseLeave:l,onTouchStart:u}=t,d=K.useRef(null);K.useEffect(()=>{if(e===`render`&&a(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{a(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]);let f=()=>{e===`intent`&&r(!0)},p=()=>{e===`intent`&&(r(!1),a(!1))};return K.useEffect(()=>{if(n){let e=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(e)}}},[n]),[i,d,{onFocus:Aa(o,f),onBlur:Aa(s,p),onMouseEnter:Aa(c,f),onMouseLeave:Aa(l,p),onTouchStart:Aa(u,f)}]}var Ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ea(e,t,n){return e===`render`&&!t&&!n?`true`:void 0}var Da=K.forwardRef(({to:e,prefetch:t=`none`,discover:n=`render`,...r},i)=>{let a=typeof e==`string`&&Ta.test(e),o=Mt(e),[s,c,l]=wa(t,r);return K.createElement(K.Fragment,null,K.createElement(ar,$({},r,l,{ref:Ya(i,c),to:e,"data-discover":Ea(n,a,r.reloadDocument)})),s&&!a?K.createElement(Na,{page:o}):null)});Da.displayName=`NavLink`;var Oa=K.forwardRef(({to:e,prefetch:t=`none`,discover:n=`render`,...r},i)=>{let a=typeof e==`string`&&Ta.test(e),o=Mt(e),[s,c,l]=wa(t,r);return K.createElement(K.Fragment,null,K.createElement(ir,$({},r,l,{ref:Ya(i,c),to:e,"data-discover":Ea(n,a,r.reloadDocument)})),s&&!a?K.createElement(Na,{page:o}):null)});Oa.displayName=`Link`;var ka=K.forwardRef(({discover:e=`render`,...t},n)=>{let r=typeof t.action==`string`&&Ta.test(t.action);return K.createElement(or,$({},t,{ref:n,"data-discover":Ea(e,r,t.reloadDocument)}))});ka.displayName=`Form`;function Aa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ja(e,t,n){if(n&&!za)return[e[0]];if(t){let n=e.findIndex(e=>t[e.route.id]!==void 0);return e.slice(0,n+1)}return e}function Ma(){let{isSpaMode:e,manifest:t,routeModules:n,criticalCss:r}=Ca(),{errors:i,matches:a}=xa(),o=ja(a,i,e),s=K.useMemo(()=>$r(o,n,t),[o,n,t]);return K.createElement(K.Fragment,null,r?K.createElement(`style`,{dangerouslySetInnerHTML:{__html:r}}
22):null,s.map(({key:e,link:t})=>ni(t)?K.createElement(Na,$({key:e},t)):K.createElement(`link`,$({key:e},t))))}function Na({page:e,...t}){let{router:n}=ba(),r=K.useMemo(()=>y(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?K.createElement(Fa,$({page:e,matches:r},t)):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function Pa(e){let{manifest:t,routeModules:n}=Ca(),[r,i]=K.useState([]);return K.useEffect(()=>{let r=!1;return ii(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Fa({page:e,matches:t,...n}){let r=X(),{future:i,manifest:a,routeModules:o}=Ca(),{loaderData:s,matches:c}=xa(),l=K.useMemo(()=>ai(e,t,c,a,r,i,`data`),[e,t,c,a,r,i]),u=K.useMemo(()=>{if(!i.v3_singleFetch)return oi(e,l,a);if(e===r.pathname+r.search+r.hash)return[];let n=new Set,c=!1;if(t.forEach(e=>{var t;a.routes[e.route.id].hasLoader&&(!l.some(t=>t.route.id===e.route.id)&&e.route.id in s&&(t=o[e.route.id])!=null&&t.shouldRevalidate||a.routes[e.route.id].hasClientLoader?c=!0:n.add(e.route.id))}),n.size===0)return[];let u=Ri(e);return c&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[i.v3_singleFetch,s,r,a,l,t,e,o]),d=K.useMemo(()=>ai(e,t,c,a,r,i,`assets`),[e,t,c,a,r,i]),f=K.useMemo(()=>si(d,a),[d,a]),p=Pa(d);return K.createElement(K.Fragment,null,u.map(e=>K.createElement(`link`,$({key:e,rel:`prefetch`,as:`fetch`,href:e},n))),f.map(e=>K.createElement(`link`,$({key:e,rel:`modulepreload`,href:e},n))),p.map(({key:e,link:t})=>K.createElement(`link`,$({key:e},t))))}function Ia(){let{isSpaMode:e,routeModules:t}=Ca(),{errors:n,matches:r,loaderData:i}=xa(),a=X(),o=ja(r,n,e),s=null;n&&(s=n[o[o.length-1].route.id]);let c=[],l=null,u=[];for(let e=0;e<o.length;e++){let n=o[e],r=n.route.id,d=i[r],f=n.params,p=t[r],m=[],h={id:r,data:d,meta:[],params:n.params,pathname:n.pathname,handle:n.route.handle,error:s};if(u[e]=h,p!=null&&p.meta?m=typeof p.meta==`function`?p.meta({data:d,params:f,location:a,matches:u,error:s}):Array.isArray(p.meta)?[...p.meta]:p.meta:l&&(m=[...l]),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.
23
24To reference the meta function API, see https://remix.run/route/meta`);h.meta=m,u[e]=h,c=[...m],l=c}return K.createElement(K.Fragment,null,c.flat().map(e=>{if(!e)return null;if(`tagName`in e){let{tagName:t,...n}=e;if(!La(t))return console.warn(`A meta object uses an invalid tagName: ${t}. Expected either 'link' or 'meta'`),null;let r=t;return K.createElement(r,$({key:JSON.stringify(n)},n))}if(`title`in e)return K.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`?K.createElement(`meta`,{key:`charSet`,charSet:e.charSet}):null;if(`script:ld+json`in e)try{let t=JSON.stringify(e[`script:ld+json`]);return K.createElement(`script`,{key:`script:ld+json:${t}`,type:`application/ld+json`,dangerouslySetInnerHTML:{__html:_i(t)}})}catch{return null}return K.createElement(`meta`,$({key:JSON.stringify(e)},e))}))}function La(e){return typeof e==`string`&&/^(meta|link)$/.test(e)}function Ra(e){return K.createElement(vn,e)}var za=!1;function Ba(e){let{manifest:t,serverHandoffString:n,abortDelay:r,serializeError:i,isSpaMode:a,future:o,renderMeta:s}=Ca(),{router:c,static:l,staticContext:u}=ba(),{matches:d}=xa(),f=fa(o,a);s&&(s.didRenderScripts=!0);let p=ja(d,null,a);K.useEffect(()=>{za=!0},[]);let m=(e,t)=>{let n;return n=i&&t instanceof Error?i(t):t,`${JSON.stringify(e)}:__remixContext.p(!1, ${_i(JSON.stringify(n))})`},h=(e,t,n)=>{let r;try{r=JSON.stringify(n)}catch(e){return m(t,e)}return`${JSON.stringify(t)}:__remixContext.p(${_i(r)})`},g=(e,t,n)=>{let r;return r=i&&n instanceof Error?i(n):n,`__remixContext.r(${JSON.stringify(e)}, ${JSON.stringify(t)}, !1, ${_i(JSON.stringify(r))})`},_=(e,t,n)=>{let r;try{r=JSON.stringify(n)}catch(n){return g(e,t,n)}return`__remixContext.r(${JSON.stringify(e)}, ${JSON.stringify(t)}, ${_i(r)})`},v=[],y=K.useMemo(()=>{var i;let a=o.v3_singleFetch?`window.__remixContext.stream = new ReadableStream({start(controller){window.__remixContext.streamController = controller;}}
24).pipeThrough(new TextEncoderStream());`:``,s=u?`window.__remixContext = ${n};${a}`:` `,d=o.v3_singleFetch?void 0:u?.activeDeferreds;s+=d?[`__remixContext.p = function(v,e,p,x) {`,`  if (typeof e !== 'undefined') {`,`    x=new Error("Unexpected Server Error");
25    x.stack=undefined;`,`    p=Promise.reject(x);`,`  } else {`,`    p=Promise.resolve(v);`,`  }`,`  return p;`,`};`,`__remixContext.n = function(i,k) {`,`  __remixContext.t = __remixContext.t || {};`,`  __remixContext.t[i] = __remixContext.t[i] || {};`,`  let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});`,typeof r==`number`?`setTimeout(() => {if(typeof p._error !== "undefined" || typeof p._data !== "undefined"){return;} __remixContext.t[i][k].e(new Error("Server timeout."))}, ${r});`:``,`  return p;`,`};`,`__remixContext.r = function(i,k,v,e,p,x) {`,`  p = __remixContext.t[i][k];`,`  if (typeof e !== 'undefined') {`,`    x=new Error("Unexpected Server Error");
26    x.stack=undefined;`,`    p.e(x);`,`  } else {`,`    p.r(v);`,`  }`,`};`].join(`
27`)+Object.entries(d).map(([t,n])=>{let r=new Set(n.pendingKeys),i=n.deferredKeys.map(i=>{if(r.has(i))return v.push(K.createElement(Va,{key:`${t} | ${i}`,deferredData:n,routeId:t,dataKey:i,scriptProps:e,serializeData:_,serializeError:g})),`${JSON.stringify(i)}:__remixContext.n(${JSON.stringify(t)}, ${JSON.stringify(i)})`;{let e=n.data[i];return e._error===void 0?h(t,i,e._data):m(i,e._error)}}).join(`,
28`);return`Object.assign(__remixContext.state.loaderData[${JSON.stringify(t)}], {${i}});`}).join(`
29`)+(v.length>0?`__remixContext.a=${v.length};`:``):``;let y=l?`${(i=t.hmr)!=null&&i.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:``}${f?``:`import ${JSON.stringify(t.url)}`};
30${p.map((e,n)=>`import * as route${n} from ${JSON.stringify(t.routes[e.route.id].module)};`).join(`
31`)}
32${f?`window.__remixManifest = ${JSON.stringify(pa(t,c),null,2)};`:``}
33window.__remixRouteModules = {${p.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(`,`)}};
34
35import(${JSON.stringify(t.entry.module)});`:` `;return K.createElement(K.Fragment,null,K.createElement(`script`,$({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:vi(s),type:void 0})),K.createElement(`script`,$({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:vi(y),type:`module`,async:!0})))},[]);if(!l&&typeof __remixContext==`object`&&__remixContext.a)for(let t=0;t<__remixContext.a;t++)v.push(K.createElement(Va,{key:t,scriptProps:e,serializeData:_,serializeError:g}));let b=p.map(e=>{let n=t.routes[e.route.id];return(n.imports||[]).concat([n.module])}).flat(1),x=za?[]:t.entry.imports.concat(b);return za?null:K.createElement(K.Fragment,null,f?null:K.createElement(`link`,{rel:`modulepreload`,href:t.url,crossOrigin:e.crossOrigin}),K.createElement(`link`,{rel:`modulepreload`,href:t.entry.module,crossOrigin:e.crossOrigin}),Ua(x).map(t=>K.createElement(`link`,{key:t,rel:`modulepreload`,href:t,crossOrigin:e.crossOrigin})),y,v)}function Va({dataKey:e,deferredData:t,routeId:n,scriptProps:r,serializeData:i,serializeError:a}){return typeof document>`u`&&t&&e&&n&&qr(t.pendingKeys.includes(e),`Deferred data for route ${n} with key ${e} was not pending but tried to render a script for it.`),K.createElement(K.Suspense,{fallback:typeof document>`u`&&t&&e&&n?null:K.createElement(`script`,$({},r,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:` `}}))},typeof document>`u`&&t&&e&&n?K.createElement(Ra,{resolve:t.data[e],errorElement:K.createElement(Ha,{dataKey:e,routeId:n,scriptProps:r,serializeError:a}),children:t=>K.createElement(`script`,$({},r,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i(n,e,t)}}))}):K.createElement(`script`,$({},r,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:` `}})))}function Ha({dataKey:e,routeId:t,scriptProps:n,serializeError:r}){let i=un();return K.createElement(`script`,$({},n,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:r(t,e,i)}}))}function Ua(e){return[...new Set(e)]}function Wa(){return rn()}function Ga(){return an()}function Ka(e){return on(e)}function qa(){return sn()}function Ja(e={}){return vr(e)}function Ya(...e){return t=>
35{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}export{Sn as A,on as B,ir as C,fr as D,_r as E,Pt as F,y as G,o as H,zt as I,Vt as L,X as M,It as N,gr as O,tn as P,nn as R,qr as S,vr as T,Me as U,B as V,ye as W,sa as _,Da as a,Mi as b,qa as c,Wa as d,Ka as f,Xi as g,$i as h,Ia as i,an as j,gn as k,Ja as l,ha as m,Oa as n,Sa as o,ma as p,Ma as r,Ba as s,ka as t,Ga as u,Wi as v,$n as w,Zr as x,Bi as y,cn as z};
36//# sourceMappingURL=components-CDo3yjgw.js.map
37//# debugId=abef39d0-fff7-571e-91fb-9b9b9082516f

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.