@kb-labs/release-manager-cli 2.98.0 → 2.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/widgets/117.js +1 -1
- package/dist/widgets/165.js +1 -1
- package/dist/widgets/370.js +1 -1
- package/dist/widgets/46.js +30 -30
- package/dist/widgets/50.js +1 -1
- package/dist/widgets/546.js +1 -1
- package/dist/widgets/62.js +1 -1
- package/dist/widgets/669.js +1 -1
- package/dist/widgets/697.js +1 -0
- package/dist/widgets/733.js +2 -2
- package/dist/widgets/775.js +1 -1
- package/dist/widgets/__federation_expose_ReleasePage.js +1 -1
- package/dist/widgets/mf-manifest.json +17 -17
- package/dist/widgets/mf-stats.json +23 -23
- package/dist/widgets/remoteEntry.js +3 -3
- package/package.json +7 -7
- package/dist/widgets/78.js +0 -1
package/dist/widgets/733.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.rspackChunk_kb_labs_release_manager_cli=self.rspackChunk_kb_labs_release_manager_cli||[]).push([[733],{8389(e,t){let r;t.qg=function(e,t){let r=new l,n=e.length;if(n<2)return r;let a=t?.decode||d,o=0;do{let t=function(e,t,r){let n=e.indexOf("=",t);return n<r?n:-1}(e,o,n);if(-1===t)break;let i=function(e,t,r){let n=e.indexOf(";",t);return -1===n?r:n}(e,o,n);if(t>i){o=e.lastIndexOf(";",t-1)+1;continue}let s=c(e,o,t);void 0===r[s]&&(r[s]=a(c(e,t+1,i))),o=i+1}while(o<n);return r},t.lK=u,t.lK=u;let n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,a=/^[\u0021-\u003A\u003C-\u007E]*$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,s=Object.prototype.toString,l=((r=function(){}).prototype=Object.create(null),r);function u(e,t,r){let l="object"==typeof e?e:{...r,name:e,value:String(t)},u=("object"==typeof t?t:r)?.encode||encodeURIComponent;if(!n.test(l.name))throw TypeError(`argument name is invalid: ${l.name}`);let c=l.value?u(l.value):"";if(!a.test(c))throw TypeError(`argument val is invalid: ${l.value}`);let d=l.name+"="+c;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!o.test(l.domain))throw TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!i.test(l.path))throw TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){var h;if(h=l.expires,"[object Date]"!==s.call(h)||!Number.isFinite(l.expires.valueOf()))throw TypeError(`option expires is invalid: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}if(l.httpOnly&&(d+="; HttpOnly"),l.secure&&(d+="; Secure"),l.partitioned&&(d+="; Partitioned"),l.priority)switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${l.priority}`)}if(l.sameSite)switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${l.sameSite}`)}return d}function c(e,t,r){let n=t,a=r;do{let t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<a);for(;a>n;){let t=e.charCodeAt(a-1);if(32!==t&&9!==t)break;a--}return e.slice(n,a)}function d(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},4981(e){var t={decodeValues:!0,map:!1,silent:!1};function r(e){return"string"!=typeof e||e in{}}function n(){return Object.create(null)}function a(e){return"string"==typeof e&&!!e.trim()}function o(e,o){var i,s,l,u,c=e.split(";").filter(a),d=(i=c.shift(),s="",l="",(u=i.split("=")).length>1?(s=u.shift(),l=u.join("=")):l=i,{name:s,value:l}),h=d.name,f=d.value;if(o=o?Object.assign({},t,o):t,r(h))return null;try{f=o.decodeValues?decodeURIComponent(f):f}catch(e){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",e)}var m=n();return m.name=h,m.value=f,c.forEach(function(e){var t=e.split("="),n=t.shift().trimLeft().toLowerCase();if(!r(n)){var a=t.join("=");if("expires"===n)m.expires=new Date(a);else if("max-age"===n){var o=parseInt(a,10);Number.isNaN(o)||(m.maxAge=o)}else"secure"===n?m.secure=!0:"httponly"===n?m.httpOnly=!0:"samesite"===n?m.sameSite=a:"partitioned"===n?m.partitioned=!0:n&&(m[n]=a)}}),m}function i(e,i){if(i=i?Object.assign({},t,i):t,!e)if(!i.map)return[];else return n();if(e.headers)if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var s=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];s||!e.headers.cookie||i.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=s}if(Array.isArray(e)||(e=[e]),!i.map)return e.filter(a).map(function(e){return o(e,i)}).filter(Boolean);var l=n();return e.filter(a).reduce(function(e,t){var n=o(t,i);return n&&!r(n.name)&&(e[n.name]=n),e},l)}e.exports=i,e.exports.parse=i,e.exports.parseString=o,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,a,o,i=[],s=0;function l(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}for(;s<e.length;){for(t=s,o=!1;l();)if(","===(r=e.charAt(s))){for(n=s,s+=1,l(),a=s;s<e.length&&"="!==(r=e.charAt(s))&&";"!==r&&","!==r;)s+=1;s<e.length&&"="===e.charAt(s)?(o=!0,s=a,i.push(e.substring(t,n)),t=s):s=n+1}else s+=1;(!o||s>=e.length)&&i.push(e.substring(t,e.length))}return i}},7604(e,t,r){r.r(t),r.d(t,{Await:()=>rG,BrowserRouter:()=>aD,Form:()=>a$,HashRouter:()=>aA,HydratedRouter:()=>is,IDLE_BLOCKER:()=>eO,IDLE_FETCHER:()=>eM,IDLE_NAVIGATION:()=>eT,Link:()=>aM,Links:()=>ap,MemoryRouter:()=>rW,Meta:()=>aw,NavLink:()=>aO,Navigate:()=>rJ,NavigationType:()=>v,Outlet:()=>rY,PrefetchPageLinks:()=>ay,Route:()=>rX,Router:()=>rV,RouterContextProvider:()=>M,RouterProvider:()=>ia,Routes:()=>rK,Scripts:()=>aE,ScrollRestoration:()=>aN,ServerRouter:()=>oe,StaticRouter:()=>a0,StaticRouterProvider:()=>a1,UNSAFE_AwaitContextProvider:()=>tX,UNSAFE_DataRouterContext:()=>tz,UNSAFE_DataRouterStateContext:()=>tI,UNSAFE_ErrorResponseImpl:()=>ef,UNSAFE_FetchersContext:()=>tJ,UNSAFE_FrameworkContext:()=>ac,UNSAFE_LocationContext:()=>tK,UNSAFE_NavigationContext:()=>tV,UNSAFE_RSCDefaultRootErrorBoundary:()=>o8,UNSAFE_RemixErrorBoundary:()=>aR,UNSAFE_RouteContext:()=>tG,UNSAFE_ServerMode:()=>oh,UNSAFE_SingleFetchRedirectSymbol:()=>nP,UNSAFE_ViewTransitionContext:()=>tW,UNSAFE_WithComponentProps:()=>r8,UNSAFE_WithErrorBoundaryProps:()=>ne,UNSAFE_WithHydrateFallbackProps:()=>r9,UNSAFE_createBrowserHistory:()=>R,UNSAFE_createClientRoutes:()=>n3,UNSAFE_createClientRoutesWithHMRRevalidationOptOut:()=>n2,UNSAFE_createHashHistory:()=>S,UNSAFE_createMemoryHistory:()=>E,UNSAFE_createRouter:()=>eH,UNSAFE_decodeViaTurboStream:()=>nH,UNSAFE_deserializeErrors:()=>ie,UNSAFE_getHydrationData:()=>it,UNSAFE_getPatchRoutesOnNavigationFunction:()=>an,UNSAFE_getTurboStreamSingleFetchDataStrategy:()=>n_,UNSAFE_hydrationRouteProperties:()=>rF,UNSAFE_invariant:()=>x,UNSAFE_mapRouteProperties:()=>rj,UNSAFE_shouldHydrateRouteLoader:()=>n7,UNSAFE_useFogOFWarDiscovery:()=>aa,UNSAFE_useScrollRestoration:()=>aK,UNSAFE_withComponentProps:()=>r3,UNSAFE_withErrorBoundaryProps:()=>nt,UNSAFE_withHydrateFallbackProps:()=>r6,createBrowserRouter:()=>ak,createContext:()=>T,createCookie:()=>oi,createCookieSessionStorage:()=>oY,createHashRouter:()=>aP,createMemoryRouter:()=>rH,createMemorySessionStorage:()=>oX,createPath:()=>L,createRequestHandler:()=>oN,createRoutesFromChildren:()=>r0,createRoutesFromElements:()=>r1,createRoutesStub:()=>ot,createSearchParams:()=>no,createSession:()=>oB,createSessionStorage:()=>oW,createStaticHandler:()=>a4,createStaticRouter:()=>a8,data:()=>eu,generatePath:()=>q,href:()=>oV,isCookie:()=>os,isRouteErrorResponse:()=>em,isSession:()=>oq,matchPath:()=>W,matchRoutes:()=>F,parsePath:()=>D,redirect:()=>ec,redirectDocument:()=>ed,renderMatches:()=>r2,replace:()=>eh,resolvePath:()=>K,unstable_HistoryRouter:()=>a_,unstable_RSCStaticRouter:()=>o7,unstable_routeRSCServerRequest:()=>o6,unstable_setDevServerHooks:()=>oE,unstable_usePrompt:()=>aZ,unstable_useRoute:()=>rA,unstable_useRouterState:()=>rT,useActionData:()=>rR,useAsyncError:()=>rC,useAsyncValue:()=>rx,useBeforeUnload:()=>aG,useBlocker:()=>rP,useFetcher:()=>aW,useFetchers:()=>aJ,useFormAction:()=>aq,useHref:()=>t2,useInRouterContext:()=>t4,useLinkClickHandler:()=>aU,useLoaderData:()=>rb,useLocation:()=>t8,useMatch:()=>t5,useMatches:()=>rw,useNavigate:()=>t7,useNavigation:()=>rg,useNavigationType:()=>t3,useOutlet:()=>rr,useOutletContext:()=>rt,useParams:()=>rn,useResolvedPath:()=>ra,useRevalidator:()=>rv,useRouteError:()=>rS,useRouteLoaderData:()=>rE,useRoutes:()=>ro,useSearchParams:()=>az,useSubmit:()=>aB,useViewTransitionState:()=>aQ});var n,a,o,i,s,l,u,c,d=r(1913),h=r.n(d),f=e=>{throw TypeError(e)},m=(e,t,r)=>t.has(e)||f("Cannot "+r),p=(e,t,r)=>(m(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),g=(e,t,r,n)=>(m(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),v=((n=v||{}).Pop="POP",n.Push="PUSH",n.Replace="REPLACE",n),w="popstate";function b(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function E(e={}){let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.mask));let o=l(null==n?t.length-1:n),i="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function u(e,r=null,n,a){let i=P(t?t[o].pathname:"/",e,r,n,a);return C("/"===i.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),i}function c(e){return"string"==typeof e?e:L(e)}return{get index(){return o},get action(){return i},get location(){return t[o]},createHref:c,createURL:e=>new URL(c(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?D(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){i="PUSH";let n=b(e)?e:u(e,r);o+=1,t.splice(o,t.length,n),a&&s&&s({action:i,location:n,delta:1})},replace(e,r){i="REPLACE";let n=b(e)?e:u(e,r);t[o]=n,a&&s&&s({action:i,location:n,delta:0})},go(e){i="POP";let r=l(o+e),n=t[r];o=r,s&&s({action:i,location:n,delta:e})},listen:e=>(s=e,()=>{s=null})}}function R(e={}){return A(function(e,t){let r=t.state?.masked,{pathname:n,search:a,hash:o}=r||e.location;return P("",{pathname:n,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",r?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:L(t)},null,e)}function S(e={}){return A(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=D(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),P("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:L(t))},function(e,t){C("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function x(e,t){if(!1===e||null==e)throw Error(t)}function C(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function P(e,t,r=null,n,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?D(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10),mask:a}}function L({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function D(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function A(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s="POP",l=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){s="POP";let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:f.location,delta:t})}function h(e){return _(a,e)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let f={get action(){return s},get location(){return e(a,i)},listen(e){if(l)throw Error("A history only accepts one active listener");return a.addEventListener(w,d),l=e,()=>{a.removeEventListener(w,d),l=null}},createHref:e=>t(a,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let n=b(e)?e:P(f.location,e,t);r&&r(n,e);let d=k(n,u=c()+1),h=f.createHref(n.mask||n);try{i.pushState(d,"",h)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(h)}o&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let n=b(e)?e:P(f.location,e,t);r&&r(n,e);let a=k(n,u=c()),d=f.createHref(n.mask||n);i.replaceState(a,"",d),o&&l&&l({action:s,location:f.location,delta:0})},go:e=>i.go(e)};return f}function _(e,t,r=!1){let n="http://localhost";e&&(n="null"!==e.location.origin?e.location.origin:e.location.href),x(n,"No window.location.(origin|href) available to create URL");let a="string"==typeof t?t:L(t);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function T(e){return{defaultValue:e}}var M=class{constructor(e){if(y(this,o,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(p(this,o).has(e))return p(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw Error("No value found for context")}set(e,t){p(this,o).set(e,t)}};o=new WeakMap;var O=new Set(["lazy","caseSensitive","path","id","index","children"]),$=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function N(e,t,r=[],n={},a=!1){return e.map((e,o)=>{let i=[...r,String(o)],s="string"==typeof e.id?e.id:i.join("-");if(x(!0!==e.index||!e.children,"Cannot specify children on an index route"),x(a||!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),!0===e.index){let r={...e,id:s};return n[s]=j(r,t(r)),r}{let r={...e,id:s,children:void 0};return n[s]=j(r,t(r)),e.children&&(r.children=N(e.children,t,i,n,a)),r}})}function j(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function F(e,t,r="/"){return H(e,t,r,!1)}function H(e,t,r,n,a){let o=X(("string"==typeof t?D(t):t).pathname||"/",r);if(null==o)return null;let i=a??z(e),s=null,l=Y(o);for(let e=0;null==s&&e<i.length;++e)s=function(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=W({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u),d=s.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=W({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:en([o,c.pathname]),pathnameBase:eo(en([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=en([o,c.pathnameBase]))}return i}(i[e],l,n);return s}function U(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function z(e){let t=function e(t,r=[],n=[],a="",o=!1){let i=(t,i,s=o,l)=>{var u,c;let d,h,f={relativePath:void 0===l?t.path||"":l,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(a)&&s)return;x(f.relativePath.startsWith(a),`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(a.length)}let m=en([a,f.relativePath]),p=n.concat(f);t.children&&t.children.length>0&&(x(!0!==t.index,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),e(t.children,r,p,m,s)),(null!=t.path||t.index)&&r.push({path:m,score:(u=m,c=t.index,h=(d=u.split("/")).length,d.some(B)&&(h+=-2),c&&(h+=2),d.filter(e=>!B(e)).reduce((e,t)=>e+(I.test(t)?3:""===t?1:10),h)),routesMeta:p})};return t.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let s=e(a.join("/")),l=[];return l.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&l.push(...s),l.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))i(e,t,!0,r);else i(e,t)}),r}(e);return t.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)}),t}var I=/^:[\w-]+$/,B=e=>"*"===e;function q(e,t={}){let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(C(!1,`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`),r=r.replace(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);let o=e.match(/^:([\w-]+)(\??)(.*)/);if(o){let[,e,r,n]=o,i=t[e];return x("?"===r||null!=i,`Missing ":${e}" param`),encodeURIComponent(a(i))+n}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=J(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}let a=s[n];return r&&!a?e[t]=void 0:e[t]=(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function J(e,t=!1,r=!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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,a,o)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Y(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 a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function X(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var V=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function K(e,t="/"){let{pathname:r,search:n="",hash:a=""}="string"==typeof e?D(e):e;return{pathname:r?(r=er(r)).startsWith("/")?G(r.substring(1),"/"):G(r,t):t,search:ei(n),hash:es(a)}}function G(e,t){let r=ea(t).split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function Z(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Q(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function ee(e){let t=Q(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function et(e,t,r,n=!1){let a,o;"string"==typeof e?a=D(e):(x(!(a={...e}).pathname||!a.pathname.includes("?"),Z("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),Z("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),Z("#","search","hash",a)));let i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=K(a,o),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var er=e=>e.replace(/\/\/+/g,"/"),en=e=>er(e.join("/")),ea=e=>e.replace(/\/+$/,""),eo=e=>ea(e).replace(/^\/*/,"/"),ei=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",es=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",el=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function eu(e,t){return new el(e,"number"==typeof t?{status:t}:t)}var ec=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},ed=(e,t)=>{let r=ec(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},eh=(e,t)=>{let r=ec(e,t);return r.headers.set("X-Remix-Replace","true"),r},ef=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function em(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ep(e){return en(e.map(e=>e.route.path).filter(Boolean))||"/"}var ey="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function eg(e,t){let r=e;if("string"!=typeof r||!V.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(ey)try{let e=new URL(window.location.href),n=new URL(r.startsWith("//")?e.protocol+r:r),o=X(n.pathname,t);n.origin===e.origin&&null!=o?r=o+n.search+n.hash:a=!0}catch(e){C(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var ev=Symbol("Uninstrumented");function ew(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){for(let t of Object.keys(r))e[t]&&r[t].push(e[t])}}));let n={};if("function"==typeof t.lazy&&r.lazy.length>0){let e=eb(r.lazy,t.lazy,()=>void 0);e&&(n.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach(t=>{let a=e[t],o=r[`lazy.${t}`];if("function"==typeof a&&o.length>0){let e=eb(o,a,()=>void 0);e&&(n.lazy=Object.assign(n.lazy||{},{[t]:e}))}})}return["loader","action"].forEach(e=>{let a=t[e];if("function"==typeof a&&r[e].length>0){let t=a[ev]??a,o=eb(r[e],t,(...e)=>eR(e[0]));o&&("loader"===e&&!0===t.hydrate&&(o.hydrate=!0),o[ev]=t,n[e]=o)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(e=>{let t=e[ev]??e,n=eb(r.middleware,t,(...e)=>eR(e[0]));return n?(n[ev]=t,n):e})),n}function eb(e,t,r){return 0===e.length?null:async(...n)=>{let a=await eE(e,r(...n),()=>t(...n),e.length-1);if("error"===a.type)throw a.value;return a.value}}async function eE(e,t,r,n){let a,o=e[n];if(o){let i,s=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=eE(e,t,r,n-1),x(a=await i,"Expected a result"),"error"===a.type&&a.value instanceof Error)?{status:"error",error:a.value}:{status:"success",error:void 0};try{await o(s,t)}catch(e){console.error("An instrumentation function threw an error:",e)}i||await s(),await i}else try{let e=await r();a={type:"success",value:e}}catch(e){a={type:"error",value:e}}return a||{type:"error",value:Error("No result assigned in instrumentation chain.")}}function eR(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:ex(t),params:{...n},pattern:a,context:eC(r)}}function eS(e,t){return{currentUrl:L(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function ex(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function eC(e){if(!function(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===ek}(e))return{get:t=>e.get(t)};{let t={...e};return Object.freeze(t),t}}var ek=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),eP=["POST","PUT","PATCH","DELETE"],eL=new Set(eP),eD=new Set(["GET",...eP]),eA=new Set([301,302,303,307,308]),e_=new Set([307,308]),eT={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},eM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},eO={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},e$=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),eN="remix-router-transitions",ej=Symbol("ResetLoaderData"),eF=class{constructor(e){y(this,i),y(this,s),y(this,l),y(this,u),g(this,i,e),g(this,s,z(e))}get stableRoutes(){return p(this,i)}get activeRoutes(){return p(this,l)??p(this,i)}get branches(){return p(this,u)??p(this,s)}get hasHMRRoutes(){return null!=p(this,l)}setRoutes(e){g(this,i,e),g(this,s,z(e))}setHmrRoutes(e){g(this,l,e),g(this,u,z(e))}commitHmrRoutes(){p(this,l)&&(g(this,i,p(this,l)),g(this,s,p(this,u)),g(this,l,void 0),g(this,u,void 0))}};function eH(e){let t,r,n,a,o,i=e.window?e.window:"u">typeof window?window:void 0,s=void 0!==i&&void 0!==i.document&&void 0!==i.document.createElement;x(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=e.hydrationRouteProperties||[],u=e.mapRouteProperties||e$,c=u;if(e.instrumentations){let t=e.instrumentations;c=e=>({...u(e),...ew(t.map(e=>e.route).filter(Boolean),e)})}let d={},h=new eF(N(e.routes,c,void 0,d)),f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let m=e.dataStrategy||e4,p={...e.future},y=null,g=new Set,v=null,w=null,b=null,E=null,R=null!=e.hydrationData,S=H(h.activeRoutes,e.history.location,f,!1,h.branches),k=!1,A=null;if(null!=S||e.patchRoutesOnNavigation)if(S&&!e.hydrationData&&eI(S,h.activeRoutes,e.history.location.pathname).active&&(S=null),S)if(S.some(e=>e.route.lazy))t=!1,r=!0;else if(S.some(e=>eY(e.route))){let n=e.hydrationData?e.hydrationData.loaderData:null,a=e.hydrationData?e.hydrationData.errors:null,o=S;if(a){let e=S.findIndex(e=>void 0!==a[e.route.id]);o=o.slice(0,e+1)}r=!1,t=!0,o.forEach(e=>{let o=eX(e.route,n,a);r=r||o.renderFallback,t=t&&!o.shouldLoad})}else t=!0,r=!1;else{t=!1,r=!0,S=[];let n=eI(null,h.activeRoutes,e.history.location.pathname);n.active&&n.matches&&(k=!0,S=n.matches)}else{let n=tv(404,{pathname:e.history.location.pathname}),{matches:a,route:o}=tg(h.activeRoutes);t=!0,r=!1,S=a,A={[o.id]:n}}let T={historyAction:e.history.action,location:e.history.location,matches:S,initialized:t,renderFallback:r,navigation:eT,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},O="POP",$=null,j=!1,F=!1,z=new Map,I=null,B=!1,q=!1,W=new Set,J=new Map,Y=0,K=-1,G=new Map,Z=new Set,Q=new Map,ee=new Map,et=new Set,er=new Map,en=null;function ea(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=d[e.route.id],r=e.route;return r.element!==t.element||r.errorElement!==t.errorElement||r.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}));let r=[],n=[];(T={...T,...e}).fetchers.forEach((e,t)=>{"idle"===e.state&&(et.has(t)?r.push(t):n.push(t))}),et.forEach(e=>{T.fetchers.has(e)||J.has(e)||r.push(e)}),0===g.size&&(v={newErrors:e.errors??null}),[...g].forEach(n=>n(T,{deletedFetchers:r,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>ex(T.fetchers,e)),n.forEach(e=>T.fetchers.delete(e))}function eo(t,r,{flushSync:n}={}){let a,o,i=null!=T.actionData&&null!=T.navigation.formMethod&&tM(T.navigation.formMethod)&&"loading"===T.navigation.state&&t.state?._isRedirect!==!0;a=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:i?T.actionData:null;let s=r.loaderData?tm(T.loaderData,r.loaderData,r.matches||[],r.errors):T.loaderData,l=T.blockers;l.size>0&&(l=new Map(l)).forEach((e,t)=>l.set(t,eO));let u=!B&&ez(t,r.matches||T.matches),c=!0===j||null!=T.navigation.formMethod&&tM(T.navigation.formMethod)&&t.state?._isRedirect!==!0;if(h.commitHmrRoutes(),B||"POP"===O||("PUSH"===O?e.history.push(t,t.state):"REPLACE"===O&&e.history.replace(t,t.state)),"POP"===O){let e=z.get(T.location.pathname);e&&e.has(t.pathname)?o={currentLocation:T.location,nextLocation:t}:z.has(t.pathname)&&(o={currentLocation:t,nextLocation:T.location})}else if(F){let e=z.get(T.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(T.location.pathname,e)),o={currentLocation:T.location,nextLocation:t}}ea({...r,actionData:a,loaderData:s,historyAction:O,location:t,initialized:!0,renderFallback:!1,navigation:eT,revalidation:"idle",restoreScrollPosition:u,preventScrollReset:c,blockers:l},{viewTransitionOpts:o,flushSync:!0===n}),O="POP",j=!1,F=!1,B=!1,q=!1,$?.resolve(),$=null,en?.resolve(),en=null}async function ei(t,r){let n;if($?.resolve(),$=null,"number"==typeof t){$||($=tU());let r=$.promise;return e.history.go(t),r}let{path:a,submission:o,error:i}=eW(!1,eq(T.location,T.matches,f,t,r?.fromRouteId,r?.relative),r);r?.mask&&(n={pathname:"",search:"",hash:"",..."string"==typeof r.mask?D(r.mask):{...T.location.mask,...r.mask}});let s=T.location,l=P(s,a,r&&r.state,void 0,n);l={...l,...e.history.encodeLocation(l)};let u=r&&null!=r.replace?r.replace:void 0,c="PUSH";!0===u?c="REPLACE":!1===u||null!=o&&tM(o.formMethod)&&o.formAction===T.location.pathname+T.location.search&&(c="REPLACE");let d=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),m=ej({currentLocation:s,nextLocation:l,historyAction:c});m?eA(m,{state:"blocked",location:l,proceed(){eA(m,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),ei(t,r)},reset(){let e=new Map(T.blockers);e.set(m,eO),ea({blockers:e})}}):await es(c,l,{submission:o,pendingError:i,preventScrollReset:d,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.defaultShouldRevalidate})}async function es(t,r,n){var o,i,s,l;let u;a&&a.abort(),a=null,O=t,B=!0===(n&&n.startUninterruptedRevalidation),o=T.location,i=T.matches,w&&E&&(w[eU(o,i)]=E()),j=!0===(n&&n.preventScrollReset),F=!0===(n&&n.enableViewTransition);let c=h.activeRoutes,d=n?.initialHydration&&T.matches&&T.matches.length>0&&!k?T.matches:H(c,r,f,!1,h.branches),m=!0===(n&&n.flushSync);if(d&&T.initialized&&!q&&(s=T.location,l=r,s.pathname===l.pathname&&s.search===l.search&&(""===s.hash?""!==l.hash:s.hash===l.hash||""!==l.hash||!1))&&!(n&&n.submission&&tM(n.submission.formMethod)))return void eo(r,{matches:d},{flushSync:m});let p=eI(d,c,r.pathname);if(p.active&&p.matches&&(d=p.matches),!d){let{error:e,notFoundMatches:t,route:n}=eH(r.pathname);eo(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:m});return}let y=n&&n.overrideNavigation?{...n.overrideNavigation,matches:d,historyAction:t}:void 0;a=new AbortController;let g=tl(e.history,r,a.signal,n&&n.submission),v=e.getContext?await e.getContext():new M;if(n&&n.pendingError)u=[ty(d).route.id,{type:"error",error:n.pendingError}];else if(n&&n.submission&&tM(n.submission.formMethod)){let o=await el(g,r,n.submission,d,t,v,p.active,n&&!0===n.initialHydration,{replace:n.replace,flushSync:m});if(o.shortCircuited)return;if(o.pendingActionResult){let[e,t]=o.pendingActionResult;if(tk(t)&&em(t.error)&&404===t.error.status){a=null,eo(r,{matches:o.matches,loaderData:{},errors:{[e]:t.error}});return}}d=o.matches||d,u=o.pendingActionResult,y=tj(r,d,t,n.submission),m=!1,p.active=!1,g=tl(e.history,g.url,g.signal)}let{shortCircuited:b,matches:R,loaderData:S,errors:x,workingFetchers:C}=await eu(g,r,d,t,v,p.active,y,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,m,u,n&&n.callSiteDefaultShouldRevalidate);b||(a=null,eo(r,{matches:R||d,...tp(u),loaderData:S,errors:x,...C?{fetchers:C}:{}}))}async function el(t,r,n,a,o,i,s,u,m={}){var p,y,g;let v;if(eg(),ea({navigation:(p=r,y=a,{state:"submitting",location:p,matches:y,historyAction:o,formMethod:(g=n).formMethod,formAction:g.formAction,formEncType:g.formEncType,formData:g.formData,json:g.json,text:g.text})},{flushSync:!0===m.flushSync}),s){let e=await eB(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=tg(h.activeRoutes);return{matches:t,pendingActionResult:[r.id,{type:"error",error:e.error}]}}let t=ty(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(e.matches)a=e.matches;else{let{notFoundMatches:e,error:t,route:n}=eH(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:t}]}}}let w=t$(a,r);if(w.route.action||w.route.lazy){let e=te(c,d,t,r,a,w,u?[]:l,i),n=await ep(t,r,e,i,null);if(!(v=n[w.route.id])){for(let e of a)if(n[e.route.id]){v=n[e.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}else v={type:"error",error:tv(405,{method:t.method,pathname:r.pathname,routeId:w.route.id})};if(tP(v)){let r;return r=m&&null!=m.replace?m.replace:ts(v.response.headers.get("Location"),new URL(t.url),f,e.history)===T.location.pathname+T.location.search,await ef(t,v,!0,{submission:n,replace:r}),{shortCircuited:!0}}if(tk(v)){let e=ty(a,w.route.id);return!0!==(m&&m.replace)&&(O="PUSH"),{matches:a,pendingActionResult:[e.route.id,v,w.route.id]}}return{matches:a,pendingActionResult:[w.route.id,v]}}async function eu(t,r,n,o,i,s,u,m,p,y,g,v,w,b){let E=u||tj(r,n,o,m),R=m||p||tN(E),S=!B&&!g;if(s){if(S){let e=ec(w);ea({navigation:E,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await eB(n,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=tg(h.activeRoutes);return{matches:t,loaderData:{},errors:{[r.id]:e.error}}}let t=ty(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)n=e.matches;else{let{error:e,notFoundMatches:t,route:n}=eH(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}}let x=h.activeRoutes,{dsMatches:C,revalidatingFetchers:k}=eJ(t,i,c,d,e.history,T,n,R,r,g?[]:l,!0===g,q,W,et,Q,Z,x,f,null!=e.patchRoutesOnNavigation,h.branches,w,b);if(K=++Y,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&0===k.length){let e=new Map(T.fetchers),t=eP(e);return eo(r,{matches:n,loaderData:{},errors:w&&tk(w[1])?{[w[0]]:w[1].error}:null,...tp(w),...t?{fetchers:e}:{}},{flushSync:v}),{shortCircuited:!0}}if(S){var P;let e,t={};if(!s){t.navigation=E;let e=ec(w);void 0!==e&&(t.actionData=e)}k.length>0&&(P=k,e=new Map(T.fetchers),P.forEach(t=>{let r=e.get(t.key),n=tF(void 0,r?r.data:void 0);e.set(t.key,n)}),t.fetchers=e),ea(t,{flushSync:v})}k.forEach(e=>{eC(e.key),e.controller&&J.set(e.key,e.controller)});let L=()=>k.forEach(e=>eC(e.key));a&&a.signal.addEventListener("abort",L);let{loaderResults:D,fetcherResults:A}=await ey(C,k,t,r,i);if(t.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener("abort",L),k.forEach(e=>J.delete(e.key));let _=tw(D);if(_)return await ef(t,_.result,!0,{replace:y}),{shortCircuited:!0};if(_=tw(A))return Z.add(_.key),await ef(t,_.result,!0,{replace:y}),{shortCircuited:!0};let M=new Map(T.fetchers),{loaderData:O,errors:$}=tf(T,n,D,w,k,A,M);g&&T.errors&&($={...T.errors,...$});let N=eP(M),j=eL(K,M);return{matches:n,loaderData:O,errors:$,...N||j||k.length>0?{workingFetchers:M}:{}}}function ec(e){if(e&&!tk(e[1]))return{[e[0]]:e[1].data};if(T.actionData)if(0===Object.keys(T.actionData).length)return null;else return T.actionData}async function ed(t,r,n,o,i,s,u,m,p,y){var g,v;eg(),Q.delete(t);let w=T.fetchers.get(t);eE(t,(g=p,v=w,{state:"submitting",formMethod:g.formMethod,formAction:g.formAction,formEncType:g.formEncType,formData:g.formData,json:g.json,text:g.text,data:v?v.data:void 0}),{flushSync:u});let b=new AbortController,E=tl(e.history,n,b.signal,p);if(s){let e=await eB(o,new URL(E.url).pathname,E.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void eR(t,r,e.error,{flushSync:u});if(!e.matches)return void eR(t,r,tv(404,{pathname:n}),{flushSync:u});o=e.matches}let R=t$(o,n);if(!R.route.action&&!R.route.lazy){let e=tv(405,{method:p.formMethod,pathname:n,routeId:r});eR(t,r,e,{flushSync:u});return}J.set(t,b);let S=Y,C=te(c,d,E,n,o,R,l,i),k=await ep(E,n,C,i,t),P=k[R.route.id];if(!P){for(let e of C)if(k[e.route.id]){P=k[e.route.id];break}}if(E.signal.aborted){J.get(t)===b&&J.delete(t);return}if(et.has(t)){if(tP(P)||tk(P))return void eE(t,tH(void 0))}else{if(tP(P))return(J.delete(t),K>S)?void eE(t,tH(void 0)):(Z.add(t),eE(t,tF(p)),ef(E,P,!1,{fetcherSubmission:p,preventScrollReset:m}));if(tk(P))return void eR(t,r,P.error)}let L=T.navigation.location||T.location,D=tl(e.history,L,b.signal),A=h.activeRoutes,_="idle"!==T.navigation.state?H(A,T.navigation.location,f,!1,h.branches):T.matches;x(_,"Didn't find any matches after fetcher action");let M=++Y;G.set(t,M);let{dsMatches:$,revalidatingFetchers:N}=eJ(D,i,c,d,e.history,T,_,p,L,l,!1,q,W,et,Q,Z,A,f,null!=e.patchRoutesOnNavigation,h.branches,[R.route.id,P],y),j=tF(p,P.data),F=new Map(T.fetchers);F.set(t,j),N.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=F.get(t),n=tF(void 0,r?r.data:void 0);F.set(t,n),eC(t),e.controller&&J.set(t,e.controller)}),ea({fetchers:F});let U=()=>N.forEach(e=>eC(e.key));b.signal.addEventListener("abort",U);let{loaderResults:z,fetcherResults:I}=await ey($,N,D,L,i);if(b.signal.aborted)return;b.signal.removeEventListener("abort",U),G.delete(t),J.delete(t),N.forEach(e=>J.delete(e.key));let B=T.fetchers.has(t),X=e=>{if(!B)return e;let r=new Map(e.fetchers);return r.set(t,tH(P.data)),{...e,fetchers:r}},V=tw(z);if(V)return T=X(T),ef(D,V.result,!1,{preventScrollReset:m});if(V=tw(I))return Z.add(V.key),T=X(T),ef(D,V.result,!1,{preventScrollReset:m});let ee=new Map(T.fetchers);B&&ee.set(t,tH(P.data));let{loaderData:er,errors:en}=tf(T,_,z,void 0,N,I,ee);eL(M,ee),"loading"===T.navigation.state&&M>K?(x(O,"Expected pending action"),a&&a.abort(),eo(T.navigation.location,{matches:_,loaderData:er,errors:en,fetchers:ee})):(ea({errors:en,loaderData:tm(T.loaderData,er,_,en),fetchers:ee}),q=!1)}async function eh(t,r,n,a,o,i,s,u,h){let f=T.fetchers.get(t);eE(t,tF(h,f?f.data:void 0),{flushSync:s});let m=new AbortController,p=tl(e.history,n,m.signal);if(i){let e=await eB(a,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void eR(t,r,e.error,{flushSync:s});if(!e.matches)return void eR(t,r,tv(404,{pathname:n}),{flushSync:s});a=e.matches}let y=t$(a,n);J.set(t,m);let g=Y,v=te(c,d,p,n,a,y,l,o),w=await ep(p,n,v,o,t),b=w[y.route.id];if(!b){for(let e of a)if(w[e.route.id]){b=w[e.route.id];break}}if(J.get(t)===m&&J.delete(t),!p.signal.aborted){if(et.has(t))return void eE(t,tH(void 0));if(tP(b))if(K>g)return void eE(t,tH(void 0));else{Z.add(t),await ef(p,b,!1,{preventScrollReset:u});return}if(tk(b))return void eR(t,r,b.error);eE(t,tH(b.data))}}async function ef(t,r,n,{submission:o,fetcherSubmission:l,preventScrollReset:u,replace:c}={}){n||($?.resolve(),$=null),r.response.headers.has("X-Remix-Revalidate")&&(q=!0);let d=r.response.headers.get("Location");x(d,"Expected a Location header on the redirect Response"),d=ts(d,new URL(t.url),f,e.history);let h=P(T.location,d,{_isRedirect:!0});if(s){let e=!1;if(r.response.headers.has("X-Remix-Reload-Document"))e=!0;else{let t;if(t=d,V.test(t)){let t=_(i,d,!0);e=t.origin!==i.location.origin||null==X(t.pathname,f)}}if(e)return void(c?i.location.replace(d):i.location.assign(d))}a=null;let m=!0===c||r.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:p,formAction:y,formEncType:g}=T.navigation;!o&&!l&&p&&y&&g&&(o=tN(T.navigation));let v=o||l;if(e_.has(r.response.status)&&v&&tM(v.formMethod))await es(m,h,{submission:{...v,formAction:d},preventScrollReset:u||j,enableViewTransition:n?F:void 0});else{let e=tj(h,[],m,o);await es(m,h,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||j,enableViewTransition:n?F:void 0})}}async function ep(e,t,r,n,a){let o,i={};try{o=await tt(m,e,t,r,a,n,!1)}catch(e){return r.filter(e=>e.shouldLoad).forEach(t=>{i[t.route.id]={type:"error",error:e}}),i}if(e.signal.aborted)return i;if(!tM(e.method))for(let e of r){if(o[e.route.id]?.type==="error")break;!o.hasOwnProperty(e.route.id)&&!T.loaderData.hasOwnProperty(e.route.id)&&(!T.errors||!T.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(o[e.route.id]={type:"error",result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,n]of Object.entries(o))if(tC(n)){let a=n.result;i[t]={type:"redirect",response:to(a,e,t,r,f)}}else i[t]=await ta(n);return i}async function ey(e,t,r,n,a){let o=ep(r,n,e,a,null),i=Promise.all(t.map(async e=>{if(!e.matches||!e.match||!e.request||!e.controller)return Promise.resolve({[e.key]:{type:"error",error:tv(404,{pathname:e.path})}});{let t=(await ep(e.request,e.path,e.matches,a,e.key))[e.match.route.id];return{[e.key]:t}}}));return{loaderResults:await o,fetcherResults:(await i).reduce((e,t)=>Object.assign(e,t),{})}}function eg(){q=!0,Q.forEach((e,t)=>{J.has(t)&&W.add(t),eC(t)})}function eE(e,t,r={}){let n=new Map(T.fetchers);n.set(e,t),ea({fetchers:n},{flushSync:!0===(r&&r.flushSync)})}function eR(e,t,r,n={}){let a=ty(T.matches,t),o=new Map(T.fetchers);ex(o,e),ea({errors:{[a.route.id]:r},fetchers:o},{flushSync:!0===(n&&n.flushSync)})}function ex(e,t){let r=T.fetchers.get(t);J.has(t)&&!(r&&"loading"===r.state&&G.has(t))&&eC(t),Q.delete(t),G.delete(t),Z.delete(t),et.delete(t),W.delete(t),e.delete(t)}function eC(e,t){let r=J.get(e);r&&(r.abort(t),J.delete(e))}function ek(e,t){for(let r of e){let e=t.get(r);x(e,`Expected fetcher: ${r}`);let n=tH(e.data);t.set(r,n)}}function eP(e){let t=[],r=!1;for(let n of Z){let a=e.get(n);x(a,`Expected fetcher: ${n}`),"loading"===a.state&&(Z.delete(n),t.push(n),r=!0)}return ek(t,e),r}function eL(e,t){let r=[];for(let[n,a]of G)if(a<e){let e=t.get(n);x(e,`Expected fetcher: ${n}`),"loading"===e.state&&(eC(n),G.delete(n),r.push(n))}return ek(r,t),r.length>0}function eD(e){T.blockers.delete(e),er.delete(e)}function eA(e,t){let r=T.blockers.get(e)||eO;x("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(T.blockers);n.set(e,t),ea({blockers:n})}function ej({currentLocation:e,nextLocation:t,historyAction:r}){if(0===er.size)return;er.size>1&&C(!1,"A router only supports one blocker at a time");let n=Array.from(er.entries()),[a,o]=n[n.length-1],i=T.blockers.get(a);if((!i||"proceeding"!==i.state)&&o({currentLocation:e,nextLocation:t,historyAction:r}))return a}function eH(e){let t=tv(404,{pathname:e}),{matches:r,route:n}=tg(h.activeRoutes);return{notFoundMatches:r,route:n,error:t}}function eU(e,t){return b&&b(e,t.map(e=>U(e,T.loaderData)))||e.key}function ez(e,t){if(w){let r=w[eU(e,t)];if("number"==typeof r)return r}return null}function eI(t,r,n){if(e.patchRoutesOnNavigation){let e=h.branches;if(!t)return{active:!0,matches:H(r,n,f,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:H(r,n,f,!0,e)}}return{active:!1,matches:null}}async function eB(t,r,n,a){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let o=t;for(;;){let t=d;try{await e.patchRoutesOnNavigation({signal:n,path:r,matches:o,fetcherKey:a,patch:(e,r)=>{n.aborted||eK(e,r,h,t,c,!1)}})}catch(e){return{type:"error",error:e,partialMatches:o}}if(n.aborted)return{type:"aborted"};let i=h.branches,s=H(h.activeRoutes,r,f,!1,i),l=null;if(s){if(0===Object.keys(s[0].params).length)return{type:"success",matches:s};else if(!((l=H(h.activeRoutes,r,f,!0,i))&&o.length<l.length&&eV(o,l.slice(0,o.length))))return{type:"success",matches:s}}if(l||(l=H(h.activeRoutes,r,f,!0,i)),!l||eV(o,l))return{type:"success",matches:null};o=l}}function eV(e,t){return e.length===t.length&&e.every((e,r)=>e.route.id===t[r].route.id)}return n={get basename(){return f},get future(){return p},get state(){return T},get routes(){return h.stableRoutes},get branches(){return h.branches},get manifest(){return d},get window(){return i},initialize:function(){if(y=e.history.listen(({action:t,location:r,delta:n})=>{if(o){o(),o=void 0;return}C(0===er.size||null!=n,"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=ej({currentLocation:T.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{o=e});e.history.go(-1*n),eA(a,{state:"blocked",location:r,proceed(){eA(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(T.blockers);e.set(a,eO),ea({blockers:e})}}),$?.resolve(),$=null;return}return es(t,r)}),s){var t=i,r=z;try{let e=t.sessionStorage.getItem(eN);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(eN,JSON.stringify(r))}catch(e){C(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}})(i,z);i.addEventListener("pagehide",e),I=()=>i.removeEventListener("pagehide",e)}return T.initialized||es("POP",T.location,{initialHydration:!0}),n},subscribe:function(e){if(g.add(e),v){let{newErrors:t}=v;v=null,e(T,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>g.delete(e)},enableScrollRestoration:function(e,t,r){if(w=e,E=t,b=r||null,!R&&T.navigation===eT){R=!0;let e=ez(T.location,T.matches);null!=e&&ea({restoreScrollPosition:e})}return()=>{w=null,E=null,b=null}},navigate:ei,fetch:async function t(t,r,n,a){eC(t);let o=!0===(a&&a.flushSync),i=h.activeRoutes,s=eq(T.location,T.matches,f,n,r,a?.relative),l=H(i,s,f,!1,h.branches),u=eI(l,i,s);if(u.active&&u.matches&&(l=u.matches),!l)return void eR(t,r,tv(404,{pathname:s}),{flushSync:o});let{path:c,submission:d,error:m}=eW(!0,s,a);if(m)return void eR(t,r,m,{flushSync:o});let p=e.getContext?await e.getContext():new M,y=!0===(a&&a.preventScrollReset);d&&tM(d.formMethod)?await ed(t,r,c,l,p,u.active,o,y,d,a&&a.defaultShouldRevalidate):(Q.set(t,{routeId:r,path:c}),await eh(t,r,c,l,p,u.active,o,y,d))},revalidate:function(){en||(en=tU()),eg(),ea({revalidation:"loading"});let e=en.promise;return"submitting"===T.navigation.state||("idle"===T.navigation.state?es(T.historyAction,T.location,{startUninterruptedRevalidation:!0}):es(O||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:!0===F})),e},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:function(e){return ee.set(e,(ee.get(e)||0)+1),et.has(e)&&et.delete(e),T.fetchers.get(e)||eM},resetFetcher:function(e,t){eC(e,t?.reason),eE(e,tH(null))},deleteFetcher:function(e){let t=(ee.get(e)||0)-1;t<=0?(ee.delete(e),et.add(e)):ee.set(e,t),ea({fetchers:new Map(T.fetchers)})},dispose:function(){y&&y(),I&&I(),g.clear(),a&&a.abort(),T.fetchers.forEach((e,t)=>ex(T.fetchers,t)),T.blockers.forEach((e,t)=>eD(t))},getBlocker:function(e,t){let r=T.blockers.get(e)||eO;return er.get(e)!==t&&er.set(e,t),r},deleteBlocker:eD,patchRoutes:function(e,t,r=!1){eK(e,t,h,d,c,r),h.hasHMRRoutes||ea({})},_internalFetchControllers:J,_internalSetRoutes:function(e){d={},h.setHmrRoutes(N(e,c,void 0,d))},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ea(e)}},e.instrumentations&&(n=function(e,t){let r={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){for(let t of Object.keys(e))e[t]&&r[t].push(e[t])}})),r.navigate.length>0){let t=e.navigate[ev]??e.navigate,n=eb(r.navigate,t,(...t)=>{let[r,n]=t;return{to:"number"==typeof r||"string"==typeof r?r:r?L(r):".",...eS(e,n??{})}});n&&(n[ev]=t,e.navigate=n)}if(r.fetch.length>0){let t=e.fetch[ev]??e.fetch,n=eb(r.fetch,t,(...t)=>{let[r,,n,a]=t;return{href:n??".",fetcherKey:r,...eS(e,a??{})}});n&&(n[ev]=t,e.fetch=n)}return e}(n,e.instrumentations.map(e=>e.router).filter(Boolean))),n}function eU(e,t){x(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a=t?.mapRouteProperties||e$,o=a;if({...t?.future},t?.instrumentations){let e=t.instrumentations;o=t=>({...a(t),...ew(e.map(e=>e.route).filter(Boolean),t)})}let i=N(e,o,void 0,r),s=z(i);async function l(e,{requestContext:t,filterMatchesToLoad:a,skipLoaderErrorBubbling:u,skipRevalidation:d,dataStrategy:h,generateMiddlewareResponse:f,normalizePath:m}={}){let p=e.method,y=P("",(m||eB)(e),null,"default"),g=H(i,y,n,!1,s);if(t=null!=t?t:new M,tT(p)||"HEAD"===p){if(!g){let e=tv(404,{pathname:y.pathname}),{matches:t,route:r}=tg(i),a={basename:n,location:y,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}};return f?f(()=>Promise.resolve(a)):a}}else{let e=tv(405,{method:p}),{matches:t,route:r}=tg(i),a={basename:n,location:y,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}};return f?f(()=>Promise.resolve(a)):a}if(f){x(t instanceof M,"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`");try{let s;await e1(g,r,o);let l=await e8({request:e,url:tu(e,y),pattern:ep(g),matches:g,params:g[0].params,context:t},async()=>await f(async(e,r={})=>{let o=await c(e,y,g,t,h||null,!0===u,null,"filterMatchesToLoad"in r?r.filterMatchesToLoad??null:a??null,!0===d);return tD(o)?o:s={location:y,basename:n,...o}}),async(e,t)=>{if(t_(e))return e;if(tD(e))try{e=new ef(e.status,e.statusText,await tn(e))}catch(t){e=t}if(tL(e)&&(e=tR(e)),s){t in s.loaderData&&(s.loaderData[t]=void 0);let r=ez(i,s,e,u?t:ty(g,t).route.id);return f(()=>Promise.resolve(r))}{let r=u?t:ty(g,g.find(e=>e.route.id===t||e.route.loader)?.route.id||t).route.id,a={matches:g,location:y,basename:n,loaderData:{},actionData:null,errors:{[r]:e},statusCode:em(e)?e.status:500,actionHeaders:{},loaderHeaders:{}};return f(()=>Promise.resolve(a))}});return x(tD(l),"Expected a response in query()"),l}catch(e){if(tD(e))return e;throw e}}let v=await c(e,y,g,t,h||null,!0===u,null,a||null,!0===d);return tD(v)?v:{location:y,basename:n,...v}}async function u(e,{routeId:t,requestContext:a,dataStrategy:l,generateMiddlewareResponse:d,normalizePath:h}={}){let f=e.method,m=P("",(h||eB)(e),null,"default"),p=H(i,m,n,!1,s);if(a=null!=a?a:new M,tT(f)||"HEAD"===f||"OPTIONS"===f){if(!p)throw tv(404,{pathname:m.pathname})}else throw tv(405,{method:f});let y=t?p.find(e=>e.route.id===t):t$(p,m);if(t&&!y)throw tv(403,{pathname:m.pathname,routeId:t});if(!y)throw tv(404,{pathname:m.pathname});if(d)return x(a instanceof M,"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`"),await e1(p,r,o),await e8({request:e,url:tu(e,m),pattern:ep(p),matches:p,params:p[0].params,context:a},async()=>await d(async e=>{let t=g(await c(e,m,p,a,l||null,!1,y,null,!1));return tD(t)?t:"string"==typeof t?new Response(t):Response.json(t)}),e=>{if(tL(e))return Promise.resolve(tE(e));if(tD(e))return Promise.resolve(e);throw e});return g(await c(e,m,p,a,l||null,!1,y,null,!1));function g(e){if(tD(e))return e;let t=e.errors?Object.values(e.errors)[0]:void 0;if(void 0!==t)throw t;return e.actionData?Object.values(e.actionData)[0]:e.loaderData?Object.values(e.loaderData)[0]:void 0}}async function c(e,t,r,n,a,o,i,s,l){x(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(tM(e.method))return await d(e,t,r,i||t$(r,t),n,a,o,null!=i,s,l);let u=await h(e,t,r,n,a,o,i,s);return tD(u)?u:{...u,actionData:null,actionHeaders:{}}}catch(e){if(tx(e)&&tD(e.result)){if("error"===e.type)throw e.result;return e.result}if(t_(e))return e;throw e}}async function d(e,t,n,a,i,s,l,u,c,d){let m;if(a.route.action||a.route.lazy){let l=te(o,r,e,t,n,a,[],i);m=(await f(e,t,l,u,i,s))[a.route.id],e.signal.aborted&&eI(e,u)}else{let t=tv(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:a.route.id});if(u)throw t;m={type:"error",error:t}}if(tP(m))throw new Response(null,{status:m.response.status,headers:{Location:m.response.headers.get("Location")}});if(u){if(tk(m))throw m.error;return{matches:[a],loaderData:{},actionData:{[a.route.id]:m.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(d)if(!tk(m))return{actionData:{[a.route.id]:m.data},actionHeaders:m.headers?{[a.route.id]:m.headers}:{},matches:n,loaderData:{},errors:null,statusCode:m.statusCode||200,loaderHeaders:{}};else{let e=l?a:ty(n,a.route.id);return{statusCode:em(m.error)?m.error.status:null!=m.statusCode?m.statusCode:500,actionData:null,actionHeaders:{...m.headers?{[a.route.id]:m.headers}:{}},matches:n,loaderData:{},errors:{[e.route.id]:m.error},loaderHeaders:{}}}let p=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(tk(m)){let e=l?a:ty(n,a.route.id);return{...await h(p,t,n,i,s,l,null,c,[e.route.id,m]),statusCode:em(m.error)?m.error.status:null!=m.statusCode?m.statusCode:500,actionData:null,actionHeaders:{...m.headers?{[a.route.id]:m.headers}:{}}}}return{...await h(p,t,n,i,s,l,null,c),actionData:{[a.route.id]:m.data},...m.statusCode?{statusCode:m.statusCode}:{},actionHeaders:m.headers?{[a.route.id]:m.headers}:{}}}async function h(e,t,n,a,i,s,l,u,c){let d,h=null!=l;if(h&&!l?.route.loader&&!l?.route.lazy)throw tv(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:l?.route.id});if(l)d=te(o,r,e,t,n,l,[],a);else{let i=c&&tk(c[1])?n.findIndex(e=>e.route.id===c[0])-1:void 0,s=ep(n);d=n.map((n,l)=>null!=i&&l>i?e7(o,r,e,t,s,n,[],a,!1):e7(o,r,e,t,s,n,[],a,null!=(n.route.loader||n.route.lazy)&&(!u||u(n))))}if(!i&&!d.some(e=>e.shouldLoad))return{matches:n,loaderData:{},errors:c&&tk(c[1])?{[c[0]]:c[1].error}:null,statusCode:200,loaderHeaders:{}};let m=await f(e,t,d,h,a,i);return e.signal.aborted&&eI(e,h),{...th(n,m,c,!0,s),matches:n}}async function f(e,t,r,a,o,i){let s=await tt(i||e2,e,t,r,null,o,!0),l={};return await Promise.all(r.map(async t=>{if(!(t.route.id in s))return;let o=s[t.route.id];if(tC(o))throw to(o.result,e,t.route.id,r,n);if(a){if(tD(o.result))throw o;else if(tL(o.result))throw tE(o.result)}l[t.route.id]=await ta(o)})),l}return{dataRoutes:i,_internalRouteBranches:s,query:l,queryRoute:u}}function ez(e,t,r,n){let a=n||t._deepestRenderedBoundaryId||e[0].id;return{...t,statusCode:em(r)?r.status:500,errors:{[a]:r}}}function eI(e,t){if(void 0!==e.signal.reason)throw e.signal.reason;throw Error(`${t?"queryRoute":"query"}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function eB(e){let t=new URL(e.url);return{pathname:t.pathname,search:t.search,hash:t.hash}}function eq(e,t,r,n,a,o){let i,s;if(a){for(let e of(i=[],t))if(i.push(e),e.route.id===a){s=e;break}}else i=t,s=t[t.length-1];let l=et(n||".",ee(i),X(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(l.search=e.search,l.hash=e.hash),(null==n||""===n||"."===n)&&s){let e=tO(l.search);if(s.route.index&&!e)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(l.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();l.search=r?`?${r}`:""}}return"/"!==r&&(l.pathname=function({basename:e,pathname:t}){return"/"===t?e:en([e,t])}({basename:r,pathname:l.pathname})),L(l)}function eW(e,t,r){let n,a;if(!r||!(null!=r&&("formData"in r&&null!=r.formData||"body"in r&&void 0!==r.body)))return{path:t};if(r.formMethod&&!tT(r.formMethod))return{path:t,error:tv(405,{method:r.formMethod})};let o=()=>({path:t,error:tv(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=tb(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!tM(i))return o();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}
|
|
1
|
+
"use strict";(self.rspackChunk_kb_labs_release_manager_cli=self.rspackChunk_kb_labs_release_manager_cli||[]).push([[733],{8389(e,t){let r;t.qg=function(e,t){let r=new l,n=e.length;if(n<2)return r;let a=t?.decode||d,o=0;do{let t=function(e,t,r){let n=e.indexOf("=",t);return n<r?n:-1}(e,o,n);if(-1===t)break;let i=function(e,t,r){let n=e.indexOf(";",t);return -1===n?r:n}(e,o,n);if(t>i){o=e.lastIndexOf(";",t-1)+1;continue}let s=c(e,o,t);void 0===r[s]&&(r[s]=a(c(e,t+1,i))),o=i+1}while(o<n);return r},t.lK=u,t.lK=u;let n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,a=/^[\u0021-\u003A\u003C-\u007E]*$/,o=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,s=Object.prototype.toString,l=((r=function(){}).prototype=Object.create(null),r);function u(e,t,r){let l="object"==typeof e?e:{...r,name:e,value:String(t)},u=("object"==typeof t?t:r)?.encode||encodeURIComponent;if(!n.test(l.name))throw TypeError(`argument name is invalid: ${l.name}`);let c=l.value?u(l.value):"";if(!a.test(c))throw TypeError(`argument val is invalid: ${l.value}`);let d=l.name+"="+c;if(void 0!==l.maxAge){if(!Number.isInteger(l.maxAge))throw TypeError(`option maxAge is invalid: ${l.maxAge}`);d+="; Max-Age="+l.maxAge}if(l.domain){if(!o.test(l.domain))throw TypeError(`option domain is invalid: ${l.domain}`);d+="; Domain="+l.domain}if(l.path){if(!i.test(l.path))throw TypeError(`option path is invalid: ${l.path}`);d+="; Path="+l.path}if(l.expires){var h;if(h=l.expires,"[object Date]"!==s.call(h)||!Number.isFinite(l.expires.valueOf()))throw TypeError(`option expires is invalid: ${l.expires}`);d+="; Expires="+l.expires.toUTCString()}if(l.httpOnly&&(d+="; HttpOnly"),l.secure&&(d+="; Secure"),l.partitioned&&(d+="; Partitioned"),l.priority)switch("string"==typeof l.priority?l.priority.toLowerCase():void 0){case"low":d+="; Priority=Low";break;case"medium":d+="; Priority=Medium";break;case"high":d+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${l.priority}`)}if(l.sameSite)switch("string"==typeof l.sameSite?l.sameSite.toLowerCase():l.sameSite){case!0:case"strict":d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"none":d+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${l.sameSite}`)}return d}function c(e,t,r){let n=t,a=r;do{let t=e.charCodeAt(n);if(32!==t&&9!==t)break}while(++n<a);for(;a>n;){let t=e.charCodeAt(a-1);if(32!==t&&9!==t)break;a--}return e.slice(n,a)}function d(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},4981(e){var t={decodeValues:!0,map:!1,silent:!1};function r(e){return"string"!=typeof e||e in{}}function n(){return Object.create(null)}function a(e){return"string"==typeof e&&!!e.trim()}function o(e,o){var i,s,l,u,c=e.split(";").filter(a),d=(i=c.shift(),s="",l="",(u=i.split("=")).length>1?(s=u.shift(),l=u.join("=")):l=i,{name:s,value:l}),h=d.name,f=d.value;if(o=o?Object.assign({},t,o):t,r(h))return null;try{f=o.decodeValues?decodeURIComponent(f):f}catch(e){console.error("set-cookie-parser: failed to decode cookie value. Set options.decodeValues=false to disable decoding.",e)}var m=n();return m.name=h,m.value=f,c.forEach(function(e){var t=e.split("="),n=t.shift().trimLeft().toLowerCase();if(!r(n)){var a=t.join("=");if("expires"===n)m.expires=new Date(a);else if("max-age"===n){var o=parseInt(a,10);Number.isNaN(o)||(m.maxAge=o)}else"secure"===n?m.secure=!0:"httponly"===n?m.httpOnly=!0:"samesite"===n?m.sameSite=a:"partitioned"===n?m.partitioned=!0:n&&(m[n]=a)}}),m}function i(e,i){if(i=i?Object.assign({},t,i):t,!e)if(!i.map)return[];else return n();if(e.headers)if("function"==typeof e.headers.getSetCookie)e=e.headers.getSetCookie();else if(e.headers["set-cookie"])e=e.headers["set-cookie"];else{var s=e.headers[Object.keys(e.headers).find(function(e){return"set-cookie"===e.toLowerCase()})];s||!e.headers.cookie||i.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=s}if(Array.isArray(e)||(e=[e]),!i.map)return e.filter(a).map(function(e){return o(e,i)}).filter(Boolean);var l=n();return e.filter(a).reduce(function(e,t){var n=o(t,i);return n&&!r(n.name)&&(e[n.name]=n),e},l)}e.exports=i,e.exports.parse=i,e.exports.parseString=o,e.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,a,o,i=[],s=0;function l(){for(;s<e.length&&/\s/.test(e.charAt(s));)s+=1;return s<e.length}for(;s<e.length;){for(t=s,o=!1;l();)if(","===(r=e.charAt(s))){for(n=s,s+=1,l(),a=s;s<e.length&&"="!==(r=e.charAt(s))&&";"!==r&&","!==r;)s+=1;s<e.length&&"="===e.charAt(s)?(o=!0,s=a,i.push(e.substring(t,n)),t=s):s=n+1}else s+=1;(!o||s>=e.length)&&i.push(e.substring(t,e.length))}return i}},7604(e,t,r){r.r(t),r.d(t,{Await:()=>rG,BrowserRouter:()=>aD,Form:()=>a$,HashRouter:()=>aA,HydratedRouter:()=>is,IDLE_BLOCKER:()=>eO,IDLE_FETCHER:()=>eM,IDLE_NAVIGATION:()=>eT,Link:()=>aM,Links:()=>ap,MemoryRouter:()=>rW,Meta:()=>aw,NavLink:()=>aO,Navigate:()=>rJ,NavigationType:()=>v,Outlet:()=>rY,PrefetchPageLinks:()=>ay,Route:()=>rX,Router:()=>rV,RouterContextProvider:()=>M,RouterProvider:()=>ia,Routes:()=>rK,Scripts:()=>aE,ScrollRestoration:()=>aN,ServerRouter:()=>oe,StaticRouter:()=>a0,StaticRouterProvider:()=>a1,UNSAFE_AwaitContextProvider:()=>tX,UNSAFE_DataRouterContext:()=>tz,UNSAFE_DataRouterStateContext:()=>tI,UNSAFE_ErrorResponseImpl:()=>ef,UNSAFE_FetchersContext:()=>tJ,UNSAFE_FrameworkContext:()=>ac,UNSAFE_LocationContext:()=>tK,UNSAFE_NavigationContext:()=>tV,UNSAFE_RSCDefaultRootErrorBoundary:()=>o8,UNSAFE_RemixErrorBoundary:()=>aR,UNSAFE_RouteContext:()=>tG,UNSAFE_ServerMode:()=>oh,UNSAFE_SingleFetchRedirectSymbol:()=>nP,UNSAFE_ViewTransitionContext:()=>tW,UNSAFE_WithComponentProps:()=>r8,UNSAFE_WithErrorBoundaryProps:()=>ne,UNSAFE_WithHydrateFallbackProps:()=>r9,UNSAFE_createBrowserHistory:()=>R,UNSAFE_createClientRoutes:()=>n3,UNSAFE_createClientRoutesWithHMRRevalidationOptOut:()=>n2,UNSAFE_createHashHistory:()=>S,UNSAFE_createMemoryHistory:()=>E,UNSAFE_createRouter:()=>eH,UNSAFE_decodeViaTurboStream:()=>nH,UNSAFE_deserializeErrors:()=>ie,UNSAFE_getHydrationData:()=>it,UNSAFE_getPatchRoutesOnNavigationFunction:()=>an,UNSAFE_getTurboStreamSingleFetchDataStrategy:()=>n_,UNSAFE_hydrationRouteProperties:()=>rF,UNSAFE_invariant:()=>x,UNSAFE_mapRouteProperties:()=>rj,UNSAFE_shouldHydrateRouteLoader:()=>n7,UNSAFE_useFogOFWarDiscovery:()=>aa,UNSAFE_useScrollRestoration:()=>aK,UNSAFE_withComponentProps:()=>r3,UNSAFE_withErrorBoundaryProps:()=>nt,UNSAFE_withHydrateFallbackProps:()=>r6,createBrowserRouter:()=>ak,createContext:()=>T,createCookie:()=>oi,createCookieSessionStorage:()=>oY,createHashRouter:()=>aP,createMemoryRouter:()=>rH,createMemorySessionStorage:()=>oX,createPath:()=>L,createRequestHandler:()=>oN,createRoutesFromChildren:()=>r0,createRoutesFromElements:()=>r1,createRoutesStub:()=>ot,createSearchParams:()=>no,createSession:()=>oB,createSessionStorage:()=>oW,createStaticHandler:()=>a4,createStaticRouter:()=>a8,data:()=>eu,generatePath:()=>q,href:()=>oV,isCookie:()=>os,isRouteErrorResponse:()=>em,isSession:()=>oq,matchPath:()=>W,matchRoutes:()=>F,parsePath:()=>D,redirect:()=>ec,redirectDocument:()=>ed,renderMatches:()=>r2,replace:()=>eh,resolvePath:()=>K,unstable_HistoryRouter:()=>a_,unstable_RSCStaticRouter:()=>o7,unstable_routeRSCServerRequest:()=>o6,unstable_setDevServerHooks:()=>oE,unstable_usePrompt:()=>aZ,unstable_useRoute:()=>rA,unstable_useRouterState:()=>rT,useActionData:()=>rR,useAsyncError:()=>rC,useAsyncValue:()=>rx,useBeforeUnload:()=>aG,useBlocker:()=>rP,useFetcher:()=>aW,useFetchers:()=>aJ,useFormAction:()=>aq,useHref:()=>t2,useInRouterContext:()=>t4,useLinkClickHandler:()=>aU,useLoaderData:()=>rb,useLocation:()=>t8,useMatch:()=>t5,useMatches:()=>rw,useNavigate:()=>t7,useNavigation:()=>rg,useNavigationType:()=>t3,useOutlet:()=>rr,useOutletContext:()=>rt,useParams:()=>rn,useResolvedPath:()=>ra,useRevalidator:()=>rv,useRouteError:()=>rS,useRouteLoaderData:()=>rE,useRoutes:()=>ro,useSearchParams:()=>az,useSubmit:()=>aB,useViewTransitionState:()=>aQ});var n,a,o,i,s,l,u,c,d=r(7079),h=r.n(d),f=e=>{throw TypeError(e)},m=(e,t,r)=>t.has(e)||f("Cannot "+r),p=(e,t,r)=>(m(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),g=(e,t,r,n)=>(m(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),v=((n=v||{}).Pop="POP",n.Push="PUSH",n.Replace="REPLACE",n),w="popstate";function b(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function E(e={}){let t,{initialEntries:r=["/"],initialIndex:n,v5Compat:a=!1}=e;t=r.map((e,t)=>u(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.mask));let o=l(null==n?t.length-1:n),i="POP",s=null;function l(e){return Math.min(Math.max(e,0),t.length-1)}function u(e,r=null,n,a){let i=P(t?t[o].pathname:"/",e,r,n,a);return C("/"===i.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),i}function c(e){return"string"==typeof e?e:L(e)}return{get index(){return o},get action(){return i},get location(){return t[o]},createHref:c,createURL:e=>new URL(c(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?D(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){i="PUSH";let n=b(e)?e:u(e,r);o+=1,t.splice(o,t.length,n),a&&s&&s({action:i,location:n,delta:1})},replace(e,r){i="REPLACE";let n=b(e)?e:u(e,r);t[o]=n,a&&s&&s({action:i,location:n,delta:0})},go(e){i="POP";let r=l(o+e),n=t[r];o=r,s&&s({action:i,location:n,delta:e})},listen:e=>(s=e,()=>{s=null})}}function R(e={}){return A(function(e,t){let r=t.state?.masked,{pathname:n,search:a,hash:o}=r||e.location;return P("",{pathname:n,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",r?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:L(t)},null,e)}function S(e={}){return A(function(e,t){let{pathname:r="/",search:n="",hash:a=""}=D(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),P("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:L(t))},function(e,t){C("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function x(e,t){if(!1===e||null==e)throw Error(t)}function C(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function P(e,t,r=null,n,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?D(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10),mask:a}}function L({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function D(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function A(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s="POP",l=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){s="POP";let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:f.location,delta:t})}function h(e){return _(a,e)}null==u&&(u=0,i.replaceState({...i.state,idx:u},""));let f={get action(){return s},get location(){return e(a,i)},listen(e){if(l)throw Error("A history only accepts one active listener");return a.addEventListener(w,d),l=e,()=>{a.removeEventListener(w,d),l=null}},createHref:e=>t(a,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s="PUSH";let n=b(e)?e:P(f.location,e,t);r&&r(n,e);let d=k(n,u=c()+1),h=f.createHref(n.mask||n);try{i.pushState(d,"",h)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(h)}o&&l&&l({action:s,location:f.location,delta:1})},replace:function(e,t){s="REPLACE";let n=b(e)?e:P(f.location,e,t);r&&r(n,e);let a=k(n,u=c()),d=f.createHref(n.mask||n);i.replaceState(a,"",d),o&&l&&l({action:s,location:f.location,delta:0})},go:e=>i.go(e)};return f}function _(e,t,r=!1){let n="http://localhost";e&&(n="null"!==e.location.origin?e.location.origin:e.location.href),x(n,"No window.location.(origin|href) available to create URL");let a="string"==typeof t?t:L(t);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function T(e){return{defaultValue:e}}var M=class{constructor(e){if(y(this,o,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(p(this,o).has(e))return p(this,o).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw Error("No value found for context")}set(e,t){p(this,o).set(e,t)}};o=new WeakMap;var O=new Set(["lazy","caseSensitive","path","id","index","children"]),$=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function N(e,t,r=[],n={},a=!1){return e.map((e,o)=>{let i=[...r,String(o)],s="string"==typeof e.id?e.id:i.join("-");if(x(!0!==e.index||!e.children,"Cannot specify children on an index route"),x(a||!n[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),!0===e.index){let r={...e,id:s};return n[s]=j(r,t(r)),r}{let r={...e,id:s,children:void 0};return n[s]=j(r,t(r)),e.children&&(r.children=N(e.children,t,i,n,a)),r}})}function j(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function F(e,t,r="/"){return H(e,t,r,!1)}function H(e,t,r,n,a){let o=X(("string"==typeof t?D(t):t).pathname||"/",r);if(null==o)return null;let i=a??z(e),s=null,l=Y(o);for(let e=0;null==s&&e<i.length;++e)s=function(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let e=0;e<n.length;++e){let s=n[e],l=e===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=W({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},u),d=s.route;if(!c&&l&&r&&!n[n.length-1].route.index&&(c=W({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:en([o,c.pathname]),pathnameBase:eo(en([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=en([o,c.pathnameBase]))}return i}(i[e],l,n);return s}function U(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function z(e){let t=function e(t,r=[],n=[],a="",o=!1){let i=(t,i,s=o,l)=>{var u,c;let d,h,f={relativePath:void 0===l?t.path||"":l,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(a)&&s)return;x(f.relativePath.startsWith(a),`Absolute route path "${f.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(a.length)}let m=en([a,f.relativePath]),p=n.concat(f);t.children&&t.children.length>0&&(x(!0!==t.index,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),e(t.children,r,p,m,s)),(null!=t.path||t.index)&&r.push({path:m,score:(u=m,c=t.index,h=(d=u.split("/")).length,d.some(B)&&(h+=-2),c&&(h+=2),d.filter(e=>!B(e)).reduce((e,t)=>e+(I.test(t)?3:""===t?1:10),h)),routesMeta:p})};return t.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let s=e(a.join("/")),l=[];return l.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&l.push(...s),l.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))i(e,t,!0,r);else i(e,t)}),r}(e);return t.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)}),t}var I=/^:[\w-]+$/,B=e=>"*"===e;function q(e,t={}){let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(C(!1,`Route path "${r}" will be treated as if it were "${r.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${r.replace(/\*$/,"/*")}".`),r=r.replace(/\*$/,"/*"));let n=r.startsWith("/")?"/":"",a=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map((e,r,n)=>{if(r===n.length-1&&"*"===e)return a(t["*"]);let o=e.match(/^:([\w-]+)(\??)(.*)/);if(o){let[,e,r,n]=o,i=t[e];return x("?"===r||null!=i,`Missing ":${e}" param`),encodeURIComponent(a(i))+n}return e.replace(/\?$/g,"")}).filter(e=>!!e).join("/")}function W(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=J(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=s[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}let a=s[n];return r&&!a?e[t]=void 0:e[t]=(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function J(e,t=!1,r=!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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,a,o)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Y(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 a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function X(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var V=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function K(e,t="/"){let{pathname:r,search:n="",hash:a=""}="string"==typeof e?D(e):e;return{pathname:r?(r=er(r)).startsWith("/")?G(r.substring(1),"/"):G(r,t):t,search:ei(n),hash:es(a)}}function G(e,t){let r=ea(t).split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function Z(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Q(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function ee(e){let t=Q(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function et(e,t,r,n=!1){let a,o;"string"==typeof e?a=D(e):(x(!(a={...e}).pathname||!a.pathname.includes("?"),Z("?","pathname","search",a)),x(!a.pathname||!a.pathname.includes("#"),Z("#","pathname","hash",a)),x(!a.search||!a.search.includes("#"),Z("#","search","hash",a)));let i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=K(a,o),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}var er=e=>e.replace(/\/\/+/g,"/"),en=e=>er(e.join("/")),ea=e=>e.replace(/\/+$/,""),eo=e=>ea(e).replace(/^\/*/,"/"),ei=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",es=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",el=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function eu(e,t){return new el(e,"number"==typeof t?{status:t}:t)}var ec=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},ed=(e,t)=>{let r=ec(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},eh=(e,t)=>{let r=ec(e,t);return r.headers.set("X-Remix-Replace","true"),r},ef=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function em(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ep(e){return en(e.map(e=>e.route.path).filter(Boolean))||"/"}var ey="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function eg(e,t){let r=e;if("string"!=typeof r||!V.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(ey)try{let e=new URL(window.location.href),n=new URL(r.startsWith("//")?e.protocol+r:r),o=X(n.pathname,t);n.origin===e.origin&&null!=o?r=o+n.search+n.hash:a=!0}catch(e){C(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var ev=Symbol("Uninstrumented");function ew(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){for(let t of Object.keys(r))e[t]&&r[t].push(e[t])}}));let n={};if("function"==typeof t.lazy&&r.lazy.length>0){let e=eb(r.lazy,t.lazy,()=>void 0);e&&(n.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach(t=>{let a=e[t],o=r[`lazy.${t}`];if("function"==typeof a&&o.length>0){let e=eb(o,a,()=>void 0);e&&(n.lazy=Object.assign(n.lazy||{},{[t]:e}))}})}return["loader","action"].forEach(e=>{let a=t[e];if("function"==typeof a&&r[e].length>0){let t=a[ev]??a,o=eb(r[e],t,(...e)=>eR(e[0]));o&&("loader"===e&&!0===t.hydrate&&(o.hydrate=!0),o[ev]=t,n[e]=o)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(e=>{let t=e[ev]??e,n=eb(r.middleware,t,(...e)=>eR(e[0]));return n?(n[ev]=t,n):e})),n}function eb(e,t,r){return 0===e.length?null:async(...n)=>{let a=await eE(e,r(...n),()=>t(...n),e.length-1);if("error"===a.type)throw a.value;return a.value}}async function eE(e,t,r,n){let a,o=e[n];if(o){let i,s=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=eE(e,t,r,n-1),x(a=await i,"Expected a result"),"error"===a.type&&a.value instanceof Error)?{status:"error",error:a.value}:{status:"success",error:void 0};try{await o(s,t)}catch(e){console.error("An instrumentation function threw an error:",e)}i||await s(),await i}else try{let e=await r();a={type:"success",value:e}}catch(e){a={type:"error",value:e}}return a||{type:"error",value:Error("No result assigned in instrumentation chain.")}}function eR(e){let{request:t,context:r,params:n,pattern:a}=e;return{request:ex(t),params:{...n},pattern:a,context:eC(r)}}function eS(e,t){return{currentUrl:L(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function ex(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function eC(e){if(!function(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===ek}(e))return{get:t=>e.get(t)};{let t={...e};return Object.freeze(t),t}}var ek=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),eP=["POST","PUT","PATCH","DELETE"],eL=new Set(eP),eD=new Set(["GET",...eP]),eA=new Set([301,302,303,307,308]),e_=new Set([307,308]),eT={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},eM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},eO={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},e$=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),eN="remix-router-transitions",ej=Symbol("ResetLoaderData"),eF=class{constructor(e){y(this,i),y(this,s),y(this,l),y(this,u),g(this,i,e),g(this,s,z(e))}get stableRoutes(){return p(this,i)}get activeRoutes(){return p(this,l)??p(this,i)}get branches(){return p(this,u)??p(this,s)}get hasHMRRoutes(){return null!=p(this,l)}setRoutes(e){g(this,i,e),g(this,s,z(e))}setHmrRoutes(e){g(this,l,e),g(this,u,z(e))}commitHmrRoutes(){p(this,l)&&(g(this,i,p(this,l)),g(this,s,p(this,u)),g(this,l,void 0),g(this,u,void 0))}};function eH(e){let t,r,n,a,o,i=e.window?e.window:"u">typeof window?window:void 0,s=void 0!==i&&void 0!==i.document&&void 0!==i.document.createElement;x(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l=e.hydrationRouteProperties||[],u=e.mapRouteProperties||e$,c=u;if(e.instrumentations){let t=e.instrumentations;c=e=>({...u(e),...ew(t.map(e=>e.route).filter(Boolean),e)})}let d={},h=new eF(N(e.routes,c,void 0,d)),f=e.basename||"/";f.startsWith("/")||(f=`/${f}`);let m=e.dataStrategy||e4,p={...e.future},y=null,g=new Set,v=null,w=null,b=null,E=null,R=null!=e.hydrationData,S=H(h.activeRoutes,e.history.location,f,!1,h.branches),k=!1,A=null;if(null!=S||e.patchRoutesOnNavigation)if(S&&!e.hydrationData&&eI(S,h.activeRoutes,e.history.location.pathname).active&&(S=null),S)if(S.some(e=>e.route.lazy))t=!1,r=!0;else if(S.some(e=>eY(e.route))){let n=e.hydrationData?e.hydrationData.loaderData:null,a=e.hydrationData?e.hydrationData.errors:null,o=S;if(a){let e=S.findIndex(e=>void 0!==a[e.route.id]);o=o.slice(0,e+1)}r=!1,t=!0,o.forEach(e=>{let o=eX(e.route,n,a);r=r||o.renderFallback,t=t&&!o.shouldLoad})}else t=!0,r=!1;else{t=!1,r=!0,S=[];let n=eI(null,h.activeRoutes,e.history.location.pathname);n.active&&n.matches&&(k=!0,S=n.matches)}else{let n=tv(404,{pathname:e.history.location.pathname}),{matches:a,route:o}=tg(h.activeRoutes);t=!0,r=!1,S=a,A={[o.id]:n}}let T={historyAction:e.history.action,location:e.history.location,matches:S,initialized:t,renderFallback:r,navigation:eT,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||A,fetchers:new Map,blockers:new Map},O="POP",$=null,j=!1,F=!1,z=new Map,I=null,B=!1,q=!1,W=new Set,J=new Map,Y=0,K=-1,G=new Map,Z=new Set,Q=new Map,ee=new Map,et=new Set,er=new Map,en=null;function ea(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=d[e.route.id],r=e.route;return r.element!==t.element||r.errorElement!==t.errorElement||r.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}));let r=[],n=[];(T={...T,...e}).fetchers.forEach((e,t)=>{"idle"===e.state&&(et.has(t)?r.push(t):n.push(t))}),et.forEach(e=>{T.fetchers.has(e)||J.has(e)||r.push(e)}),0===g.size&&(v={newErrors:e.errors??null}),[...g].forEach(n=>n(T,{deletedFetchers:r,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>ex(T.fetchers,e)),n.forEach(e=>T.fetchers.delete(e))}function eo(t,r,{flushSync:n}={}){let a,o,i=null!=T.actionData&&null!=T.navigation.formMethod&&tM(T.navigation.formMethod)&&"loading"===T.navigation.state&&t.state?._isRedirect!==!0;a=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:i?T.actionData:null;let s=r.loaderData?tm(T.loaderData,r.loaderData,r.matches||[],r.errors):T.loaderData,l=T.blockers;l.size>0&&(l=new Map(l)).forEach((e,t)=>l.set(t,eO));let u=!B&&ez(t,r.matches||T.matches),c=!0===j||null!=T.navigation.formMethod&&tM(T.navigation.formMethod)&&t.state?._isRedirect!==!0;if(h.commitHmrRoutes(),B||"POP"===O||("PUSH"===O?e.history.push(t,t.state):"REPLACE"===O&&e.history.replace(t,t.state)),"POP"===O){let e=z.get(T.location.pathname);e&&e.has(t.pathname)?o={currentLocation:T.location,nextLocation:t}:z.has(t.pathname)&&(o={currentLocation:t,nextLocation:T.location})}else if(F){let e=z.get(T.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),z.set(T.location.pathname,e)),o={currentLocation:T.location,nextLocation:t}}ea({...r,actionData:a,loaderData:s,historyAction:O,location:t,initialized:!0,renderFallback:!1,navigation:eT,revalidation:"idle",restoreScrollPosition:u,preventScrollReset:c,blockers:l},{viewTransitionOpts:o,flushSync:!0===n}),O="POP",j=!1,F=!1,B=!1,q=!1,$?.resolve(),$=null,en?.resolve(),en=null}async function ei(t,r){let n;if($?.resolve(),$=null,"number"==typeof t){$||($=tU());let r=$.promise;return e.history.go(t),r}let{path:a,submission:o,error:i}=eW(!1,eq(T.location,T.matches,f,t,r?.fromRouteId,r?.relative),r);r?.mask&&(n={pathname:"",search:"",hash:"",..."string"==typeof r.mask?D(r.mask):{...T.location.mask,...r.mask}});let s=T.location,l=P(s,a,r&&r.state,void 0,n);l={...l,...e.history.encodeLocation(l)};let u=r&&null!=r.replace?r.replace:void 0,c="PUSH";!0===u?c="REPLACE":!1===u||null!=o&&tM(o.formMethod)&&o.formAction===T.location.pathname+T.location.search&&(c="REPLACE");let d=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,h=!0===(r&&r.flushSync),m=ej({currentLocation:s,nextLocation:l,historyAction:c});m?eA(m,{state:"blocked",location:l,proceed(){eA(m,{state:"proceeding",proceed:void 0,reset:void 0,location:l}),ei(t,r)},reset(){let e=new Map(T.blockers);e.set(m,eO),ea({blockers:e})}}):await es(c,l,{submission:o,pendingError:i,preventScrollReset:d,replace:r&&r.replace,enableViewTransition:r&&r.viewTransition,flushSync:h,callSiteDefaultShouldRevalidate:r&&r.defaultShouldRevalidate})}async function es(t,r,n){var o,i,s,l;let u;a&&a.abort(),a=null,O=t,B=!0===(n&&n.startUninterruptedRevalidation),o=T.location,i=T.matches,w&&E&&(w[eU(o,i)]=E()),j=!0===(n&&n.preventScrollReset),F=!0===(n&&n.enableViewTransition);let c=h.activeRoutes,d=n?.initialHydration&&T.matches&&T.matches.length>0&&!k?T.matches:H(c,r,f,!1,h.branches),m=!0===(n&&n.flushSync);if(d&&T.initialized&&!q&&(s=T.location,l=r,s.pathname===l.pathname&&s.search===l.search&&(""===s.hash?""!==l.hash:s.hash===l.hash||""!==l.hash||!1))&&!(n&&n.submission&&tM(n.submission.formMethod)))return void eo(r,{matches:d},{flushSync:m});let p=eI(d,c,r.pathname);if(p.active&&p.matches&&(d=p.matches),!d){let{error:e,notFoundMatches:t,route:n}=eH(r.pathname);eo(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:m});return}let y=n&&n.overrideNavigation?{...n.overrideNavigation,matches:d,historyAction:t}:void 0;a=new AbortController;let g=tl(e.history,r,a.signal,n&&n.submission),v=e.getContext?await e.getContext():new M;if(n&&n.pendingError)u=[ty(d).route.id,{type:"error",error:n.pendingError}];else if(n&&n.submission&&tM(n.submission.formMethod)){let o=await el(g,r,n.submission,d,t,v,p.active,n&&!0===n.initialHydration,{replace:n.replace,flushSync:m});if(o.shortCircuited)return;if(o.pendingActionResult){let[e,t]=o.pendingActionResult;if(tk(t)&&em(t.error)&&404===t.error.status){a=null,eo(r,{matches:o.matches,loaderData:{},errors:{[e]:t.error}});return}}d=o.matches||d,u=o.pendingActionResult,y=tj(r,d,t,n.submission),m=!1,p.active=!1,g=tl(e.history,g.url,g.signal)}let{shortCircuited:b,matches:R,loaderData:S,errors:x,workingFetchers:C}=await eu(g,r,d,t,v,p.active,y,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,m,u,n&&n.callSiteDefaultShouldRevalidate);b||(a=null,eo(r,{matches:R||d,...tp(u),loaderData:S,errors:x,...C?{fetchers:C}:{}}))}async function el(t,r,n,a,o,i,s,u,m={}){var p,y,g;let v;if(eg(),ea({navigation:(p=r,y=a,{state:"submitting",location:p,matches:y,historyAction:o,formMethod:(g=n).formMethod,formAction:g.formAction,formEncType:g.formEncType,formData:g.formData,json:g.json,text:g.text})},{flushSync:!0===m.flushSync}),s){let e=await eB(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=tg(h.activeRoutes);return{matches:t,pendingActionResult:[r.id,{type:"error",error:e.error}]}}let t=ty(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(e.matches)a=e.matches;else{let{notFoundMatches:e,error:t,route:n}=eH(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:t}]}}}let w=t$(a,r);if(w.route.action||w.route.lazy){let e=te(c,d,t,r,a,w,u?[]:l,i),n=await ep(t,r,e,i,null);if(!(v=n[w.route.id])){for(let e of a)if(n[e.route.id]){v=n[e.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}else v={type:"error",error:tv(405,{method:t.method,pathname:r.pathname,routeId:w.route.id})};if(tP(v)){let r;return r=m&&null!=m.replace?m.replace:ts(v.response.headers.get("Location"),new URL(t.url),f,e.history)===T.location.pathname+T.location.search,await ef(t,v,!0,{submission:n,replace:r}),{shortCircuited:!0}}if(tk(v)){let e=ty(a,w.route.id);return!0!==(m&&m.replace)&&(O="PUSH"),{matches:a,pendingActionResult:[e.route.id,v,w.route.id]}}return{matches:a,pendingActionResult:[w.route.id,v]}}async function eu(t,r,n,o,i,s,u,m,p,y,g,v,w,b){let E=u||tj(r,n,o,m),R=m||p||tN(E),S=!B&&!g;if(s){if(S){let e=ec(w);ea({navigation:E,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await eB(n,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=tg(h.activeRoutes);return{matches:t,loaderData:{},errors:{[r.id]:e.error}}}let t=ty(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)n=e.matches;else{let{error:e,notFoundMatches:t,route:n}=eH(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}}let x=h.activeRoutes,{dsMatches:C,revalidatingFetchers:k}=eJ(t,i,c,d,e.history,T,n,R,r,g?[]:l,!0===g,q,W,et,Q,Z,x,f,null!=e.patchRoutesOnNavigation,h.branches,w,b);if(K=++Y,!e.dataStrategy&&!C.some(e=>e.shouldLoad)&&!C.some(e=>e.route.middleware&&e.route.middleware.length>0)&&0===k.length){let e=new Map(T.fetchers),t=eP(e);return eo(r,{matches:n,loaderData:{},errors:w&&tk(w[1])?{[w[0]]:w[1].error}:null,...tp(w),...t?{fetchers:e}:{}},{flushSync:v}),{shortCircuited:!0}}if(S){var P;let e,t={};if(!s){t.navigation=E;let e=ec(w);void 0!==e&&(t.actionData=e)}k.length>0&&(P=k,e=new Map(T.fetchers),P.forEach(t=>{let r=e.get(t.key),n=tF(void 0,r?r.data:void 0);e.set(t.key,n)}),t.fetchers=e),ea(t,{flushSync:v})}k.forEach(e=>{eC(e.key),e.controller&&J.set(e.key,e.controller)});let L=()=>k.forEach(e=>eC(e.key));a&&a.signal.addEventListener("abort",L);let{loaderResults:D,fetcherResults:A}=await ey(C,k,t,r,i);if(t.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener("abort",L),k.forEach(e=>J.delete(e.key));let _=tw(D);if(_)return await ef(t,_.result,!0,{replace:y}),{shortCircuited:!0};if(_=tw(A))return Z.add(_.key),await ef(t,_.result,!0,{replace:y}),{shortCircuited:!0};let M=new Map(T.fetchers),{loaderData:O,errors:$}=tf(T,n,D,w,k,A,M);g&&T.errors&&($={...T.errors,...$});let N=eP(M),j=eL(K,M);return{matches:n,loaderData:O,errors:$,...N||j||k.length>0?{workingFetchers:M}:{}}}function ec(e){if(e&&!tk(e[1]))return{[e[0]]:e[1].data};if(T.actionData)if(0===Object.keys(T.actionData).length)return null;else return T.actionData}async function ed(t,r,n,o,i,s,u,m,p,y){var g,v;eg(),Q.delete(t);let w=T.fetchers.get(t);eE(t,(g=p,v=w,{state:"submitting",formMethod:g.formMethod,formAction:g.formAction,formEncType:g.formEncType,formData:g.formData,json:g.json,text:g.text,data:v?v.data:void 0}),{flushSync:u});let b=new AbortController,E=tl(e.history,n,b.signal,p);if(s){let e=await eB(o,new URL(E.url).pathname,E.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void eR(t,r,e.error,{flushSync:u});if(!e.matches)return void eR(t,r,tv(404,{pathname:n}),{flushSync:u});o=e.matches}let R=t$(o,n);if(!R.route.action&&!R.route.lazy){let e=tv(405,{method:p.formMethod,pathname:n,routeId:r});eR(t,r,e,{flushSync:u});return}J.set(t,b);let S=Y,C=te(c,d,E,n,o,R,l,i),k=await ep(E,n,C,i,t),P=k[R.route.id];if(!P){for(let e of C)if(k[e.route.id]){P=k[e.route.id];break}}if(E.signal.aborted){J.get(t)===b&&J.delete(t);return}if(et.has(t)){if(tP(P)||tk(P))return void eE(t,tH(void 0))}else{if(tP(P))return(J.delete(t),K>S)?void eE(t,tH(void 0)):(Z.add(t),eE(t,tF(p)),ef(E,P,!1,{fetcherSubmission:p,preventScrollReset:m}));if(tk(P))return void eR(t,r,P.error)}let L=T.navigation.location||T.location,D=tl(e.history,L,b.signal),A=h.activeRoutes,_="idle"!==T.navigation.state?H(A,T.navigation.location,f,!1,h.branches):T.matches;x(_,"Didn't find any matches after fetcher action");let M=++Y;G.set(t,M);let{dsMatches:$,revalidatingFetchers:N}=eJ(D,i,c,d,e.history,T,_,p,L,l,!1,q,W,et,Q,Z,A,f,null!=e.patchRoutesOnNavigation,h.branches,[R.route.id,P],y),j=tF(p,P.data),F=new Map(T.fetchers);F.set(t,j),N.filter(e=>e.key!==t).forEach(e=>{let t=e.key,r=F.get(t),n=tF(void 0,r?r.data:void 0);F.set(t,n),eC(t),e.controller&&J.set(t,e.controller)}),ea({fetchers:F});let U=()=>N.forEach(e=>eC(e.key));b.signal.addEventListener("abort",U);let{loaderResults:z,fetcherResults:I}=await ey($,N,D,L,i);if(b.signal.aborted)return;b.signal.removeEventListener("abort",U),G.delete(t),J.delete(t),N.forEach(e=>J.delete(e.key));let B=T.fetchers.has(t),X=e=>{if(!B)return e;let r=new Map(e.fetchers);return r.set(t,tH(P.data)),{...e,fetchers:r}},V=tw(z);if(V)return T=X(T),ef(D,V.result,!1,{preventScrollReset:m});if(V=tw(I))return Z.add(V.key),T=X(T),ef(D,V.result,!1,{preventScrollReset:m});let ee=new Map(T.fetchers);B&&ee.set(t,tH(P.data));let{loaderData:er,errors:en}=tf(T,_,z,void 0,N,I,ee);eL(M,ee),"loading"===T.navigation.state&&M>K?(x(O,"Expected pending action"),a&&a.abort(),eo(T.navigation.location,{matches:_,loaderData:er,errors:en,fetchers:ee})):(ea({errors:en,loaderData:tm(T.loaderData,er,_,en),fetchers:ee}),q=!1)}async function eh(t,r,n,a,o,i,s,u,h){let f=T.fetchers.get(t);eE(t,tF(h,f?f.data:void 0),{flushSync:s});let m=new AbortController,p=tl(e.history,n,m.signal);if(i){let e=await eB(a,new URL(p.url).pathname,p.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void eR(t,r,e.error,{flushSync:s});if(!e.matches)return void eR(t,r,tv(404,{pathname:n}),{flushSync:s});a=e.matches}let y=t$(a,n);J.set(t,m);let g=Y,v=te(c,d,p,n,a,y,l,o),w=await ep(p,n,v,o,t),b=w[y.route.id];if(!b){for(let e of a)if(w[e.route.id]){b=w[e.route.id];break}}if(J.get(t)===m&&J.delete(t),!p.signal.aborted){if(et.has(t))return void eE(t,tH(void 0));if(tP(b))if(K>g)return void eE(t,tH(void 0));else{Z.add(t),await ef(p,b,!1,{preventScrollReset:u});return}if(tk(b))return void eR(t,r,b.error);eE(t,tH(b.data))}}async function ef(t,r,n,{submission:o,fetcherSubmission:l,preventScrollReset:u,replace:c}={}){n||($?.resolve(),$=null),r.response.headers.has("X-Remix-Revalidate")&&(q=!0);let d=r.response.headers.get("Location");x(d,"Expected a Location header on the redirect Response"),d=ts(d,new URL(t.url),f,e.history);let h=P(T.location,d,{_isRedirect:!0});if(s){let e=!1;if(r.response.headers.has("X-Remix-Reload-Document"))e=!0;else{let t;if(t=d,V.test(t)){let t=_(i,d,!0);e=t.origin!==i.location.origin||null==X(t.pathname,f)}}if(e)return void(c?i.location.replace(d):i.location.assign(d))}a=null;let m=!0===c||r.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:p,formAction:y,formEncType:g}=T.navigation;!o&&!l&&p&&y&&g&&(o=tN(T.navigation));let v=o||l;if(e_.has(r.response.status)&&v&&tM(v.formMethod))await es(m,h,{submission:{...v,formAction:d},preventScrollReset:u||j,enableViewTransition:n?F:void 0});else{let e=tj(h,[],m,o);await es(m,h,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:u||j,enableViewTransition:n?F:void 0})}}async function ep(e,t,r,n,a){let o,i={};try{o=await tt(m,e,t,r,a,n,!1)}catch(e){return r.filter(e=>e.shouldLoad).forEach(t=>{i[t.route.id]={type:"error",error:e}}),i}if(e.signal.aborted)return i;if(!tM(e.method))for(let e of r){if(o[e.route.id]?.type==="error")break;!o.hasOwnProperty(e.route.id)&&!T.loaderData.hasOwnProperty(e.route.id)&&(!T.errors||!T.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(o[e.route.id]={type:"error",result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,n]of Object.entries(o))if(tC(n)){let a=n.result;i[t]={type:"redirect",response:to(a,e,t,r,f)}}else i[t]=await ta(n);return i}async function ey(e,t,r,n,a){let o=ep(r,n,e,a,null),i=Promise.all(t.map(async e=>{if(!e.matches||!e.match||!e.request||!e.controller)return Promise.resolve({[e.key]:{type:"error",error:tv(404,{pathname:e.path})}});{let t=(await ep(e.request,e.path,e.matches,a,e.key))[e.match.route.id];return{[e.key]:t}}}));return{loaderResults:await o,fetcherResults:(await i).reduce((e,t)=>Object.assign(e,t),{})}}function eg(){q=!0,Q.forEach((e,t)=>{J.has(t)&&W.add(t),eC(t)})}function eE(e,t,r={}){let n=new Map(T.fetchers);n.set(e,t),ea({fetchers:n},{flushSync:!0===(r&&r.flushSync)})}function eR(e,t,r,n={}){let a=ty(T.matches,t),o=new Map(T.fetchers);ex(o,e),ea({errors:{[a.route.id]:r},fetchers:o},{flushSync:!0===(n&&n.flushSync)})}function ex(e,t){let r=T.fetchers.get(t);J.has(t)&&!(r&&"loading"===r.state&&G.has(t))&&eC(t),Q.delete(t),G.delete(t),Z.delete(t),et.delete(t),W.delete(t),e.delete(t)}function eC(e,t){let r=J.get(e);r&&(r.abort(t),J.delete(e))}function ek(e,t){for(let r of e){let e=t.get(r);x(e,`Expected fetcher: ${r}`);let n=tH(e.data);t.set(r,n)}}function eP(e){let t=[],r=!1;for(let n of Z){let a=e.get(n);x(a,`Expected fetcher: ${n}`),"loading"===a.state&&(Z.delete(n),t.push(n),r=!0)}return ek(t,e),r}function eL(e,t){let r=[];for(let[n,a]of G)if(a<e){let e=t.get(n);x(e,`Expected fetcher: ${n}`),"loading"===e.state&&(eC(n),G.delete(n),r.push(n))}return ek(r,t),r.length>0}function eD(e){T.blockers.delete(e),er.delete(e)}function eA(e,t){let r=T.blockers.get(e)||eO;x("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(T.blockers);n.set(e,t),ea({blockers:n})}function ej({currentLocation:e,nextLocation:t,historyAction:r}){if(0===er.size)return;er.size>1&&C(!1,"A router only supports one blocker at a time");let n=Array.from(er.entries()),[a,o]=n[n.length-1],i=T.blockers.get(a);if((!i||"proceeding"!==i.state)&&o({currentLocation:e,nextLocation:t,historyAction:r}))return a}function eH(e){let t=tv(404,{pathname:e}),{matches:r,route:n}=tg(h.activeRoutes);return{notFoundMatches:r,route:n,error:t}}function eU(e,t){return b&&b(e,t.map(e=>U(e,T.loaderData)))||e.key}function ez(e,t){if(w){let r=w[eU(e,t)];if("number"==typeof r)return r}return null}function eI(t,r,n){if(e.patchRoutesOnNavigation){let e=h.branches;if(!t)return{active:!0,matches:H(r,n,f,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:H(r,n,f,!0,e)}}return{active:!1,matches:null}}async function eB(t,r,n,a){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let o=t;for(;;){let t=d;try{await e.patchRoutesOnNavigation({signal:n,path:r,matches:o,fetcherKey:a,patch:(e,r)=>{n.aborted||eK(e,r,h,t,c,!1)}})}catch(e){return{type:"error",error:e,partialMatches:o}}if(n.aborted)return{type:"aborted"};let i=h.branches,s=H(h.activeRoutes,r,f,!1,i),l=null;if(s){if(0===Object.keys(s[0].params).length)return{type:"success",matches:s};else if(!((l=H(h.activeRoutes,r,f,!0,i))&&o.length<l.length&&eV(o,l.slice(0,o.length))))return{type:"success",matches:s}}if(l||(l=H(h.activeRoutes,r,f,!0,i)),!l||eV(o,l))return{type:"success",matches:null};o=l}}function eV(e,t){return e.length===t.length&&e.every((e,r)=>e.route.id===t[r].route.id)}return n={get basename(){return f},get future(){return p},get state(){return T},get routes(){return h.stableRoutes},get branches(){return h.branches},get manifest(){return d},get window(){return i},initialize:function(){if(y=e.history.listen(({action:t,location:r,delta:n})=>{if(o){o(),o=void 0;return}C(0===er.size||null!=n,"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=ej({currentLocation:T.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{o=e});e.history.go(-1*n),eA(a,{state:"blocked",location:r,proceed(){eA(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(T.blockers);e.set(a,eO),ea({blockers:e})}}),$?.resolve(),$=null;return}return es(t,r)}),s){var t=i,r=z;try{let e=t.sessionStorage.getItem(eN);if(e){let t=JSON.parse(e);for(let[e,n]of Object.entries(t||{}))n&&Array.isArray(n)&&r.set(e,new Set(n||[]))}}catch(e){}let e=()=>(function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(eN,JSON.stringify(r))}catch(e){C(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}})(i,z);i.addEventListener("pagehide",e),I=()=>i.removeEventListener("pagehide",e)}return T.initialized||es("POP",T.location,{initialHydration:!0}),n},subscribe:function(e){if(g.add(e),v){let{newErrors:t}=v;v=null,e(T,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>g.delete(e)},enableScrollRestoration:function(e,t,r){if(w=e,E=t,b=r||null,!R&&T.navigation===eT){R=!0;let e=ez(T.location,T.matches);null!=e&&ea({restoreScrollPosition:e})}return()=>{w=null,E=null,b=null}},navigate:ei,fetch:async function t(t,r,n,a){eC(t);let o=!0===(a&&a.flushSync),i=h.activeRoutes,s=eq(T.location,T.matches,f,n,r,a?.relative),l=H(i,s,f,!1,h.branches),u=eI(l,i,s);if(u.active&&u.matches&&(l=u.matches),!l)return void eR(t,r,tv(404,{pathname:s}),{flushSync:o});let{path:c,submission:d,error:m}=eW(!0,s,a);if(m)return void eR(t,r,m,{flushSync:o});let p=e.getContext?await e.getContext():new M,y=!0===(a&&a.preventScrollReset);d&&tM(d.formMethod)?await ed(t,r,c,l,p,u.active,o,y,d,a&&a.defaultShouldRevalidate):(Q.set(t,{routeId:r,path:c}),await eh(t,r,c,l,p,u.active,o,y,d))},revalidate:function(){en||(en=tU()),eg(),ea({revalidation:"loading"});let e=en.promise;return"submitting"===T.navigation.state||("idle"===T.navigation.state?es(T.historyAction,T.location,{startUninterruptedRevalidation:!0}):es(O||T.historyAction,T.navigation.location,{overrideNavigation:T.navigation,enableViewTransition:!0===F})),e},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:function(e){return ee.set(e,(ee.get(e)||0)+1),et.has(e)&&et.delete(e),T.fetchers.get(e)||eM},resetFetcher:function(e,t){eC(e,t?.reason),eE(e,tH(null))},deleteFetcher:function(e){let t=(ee.get(e)||0)-1;t<=0?(ee.delete(e),et.add(e)):ee.set(e,t),ea({fetchers:new Map(T.fetchers)})},dispose:function(){y&&y(),I&&I(),g.clear(),a&&a.abort(),T.fetchers.forEach((e,t)=>ex(T.fetchers,t)),T.blockers.forEach((e,t)=>eD(t))},getBlocker:function(e,t){let r=T.blockers.get(e)||eO;return er.get(e)!==t&&er.set(e,t),r},deleteBlocker:eD,patchRoutes:function(e,t,r=!1){eK(e,t,h,d,c,r),h.hasHMRRoutes||ea({})},_internalFetchControllers:J,_internalSetRoutes:function(e){d={},h.setHmrRoutes(N(e,c,void 0,d))},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ea(e)}},e.instrumentations&&(n=function(e,t){let r={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){for(let t of Object.keys(e))e[t]&&r[t].push(e[t])}})),r.navigate.length>0){let t=e.navigate[ev]??e.navigate,n=eb(r.navigate,t,(...t)=>{let[r,n]=t;return{to:"number"==typeof r||"string"==typeof r?r:r?L(r):".",...eS(e,n??{})}});n&&(n[ev]=t,e.navigate=n)}if(r.fetch.length>0){let t=e.fetch[ev]??e.fetch,n=eb(r.fetch,t,(...t)=>{let[r,,n,a]=t;return{href:n??".",fetcherKey:r,...eS(e,a??{})}});n&&(n[ev]=t,e.fetch=n)}return e}(n,e.instrumentations.map(e=>e.router).filter(Boolean))),n}function eU(e,t){x(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a=t?.mapRouteProperties||e$,o=a;if({...t?.future},t?.instrumentations){let e=t.instrumentations;o=t=>({...a(t),...ew(e.map(e=>e.route).filter(Boolean),t)})}let i=N(e,o,void 0,r),s=z(i);async function l(e,{requestContext:t,filterMatchesToLoad:a,skipLoaderErrorBubbling:u,skipRevalidation:d,dataStrategy:h,generateMiddlewareResponse:f,normalizePath:m}={}){let p=e.method,y=P("",(m||eB)(e),null,"default"),g=H(i,y,n,!1,s);if(t=null!=t?t:new M,tT(p)||"HEAD"===p){if(!g){let e=tv(404,{pathname:y.pathname}),{matches:t,route:r}=tg(i),a={basename:n,location:y,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}};return f?f(()=>Promise.resolve(a)):a}}else{let e=tv(405,{method:p}),{matches:t,route:r}=tg(i),a={basename:n,location:y,matches:t,loaderData:{},actionData:null,errors:{[r.id]:e},statusCode:e.status,loaderHeaders:{},actionHeaders:{}};return f?f(()=>Promise.resolve(a)):a}if(f){x(t instanceof M,"When using middleware in `staticHandler.query()`, any provided `requestContext` must be an instance of `RouterContextProvider`");try{let s;await e1(g,r,o);let l=await e8({request:e,url:tu(e,y),pattern:ep(g),matches:g,params:g[0].params,context:t},async()=>await f(async(e,r={})=>{let o=await c(e,y,g,t,h||null,!0===u,null,"filterMatchesToLoad"in r?r.filterMatchesToLoad??null:a??null,!0===d);return tD(o)?o:s={location:y,basename:n,...o}}),async(e,t)=>{if(t_(e))return e;if(tD(e))try{e=new ef(e.status,e.statusText,await tn(e))}catch(t){e=t}if(tL(e)&&(e=tR(e)),s){t in s.loaderData&&(s.loaderData[t]=void 0);let r=ez(i,s,e,u?t:ty(g,t).route.id);return f(()=>Promise.resolve(r))}{let r=u?t:ty(g,g.find(e=>e.route.id===t||e.route.loader)?.route.id||t).route.id,a={matches:g,location:y,basename:n,loaderData:{},actionData:null,errors:{[r]:e},statusCode:em(e)?e.status:500,actionHeaders:{},loaderHeaders:{}};return f(()=>Promise.resolve(a))}});return x(tD(l),"Expected a response in query()"),l}catch(e){if(tD(e))return e;throw e}}let v=await c(e,y,g,t,h||null,!0===u,null,a||null,!0===d);return tD(v)?v:{location:y,basename:n,...v}}async function u(e,{routeId:t,requestContext:a,dataStrategy:l,generateMiddlewareResponse:d,normalizePath:h}={}){let f=e.method,m=P("",(h||eB)(e),null,"default"),p=H(i,m,n,!1,s);if(a=null!=a?a:new M,tT(f)||"HEAD"===f||"OPTIONS"===f){if(!p)throw tv(404,{pathname:m.pathname})}else throw tv(405,{method:f});let y=t?p.find(e=>e.route.id===t):t$(p,m);if(t&&!y)throw tv(403,{pathname:m.pathname,routeId:t});if(!y)throw tv(404,{pathname:m.pathname});if(d)return x(a instanceof M,"When using middleware in `staticHandler.queryRoute()`, any provided `requestContext` must be an instance of `RouterContextProvider`"),await e1(p,r,o),await e8({request:e,url:tu(e,m),pattern:ep(p),matches:p,params:p[0].params,context:a},async()=>await d(async e=>{let t=g(await c(e,m,p,a,l||null,!1,y,null,!1));return tD(t)?t:"string"==typeof t?new Response(t):Response.json(t)}),e=>{if(tL(e))return Promise.resolve(tE(e));if(tD(e))return Promise.resolve(e);throw e});return g(await c(e,m,p,a,l||null,!1,y,null,!1));function g(e){if(tD(e))return e;let t=e.errors?Object.values(e.errors)[0]:void 0;if(void 0!==t)throw t;return e.actionData?Object.values(e.actionData)[0]:e.loaderData?Object.values(e.loaderData)[0]:void 0}}async function c(e,t,r,n,a,o,i,s,l){x(e.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(tM(e.method))return await d(e,t,r,i||t$(r,t),n,a,o,null!=i,s,l);let u=await h(e,t,r,n,a,o,i,s);return tD(u)?u:{...u,actionData:null,actionHeaders:{}}}catch(e){if(tx(e)&&tD(e.result)){if("error"===e.type)throw e.result;return e.result}if(t_(e))return e;throw e}}async function d(e,t,n,a,i,s,l,u,c,d){let m;if(a.route.action||a.route.lazy){let l=te(o,r,e,t,n,a,[],i);m=(await f(e,t,l,u,i,s))[a.route.id],e.signal.aborted&&eI(e,u)}else{let t=tv(405,{method:e.method,pathname:new URL(e.url).pathname,routeId:a.route.id});if(u)throw t;m={type:"error",error:t}}if(tP(m))throw new Response(null,{status:m.response.status,headers:{Location:m.response.headers.get("Location")}});if(u){if(tk(m))throw m.error;return{matches:[a],loaderData:{},actionData:{[a.route.id]:m.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(d)if(!tk(m))return{actionData:{[a.route.id]:m.data},actionHeaders:m.headers?{[a.route.id]:m.headers}:{},matches:n,loaderData:{},errors:null,statusCode:m.statusCode||200,loaderHeaders:{}};else{let e=l?a:ty(n,a.route.id);return{statusCode:em(m.error)?m.error.status:null!=m.statusCode?m.statusCode:500,actionData:null,actionHeaders:{...m.headers?{[a.route.id]:m.headers}:{}},matches:n,loaderData:{},errors:{[e.route.id]:m.error},loaderHeaders:{}}}let p=new Request(e.url,{headers:e.headers,redirect:e.redirect,signal:e.signal});if(tk(m)){let e=l?a:ty(n,a.route.id);return{...await h(p,t,n,i,s,l,null,c,[e.route.id,m]),statusCode:em(m.error)?m.error.status:null!=m.statusCode?m.statusCode:500,actionData:null,actionHeaders:{...m.headers?{[a.route.id]:m.headers}:{}}}}return{...await h(p,t,n,i,s,l,null,c),actionData:{[a.route.id]:m.data},...m.statusCode?{statusCode:m.statusCode}:{},actionHeaders:m.headers?{[a.route.id]:m.headers}:{}}}async function h(e,t,n,a,i,s,l,u,c){let d,h=null!=l;if(h&&!l?.route.loader&&!l?.route.lazy)throw tv(400,{method:e.method,pathname:new URL(e.url).pathname,routeId:l?.route.id});if(l)d=te(o,r,e,t,n,l,[],a);else{let i=c&&tk(c[1])?n.findIndex(e=>e.route.id===c[0])-1:void 0,s=ep(n);d=n.map((n,l)=>null!=i&&l>i?e7(o,r,e,t,s,n,[],a,!1):e7(o,r,e,t,s,n,[],a,null!=(n.route.loader||n.route.lazy)&&(!u||u(n))))}if(!i&&!d.some(e=>e.shouldLoad))return{matches:n,loaderData:{},errors:c&&tk(c[1])?{[c[0]]:c[1].error}:null,statusCode:200,loaderHeaders:{}};let m=await f(e,t,d,h,a,i);return e.signal.aborted&&eI(e,h),{...th(n,m,c,!0,s),matches:n}}async function f(e,t,r,a,o,i){let s=await tt(i||e2,e,t,r,null,o,!0),l={};return await Promise.all(r.map(async t=>{if(!(t.route.id in s))return;let o=s[t.route.id];if(tC(o))throw to(o.result,e,t.route.id,r,n);if(a){if(tD(o.result))throw o;else if(tL(o.result))throw tE(o.result)}l[t.route.id]=await ta(o)})),l}return{dataRoutes:i,_internalRouteBranches:s,query:l,queryRoute:u}}function ez(e,t,r,n){let a=n||t._deepestRenderedBoundaryId||e[0].id;return{...t,statusCode:em(r)?r.status:500,errors:{[a]:r}}}function eI(e,t){if(void 0!==e.signal.reason)throw e.signal.reason;throw Error(`${t?"queryRoute":"query"}() call aborted without an \`AbortSignal.reason\`: ${e.method} ${e.url}`)}function eB(e){let t=new URL(e.url);return{pathname:t.pathname,search:t.search,hash:t.hash}}function eq(e,t,r,n,a,o){let i,s;if(a){for(let e of(i=[],t))if(i.push(e),e.route.id===a){s=e;break}}else i=t,s=t[t.length-1];let l=et(n||".",ee(i),X(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(l.search=e.search,l.hash=e.hash),(null==n||""===n||"."===n)&&s){let e=tO(l.search);if(s.route.index&&!e)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&e){let e=new URLSearchParams(l.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();l.search=r?`?${r}`:""}}return"/"!==r&&(l.pathname=function({basename:e,pathname:t}){return"/"===t?e:en([e,t])}({basename:r,pathname:l.pathname})),L(l)}function eW(e,t,r){let n,a;if(!r||!(null!=r&&("formData"in r&&null!=r.formData||"body"in r&&void 0!==r.body)))return{path:t};if(r.formMethod&&!tT(r.formMethod))return{path:t,error:tv(405,{method:r.formMethod})};let o=()=>({path:t,error:tv(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),s=tb(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!tM(i))return o();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}
|
|
2
2
|
`,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}else if("application/json"===r.formEncType){if(!tM(i))return o();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return o()}}}if(x("function"==typeof FormData,"FormData is not available in this environment"),r.formData)n=tc(r.formData),a=r.formData;else if(r.body instanceof FormData)n=tc(r.body),a=r.body;else if(r.body instanceof URLSearchParams)a=td(n=r.body);else if(null==r.body)n=new URLSearchParams,a=new FormData;else try{n=new URLSearchParams(r.body),a=td(n)}catch(e){return o()}let l={formMethod:i,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if(tM(l.formMethod))return{path:t,submission:l};let u=D(t);return e&&u.search&&tO(u.search)&&n.append("index",""),u.search=`?${n}`,{path:L(u),submission:l}}function eJ(e,t,r,n,a,o,i,s,l,u,c,d,h,f,m,p,y,g,v,w,b,E){let R,S=b?tk(b[1])?b[1].error:b[1].data:void 0,x=a.createURL(o.location),C=a.createURL(l);if(c&&o.errors){let e=Object.keys(o.errors)[0];R=i.findIndex(t=>t.route.id===e)}else if(b&&tk(b[1])){let e=b[0];R=i.findIndex(t=>t.route.id===e)-1}let k=b?b[1].statusCode:void 0,P=k&&k>=400,L={currentUrl:x,currentParams:o.matches[0]?.params||{},nextUrl:C,nextParams:i[0].params,...s,actionResult:S,actionStatus:k},D=ep(i),A=i.map((a,i)=>{var s,h,f,m,p;let y,{route:g}=a,v=null;if(null!=R&&i>R)v=!1;else if(g.lazy)v=!0;else if(eY(g))if(c){let{shouldLoad:e}=eX(g,o.loaderData,o.errors);v=e}else{let e,t;s=o.loaderData,h=o.matches[i],f=a,e=!h||f.route.id!==h.route.id,t=!s.hasOwnProperty(f.route.id),(e||t)&&(v=!0)}else v=!1;if(null!==v)return e7(r,n,e,l,D,a,u,t,v);let w=!1;"boolean"==typeof E?w=E:P?w=!1:d||x.pathname+x.search===C.pathname+C.search||x.search!==C.search?w=!0:(m=o.matches[i],p=a,y=m.route.path,(m.pathname!==p.pathname||null!=y&&y.endsWith("*")&&m.params["*"]!==p.params["*"])&&(w=!0));let b={...L,defaultShouldRevalidate:w},S=eV(a,b);return e7(r,n,e,l,D,a,u,t,S,b,E)}),_=[];return m.forEach((e,s)=>{if(c||!i.some(t=>t.route.id===e.routeId)||f.has(s))return;let l=o.fetchers.get(s),m=l&&"idle"!==l.state&&void 0===l.data,b=H(y,e.path,g??"/",!1,w);if(!b){if(v&&m)return;_.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(p.has(s))return;let R=t$(b,e.path),S=new AbortController,x=tl(a,e.path,S.signal),C=null;if(h.has(s))h.delete(s),C=te(r,n,x,e.path,b,R,u,t);else if(m)d&&(C=te(r,n,x,e.path,b,R,u,t));else{let a={...L,defaultShouldRevalidate:"boolean"==typeof E?E:!P&&d};eV(R,a)&&(C=te(r,n,x,e.path,b,R,u,t,a))}C&&_.push({key:s,routeId:e.routeId,path:e.path,matches:C,match:R,request:x,controller:S})}),{dsMatches:A,revalidatingFetchers:_}}function eY(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function eX(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!eY(e))return{shouldLoad:!1,renderFallback:!1};let n=null!=t&&e.id in t,a=null!=r&&void 0!==r[e.id];if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if("function"==typeof e.loader&&!0===e.loader.hydrate)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function eV(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function eK(e,t,r,n,a,o){let i;if(e){let t=n[e];x(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),i=t.children}else i=r.activeRoutes;let s=[],l=[];if(t.forEach(e=>{let t=i.find(t=>(function e(t,r){return"id"in t&&"id"in r&&t.id===r.id||t.index===r.index&&t.path===r.path&&t.caseSensitive===r.caseSensitive&&((!t.children||0===t.children.length)&&(!r.children||0===r.children.length)||(t.children?.every((t,n)=>r.children?.some(r=>e(t,r)))??!1))})(e,t));t?l.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=N(s,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...t)}if(o&&l.length>0)for(let e=0;e<l.length;e++){let{existingRoute:t,newRoute:r}=l[e],[n]=N([r],a,[],{},!0);Object.assign(t,{element:n.element?n.element:t.element,errorElement:n.errorElement?n.errorElement:t.errorElement,hydrateFallbackElement:n.hydrateFallbackElement?n.hydrateFallbackElement:t.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}i=new WeakMap,s=new WeakMap,l=new WeakMap,u=new WeakMap;var eG=new WeakMap,eZ=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(x(a,"No route found in manifest"),!a.lazy||"object"!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=eG.get(a);i||(i={},eG.set(a,i));let s=i[e];if(s)return s;let l=(async()=>{let t=O.has(e),r=void 0!==a[e]&&"hasErrorBoundary"!==e;if(t)C(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(r)C(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,n(a)))}"object"==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every(e=>void 0===e)&&(a.lazy=void 0))})();return i[e]=l,l},eQ=new WeakMap;function e0(e){return void 0!==e}function e1(e,t,r){let n=e.map(({route:e})=>{if("object"==typeof e.lazy&&e.lazy.middleware)return eZ({key:"middleware",route:e,manifest:t,mapRouteProperties:r})}).filter(e0);return n.length>0?Promise.all(n):void 0}async function e2(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function e4(e){return e.matches.some(e=>e.route.middleware)?e3(e,()=>e2(e)):e2(e)}function e8(e,t,r){return e5(e,t,function(e){return tL(e)?tE(e):e},tD,r)}function e3(e,t){return e5(e,t,e=>{if(t_(e))throw e;return e},tS,function(t,r,n){if(n)return Promise.resolve(Object.assign(n.value,{[r]:{type:"error",result:t}}));{let{matches:n}=e,a=Math.min(Math.max(n.findIndex(e=>e.route.id===r),0),Math.max(n.findIndex(e=>e.shouldCallHandler()),0));return Promise.resolve({[ty(n,n[a].route.id).route.id]:{type:"error",result:t}})}})}async function e5(e,t,r,n,a){let{matches:o,...i}=e,s=o.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await e9(i,s,t,r,n,a)}async function e9(e,t,r,n,a,o,i=0){let s,{request:l}=e;if(l.signal.aborted)throw l.signal.reason??Error(`Request aborted: ${l.method} ${l.url}`);let u=t[i];if(!u)return await r();let[c,d]=u,h=async()=>{if(s)throw Error("You may only call `next()` once per middleware");try{return(s={value:await e9(e,t,r,n,a,o,i+1)}).value}catch(e){return(s={value:await o(e,c,s)}).value}};try{let t=await d(e,h),r=null!=t?n(t):void 0;if(a(r))return r;if(s)return r??s.value;return(s={value:await h()}).value}catch(e){return await o(e,c,s)}}function e6(e,t,r,n,a){let o=eZ({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=function(e,t,r,n,a){let o,i=r[e.id];if(x(i,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=eQ.get(i);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{x("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let a=$.has(e),o=void 0!==i[e]&&"hasErrorBoundary"!==e;a?C(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):o?C(!o,`Route "${i.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):r[e]=n}Object.assign(i,r),Object.assign(i,{...n(i),lazy:void 0})})();return eQ.set(i,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let s=Object.keys(e.lazy),l=[];for(let i of s){if(a&&a.includes(i))continue;let s=eZ({key:i,route:e,manifest:r,mapRouteProperties:n});s&&(l.push(s),i===t&&(o=s))}let u=l.length>0?Promise.all(l).then(()=>{}):void 0;return u?.catch(()=>{}),o?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:o}}(n.route,tM(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function e7(e,t,r,n,a,o,i,s,l,u=null,c){let d=!1,h=e6(e,t,r,o,i);return{...o,_lazyPromises:h,shouldLoad:l,shouldRevalidateArgs:u,shouldCallHandler:e=>(d=!0,u)?"boolean"==typeof c?eV(o,{...u,defaultShouldRevalidate:c}):"boolean"==typeof e?eV(o,{...u,defaultShouldRevalidate:e}):eV(o,u):l,resolve(e){let{lazy:t,loader:i,middleware:u}=o.route,c=d||l||e&&!tM(r.method)&&(t||i),f=u&&u.length>0&&!i&&!t;return c&&(tM(r.method)||!f)?tr({request:r,path:n,pattern:a,match:o,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:"data",result:void 0})}}}function te(e,t,r,n,a,o,i,s,l=null){return a.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:e6(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:e7(e,t,r,n,ep(a),u,i,s,!0,l))}async function tt(e,t,r,n,a,o,i){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let s={request:t,url:tu(t,r),pattern:ep(n),params:n[0].params,context:o,matches:n},l=i?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>e3(s,()=>e({...s,fetcherKey:a,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}})),u=await e({...s,fetcherKey:a,runClientMiddleware:l});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch(e){}return u}async function tr({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:s}){let l,u,c=tM(e.method),d=c?"action":"loader",h=a=>{let o,l=new Promise((e,t)=>o=t);u=()=>o(),e.signal.addEventListener("abort",u);let c=o=>"function"!=typeof a?Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${n.route.id}]`)):a({request:e,url:tu(e,t),pattern:r,params:n.params,context:s},...void 0!==o?[o]:[]);return Promise.race([(async()=>{try{let e=await (i?i(e=>c(e)):c());return{type:"data",result:e}}catch(e){return{type:"error",result:e}}})(),l])};try{let t=c?n.route.action:n.route.loader;if(a||o)if(t){let e,[r]=await Promise.all([h(t).catch(t=>{e=t}),a,o]);if(void 0!==e)throw e;l=r}else{await a;let t=c?n.route.action:n.route.loader;if(t)[l]=await Promise.all([h(t),o]);else{if("action"!==d)return{type:"data",result:void 0};let t=new URL(e.url),r=t.pathname+t.search;throw tv(405,{method:e.method,pathname:r,routeId:n.route.id})}}else if(t)l=await h(t);else{let t=new URL(e.url),r=t.pathname+t.search;throw tv(404,{pathname:r})}}catch(e){return{type:"error",result:e}}finally{u&&e.signal.removeEventListener("abort",u)}return l}async function tn(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}async function ta(e){let{result:t,type:r}=e;if(tD(t)){let e;try{e=await tn(t)}catch(e){return{type:"error",error:e}}return"error"===r?{type:"error",error:new ef(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}if("error"===r)return tL(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:tR(t),statusCode:em(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:em(t)?t.status:void 0};return tL(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function to(e,t,r,n,a){let o,i=e.headers.get("Location");if(x(i,"Redirects returned/thrown from loaders/actions must have a Location header"),o=i,!V.test(o)){let o=n.slice(0,n.findIndex(e=>e.route.id===r)+1);i=eq(new URL(t.url),o,a,i),e.headers.set("Location",i)}return e}var ti=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ts(e,t,r,n){if(V.test(e)){let n=new URL(e.startsWith("//")?t.protocol+e:e);if(ti.includes(n.protocol))throw Error("Invalid redirect location");let a=null!=X(n.pathname,r);if(n.origin===t.origin&&a)return er(n.pathname)+n.search+n.hash}try{let t=n.createURL(e);if(ti.includes(t.protocol))throw Error("Invalid redirect location")}catch(e){}return e}function tl(e,t,r,n){let a=e.createURL(tb(t)).toString(),o={signal:r};if(n&&tM(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=tc(n.formData):o.body=n.formData}return new Request(a,o)}function tu(e,t){let r=new URL(e.url),n="string"==typeof t?D(t):t;if(r.pathname=n.pathname||"/",n.search){let e=new URLSearchParams(n.search),t=e.getAll("index");for(let r of(e.delete("index"),t.filter(Boolean)))e.append("index",r);r.search=e.size?`?${e.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function tc(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function td(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function th(e,t,r,n=!1,a=!1){let o,i={},s=null,l=!1,u={},c=r&&tk(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let d=r.route.id,h=t[d];if(x(!tP(h),"Cannot handle redirect results in processLoaderData"),tk(h)){let t=h.error;if(void 0!==c&&(t=c,c=void 0),s=s||{},a)s[d]=t;else{let r=ty(e,d);null==s[r.route.id]&&(s[r.route.id]=t)}n||(i[d]=ej),l||(l=!0,o=em(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else i[d]=h.data,h.statusCode&&200!==h.statusCode&&!l&&(o=h.statusCode),h.headers&&(u[d]=h.headers)}),void 0!==c&&r&&(s={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function tf(e,t,r,n,a,o,i){let{loaderData:s,errors:l}=th(t,r,n);return a.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:a}=t;if(a&&a.signal.aborted)return;let s=o[r];if(x(s,"Did not find corresponding fetcher result"),tk(s)){let t=ty(e.matches,n?.route.id);l&&l[t.route.id]||(l={...l,[t.route.id]:s.error}),i.delete(r)}else if(tP(s))x(!1,"Unhandled fetcher revalidation redirect");else{let e=tH(s.data);i.set(r,e)}}),{loaderData:s,errors:l}}function tm(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==ej).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function tp(e){return e?tk(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function ty(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function tg(e){let t=1===e.length?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 tv(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?s=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===a&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",s=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?s=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(s=`Invalid request method "${n.toUpperCase()}"`)),new ef(e||500,i,Error(s),!0)}function tw(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(tP(n))return{key:r,result:n}}}function tb(e){return L({..."string"==typeof e?D(e):e,hash:""})}function tE(e){return Response.json(e.data,e.init??void 0)}function tR(e){return new ef(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function tS(e){return null!=e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&tx(t))}function tx(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}function tC(e){return tD(e.result)&&eA.has(e.result.status)}function tk(e){return"error"===e.type}function tP(e){return"redirect"===(e&&e.type)}function tL(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function tD(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function tA(e){return eA.has(e)}function t_(e){return tD(e)&&tA(e.status)&&e.headers.has("Location")}function tT(e){return eD.has(e.toUpperCase())}function tM(e){return eL.has(e.toUpperCase())}function tO(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function t$(e,t){let r="string"==typeof t?D(t).search:t.search;if(e[e.length-1].route.index&&tO(r||""))return e[e.length-1];let n=Q(e);return n[n.length-1]}function tN(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n){if(null!=a)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};else if(null!=o)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};else if(void 0!==i)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function tj(e,t,r,n){return n?{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function tF(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 tH(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 tU(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(e){}},t=async e=>{a(e);try{await r}catch(e){}}});return{promise:r,resolve:e,reject:t}}var tz=d.createContext(null);tz.displayName="DataRouter";var tI=d.createContext(null);tI.displayName="DataRouterState";var tB=d.createContext(!1);function tq(){return d.useContext(tB)}var tW=d.createContext({isTransitioning:!1});tW.displayName="ViewTransition";var tJ=d.createContext(new Map);tJ.displayName="Fetchers";var tY=d.createContext(null);tY.displayName="Await";var tX=e=>d.createElement(tY.Provider,e),tV=d.createContext(null);tV.displayName="Navigation";var tK=d.createContext(null);tK.displayName="Location";var tG=d.createContext({outlet:null,matches:[],isDataRoute:!1});tG.displayName="Route";var tZ=d.createContext(null);tZ.displayName="RouteError";var tQ="REACT_ROUTER_ERROR";function t0(e){if(e.startsWith(`${tQ}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}function t1(e){if(e.startsWith(`${tQ}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new ef(t.status,t.statusText,t.data)}catch{}}function t2(e,{relative:t}={}){x(t4(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=d.useContext(tV),{hash:a,pathname:o,search:i}=ra(e,{relative:t}),s=o;return"/"!==r&&(s="/"===o?r:en([r,o])),n.createHref({pathname:s,search:i,hash:a})}function t4(){return null!=d.useContext(tK)}function t8(){return x(t4(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(tK).location}function t3(){return d.useContext(tK).navigationType}function t5(e){x(t4(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=t8();return d.useMemo(()=>W(e,Y(t)),[t,e])}var t9="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function t6(e){d.useContext(tV).static||d.useLayoutEffect(e)}function t7(){let{isDataRoute:e}=d.useContext(tG);return e?function(){let{router:e}=rm("useNavigate"),t=ry("useNavigate"),r=d.useRef(!1);return t6(()=>{r.current=!0}),d.useCallback(async(n,a={})=>{C(r.current,t9),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}():function(){x(t4(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(tz),{basename:t,navigator:r}=d.useContext(tV),{matches:n}=d.useContext(tG),{pathname:a}=t8(),o=JSON.stringify(ee(n)),i=d.useRef(!1);return t6(()=>{i.current=!0}),d.useCallback((n,s={})=>{if(C(i.current,t9),!i.current)return;if("number"==typeof n)return void r.go(n);let l=et(n,JSON.parse(o),a,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:en([t,l.pathname])),(s.replace?r.replace:r.push)(l,s.state,s)},[t,r,o,a,e])}()}var re=d.createContext(null);function rt(){return d.useContext(re)}function rr(e){let t=d.useContext(tG).outlet;return d.useMemo(()=>t&&d.createElement(re.Provider,{value:e},t),[t,e])}function rn(){let{matches:e}=d.useContext(tG),t=e[e.length-1];return t?.params??{}}function ra(e,{relative:t}={}){let{matches:r}=d.useContext(tG),{pathname:n}=t8(),a=JSON.stringify(ee(r));return d.useMemo(()=>et(e,JSON.parse(a),n,"path"===t),[e,a,n,t])}function ro(e,t){return ri(e,t)}function ri(e,t,r){let n;x(t4(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(tV),{matches:o}=d.useContext(tG),i=o[o.length-1],s=i?i.params:{},l=i?i.pathname:"/",u=i?i.pathnameBase:"/",c=i&&i.route;{let e=c&&c.path||"";rD(l,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
3
|
|
|
4
4
|
Please change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let h=t8();if(t){let e="string"==typeof t?D(t):t;x("/"===u||e.pathname?.startsWith(u),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${e.pathname}" was given in the \`location\` prop.`),n=e}else n=h;let f=n.pathname||"/",m=f;if("/"!==u){let e=u.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(e.length).join("/")}let p=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):F(e,{pathname:m});C(c||null!=p,`No routes matched location "${n.pathname}${n.search}${n.hash}" `),C(null==p||void 0!==p[p.length-1].route.element||void 0!==p[p.length-1].route.Component||void 0!==p[p.length-1].route.lazy,`Matched leaf route at location "${n.pathname}${n.search}${n.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=rh(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:en([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:en([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,r);return t&&y?d.createElement(tK.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...n},navigationType:"POP"}},y):y}var rs=d.createElement(function(){let e=rS(),t=em(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"2px 4px",backgroundColor:n},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=d.createElement(d.Fragment,null,d.createElement("p",null,"\uD83D\uDCBF Hey developer \uD83D\uDC4B"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:a},"ErrorBoundary")," or"," ",d.createElement("code",{style:a},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:{padding:"0.5rem",backgroundColor:n}},r):null,o)},null),rl=class extends d.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||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){let t=t1(e.digest);t&&(e=t)}let t=void 0!==e?d.createElement(tG.Provider,{value:this.props.routeContext},d.createElement(tZ.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?d.createElement(rc,{error:e},t):t}};rl.contextType=tB;var ru=new WeakMap;function rc({children:e,error:t}){let{basename:r}=d.useContext(tV);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=t0(t.digest);if(e){let n=ru.get(t);if(n)throw n;let a=eg(e.location,r);if(ey&&!ru.get(t))if(a.isExternal||e.reloadDocument)window.location.href=a.absoluteURL||a.to;else{let r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw ru.set(t,r),r}return d.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function rd({routeContext:e,match:t,children:r}){let n=d.useContext(tz);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(tG.Provider,{value:e},r)}function rh(e,t=[],r){let n=r?.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,o=n?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);x(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let i=!1,s=-1;if(r&&n){i=n.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:o}=n,l=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||l){r.isStatic&&(i=!0),a=s>=0?a.slice(0,s+1):[a[0]];break}}}}let l=r?.onError,u=n&&l?(e,t)=>{l(e,{location:n.location,params:n.matches?.[0]?.params??{},pattern:ep(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,l)=>{let c,h=!1,f=null,m=null;n&&(c=o&&r.route.id?o[r.route.id]:void 0,f=r.route.errorElement||rs,i&&(s<0&&0===l?(rD("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,m=null):s===l&&(h=!0,m=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,l+1)),y=()=>{let t;return t=c?f:h?m:r.route.Component?d.createElement(r.route.Component,null):r.route.element?r.route.element:e,d.createElement(rd,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===l)?d.createElement(rl,{location:n.location,revalidation:n.revalidation,component:f,error:c,children:y(),routeContext:{outlet:null,matches:p,isDataRoute:!0},onError:u}):y()},null)}function rf(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function rm(e){let t=d.useContext(tz);return x(t,rf(e)),t}function rp(e){let t=d.useContext(tI);return x(t,rf(e)),t}function ry(e){let t,r=(x(t=d.useContext(tG),rf(e)),t),n=r.matches[r.matches.length-1];return x(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function rg(){let e=rp("useNavigation");return d.useMemo(()=>{let{matches:t,historyAction:r,...n}=e.navigation;return n},[e.navigation])}function rv(){let e=rm("useRevalidator"),t=rp("useRevalidator"),r=d.useCallback(async()=>{await e.router.revalidate()},[e.router]);return d.useMemo(()=>({revalidate:r,state:t.revalidation}),[r,t.revalidation])}function rw(){let{matches:e,loaderData:t}=rp("useMatches");return d.useMemo(()=>e.map(e=>U(e,t)),[e,t])}function rb(){let e=rp("useLoaderData"),t=ry("useLoaderData");return e.loaderData[t]}function rE(e){return rp("useRouteLoaderData").loaderData[e]}function rR(){let e=rp("useActionData"),t=ry("useLoaderData");return e.actionData?e.actionData[t]:void 0}function rS(){let e=d.useContext(tZ),t=rp("useRouteError"),r=ry("useRouteError");return void 0!==e?e:t.errors?.[r]}function rx(){let e=d.useContext(tY);return e?._data}function rC(){let e=d.useContext(tY);return e?._error}var rk=0;function rP(e){let{router:t,basename:r}=rm("useBlocker"),n=rp("useBlocker"),[a,o]=d.useState(""),i=d.useCallback(t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:{...n,pathname:X(n.pathname,r)||n.pathname},nextLocation:{...a,pathname:X(a.pathname,r)||a.pathname},historyAction:o})},[r,e]);return d.useEffect(()=>{let e=String(++rk);return o(e),()=>t.deleteBlocker(e)},[t]),d.useEffect(()=>{""!==a&&t.getBlocker(a,i)},[t,a,i]),a&&n.blockers.has(a)?n.blockers.get(a):eO}var rL={};function rD(e,t,r){t||rL[e]||(rL[e]=!0,C(!1,r))}function rA(...e){let t=ry("useRoute"),r=e[0]??t,n=rp("useRoute"),a=n.matches.find(({route:e})=>e.id===r);if(void 0!==a)return{handle:a.route.handle,loaderData:n.loaderData[r],actionData:n.actionData?.[r]}}function r_(e){return{id:e.route.id,pathname:e.pathname,params:e.params,handle:e.route.handle}}function rT(){let{location:e,historyAction:t,matches:r,navigation:n}=rp("unstable_useRouterState"),a=d.useMemo(()=>({type:t,location:e,searchParams:new URLSearchParams(e.search),params:r[r.length-1]?.params??{},matches:r.map(e=>r_(e))}),[e,r,t]),o=d.useMemo(()=>{if("idle"===n.state)return null;let e={type:n.historyAction,location:n.location,searchParams:new URLSearchParams(n.location.search),params:n.matches[n.matches.length-1]?.params??{},matches:n.matches.map(e=>r_(e))};return"loading"===n.state?{...e,state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{...e,state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}},[n]);return d.useMemo(()=>({active:a,pending:o}),[a,o])}var rM={};function rO(e,t){e||rM[t]||(rM[t]=!0,console.warn(t))}var r$=d.useOptimistic,rN=()=>void 0;function rj(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&C(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&C(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&C(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var rF=["HydrateFallback","hydrateFallbackElement"];function rH(e,t){return eH({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:E({initialEntries:t?.initialEntries,initialIndex:t?.initialIndex}),hydrationData:t?.hydrationData,routes:e,hydrationRouteProperties:rF,mapRouteProperties:rj,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,instrumentations:t?.instrumentations}).initialize()}var rU=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}};function rz({router:e,flushSync:t,onError:r,useTransitions:n}){n=tq()||n;let[a,o]=d.useState(e.state),[i,s]=r$?r$(a):[a,rN],[l,u]=d.useState(),[c,h]=d.useState({isTransitioning:!1}),[f,m]=d.useState(),[p,y]=d.useState(),[g,v]=d.useState(),w=d.useRef(new Map),b=d.useCallback((a,{deletedFetchers:i,newErrors:l,flushSync:c,viewTransitionOpts:g})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:a.location,params:a.matches[0]?.params??{},pattern:ep(a.matches)})),a.fetchers.forEach((e,t)=>{void 0!==e.data&&w.current.set(t,e.data)}),i.forEach(e=>w.current.delete(e)),rO(!1===c||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(rO(null==g||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!b)return void(t&&c?t(()=>o(a)):!1===n?o(a):d.startTransition(()=>{!0===n&&s(e=>rI(e,a)),o(a)}));if(t&&c){t(()=>{p&&(f?.resolve(),p.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>o(a))});r.finished.finally(()=>{t(()=>{m(void 0),y(void 0),u(void 0),h({isTransitioning:!1})})}),t(()=>y(r));return}p?(f?.resolve(),p.skipTransition(),v({state:a,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(u(a),h({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,p,f,n,s,r]);d.useLayoutEffect(()=>e.subscribe(b),[e,b]),d.useEffect(()=>{c.isTransitioning&&!c.flushSync&&m(new rU)},[c]),d.useEffect(()=>{if(f&&l&&e.window){let t=f.promise,r=e.window.document.startViewTransition(async()=>{!1===n?o(l):d.startTransition(()=>{!0===n&&s(e=>rI(e,l)),o(l)}),await t});r.finished.finally(()=>{m(void 0),y(void 0),u(void 0),h({isTransitioning:!1})}),y(r)}},[l,f,e.window,n,s]),d.useEffect(()=>{f&&l&&i.location.key===l.location.key&&f.resolve()},[f,p,i.location,l]),d.useEffect(()=>{!c.isTransitioning&&g&&(u(g.state),h({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),v(void 0))},[c.isTransitioning,g]);let E=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),R=e.basename||"/",S=d.useMemo(()=>({router:e,navigator:E,static:!1,basename:R,onError:r}),[e,E,R,r]);return d.createElement(d.Fragment,null,d.createElement(tz.Provider,{value:S},d.createElement(tI.Provider,{value:i},d.createElement(tJ.Provider,{value:w.current},d.createElement(tW.Provider,{value:c},d.createElement(rV,{basename:R,location:i.location,navigationType:i.historyAction,navigator:E,useTransitions:n},d.createElement(rB,{routes:e.routes,manifest:e.manifest,future:e.future,state:i,isStatic:!1,onError:r})))))),null)}function rI(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var rB=d.memo(rq);function rq({routes:e,manifest:t,future:r,state:n,isStatic:a,onError:o}){return ri(e,void 0,{manifest:t,state:n,isStatic:a,onError:o,future:r})}function rW({basename:e,children:t,initialEntries:r,initialIndex:n,useTransitions:a}){let o=d.useRef();null==o.current&&(o.current=E({initialEntries:r,initialIndex:n,v5Compat:!0}));let i=o.current,[s,l]=d.useState({action:i.action,location:i.location}),u=d.useCallback(e=>{!1===a?l(e):d.startTransition(()=>l(e))},[a]);return d.useLayoutEffect(()=>i.listen(u),[i,u]),d.createElement(rV,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:i,useTransitions:a})}function rJ({to:e,replace:t,state:r,relative:n}){x(t4(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=d.useContext(tV);C(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=d.useContext(tG),{pathname:i}=t8(),s=t7(),l=JSON.stringify(et(e,ee(o),i,"path"===n));return d.useEffect(()=>{s(JSON.parse(l),{replace:t,state:r,relative:n})},[s,l,n,t,r]),null}function rY(e){return rr(e.context)}function rX(e){x(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function rV({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,useTransitions:i}){x(!t4(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=d.useMemo(()=>({basename:s,navigator:a,static:o,useTransitions:i,future:{}}),[s,a,o,i]);"string"==typeof r&&(r=D(r));let{pathname:u="/",search:c="",hash:h="",state:f=null,key:m="default",mask:p}=r,y=d.useMemo(()=>{let e=X(u,s);return null==e?null:{location:{pathname:e,search:c,hash:h,state:f,key:m,mask:p},navigationType:n}},[s,u,c,h,f,m,n,p]);return(C(null!=y,`<Router basename="${s}"> is not able to match the URL "${u}${c}${h}" because it does not start with the basename, so the <Router> won't render anything.`),null==y)?null:d.createElement(tV.Provider,{value:l},d.createElement(tK.Provider,{children:t,value:y}))}function rK({children:e,location:t}){return ri(r0(e),t)}function rG({children:e,errorElement:t,resolve:r}){let n=d.useContext(tz),a=d.useContext(tI),o=d.useCallback((e,t)=>{n&&n.onError&&a&&n.onError(e,{location:a.location,params:a.matches[0]?.params||{},pattern:ep(a.matches),errorInfo:t})},[n,a]);return d.createElement(rZ,{resolve:r,errorElement:t,onError:o},d.createElement(rQ,null,e))}var rZ=class extends d.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=0;if(r instanceof Promise)if(this.state.error){a=2;let e=this.state.error;Object.defineProperty(n=Promise.reject().catch(()=>{}),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?a="_error"in(n=r)?2:+("_data"in n):(a=0,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then(e=>Object.defineProperty(r,"_data",{get:()=>e}),e=>{this.props.onError?.(e),Object.defineProperty(r,"_error",{get:()=>e})}));else a=1,Object.defineProperty(n=Promise.resolve(),"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(2===a&&!t)throw n._error;if(2===a)return d.createElement(tY.Provider,{value:n,children:t});if(1===a)return d.createElement(tY.Provider,{value:n,children:e});throw n}};function rQ({children:e}){let t=rx(),r="function"==typeof e?e(t):e;return d.createElement(d.Fragment,null,r)}function r0(e,t=[]){let r=[];return d.Children.forEach(e,(e,n)=>{if(!d.isValidElement(e))return;let a=[...t,n];if(e.type===d.Fragment)return void r.push.apply(r,r0(e.props.children,a));x(e.type===rX,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),x(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=r0(e.props.children,a)),r.push(o)}),r}var r1=r0;function r2(e){return rh(e)}function r4(){return{params:rn(),loaderData:rb(),actionData:rR(),matches:rw()}}function r8({children:e}){let t=r4();return d.cloneElement(e,t)}function r3(e){return function(){let t=r4();return d.createElement(e,t)}}function r5(){return{params:rn(),loaderData:rb(),actionData:rR()}}function r9({children:e}){let t=r5();return d.cloneElement(e,t)}function r6(e){return function(){let t=r5();return d.createElement(e,t)}}function r7(){return{params:rn(),loaderData:rb(),actionData:rR(),error:rS()}}function ne({children:e}){let t=r7();return d.cloneElement(e,t)}function nt(e){return function(){let t=r7();return d.createElement(e,t)}}var nr="get",nn="application/x-www-form-urlencoded";function na(e){return"u">typeof HTMLElement&&e instanceof HTMLElement}function no(e=""){return new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}var ni=null,ns=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function nl(e){return null==e||ns.has(e)?e:(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${nn}"`),null)}var nu=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],nc=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}},nd=()=>Date.now(),nh=()=>new Promise(e=>setTimeout(e,0));async function nf(e){let{indices:t}=this,r=t.get(e);if(r)return[r];if(void 0===e)return -7;if(null===e)return -5;if(Number.isNaN(e))return -2;if(e===1/0)return -6;if(e===-1/0)return -3;if(0===e&&1/e<0)return -4;let n=this.index++;t.set(e,n);let a=[[e,n]];return await nm.call(this,a),n}async function nm(e){let{deferred:t,indices:r,plugins:n,postPlugins:a}=this,o=this.stringified,i=nd(),s=t=>{let n=r.get(t);if(n)return[n];if(void 0===t)return -7;if(null===t)return -5;if(Number.isNaN(t))return -2;if(t===1/0)return -6;if(t===-1/0)return -3;if(0===t&&1/t<0)return -4;let a=this.index++;return r.set(t,a),e.push([t,a]),a},l=0;for(;e.length>0;){let r=nd();++l%6e3==0&&r-i>=1&&(await nh(),i=nd());let[u,c]=e.pop(),d=e=>Object.keys(e).map(t=>`"_${s(t)}":${s(e[t])}`).join(","),h=null;switch(typeof u){case"boolean":case"number":case"string":o[c]=JSON.stringify(u);break;case"bigint":o[c]=`["B","${u}"]`;break;case"symbol":{let e=Symbol.keyFor(u);e?o[c]=`["Y",${JSON.stringify(e)}]`:h=Error("Cannot encode symbol unless created with Symbol.for()");break}case"object":{if(!u){o[c]="-5";break}let e=Array.isArray(u),r=!1;if(!e&&n)for(let e of n){let t=e(u);if(Array.isArray(t)){r=!0;let[e,...n]=t;o[c]=`[${JSON.stringify(e)}`,n.length>0&&(o[c]+=`,${n.map(e=>s(e)).join(",")}`),o[c]+="]";break}}if(!r){let r=e?"[":"{";if(e){for(let e=0;e<u.length;e++)r+=(e?",":"")+(e in u?s(u[e]):-1);o[c]=`${r}]`}else if(u instanceof Date){let e=u.getTime();o[c]=`["D",${Number.isNaN(e)?JSON.stringify("invalid"):e}]`}else u instanceof URL?o[c]=`["U",${JSON.stringify(u.href)}]`:u instanceof RegExp?o[c]=`["R",${JSON.stringify(u.source)},${JSON.stringify(u.flags)}]`:u instanceof Set?u.size>0?o[c]=`["S",${[...u].map(e=>s(e)).join(",")}]`:o[c]='["S"]':u instanceof Map?u.size>0?o[c]=`["M",${[...u].flatMap(([e,t])=>[s(e),s(t)]).join(",")}]`:o[c]='["M"]':u instanceof Promise?(o[c]=`["P",${c}]`,t[c]=u):u instanceof Error?(o[c]=`["E",${JSON.stringify(u.message)}`,"Error"!==u.name&&(o[c]+=`,${JSON.stringify(u.name)}`),o[c]+="]"):null===Object.getPrototypeOf(u)?o[c]=`["N",{${d(u)}}]`:function(e){let t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===np}(u)?o[c]=`{${d(u)}}`:h=Error("Cannot encode object with prototype")}break}default:{let e=Array.isArray(u),t=!1;if(!e&&n)for(let e of n){let r=e(u);if(Array.isArray(r)){t=!0;let[e,...n]=r;o[c]=`[${JSON.stringify(e)}`,n.length>0&&(o[c]+=`,${n.map(e=>s(e)).join(",")}`),o[c]+="]";break}}t||(h=Error("Cannot encode function or unexpected type"))}}if(h){let e=!1;if(a)for(let t of a){let r=t(u);if(Array.isArray(r)){e=!0;let[t,...n]=r;o[c]=`[${JSON.stringify(t)}`,n.length>0&&(o[c]+=`,${n.map(e=>s(e)).join(",")}`),o[c]+="]";break}}if(!e)throw h}}}var np=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),ny="u">typeof window?window:"u">typeof globalThis?globalThis:void 0;function ng(e){let{hydrated:t,values:r}=this;if("number"==typeof e)return nv.call(this,e);if(!Array.isArray(e)||!e.length)throw SyntaxError();let n=r.length;for(let t of e)r.push(t);return t.length=r.length,nv.call(this,n)}function nv(e){let t,{hydrated:r,values:n,deferred:a,plugins:o}=this,i=[[e,e=>{t=e}]],s=[];for(;i.length>0;){let[e,t]=i.pop();switch(e){case -7:t(void 0);continue;case -5:t(null);continue;case -2:t(NaN);continue;case -6:t(1/0);continue;case -3:t(-1/0);continue;case -4:t(-0);continue}if(r[e]){t(r[e]);continue}let l=n[e];if(!l||"object"!=typeof l){r[e]=l,t(l);continue}if(Array.isArray(l))if("string"==typeof l[0]){let[n,u,c]=l;switch(n){case"D":t(r[e]=new Date(u));continue;case"U":t(r[e]=new URL(u));continue;case"B":t(r[e]=BigInt(u));continue;case"R":t(r[e]=new RegExp(u,c));continue;case"Y":t(r[e]=Symbol.for(u));continue;case"S":let d=new Set;r[e]=d;for(let e=l.length-1;e>0;e--)i.push([l[e],e=>{d.add(e)}]);t(d);continue;case"M":let h=new Map;r[e]=h;for(let e=l.length-2;e>0;e-=2){let t=[];i.push([l[e+1],e=>{t[1]=e}]),i.push([l[e],e=>{t[0]=e}]),s.push(()=>{h.set(t[0],t[1])})}t(h);continue;case"N":let f=Object.create(null);for(let t of(r[e]=f,Object.keys(u).reverse())){let e=[];i.push([u[t],t=>{e[1]=t}]),i.push([Number(t.slice(1)),t=>{e[0]=t}]),s.push(()=>{f[e[0]]=e[1]})}t(f);continue;case"P":if(r[u])t(r[e]=r[u]);else{let n=new nc;a[u]=n,t(r[e]=n.promise)}continue;case"E":let[,m,p]=l,y=p&&ny&&nu.includes(p)&&p in ny&&"function"==typeof ny[p]?new ny[p](m):Error(m);r[e]=y,t(y);continue;case"Z":t(r[e]=r[u]);continue;default:if(Array.isArray(o)){let n=[],a=l.slice(1);for(let e=0;e<a.length;e++){let t=a[e];i.push([t,t=>{n[e]=t}])}s.push(()=>{for(let a of o){let o=a(l[0],...n);if(o)return void t(r[e]=o.value)}throw SyntaxError()});continue}throw SyntaxError()}}else{let n=[];r[e]=n;for(let e=0;e<l.length;e++){let t=l[e];-1!==t&&i.push([t,t=>{n[e]=t}])}t(n);continue}{let n={};for(let t of(r[e]=n,Object.keys(l).reverse())){let e=[];i.push([l[t],t=>{e[1]=t}]),i.push([Number(t.slice(1)),t=>{e[0]=t}]),s.push(()=>{n[e[0]]=e[1]})}t(n);continue}}for(;s.length>0;)s.pop()();return t}async function nw(e,t){let r,n,{plugins:a}=t??{},o=new nc,i=e.pipeThrough((r=new TextDecoder,n="",new TransformStream({transform(e,t){let a=r.decode(e,{stream:!0}),o=(n+a).split("\n");for(let e of(n=o.pop()||"",o))t.enqueue(e)},flush(e){n&&e.enqueue(n)}}))).getReader(),s={values:[],hydrated:[],deferred:{},plugins:a},l=await nb.call(s,i),u=o.promise;return l.done?o.resolve():u=nE.call(s,i).then(o.resolve).catch(e=>{for(let t of Object.values(s.deferred))t.reject(e);o.reject(e)}),{done:u.then(()=>i.closed),value:l.value}}async function nb(e){let t,r=await e.read();if(!r.value)throw SyntaxError();try{t=JSON.parse(r.value)}catch(e){throw SyntaxError()}return{done:r.done,value:ng.call(this,t)}}async function nE(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;let r=t.value;switch(r[0]){case"P":{let e,t=r.indexOf(":"),n=Number(r.slice(1,t)),a=this.deferred[n];if(!a)throw Error(`Deferred ID ${n} not found in stream`);let o=r.slice(t+1);try{e=JSON.parse(o)}catch(e){throw SyntaxError()}let i=ng.call(this,e);a.resolve(i);break}case"E":{let e,t=r.indexOf(":"),n=Number(r.slice(1,t)),a=this.deferred[n];if(!a)throw Error(`Deferred ID ${n} not found in stream`);let o=r.slice(t+1);try{e=JSON.parse(o)}catch(e){throw SyntaxError()}let i=ng.call(this,e);a.reject(i);break}default:throw SyntaxError()}t=await e.read()}}async function nR(e){let t={signal:e.signal};if("GET"!==e.method){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}var nS={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},nx=/[&><\u2028\u2029]/g;function nC(e){return e.replace(nx,e=>nS[e])}function nk(e,t){if(!1===e||null==e)throw Error(t)}var nP=Symbol("SingleFetchRedirect"),nL=class extends Error{},nD=new Set([100,101,204,205]);function nA({context:e,identifier:t,reader:r,textDecoder:n,nonce:a}){if(!e.renderMeta||!e.renderMeta.didRenderScripts)return null;e.renderMeta.streamCache||(e.renderMeta.streamCache={});let{streamCache:o}=e.renderMeta,i=o[t];if(i||(i=o[t]=r.read().then(e=>{o[t].result={done:e.done,value:n.decode(e.value,{stream:!0})}}).catch(e=>{o[t].error=e})),i.error)throw i.error;if(void 0===i.result)throw i;let{done:s,value:l}=i.result,u=l?d.createElement("script",{nonce:a,dangerouslySetInnerHTML:{__html:`window.__reactRouterContext.streamController.enqueue(${nC(JSON.stringify(l))});`}}):null;return s?d.createElement(d.Fragment,null,u,d.createElement("script",{nonce:a,dangerouslySetInnerHTML:{__html:"window.__reactRouterContext.streamController.close();"}})):d.createElement(d.Fragment,null,u,d.createElement(d.Suspense,null,d.createElement(nA,{context:e,identifier:t+1,reader:r,textDecoder:n,nonce:a})))}function n_(e,t,r,n,a,o){let i=function(e,t,r,n,a,o,i=()=>!0){return async s=>{let{request:l,matches:u,fetcherKey:c}=s,d=e();if("GET"!==l.method)return nT(s,r,a,o);let h=u.some(e=>{let{hasLoader:r,hasClientLoader:n}=t(e);return e.shouldCallHandler()&&r&&!n});return n||h?c?nN(s,r,a,o):nO(s,d,t,r,n,a,o,i):nM(s,t,r,a,o)}}(e,e=>{let r=t.routes[e.route.id];return nk(r,"Route not found in manifest"),{hasLoader:r.hasLoader,hasClientLoader:r.hasClientLoader}},nF,n,a,o);return async e=>e.runClientMiddleware(i)}async function nT(e,t,r,n){let a,o=e.matches.find(e=>e.shouldCallHandler());nk(o,"No action match found");let i=await o.resolve(async i=>await i(async()=>{let{data:i,status:s}=await t(e,r,n,[o.route.id]);return a=s,nU(i,o.route.id)}));return tD(i.result)||em(i.result)||tL(i.result)?{[o.route.id]:i}:{[o.route.id]:{type:i.type,result:eu(i.result,a)}}}async function nM(e,t,r,n,a){let o=e.matches.filter(e=>e.shouldCallHandler()),i={};return await Promise.all(o.map(o=>o.resolve(async s=>{try{let{hasClientLoader:l}=t(o),u=o.route.id,c=l?await s(async()=>{let{data:t}=await r(e,n,a,[u]);return nU(t,u)}):await s();i[o.route.id]={type:"data",result:c}}catch(e){i[o.route.id]={type:"error",result:e}}}))),i}async function nO(e,t,r,n,a,o,i,s=()=>!0){let l=new Set,u=!1,c=e.matches.map(()=>nz()),d=nz(),h={},f=Promise.all(e.matches.map(async(t,a)=>t.resolve(async f=>{c[a].resolve();let m=t.route.id,{hasLoader:p,hasClientLoader:y}=r(t),g=!t.shouldRevalidateArgs||null==t.shouldRevalidateArgs.actionStatus||t.shouldRevalidateArgs.actionStatus<400;if(!t.shouldCallHandler(g)){u||(u=null!=t.shouldRevalidateArgs&&p);return}if(s(t)&&y){p&&(u=!0);try{let t=await f(async()=>{let{data:t}=await n(e,o,i,[m]);return nU(t,m)});h[m]={type:"data",result:t}}catch(e){h[m]={type:"error",result:e}}return}p&&l.add(m);try{let e=await f(async()=>{let e=await d.promise;return nU(e,m)});h[m]={type:"data",result:e}}catch(e){h[m]={type:"error",result:e}}})));if(await Promise.all(c.map(e=>e.promise)),(t.state.initialized||"idle"!==t.state.navigation.state)&&0!==l.size||window.__reactRouterHdrActive){let t=a&&u&&l.size>0?[...l.keys()]:void 0;try{let r=await n(e,o,i,t);d.resolve(r.data)}catch(e){d.reject(e)}}else d.resolve({routes:{}});return await f,await n$(d.promise,e.matches,l,h),h}async function n$(e,t,r,n){try{let a,o=await e;if("routes"in o){for(let e of t)if(e.route.id in o.routes){let t=o.routes[e.route.id];if("error"in t){a=t.error,n[e.route.id]?.result==null&&(n[e.route.id]={type:"error",result:a});break}}}void 0!==a&&Array.from(r.values()).forEach(e=>{n[e].result instanceof nL&&(n[e].result=a)})}catch(e){}}async function nN(e,t,r,n){let a=e.matches.find(e=>e.shouldCallHandler());nk(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async a=>a(async()=>{let{data:a}=await t(e,r,n,[o]);return nU(a,o)}));return{[a.route.id]:i}}function nj(e,t,r,n){let a="string"==typeof e?new URL(e,"u"<typeof window?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:"/"===a.pathname?a.pathname=`_root.${n}`:t&&"/"===X(a.pathname,t)?a.pathname=`${ea(t)}/_root.${n}`:a.pathname=`${ea(a.pathname)}.${n}`,a}async function nF(e,t,r,n){let{request:a}=e,o=nj(a.url,t,r,"data");"GET"===a.method&&(o=function(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let e of t)e&&r.push(e);for(let t of r)e.searchParams.append("index",t);return e}(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await nR(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new ef(i.status,i.statusText,await i.text());if(204===i.status&&i.headers.has("X-Remix-Redirect"))return{status:202,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:"true"===i.headers.get("X-Remix-Revalidate"),reload:"true"===i.headers.get("X-Remix-Reload-Document"),replace:"true"===i.headers.get("X-Remix-Replace")}}};if(nD.has(i.status)){let e={};return n&&"GET"!==a.method&&(e[n[0]]={data:void 0}),{status:i.status,data:{routes:e}}}nk(i.body,"No response body to decode");try{let e,t=await nH(i.body,window);if("GET"===a.method){let r=t.value;e=nP in r?{redirect:r[nP]}:{routes:r}}else{let r=t.value,a=n?.[0];nk(a,"No routeId found for single fetch call decoding"),e="redirect"in r?{redirect:r}:{routes:{[a]:r}}}return{status:i.status,data:e}}catch(e){throw Error("Unable to decode turbo-stream response")}}function nH(e,t){return nw(e,{plugins:[(e,...r)=>{if("SanitizedError"===e){let[e,n,a]=r,o=Error;e&&nu.includes(e)&&e in t&&"function"==typeof t[e]&&(o=t[e]);let i=new o(n);return i.stack=a,{value:i}}if("ErrorResponse"===e){let[e,t,n]=r;return{value:new ef(t,n,e)}}return"SingleFetchRedirect"===e?{value:{[nP]:r[0]}}:"SingleFetchClassInstance"===e?{value:r[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}function nU(e,t){if("redirect"in e){let{redirect:t,revalidate:r,reload:n,replace:a,status:o}=e.redirect;throw ec(t,{status:o,headers:{...r?{"X-Remix-Revalidate":"yes"}:null,...n?{"X-Remix-Reload-Document":"yes"}:null,...a?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(null==r)throw new nL(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw Error(`Invalid response found for routeId "${t}"`)}function nz(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(e){}},t=async e=>{a(e);try{await r}catch(e){}}});return{promise:r,resolve:e,reject:t}}async function nI(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function nB(e){return e.css?e.css.map(e=>({rel:"stylesheet",href:e})):[]}async function nq(e){if(!e.css)return;let t=nB(e);await Promise.all(t.map(nJ))}async function nW(e,t){if(!e.css&&!t.links||!function(){if(void 0!==c)return c;let e=document.createElement("link");return c=e.relList.supports("preload"),e=null,c}())return;let r=[];if(e.css&&r.push(...nB(e)),t.links&&r.push(...t.links()),0===r.length)return;let n=[];for(let e of r)nY(e)||"stylesheet"!==e.rel||n.push({...e,rel:"preload",as:"style"});await Promise.all(n.map(nJ))}async function nJ(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");function n(){document.head.contains(r)&&document.head.removeChild(r)}Object.assign(r,e),r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function nY(e){return null!=e&&"string"==typeof e.page}function nX(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function nV(e,t,r){return nZ((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await nI(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(nX).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function nK(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,s=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(i(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function nG(e,t,{includeHydrateFallback:r}={}){return[...new Set(e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1))]}function nZ(e,t){let r=new Set,n=new Set(t);return e.reduce((e,a)=>{if(t&&!nY(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={};for(let r of Object.keys(e).sort())t[r]=e[r];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e},[])}function nQ(){return d.createElement(ax,{title:"Loading...",renderScripts:!0},d.createElement("script",{dangerouslySetInnerHTML:{__html:`
|
|
@@ -31,4 +31,4 @@ ${String(e)}`),new Response(r,{status:500,headers:{"Content-Type":"text/plain"}}
|
|
|
31
31
|
console.log(
|
|
32
32
|
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
33
33
|
);
|
|
34
|
-
`}});return em(e)?h().createElement(o2,{renderAppShell:t,title:"Unhandled Thrown Response!"},h().createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n):(r=e instanceof Error?e:Error(null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e)),h().createElement(o2,{renderAppShell:t,title:"Application Error!"},h().createElement("h1",{style:{fontSize:"24px"}},"Application Error"),h().createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n))}function o8({hasRootLayout:e}){let t=rS();if(void 0===e)throw Error("Missing 'hasRootLayout' prop");return h().createElement(o4,{renderAppShell:!e,error:t})}var o3=()=>null,o5="/__manifest",o9=d.use;async function o6({request:e,serverResponse:t,createFromReadableStream:r,renderHTML:n,hydrate:a=!0}){let o,i,s,l=new URL(e.url);if(l.pathname.endsWith(".rsc")||l.pathname.endsWith(".manifest")||e.headers.has("rsc-action-id")||"true"===t.headers.get("React-Router-Resource"))return t;if(!t.body)throw Error("Missing body in server response");let u=t.clone(),c=null;a&&(c=t.clone());let d=t.body,h=[],f=()=>o?new ReadableStream({start(e){o.forEach(t=>e.enqueue(t)),h.push(e)}}):(o=[],d.pipeThrough(new TransformStream({transform(e,t){o.push(e),t.enqueue(e),h.forEach(t=>t.enqueue(e))},flush(){h.forEach(e=>e.close()),h=[]}}))),m=null;try{if(!u.body)throw Error("Failed to clone server response");let e=await r(u.body);if(202===t.status&&"redirect"===e.type){let r=new Headers(t.headers);return r.delete("Content-Encoding"),r.delete("Content-Length"),r.delete("Content-Type"),r.delete("X-Remix-Response"),r.set("Location",e.location),new Response(c?.body||"",{headers:r,status:e.status,statusText:t.statusText})}let o=new Headers,l=t.status,d=t.statusText,h=await n(()=>{let e=Promise.resolve(r(f()));return Object.defineProperties(e,{_deepestRenderedBoundaryId:{get:()=>m,set(e){m=e}},formState:{get:()=>e.then(e=>"render"===e.type?e.formState:void 0)}})},{onError(e){if("object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){if(i=t0(e.digest))return e.digest;let t=t1(e.digest);if(t)return s=t,l=t.status,d=t.statusText,e.digest}},onHeaders(e){for(let[t,r]of e)o.append(t,r)}}),p=new Headers(o);for(let[e,r]of t.headers)p.append(e,r);if(p.set("Content-Type","text/html; charset=utf-8"),i)return p.set("Location",i.location),new Response(h,{status:i.status,headers:p});let y=new TransformStream({flush(e){i&&e.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${nC(i.location)}"/>`))}});if(!a)return new Response(h.pipeThrough(y),{status:l,statusText:d,headers:p});if(!c?.body)throw Error("Failed to clone server response");let g=h.pipeThrough(oZ(c.body)).pipeThrough(y);return new Response(g,{status:l,statusText:d,headers:p})}catch(e){if(e instanceof Response)return e;if(i)return new Response(`Redirect: ${i.location}`,{status:i.status,headers:{Location:i.location}});try{let o,i=s??e,[l,u]=em(i)?[i.status,i.statusText]:[500,""],d=new Headers,h=await n(()=>{let e=Promise.resolve(r(f())).then(e=>Object.assign(e,{status:l,errors:m?{[m]:i}:{}}));return Object.defineProperties(e,{_deepestRenderedBoundaryId:{get:()=>m,set(e){m=e}},formState:{get:()=>e.then(e=>"render"===e.type?e.formState:void 0)}})},{onError(e){if("object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){if(o=t0(e.digest))return e.digest;let t=t1(e.digest);if(t)return l=t.status,u=t.statusText,e.digest}},onHeaders(e){for(let[t,r]of e)d.append(t,r)}}),p=new Headers(d);for(let[e,r]of t.headers)p.append(e,r);if(p.set("Content-Type","text/html; charset=utf-8"),o)return p.set("Location",o.location),new Response(h,{status:o.status,headers:p});let y=new TransformStream({flush(e){o&&e.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${nC(o.location)}"/>`))}});if(!a)return new Response(h.pipeThrough(y),{status:l,statusText:u,headers:p});if(!c?.body)throw Error("Failed to clone server response");let g=h.pipeThrough(oZ(c.body)).pipeThrough(y);return new Response(g,{status:l,statusText:u,headers:p})}catch(e){}throw e}}function o7({getPayload:e}){let t=e(),r=function(e){if(o9)return o9(e);throw Error("React Router v7 requires React 19+ for RSC features.")}(t);if("redirect"===r.type)throw new Response(null,{status:r.status,headers:{Location:r.location}});if("render"!==r.type)return null;let n={...r.loaderData};for(let e of r.matches)n7(e.id,e.clientLoader,e.hasLoader,!1)&&(e.hydrateFallbackElement||!e.hasLoader)&&delete n[e.id];let a={get _deepestRenderedBoundaryId(){return t._deepestRenderedBoundaryId??null},set _deepestRenderedBoundaryId(boundaryId){t._deepestRenderedBoundaryId=boundaryId},actionData:r.actionData,actionHeaders:{},basename:r.basename,errors:r.errors,loaderData:n,loaderHeaders:{},location:r.location,statusCode:200,matches:r.matches.map(e=>({params:e.params,pathname:e.pathname,pathnameBase:e.pathnameBase,route:{id:e.id,action:e.hasAction||!!e.clientAction,handle:e.handle,hasErrorBoundary:e.hasErrorBoundary,loader:e.hasLoader||!!e.clientLoader,index:e.index,path:e.path,shouldRevalidate:e.shouldRevalidate}}))},o=a8(r.matches.reduceRight((e,t)=>{let r={id:t.id,action:t.hasAction||!!t.clientAction,element:t.element,errorElement:t.errorElement,handle:t.handle,hasErrorBoundary:!!t.errorElement,hydrateFallbackElement:t.hydrateFallbackElement,index:t.index,loader:t.hasLoader||!!t.clientLoader,path:t.path,shouldRevalidate:t.shouldRevalidate};return e.length>0&&(r.children=e),[r]},[]),a),i={future:{v8_middleware:!1,v8_trailingSlashAwareDataRequests:!0,v8_passThroughRequests:!0},isSpaMode:!1,ssr:!0,criticalCss:"",manifest:{routes:{},version:"1",url:"",entry:{module:"",imports:[]}},routeDiscovery:"initial"===r.routeDiscovery.mode?{mode:"initial",manifestPath:o5}:{mode:"lazy",manifestPath:r.routeDiscovery.manifestPath||o5},routeModules:function(e){let t={};for(let a of e.matches){var r=t,n=a;for(let e of n=Array.isArray(n)?n:[n])r[e.id]={links:e.links,meta:e.meta,default:o3}}return t}(r)};return d.createElement(tB.Provider,{value:!0},d.createElement(o1,{location:r.location},d.createElement(ac.Provider,{value:i},d.createElement(a1,{context:a,router:o,hydrate:!1,nonce:r.nonce}))))}function ie(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new ef(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack=n.stack,r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack=n.stack,r[e]=t}}else r[e]=n;return r}function it({state:e,routes:t,getRouteInfo:r,location:n,basename:a,isSpaMode:o}){let i={...e,loaderData:{...e.loaderData}},s=F(t,n,a);if(s)for(let e of s){let t=e.route.id,n=r(t);n7(t,n.clientLoader,n.hasLoader,o)&&(n.hasHydrateFallback||!n.hasLoader)?delete i.loaderData[t]:n.hasLoader||(i.loaderData[t]=null)}return i}var ir=r(1529);function ia(e){return d.createElement(rz,{flushSync:ir.flushSync,...e})}var io=null,ii=null;function is(e){ii||(ii=function({getContext:e,instrumentations:t}){let r;if(!io&&window.__reactRouterContext&&window.__reactRouterManifest&&window.__reactRouterRouteModules){if(!0===window.__reactRouterManifest.sri){let e=document.querySelector("script[rr-importmap]");if(e?.textContent)try{window.__reactRouterManifest.sri=JSON.parse(e.textContent).integrity}catch(e){console.error("Failed to parse import map",e)}}io={context:window.__reactRouterContext,manifest:window.__reactRouterManifest,routeModules:window.__reactRouterRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}}if(!io)throw Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let n=io;if(!io.stateDecodingPromise){let e=io.context.stream;x(e,"No stream found for single fetch decoding"),io.context.stream=void 0,io.stateDecodingPromise=nH(e,window).then(e=>{io.context.state=e.value,n.stateDecodingPromise.value=!0}).catch(e=>{n.stateDecodingPromise.error=e})}if(io.stateDecodingPromise.error)throw io.stateDecodingPromise.error;if(!io.stateDecodingPromise.value)throw io.stateDecodingPromise;let a=n3(io.manifest.routes,io.routeModules,io.context.state,io.context.ssr,io.context.isSpaMode);if(io.context.isSpaMode){let{loaderData:e}=io.context.state;io.manifest.routes.root?.hasLoader&&e&&"root"in e&&(r={loaderData:{root:e.root}})}else(r=it({state:io.context.state,routes:a,getRouteInfo:e=>({clientLoader:io.routeModules[e]?.clientLoader,hasLoader:io.manifest.routes[e]?.hasLoader===!0,hasHydrateFallback:io.routeModules[e]?.HydrateFallback!=null}),location:window.location,basename:window.__reactRouterContext?.basename,isSpaMode:io.context.isSpaMode}))&&r.errors&&(r.errors=ie(r.errors));window.history.state&&window.history.state.masked&&window.history.replaceState({...window.history.state,masked:void 0},"");let o=eH({routes:a,history:R(),basename:io.context.basename,getContext:e,hydrationData:r,hydrationRouteProperties:rF,instrumentations:t,mapRouteProperties:rj,future:{v8_passThroughRequests:io.context.future.v8_passThroughRequests},dataStrategy:n_(()=>o,io.manifest,io.routeModules,io.context.ssr,io.context.basename,io.context.future.v8_trailingSlashAwareDataRequests),patchRoutesOnNavigation:an(()=>o,io.manifest,io.routeModules,io.context.ssr,io.context.routeDiscovery,io.context.isSpaMode,io.context.basename)});return io.router=o,o.state.initialized&&(io.routerInitialized=!0,o.initialize()),o.createRoutesForHMR=n2,window.__reactRouterDataRouter=o,o}({getContext:e.getContext,instrumentations:e.instrumentations}));let[t,r]=d.useState(void 0);d.useEffect(()=>{},[]),d.useEffect(()=>{},[t]);let[n,a]=d.useState(ii.state.location);return d.useLayoutEffect(()=>{io&&io.router&&!io.routerInitialized&&(io.routerInitialized=!0,io.router.initialize())},[]),d.useLayoutEffect(()=>{if(io&&io.router)return io.router.subscribe(e=>{e.location!==n&&a(e.location)})},[n]),x(io,"ssrInfo unavailable for HydratedRouter"),aa(ii,io.manifest,io.routeModules,io.context.ssr,io.context.routeDiscovery,io.context.isSpaMode),d.createElement(d.Fragment,null,d.createElement(ac.Provider,{value:{manifest:io.manifest,routeModules:io.routeModules,future:io.context.future,criticalCss:t,ssr:io.context.ssr,isSpaMode:io.context.isSpaMode,routeDiscovery:io.context.routeDiscovery}},d.createElement(aR,{location:n},d.createElement(ia,{router:ii,useTransitions:e.useTransitions,onError:e.onError}))),d.createElement(d.Fragment,null))}}}]);
|
|
34
|
+
`}});return em(e)?h().createElement(o2,{renderAppShell:t,title:"Unhandled Thrown Response!"},h().createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n):(r=e instanceof Error?e:Error(null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e)),h().createElement(o2,{renderAppShell:t,title:"Application Error!"},h().createElement("h1",{style:{fontSize:"24px"}},"Application Error"),h().createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n))}function o8({hasRootLayout:e}){let t=rS();if(void 0===e)throw Error("Missing 'hasRootLayout' prop");return h().createElement(o4,{renderAppShell:!e,error:t})}var o3=()=>null,o5="/__manifest",o9=d.use;async function o6({request:e,serverResponse:t,createFromReadableStream:r,renderHTML:n,hydrate:a=!0}){let o,i,s,l=new URL(e.url);if(l.pathname.endsWith(".rsc")||l.pathname.endsWith(".manifest")||e.headers.has("rsc-action-id")||"true"===t.headers.get("React-Router-Resource"))return t;if(!t.body)throw Error("Missing body in server response");let u=t.clone(),c=null;a&&(c=t.clone());let d=t.body,h=[],f=()=>o?new ReadableStream({start(e){o.forEach(t=>e.enqueue(t)),h.push(e)}}):(o=[],d.pipeThrough(new TransformStream({transform(e,t){o.push(e),t.enqueue(e),h.forEach(t=>t.enqueue(e))},flush(){h.forEach(e=>e.close()),h=[]}}))),m=null;try{if(!u.body)throw Error("Failed to clone server response");let e=await r(u.body);if(202===t.status&&"redirect"===e.type){let r=new Headers(t.headers);return r.delete("Content-Encoding"),r.delete("Content-Length"),r.delete("Content-Type"),r.delete("X-Remix-Response"),r.set("Location",e.location),new Response(c?.body||"",{headers:r,status:e.status,statusText:t.statusText})}let o=new Headers,l=t.status,d=t.statusText,h=await n(()=>{let e=Promise.resolve(r(f()));return Object.defineProperties(e,{_deepestRenderedBoundaryId:{get:()=>m,set(e){m=e}},formState:{get:()=>e.then(e=>"render"===e.type?e.formState:void 0)}})},{onError(e){if("object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){if(i=t0(e.digest))return e.digest;let t=t1(e.digest);if(t)return s=t,l=t.status,d=t.statusText,e.digest}},onHeaders(e){for(let[t,r]of e)o.append(t,r)}}),p=new Headers(o);for(let[e,r]of t.headers)p.append(e,r);if(p.set("Content-Type","text/html; charset=utf-8"),i)return p.set("Location",i.location),new Response(h,{status:i.status,headers:p});let y=new TransformStream({flush(e){i&&e.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${nC(i.location)}"/>`))}});if(!a)return new Response(h.pipeThrough(y),{status:l,statusText:d,headers:p});if(!c?.body)throw Error("Failed to clone server response");let g=h.pipeThrough(oZ(c.body)).pipeThrough(y);return new Response(g,{status:l,statusText:d,headers:p})}catch(e){if(e instanceof Response)return e;if(i)return new Response(`Redirect: ${i.location}`,{status:i.status,headers:{Location:i.location}});try{let o,i=s??e,[l,u]=em(i)?[i.status,i.statusText]:[500,""],d=new Headers,h=await n(()=>{let e=Promise.resolve(r(f())).then(e=>Object.assign(e,{status:l,errors:m?{[m]:i}:{}}));return Object.defineProperties(e,{_deepestRenderedBoundaryId:{get:()=>m,set(e){m=e}},formState:{get:()=>e.then(e=>"render"===e.type?e.formState:void 0)}})},{onError(e){if("object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){if(o=t0(e.digest))return e.digest;let t=t1(e.digest);if(t)return l=t.status,u=t.statusText,e.digest}},onHeaders(e){for(let[t,r]of e)d.append(t,r)}}),p=new Headers(d);for(let[e,r]of t.headers)p.append(e,r);if(p.set("Content-Type","text/html; charset=utf-8"),o)return p.set("Location",o.location),new Response(h,{status:o.status,headers:p});let y=new TransformStream({flush(e){o&&e.enqueue(new TextEncoder().encode(`<meta http-equiv="refresh" content="0;url=${nC(o.location)}"/>`))}});if(!a)return new Response(h.pipeThrough(y),{status:l,statusText:u,headers:p});if(!c?.body)throw Error("Failed to clone server response");let g=h.pipeThrough(oZ(c.body)).pipeThrough(y);return new Response(g,{status:l,statusText:u,headers:p})}catch(e){}throw e}}function o7({getPayload:e}){let t=e(),r=function(e){if(o9)return o9(e);throw Error("React Router v7 requires React 19+ for RSC features.")}(t);if("redirect"===r.type)throw new Response(null,{status:r.status,headers:{Location:r.location}});if("render"!==r.type)return null;let n={...r.loaderData};for(let e of r.matches)n7(e.id,e.clientLoader,e.hasLoader,!1)&&(e.hydrateFallbackElement||!e.hasLoader)&&delete n[e.id];let a={get _deepestRenderedBoundaryId(){return t._deepestRenderedBoundaryId??null},set _deepestRenderedBoundaryId(boundaryId){t._deepestRenderedBoundaryId=boundaryId},actionData:r.actionData,actionHeaders:{},basename:r.basename,errors:r.errors,loaderData:n,loaderHeaders:{},location:r.location,statusCode:200,matches:r.matches.map(e=>({params:e.params,pathname:e.pathname,pathnameBase:e.pathnameBase,route:{id:e.id,action:e.hasAction||!!e.clientAction,handle:e.handle,hasErrorBoundary:e.hasErrorBoundary,loader:e.hasLoader||!!e.clientLoader,index:e.index,path:e.path,shouldRevalidate:e.shouldRevalidate}}))},o=a8(r.matches.reduceRight((e,t)=>{let r={id:t.id,action:t.hasAction||!!t.clientAction,element:t.element,errorElement:t.errorElement,handle:t.handle,hasErrorBoundary:!!t.errorElement,hydrateFallbackElement:t.hydrateFallbackElement,index:t.index,loader:t.hasLoader||!!t.clientLoader,path:t.path,shouldRevalidate:t.shouldRevalidate};return e.length>0&&(r.children=e),[r]},[]),a),i={future:{v8_middleware:!1,v8_trailingSlashAwareDataRequests:!0,v8_passThroughRequests:!0},isSpaMode:!1,ssr:!0,criticalCss:"",manifest:{routes:{},version:"1",url:"",entry:{module:"",imports:[]}},routeDiscovery:"initial"===r.routeDiscovery.mode?{mode:"initial",manifestPath:o5}:{mode:"lazy",manifestPath:r.routeDiscovery.manifestPath||o5},routeModules:function(e){let t={};for(let a of e.matches){var r=t,n=a;for(let e of n=Array.isArray(n)?n:[n])r[e.id]={links:e.links,meta:e.meta,default:o3}}return t}(r)};return d.createElement(tB.Provider,{value:!0},d.createElement(o1,{location:r.location},d.createElement(ac.Provider,{value:i},d.createElement(a1,{context:a,router:o,hydrate:!1,nonce:r.nonce}))))}function ie(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new ef(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let a=new t(n.message);a.stack=n.stack,r[e]=a}catch(e){}}if(null==r[e]){let t=Error(n.message);t.stack=n.stack,r[e]=t}}else r[e]=n;return r}function it({state:e,routes:t,getRouteInfo:r,location:n,basename:a,isSpaMode:o}){let i={...e,loaderData:{...e.loaderData}},s=F(t,n,a);if(s)for(let e of s){let t=e.route.id,n=r(t);n7(t,n.clientLoader,n.hasLoader,o)&&(n.hasHydrateFallback||!n.hasLoader)?delete i.loaderData[t]:n.hasLoader||(i.loaderData[t]=null)}return i}var ir=r(1181);function ia(e){return d.createElement(rz,{flushSync:ir.flushSync,...e})}var io=null,ii=null;function is(e){ii||(ii=function({getContext:e,instrumentations:t}){let r;if(!io&&window.__reactRouterContext&&window.__reactRouterManifest&&window.__reactRouterRouteModules){if(!0===window.__reactRouterManifest.sri){let e=document.querySelector("script[rr-importmap]");if(e?.textContent)try{window.__reactRouterManifest.sri=JSON.parse(e.textContent).integrity}catch(e){console.error("Failed to parse import map",e)}}io={context:window.__reactRouterContext,manifest:window.__reactRouterManifest,routeModules:window.__reactRouterRouteModules,stateDecodingPromise:void 0,router:void 0,routerInitialized:!1}}if(!io)throw Error("You must be using the SSR features of React Router in order to skip passing a `router` prop to `<RouterProvider>`");let n=io;if(!io.stateDecodingPromise){let e=io.context.stream;x(e,"No stream found for single fetch decoding"),io.context.stream=void 0,io.stateDecodingPromise=nH(e,window).then(e=>{io.context.state=e.value,n.stateDecodingPromise.value=!0}).catch(e=>{n.stateDecodingPromise.error=e})}if(io.stateDecodingPromise.error)throw io.stateDecodingPromise.error;if(!io.stateDecodingPromise.value)throw io.stateDecodingPromise;let a=n3(io.manifest.routes,io.routeModules,io.context.state,io.context.ssr,io.context.isSpaMode);if(io.context.isSpaMode){let{loaderData:e}=io.context.state;io.manifest.routes.root?.hasLoader&&e&&"root"in e&&(r={loaderData:{root:e.root}})}else(r=it({state:io.context.state,routes:a,getRouteInfo:e=>({clientLoader:io.routeModules[e]?.clientLoader,hasLoader:io.manifest.routes[e]?.hasLoader===!0,hasHydrateFallback:io.routeModules[e]?.HydrateFallback!=null}),location:window.location,basename:window.__reactRouterContext?.basename,isSpaMode:io.context.isSpaMode}))&&r.errors&&(r.errors=ie(r.errors));window.history.state&&window.history.state.masked&&window.history.replaceState({...window.history.state,masked:void 0},"");let o=eH({routes:a,history:R(),basename:io.context.basename,getContext:e,hydrationData:r,hydrationRouteProperties:rF,instrumentations:t,mapRouteProperties:rj,future:{v8_passThroughRequests:io.context.future.v8_passThroughRequests},dataStrategy:n_(()=>o,io.manifest,io.routeModules,io.context.ssr,io.context.basename,io.context.future.v8_trailingSlashAwareDataRequests),patchRoutesOnNavigation:an(()=>o,io.manifest,io.routeModules,io.context.ssr,io.context.routeDiscovery,io.context.isSpaMode,io.context.basename)});return io.router=o,o.state.initialized&&(io.routerInitialized=!0,o.initialize()),o.createRoutesForHMR=n2,window.__reactRouterDataRouter=o,o}({getContext:e.getContext,instrumentations:e.instrumentations}));let[t,r]=d.useState(void 0);d.useEffect(()=>{},[]),d.useEffect(()=>{},[t]);let[n,a]=d.useState(ii.state.location);return d.useLayoutEffect(()=>{io&&io.router&&!io.routerInitialized&&(io.routerInitialized=!0,io.router.initialize())},[]),d.useLayoutEffect(()=>{if(io&&io.router)return io.router.subscribe(e=>{e.location!==n&&a(e.location)})},[n]),x(io,"ssrInfo unavailable for HydratedRouter"),aa(ii,io.manifest,io.routeModules,io.context.ssr,io.context.routeDiscovery,io.context.isSpaMode),d.createElement(d.Fragment,null,d.createElement(ac.Provider,{value:{manifest:io.manifest,routeModules:io.routeModules,future:io.context.future,criticalCss:t,ssr:io.context.ssr,isSpaMode:io.context.isSpaMode,routeDiscovery:io.context.routeDiscovery}},d.createElement(aR,{location:n},d.createElement(ia,{router:ii,useTransitions:e.useTransitions,onError:e.onError}))),d.createElement(d.Fragment,null))}}}]);
|