@modern-js/devtools-client 2.33.1 → 2.34.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/.turbo/turbo-build.log +9 -9
- package/CHANGELOG.md +8 -0
- package/dist/html/devtools/index.html +3 -3
- package/dist/routes-manifest.json +6 -6
- package/dist/static/js/{devtools.40d03ab0.js → devtools.56bf0fe9.js} +1 -1
- package/dist/static/js/{devtools.40d03ab0.js.map → devtools.56bf0fe9.js.map} +1 -1
- package/dist/static/js/lib-router.7b48a0f0.js +1 -0
- package/dist/static/js/{lib-router.b25b1e17.js.LICENSE.txt → lib-router.7b48a0f0.js.LICENSE.txt} +3 -3
- package/dist/static/js/lib-router.7b48a0f0.js.map +1 -0
- package/dist/static/js/{vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~c023d3.a2fff477.js → vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~2b20fe.2a50a754.js} +1 -1
- package/dist/static/js/{vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~c023d3.a2fff477.js.map → vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~2b20fe.2a50a754.js.map} +1 -1
- package/package.json +8 -8
- package/dist/static/js/lib-router.b25b1e17.js +0 -1
- package/dist/static/js/lib-router.b25b1e17.js.map +0 -1
- /package/dist/static/js/{vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~c023d3.a2fff477.js.LICENSE.txt → vendors~node_modules_pnpm_loadable_component_5_15_3_react_18_2_0_node_modules_loadable_compon~2b20fe.2a50a754.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_modern_js_devtools_client=self.webpackChunk_modern_js_devtools_client||[]).push([["lib-router"],{15239:function(e,t,r){"use strict";r.r(t),r.d(t,{Action:function(){return o},ErrorResponse:function(){return k},UNSAFE_getPathContributingMatches:function(){return P},UNSAFE_invariant:function(){return h},createBrowserHistory:function(){return c},createHashHistory:function(){return d},createPath:function(){return m},createRouter:function(){return q},isRouteErrorResponse:function(){return L},joinPaths:function(){return C},matchRoutes:function(){return w},parsePath:function(){return y},resolveTo:function(){return U},stripBasename:function(){return S}});var n,a,o,i,s=r("61078");function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}(n=o||(o={})).Pop="POP",n.Push="PUSH",n.Replace="REPLACE";var l="popstate";function c(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r,search:n,hash:a}=e.location;return v("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:m(t)},null,e)}function d(e){return void 0===e&&(e={}),g(function(e,t){var{pathname:r="/",search:n="",hash:a=""}=y(e.location.hash.substr(1));return!r.startsWith("/")&&!r.startsWith(".")&&(r="/"+r),v("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){var r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){var a=e.location.href,o=a.indexOf("#");n=-1===o?a:a.slice(0,o)}return n+"#"+("string"==typeof t?t:m(t))},function(e,t){f("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function h(e,t){if(!1===e||null==e)throw Error(t)}function f(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function p(e,t){return{usr:e.state,key:e.key,idx:t}}function v(e,t,r,n){return void 0===r&&(r=null),u({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?y(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function m(e){var{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function y(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function g(e,t,r,n){void 0===n&&(n={});var{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.history,c=o.Pop,d=null,f=y();function y(){return(s.state||{idx:null}).idx}function g(){c=o.Pop;var e=y(),t=null==e?null:e-f;f=e,d&&d({action:c,location:E.location,delta:t})}null==f&&(f=0,s.replaceState(u({},s.state,{idx:f}),""));function b(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:m(e);return h(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}var E={get action(){return c},get location(){return e(a,s)},listen(e){if(d)throw Error("A history only accepts one active listener");return a.addEventListener(l,g),d=e,()=>{a.removeEventListener(l,g),d=null}},createHref:e=>t(a,e),createURL:b,encodeLocation(e){var t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=o.Push;var n=v(E.location,e,t);r&&r(n,e);var u=p(n,f=y()+1),l=E.createHref(n);try{s.pushState(u,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(l)}i&&d&&d({action:c,location:E.location,delta:1})},replace:function(e,t){c=o.Replace;var n=v(E.location,e,t);r&&r(n,e);var a=p(n,f=y()),u=E.createHref(n);s.replaceState(a,"",u),i&&d&&d({action:c,location:E.location,delta:0})},go:e=>s.go(e)};return E}(a=i||(i={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";var b=new Set(["lazy","caseSensitive","path","id","index","children"]);function E(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map((e,a)=>{var o=[...r,a],i="string"==typeof e.id?e.id:o.join("-");if(h(!0!==e.index||!e.children,"Cannot specify children on an index route"),h(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),!0===e.index){var s=u({},e,t(e),{id:i});return n[i]=s,s}var l=u({},e,t(e),{id:i,children:void 0});return n[i]=l,e.children&&(l.children=E(e.children,t,o,n)),l})}function w(e,t,r){void 0===r&&(r="/");var n=S(("string"==typeof t?y(t):t).pathname||"/",r);if(null==n)return null;var a=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");var o=(t,o,i)=>{var s={relativePath:void 0===i?t.path||"":i,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};s.relativePath.startsWith("/")&&(h(s.relativePath.startsWith(a),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+a)+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),s.relativePath=s.relativePath.slice(a.length));var u=C([a,s.relativePath]),l=n.concat(s);t.children&&t.children.length>0&&(h(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),e(t.children,r,l,u)),(null!=t.path||t.index)&&r.push({path:u,score:function(e,t){var r=e.split("/"),n=r.length;return r.some(x)&&(n+=-2),t&&(n+=2),r.filter(e=>!x(e)).reduce((e,t)=>e+(R.test(t)?3:""===t?1:10),n)}(u,t.index),routesMeta:l})};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(var n of function e(t){var r=t.split("/");if(0===r.length)return[];var[n,...a]=r,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];var s=e(a.join("/")),u=[];return u.push(...s.map(e=>""===e?i:[i,e].join("/"))),o&&u.push(...s),u.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,n);else o(e,t)}),r}(e);(function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))})(a);for(var o=null,i=0;null==o&&i<a.length;++i)o=function(e,t){for(var{routesMeta:r}=e,n={},a="/",o=[],i=0;i<r.length;++i){var s=r[i],u=i===r.length-1,l="/"===a?t:t.slice(a.length)||"/",c=function(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var[r,n]=function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),f("*"===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(/\*$/,"/*"))+'".');var n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(e,t)=>(n.push(t),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;var o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((e,t,r)=>{if("*"===t){var n=s[r]||"";i=o.slice(0,o.length-n.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return f(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e)+'" is a malformed URL segment. This is probably'+(" due to a bad percent encoding ("+r)+")."),e}}(s[r]||"",t),e},{}),pathname:o,pathnameBase:i,pattern:e}}({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},l);if(!c)return null;Object.assign(n,c.params);var d=s.route;o.push({params:n,pathname:C([a,c.pathname]),pathnameBase:A(C([a,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(a=C([a,c.pathnameBase]))}return o}(a[i],function(e){try{return decodeURI(e)}catch(t){return f(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t)+")."),e}}(n));return o}var R=/^:\w+$/,x=e=>"*"===e;function S(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function D(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 P(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function U(e,t,r,n){void 0===n&&(n=!1),"string"==typeof e?a=y(e):(h(!(a=u({},e)).pathname||!a.pathname.includes("?"),D("?","pathname","search",a)),h(!a.pathname||!a.pathname.includes("#"),D("#","pathname","hash",a)),h(!a.search||!a.search.includes("#"),D("#","search","hash",a)));var a,o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(n||null==s)o=r;else{var l=t.length-1;if(s.startsWith("..")){for(var c=s.split("/");".."===c[0];)c.shift(),l-=1;a.pathname=c.join("/")}o=l>=0?t[l]:"/"}var d=function(e,t){void 0===t&&(t="/");var{pathname:r,search:n="",hash:a=""}="string"==typeof e?y(e):e;return{pathname:r?r.startsWith("/")?r:function(e,t){var r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(r,t):t,search:_(n),hash:M(a)}}(a,o),f=s&&"/"!==s&&s.endsWith("/"),p=(i||"."===s)&&r.endsWith("/");return!d.pathname.endsWith("/")&&(f||p)&&(d.pathname+="/"),d}var C=e=>e.join("/").replace(/\/\/+/g,"/"),A=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),_=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",M=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class k{constructor(e,t,r,n){void 0===n&&(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 L(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var j=["post","put","patch","delete"],F=new Set(j),N=["get",...j],O=new Set(N),T=new Set([301,302,303,307,308]),B=new Set([307,308]),z={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},I={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},H={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},W=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function q(e){var t,r,n,a,l=e.window?e.window:"undefined"!=typeof window?window:void 0,c=void 0!==l&&void 0!==l.document&&void 0!==l.document.createElement,d=!c;if(h(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var p=e.detectErrorBoundary;t=e=>({hasErrorBoundary:p(e)})}else t=$;var m={},y=E(e.routes,t,void 0,m),g=e.basename||"/",b=u({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),R=null,x=new Set,D=null,P=null,U=null,C=null!=e.hydrationData,A=w(y,e.history.location,g),_=null;if(null==A){var M=eu(404,{pathname:e.history.location.pathname}),{matches:k,route:L}=es(y);A=k,_={[L.id]:M}}var j=!A.some(e=>e.route.lazy)&&(!A.some(e=>e.route.loader)||null!=e.hydrationData),F={historyAction:e.history.action,location:e.history.location,matches:A,initialized:j,navigation:z,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||_,fetchers:new Map,blockers:new Map},N=o.Pop,O=!1,T=!1,q=!1,X=[],G=[],K=new Map,Q=0,ee=-1,er=new Map,en=new Set,ec=new Map,em=new Map,eg=new Map,eb=!1;function eD(e){F=u({},F,e),x.forEach(e=>e(F))}function eP(t,n){var a,i,s,l=null!=F.actionData&&null!=F.navigation.formMethod&&ep(F.navigation.formMethod)&&"loading"===F.navigation.state&&(null==(a=t.state)?void 0:a._isRedirect)!==!0;s=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:l?F.actionData:null;var c=n.loaderData?eo(F.loaderData,n.loaderData,n.matches||[],n.errors):F.loaderData,d=F.blockers;d.size>0&&(d=new Map(d)).forEach((e,t)=>d.set(t,H));var h=!0===O||null!=F.navigation.formMethod&&ep(F.navigation.formMethod)&&(null==(i=t.state)?void 0:i._isRedirect)!==!0;r&&(y=r,r=void 0),T||N===o.Pop||(N===o.Push?e.history.push(t,t.state):N===o.Replace&&e.history.replace(t,t.state)),eD(u({},n,{actionData:s,loaderData:c,historyAction:N,location:t,initialized:!0,navigation:z,revalidation:"idle",restoreScrollPosition:eQ(t,n.matches||F.matches),preventScrollReset:h,blockers:d})),N=o.Pop,O=!1,T=!1,q=!1,X=[],G=[]}function eU(e,t){return eC.apply(this,arguments)}function eC(){return(eC=(0,s._)(function*(t,r){if("number"==typeof t){e.history.go(t);return}var n=J(F.location,F.matches,g,b.v7_prependBasename,t,null==r?void 0:r.fromRouteId,null==r?void 0:r.relative),{path:a,submission:i,error:s}=Y(b.v7_normalizeFormMethod,!1,n,r),l=F.location,c=v(F.location,a,r&&r.state);c=u({},c,e.history.encodeLocation(c));var d=r&&null!=r.replace?r.replace:void 0,h=o.Push;!0===d?h=o.Replace:!1===d||null!=i&&ep(i.formMethod)&&i.formAction===F.location.pathname+F.location.search&&(h=o.Replace);var f=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,p=eX({currentLocation:l,nextLocation:c,historyAction:h});if(p){eV(p,{state:"blocked",location:c,proceed(){eV(p,{state:"proceeding",proceed:void 0,reset:void 0,location:c}),eU(t,r)},reset(){var e=new Map(F.blockers);e.set(p,H),eD({blockers:e})}});return}return yield eA(h,c,{submission:i,pendingError:s,preventScrollReset:f,replace:r&&r.replace})})).apply(this,arguments)}function eA(e,t,r){return e_.apply(this,arguments)}function e_(){return(e_=(0,s._)(function*(t,n,o){a&&a.abort(),a=null,N=t,T=!0===(o&&o.startUninterruptedRevalidation),function(e,t){D&&U&&(D[eK(e,t)]=U())}(F.location,F.matches),O=!0===(o&&o.preventScrollReset);var i,s,l=r||y,c=o&&o.overrideNavigation,d=w(l,n,g);if(!d){var h=eu(404,{pathname:n.pathname}),{matches:f,route:p}=es(l);eG(),eP(n,{matches:f,loaderData:{},errors:{[p.id]:h}});return}if(F.initialized&&!q&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(F.location,n)&&!(o&&o.submission&&ep(o.submission.formMethod))){eP(n,{matches:d});return}a=new AbortController;var v=et(e.history,n,a.signal,o&&o.submission);if(o&&o.pendingError)s={[ei(d).route.id]:o.pendingError};else if(o&&o.submission&&ep(o.submission.formMethod)){var m=yield function(e,t,r,n,a){return eM.apply(this,arguments)}(v,n,o.submission,d,{replace:o.replace});if(m.shortCircuited)return;i=m.pendingActionData,s=m.pendingActionError,c=eR(n,o.submission),v=new Request(v.url,{signal:v.signal})}var{shortCircuited:b,loaderData:E,errors:R}=yield function(e,t,r,n,a,o,i,s,u){return ek.apply(this,arguments)}(v,n,d,c,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,i,s);!b&&(a=null,eP(n,u({matches:d},i?{actionData:i}:{},{loaderData:E,errors:R})))})).apply(this,arguments)}function eM(){return(eM=(0,s._)(function*(e,r,n,a,s){void 0===s&&(s={}),ez(),eD({navigation:function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(r,n)});var u,l,c=eE(a,r);if(c.route.action||c.route.lazy){if(u=yield Z("action",e,c,a,m,t,g),e.signal.aborted)return{shortCircuited:!0}}else u={type:i.error,error:eu(405,{method:e.method,pathname:r.pathname,routeId:c.route.id})};if(ef(u))return l=s&&null!=s.replace?s.replace:u.location===F.location.pathname+F.location.search,yield eN(F,u,{submission:n,replace:l}),{shortCircuited:!0};if(eh(u)){var d=ei(a,c.route.id);return!0!==(s&&s.replace)&&(N=o.Push),{pendingActionData:{},pendingActionError:{[d.route.id]:u.error}}}if(ed(u))throw eu(400,{type:"defer-action"});return{pendingActionData:{[c.route.id]:u.data}}})).apply(this,arguments)}function ek(){return(ek=(0,s._)(function*(t,n,o,i,s,l,c,d,h){var f=i||eR(n,s),p=s||l||ew(f),v=r||y,[m,b]=V(e.history,F,o,p,n,q,X,G,ec,en,v,g,d,h);if(eG(e=>!(o&&o.some(t=>t.route.id===e))||m&&m.some(t=>t.route.id===e)),ee=++Q,0===m.length&&0===b.length)return eP(n,u({matches:o,loaderData:{},errors:h||null},d?{actionData:d}:{},eq()?{fetchers:new Map(F.fetchers)}:{})),{shortCircuited:!0};if(!T){b.forEach(e=>{var t=F.fetchers.get(e.key),r=ex(void 0,t?t.data:void 0);F.fetchers.set(e.key,r)});var E=d||F.actionData;eD(u({navigation:f},E?0===Object.keys(E).length?{actionData:null}:{actionData:E}:{},b.length>0?{fetchers:new Map(F.fetchers)}:{}))}b.forEach(e=>{K.has(e.key)&&eW(e.key),e.controller&&K.set(e.key,e.controller)});var w=()=>b.forEach(e=>eW(e.key));a&&a.signal.addEventListener("abort",w);var{results:R,loaderResults:x,fetcherResults:S}=yield eT(F.matches,o,m,b,t);if(t.signal.aborted)return{shortCircuited:!0};a&&a.signal.removeEventListener("abort",w),b.forEach(e=>K.delete(e.key));var D=el(R);if(D){if(D.idx>=m.length){var P=b[D.idx-m.length].key;en.add(P)}return yield eN(F,D.result,{replace:c}),{shortCircuited:!0}}var{loaderData:U,errors:C}=ea(F,o,m,x,h,b,S,em);em.forEach((e,t)=>{e.subscribe(r=>{(r||e.done)&&em.delete(t)})});var A=eq(),_=eJ(ee);return u({loaderData:U,errors:C},A||_||b.length>0?{fetchers:new Map(F.fetchers)}:{})})).apply(this,arguments)}function eL(e){return F.fetchers.get(e)||I}function ej(){return(ej=(0,s._)(function*(n,o,i,s,l,c){if(ez(),ec.delete(n),!s.route.action&&!s.route.lazy){var d=eu(405,{method:c.formMethod,pathname:i,routeId:o});eI(n,o,d);return}var f=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0," _hasFetcherDoneAnything ":!0}}(c,F.fetchers.get(n));F.fetchers.set(n,f),eD({fetchers:new Map(F.fetchers)});var p=new AbortController,v=et(e.history,i,p.signal,c);K.set(n,p);var b=Q,E=yield Z("action",v,s,l,m,t,g);if(v.signal.aborted){K.get(n)===p&&K.delete(n);return}if(ef(E)){if(K.delete(n),ee>b){var R=eS(void 0);F.fetchers.set(n,R),eD({fetchers:new Map(F.fetchers)});return}en.add(n);var x=ex(c);return F.fetchers.set(n,x),eD({fetchers:new Map(F.fetchers)}),eN(F,E,{submission:c,isFetchActionRedirect:!0})}if(eh(E)){eI(n,o,E.error);return}if(ed(E))throw eu(400,{type:"defer-action"});var S=F.navigation.location||F.location,D=et(e.history,S,p.signal),P=r||y,U="idle"!==F.navigation.state?w(P,F.navigation.location,g):F.matches;h(U,"Didn't find any matches after fetcher action");var C=++Q;er.set(n,C);var A=ex(c,E.data);F.fetchers.set(n,A);var[_,M]=V(e.history,F,U,c,S,q,X,G,ec,en,P,g,{[s.route.id]:E.data},void 0);M.filter(e=>e.key!==n).forEach(e=>{var t=e.key,r=F.fetchers.get(t),n=ex(void 0,r?r.data:void 0);F.fetchers.set(t,n),K.has(t)&&eW(t),e.controller&&K.set(t,e.controller)}),eD({fetchers:new Map(F.fetchers)});var k=()=>M.forEach(e=>eW(e.key));p.signal.addEventListener("abort",k);var{results:L,loaderResults:j,fetcherResults:O}=yield eT(F.matches,U,_,M,D);if(!p.signal.aborted){p.signal.removeEventListener("abort",k),er.delete(n),K.delete(n),M.forEach(e=>K.delete(e.key));var T=el(L);if(T){if(T.idx>=_.length){var B=M[T.idx-_.length].key;en.add(B)}return eN(F,T.result)}var{loaderData:z,errors:I}=ea(F,F.matches,_,j,void 0,M,O,em);if(F.fetchers.has(n)){var H=eS(E.data);F.fetchers.set(n,H)}var W=eJ(C);"loading"===F.navigation.state&&C>ee?(h(N,"Expected pending action"),a&&a.abort(),eP(F.navigation.location,{matches:U,loaderData:z,errors:I,fetchers:new Map(F.fetchers)})):(eD(u({errors:I,loaderData:eo(F.loaderData,z,U,I)},W||M.length>0?{fetchers:new Map(F.fetchers)}:{})),q=!1)}})).apply(this,arguments)}function eF(){return(eF=(0,s._)(function*(r,n,a,o,i,s){var u=F.fetchers.get(r),l=ex(s,u?u.data:void 0);F.fetchers.set(r,l),eD({fetchers:new Map(F.fetchers)});var c=new AbortController,d=et(e.history,a,c.signal);K.set(r,c);var f=Q,p=yield Z("loader",d,o,i,m,t,g);if(ed(p)&&(p=(yield ey(p,d.signal,!0))||p),K.get(r)===c&&K.delete(r),!d.signal.aborted){if(ef(p)){if(ee>f){var v=eS(void 0);F.fetchers.set(r,v),eD({fetchers:new Map(F.fetchers)});return}en.add(r),yield eN(F,p);return}if(eh(p)){var y=ei(F.matches,n);F.fetchers.delete(r),eD({fetchers:new Map(F.fetchers),errors:{[y.route.id]:p.error}});return}h(!ed(p),"Unhandled fetcher deferred data");var b=eS(p.data);F.fetchers.set(r,b),eD({fetchers:new Map(F.fetchers)})}})).apply(this,arguments)}function eN(e,t,r){return eO.apply(this,arguments)}function eO(){return(eO=(0,s._)(function*(t,r,n){var{submission:i,replace:s,isFetchActionRedirect:d}=void 0===n?{}:n;r.revalidate&&(q=!0);var f=v(t.location,r.location,u({_isRedirect:!0},d?{_isFetchActionRedirect:!0}:{}));if(h(f,"Expected a location on the redirect navigation"),c){var p=!1;if(r.reloadDocument)p=!0;else if(W.test(r.location)){var m=e.history.createURL(r.location);p=m.origin!==l.location.origin||null==S(m.pathname,g)}if(p){s?l.location.replace(r.location):l.location.assign(r.location);return}}a=null;var y=!0===s?o.Replace:o.Push,b=i||ew(t.navigation);if(B.has(r.status)&&b&&ep(b.formMethod))yield eA(y,f,{submission:u({},b,{formAction:r.location}),preventScrollReset:O});else if(d)yield eA(y,f,{overrideNavigation:eR(f),fetcherSubmission:b,preventScrollReset:O});else{var E=eR(f,b);yield eA(y,f,{overrideNavigation:E,preventScrollReset:O})}})).apply(this,arguments)}function eT(e,t,r,n,a){return eB.apply(this,arguments)}function eB(){return(eB=(0,s._)(function*(r,n,a,o,s){var u=yield Promise.all([...a.map(e=>Z("loader",s,e,n,m,t,g)),...o.map(r=>r.matches&&r.match&&r.controller?Z("loader",et(e.history,r.path,r.controller.signal),r.match,r.matches,m,t,g):{type:i.error,error:eu(404,{pathname:r.path})})]),l=u.slice(0,a.length),c=u.slice(a.length);return yield Promise.all([ev(r,a,l,l.map(()=>s.signal),!1,F.loaderData),ev(r,o.map(e=>e.match),c,o.map(e=>e.controller?e.controller.signal:null),!0)]),{results:u,loaderResults:l,fetcherResults:c}})).apply(this,arguments)}function ez(){q=!0,X.push(...eG()),ec.forEach((e,t)=>{K.has(t)&&(G.push(t),eW(t))})}function eI(e,t,r){var n=ei(F.matches,t);eH(e),eD({errors:{[n.route.id]:r},fetchers:new Map(F.fetchers)})}function eH(e){var t=F.fetchers.get(e);K.has(e)&&!(t&&"loading"===t.state&&er.has(e))&&eW(e),ec.delete(e),er.delete(e),en.delete(e),F.fetchers.delete(e)}function eW(e){var t=K.get(e);h(t,"Expected fetch controller: "+e),t.abort(),K.delete(e)}function e$(e){for(var t of e){var r=eS(eL(t).data);F.fetchers.set(t,r)}}function eq(){var e=[],t=!1;for(var r of en){var n=F.fetchers.get(r);h(n,"Expected fetcher: "+r),"loading"===n.state&&(en.delete(r),e.push(r),t=!0)}return e$(e),t}function eJ(e){var t=[];for(var[r,n]of er)if(n<e){var a=F.fetchers.get(r);h(a,"Expected fetcher: "+r),"loading"===a.state&&(eW(r),er.delete(r),t.push(r))}return e$(t),t.length>0}function eY(e){F.blockers.delete(e),eg.delete(e)}function eV(e,t){var r=F.blockers.get(e)||H;h("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);var n=new Map(F.blockers);n.set(e,t),eD({blockers:n})}function eX(e){var{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0!==eg.size){eg.size>1&&f(!1,"A router only supports one blocker at a time");var a=Array.from(eg.entries()),[o,i]=a[a.length-1],s=F.blockers.get(o);if((!s||"proceeding"!==s.state)&&i({currentLocation:t,nextLocation:r,historyAction:n}))return o}}function eG(e){var t=[];return em.forEach((r,n)=>{(!e||e(n))&&(r.cancel(),t.push(n),em.delete(n))}),t}function eK(e,t){return P&&P(e,t.map(e=>(function(e,t){var{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}})(e,F.loaderData)))||e.key}function eQ(e,t){if(D){var r=D[eK(e,t)];if("number"==typeof r)return r}return null}return n={get basename(){return g},get state(){return F},get routes(){return y},initialize:function(){return R=e.history.listen(t=>{var{action:r,location:n,delta:a}=t;if(eb){eb=!1;return}f(0===eg.size||null!=a,"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.");var o=eX({currentLocation:F.location,nextLocation:n,historyAction:r});if(o&&null!=a){eb=!0,e.history.go(-1*a),eV(o,{state:"blocked",location:n,proceed(){eV(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset(){var e=new Map(F.blockers);e.set(o,H),eD({blockers:e})}});return}return eA(r,n)}),!F.initialized&&eA(o.Pop,F.location),n},subscribe:function(e){return x.add(e),()=>x.delete(e)},enableScrollRestoration:function(e,t,r){if(D=e,U=t,P=r||null,!C&&F.navigation===z){C=!0;var n=eQ(F.location,F.matches);null!=n&&eD({restoreScrollPosition:n})}return()=>{D=null,U=null,P=null}},navigate:eU,fetch:function(e,t,n,a){if(d)throw Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");K.has(e)&&eW(e);var o=r||y,i=J(F.location,F.matches,g,b.v7_prependBasename,n,t,null==a?void 0:a.relative),s=w(o,i,g);if(!s){eI(e,t,eu(404,{pathname:i}));return}var{path:u,submission:l,error:c}=Y(b.v7_normalizeFormMethod,!0,i,a);if(c){eI(e,t,c);return}var h=eE(s,u);if(O=!0===(a&&a.preventScrollReset),l&&ep(l.formMethod)){(function(e,t,r,n,a,o){ej.apply(this,arguments)})(e,t,u,h,s,l);return}ec.set(e,{routeId:t,path:u}),function(e,t,r,n,a,o){eF.apply(this,arguments)}(e,t,u,h,s,l)},revalidate:function(){if(ez(),eD({revalidation:"loading"}),"submitting"!==F.navigation.state){if("idle"===F.navigation.state){eA(F.historyAction,F.location,{startUninterruptedRevalidation:!0});return}eA(N||F.historyAction,F.navigation.location,{overrideNavigation:F.navigation})}},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:eL,deleteFetcher:eH,dispose:function(){R&&R(),x.clear(),a&&a.abort(),F.fetchers.forEach((e,t)=>eH(t)),F.blockers.forEach((e,t)=>eY(t))},getBlocker:function(e,t){var r=F.blockers.get(e)||H;return eg.get(e)!==t&&eg.set(e,t),r},deleteBlocker:eY,_internalFetchControllers:K,_internalActiveDeferreds:em,_internalSetRoutes:function(e){r=E(e,t,void 0,m={})}}}Symbol("deferred");function J(e,t,r,n,a,o,i){if(null!=o&&"path"!==i){for(var s of(u=[],t))if(u.push(s),s.route.id===o){l=s;break}}else u=t,l=t[t.length-1];var u,l,c=U(a||".",P(u).map(e=>e.pathnameBase),S(e.pathname,r)||e.pathname,"path"===i);return null==a&&(c.search=e.search,c.hash=e.hash),(null==a||""===a||"."===a)&&l&&l.route.index&&!eb(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:C([r,c.pathname])),m(c)}function Y(e,t,r,n){if(!n||!(null!=(a=n)&&("formData"in a&&null!=a.formData||"body"in a&&void 0!==a.body)))return{path:r};if(n.formMethod&&!function(e){return O.has(e.toLowerCase())}(n.formMethod))return{path:r,error:eu(405,{method:n.formMethod})};var a,o,i,s=()=>({path:r,error:eu(400,{type:"invalid-body"})}),u=n.formMethod||"get",l=e?u.toUpperCase():u.toLowerCase(),c=ec(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!ep(l))return s();var d="string"==typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,t)=>{var[r,n]=t;return""+e+r+"="+n+"\n"},""):String(n.body);return{path:r,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}if("application/json"===n.formEncType){if(!ep(l))return s();try{var f="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:l,formAction:c,formEncType:n.formEncType,formData:void 0,json:f,text:void 0}}}catch(e){return s()}}}if(h("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=er(n.formData),i=n.formData;else if(n.body instanceof FormData)o=er(n.body),i=n.body;else if(n.body instanceof URLSearchParams)i=en(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{o=new URLSearchParams(n.body),i=en(o)}catch(e){return s()}var p={formMethod:l,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(ep(p.formMethod))return{path:r,submission:p};var v=y(r);return t&&v.search&&eb(v.search)&&o.append("index",""),v.search="?"+o,{path:m(v),submission:p}}function V(e,t,r,n,a,o,i,s,l,c,d,h,f,p){var v=p?Object.values(p)[0]:f?Object.values(f)[0]:void 0,m=e.createURL(t.location),y=e.createURL(a),g=(function(e,t){var r=e;if(t){var n=e.findIndex(e=>e.route.id===t);n>=0&&(r=e.slice(0,n))}return r})(r,p?Object.keys(p)[0]:void 0).filter((e,r)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){var n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||i.some(t=>t===e.route.id))return!0;var a=t.matches[r];return G(e,u({currentUrl:m,currentParams:a.params,nextUrl:y,nextParams:e.params},n,{actionResult:v,defaultShouldRevalidate:o||m.pathname+m.search===y.pathname+y.search||m.search!==y.search||X(a,e)}))}),b=[];return l.forEach((e,a)=>{if(r.some(t=>t.route.id===e.routeId)){var i=w(d,e.path,h);if(!i){b.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});return}var l=t.fetchers.get(a),f=eE(i,e.path),p=!1;(p=!c.has(a)&&(!!s.includes(a)||(l&&"idle"!==l.state&&void 0===l.data?o:G(f,u({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:v,defaultShouldRevalidate:o})))))&&b.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:f,controller:new AbortController})}}),[g,b]}function X(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function G(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function K(e,t,r){return Q.apply(this,arguments)}function Q(){return(Q=(0,s._)(function*(e,t,r){if(!!e.lazy){var n=yield e.lazy();if(e.lazy){var a=r[e.id];h(a,"No route found in manifest");var o={};for(var i in n){var s=void 0!==a[i]&&"hasErrorBoundary"!==i;f(!s,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i)+'" will be ignored.'),!s&&!b.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,u({},t(a),{lazy:void 0}))}}})).apply(this,arguments)}function Z(e,t,r,n,a,o,i,s){return ee.apply(this,arguments)}function ee(){return(ee=(0,s._)(function*(e,t,r,n,a,o,s,u){void 0===u&&(u={});var l,c,d=e=>{var n,a=new Promise((e,t)=>n=t);return E=()=>n(),t.signal.addEventListener("abort",E),Promise.race([e({request:t,params:r.params,context:u.requestContext}),a])};try{var f=r.route[e];if(r.route.lazy){if(f)b=(yield Promise.all([d(f),K(r.route,o,a)]))[0];else if(yield K(r.route,o,a),f=r.route[e])b=yield d(f);else{if("action"!==e)return{type:i.data,data:void 0};var p=new URL(t.url),v=p.pathname+p.search;throw eu(405,{method:t.method,pathname:v,routeId:r.route.id})}}else if(f)b=yield d(f);else{var m=new URL(t.url),y=m.pathname+m.search;throw eu(404,{pathname:y})}h(void 0!==b,"You defined "+("action"===e?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e)+"` function. Please return a value or `null`.")}catch(e){g=i.error,b=e}finally{E&&t.signal.removeEventListener("abort",E)}if(function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}(b)){var g,b,E,w,R=b.status;if(T.has(R)){var x=b.headers.get("Location");if(h(x,"Redirects returned/thrown from loaders/actions must have a Location header"),W.test(x)){if(!u.isStaticRequest){var D=new URL(t.url),P=new URL(x.startsWith("//")?D.protocol+x:x),U=null!=S(P.pathname,s);P.origin===D.origin&&U&&(x=P.pathname+P.search+P.hash)}}else x=J(new URL(t.url),n.slice(0,n.indexOf(r)+1),s,!0,x);if(u.isStaticRequest)throw b.headers.set("Location",x),b;return{type:i.redirect,status:R,location:x,revalidate:null!==b.headers.get("X-Remix-Revalidate"),reloadDocument:null!==b.headers.get("X-Remix-Reload-Document")}}if(u.isRouteRequest)throw{type:g===i.error?i.error:i.data,response:b};var C=b.headers.get("Content-Type");return(w=C&&/\bapplication\/json\b/.test(C)?yield b.json():yield b.text(),g===i.error)?{type:g,error:new k(R,b.statusText,w),headers:b.headers}:{type:i.data,data:w,statusCode:b.status,headers:b.headers}}return g===i.error?{type:g,error:b}:function(e){return e&&"object"==typeof e&&"object"==typeof e.data&&"function"==typeof e.subscribe&&"function"==typeof e.cancel&&"function"==typeof e.resolveData}(b)?{type:i.deferred,deferredData:b,statusCode:null==(l=b.init)?void 0:l.status,headers:(null==(c=b.init)?void 0:c.headers)&&new Headers(b.init.headers)}:{type:i.data,data:b}})).apply(this,arguments)}function et(e,t,r,n){var a=e.createURL(ec(t)).toString(),o={signal:r};if(n&&ep(n.formMethod)){var{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),"application/json"===s?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):"text/plain"===s?o.body=n.text:"application/x-www-form-urlencoded"===s&&n.formData?o.body=er(n.formData):o.body=n.formData}return new Request(a,o)}function er(e){var t=new URLSearchParams;for(var[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function en(e){var t=new FormData;for(var[r,n]of e.entries())t.append(r,n);return t}function ea(e,t,r,n,a,o,i,s){for(var l,c,d,f,p,v,m,y,g,b,{loaderData:E,errors:w}=(l=t,c=r,d=n,f=a,p=s,m={},y=null,g=!1,b={},d.forEach((e,t)=>{var r=c[t].route.id;if(h(!ef(e),"Cannot handle redirect results in processLoaderData"),eh(e)){var n=ei(l,r),a=e.error;f&&(a=Object.values(f)[0],f=void 0),null==(y=y||{})[n.route.id]&&(y[n.route.id]=a),m[r]=void 0,!g&&(g=!0,v=L(e.error)?e.error.status:500),e.headers&&(b[r]=e.headers)}else ed(e)?(p.set(r,e.deferredData),m[r]=e.deferredData.data):m[r]=e.data,null!=e.statusCode&&200!==e.statusCode&&!g&&(v=e.statusCode),e.headers&&(b[r]=e.headers)}),f&&(y=f,m[Object.keys(f)[0]]=void 0),{loaderData:m,errors:y,statusCode:v||200,loaderHeaders:b}),R=0;R<o.length;R++){var{key:x,match:S,controller:D}=o[R];h(void 0!==i&&void 0!==i[R],"Did not find corresponding fetcher result");var P=i[R];if(!D||!D.signal.aborted)if(eh(P)){var U=ei(e.matches,null==S?void 0:S.route.id);!(w&&w[U.route.id])&&(w=u({},w,{[U.route.id]:P.error})),e.fetchers.delete(x)}else if(ef(P))h(!1,"Unhandled fetcher revalidation redirect");else if(ed(P))h(!1,"Unhandled fetcher deferred data");else{var C=eS(P.data);e.fetchers.set(x,C)}}return{loaderData:E,errors:w}}function eo(e,t,r,n){var a=u({},t);for(var o of r){var i=o.route.id;if(t.hasOwnProperty(i)?void 0!==t[i]&&(a[i]=t[i]):void 0!==e[i]&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function ei(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 es(e){var t=e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function eu(e,t){var{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",s="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n)+'", so there is no way to handle the request.':"defer-action"===o?s="defer() is not supported in actions":"invalid-body"===o&&(s="Unable to encode submission body")):403===e?(i="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",s='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n)+'", so there is no way to handle the request.':a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new k(e||500,i,Error(s),!0)}function el(e){for(var t=e.length-1;t>=0;t--){var r=e[t];if(ef(r))return{result:r,idx:t}}}function ec(e){return m(u({},"string"==typeof e?y(e):e,{hash:""}))}function ed(e){return e.type===i.deferred}function eh(e){return e.type===i.error}function ef(e){return(e&&e.type)===i.redirect}function ep(e){return F.has(e.toLowerCase())}function ev(e,t,r,n,a,o){return em.apply(this,arguments)}function em(){return(em=(0,s._)(function*(e,t,r,n,a,o){for(var i=function*(i){var s=r[i],u=t[i];if(!u)return"continue";var l=e.find(e=>e.route.id===u.route.id),c=null!=l&&!X(l,u)&&(o&&o[u.route.id])!==void 0;if(ed(s)&&(a||c)){var d=n[i];h(d,"Expected an AbortSignal for revalidating fetcher deferred result"),yield ey(s,d,a).then(e=>{e&&(r[i]=e||r[i])})}},s=0;s<r.length;s++)yield*i(s)})).apply(this,arguments)}function ey(e,t,r){return eg.apply(this,arguments)}function eg(){return(eg=(0,s._)(function*(e,t,r){if(void 0===r&&(r=!1),!(yield e.deferredData.resolveData(t))){if(r)try{return{type:i.data,data:e.deferredData.unwrappedData}}catch(e){return{type:i.error,error:e}}return{type:i.data,data:e.deferredData.data}}})).apply(this,arguments)}function eb(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function eE(e,t){var r="string"==typeof t?y(t).search:t.search;if(e[e.length-1].route.index&&eb(r||""))return e[e.length-1];var n=P(e);return n[n.length-1]}function ew(e){var{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 eR(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function ex(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," _hasFetcherDoneAnything ":!0}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t," _hasFetcherDoneAnything ":!0}}function eS(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e," _hasFetcherDoneAnything ":!0}}},13721:function(e,t,r){"use strict";r.r(t),r.d(t,{Outlet:function(){return u.Outlet},Route:function(){return u.Route},RouterProvider:function(){return u.RouterProvider},createRoutesFromElements:function(){return u.createRoutesFromElements},useLocation:function(){return u.useLocation},useMatches:function(){return u.useMatches}}),r.d(t,{createBrowserRouter:function(){return b},createHashRouter:function(){return E}});var n,a,o,i,s=r("57814"),u=r("46778"),l=r("15239");function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],!(t.indexOf(r)>=0)&&(a[r]=e[r]);return a}var h="application/x-www-form-urlencoded";function f(e){return null!=e&&"string"==typeof e.tagName}var p=null,v=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function m(e){return null==e||v.has(e)?e:null}var y=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],g=["reloadDocument","replace","state","method","action","onSubmit","submit","relative","preventScrollReset"];function b(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,future:c({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.createBrowserHistory)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||w(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function E(e,t){return(0,l.createRouter)({basename:null==t?void 0:t.basename,future:c({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,l.createHashHistory)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||w(),routes:e,mapRouteProperties:u.UNSAFE_mapRouteProperties}).initialize()}function w(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=c({},t,{errors:function(e){if(!e)return null;var t=Object.entries(e),r={};for(var[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new l.ErrorResponse(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){var o=window[a.__subType];if("function"==typeof o)try{var i=new o(a.message);i.stack="",r[n]=i}catch(e){}}if(null==r[n]){var s=Error(a.message);s.stack="",r[n]=s}}else r[n]=a;return r}(t.errors)})),t}s.startTransition;var R="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,x=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;var S=s.forwardRef((e,t)=>{var{reloadDocument:r,replace:n,state:a,method:o="get",action:i,onSubmit:h,submit:f,relative:p,preventScrollReset:v}=e,m=d(e,g),y="get"===o.toLowerCase()?"get":"post",b=function(e,t){var{relative:r}=void 0===t?{}:t,{basename:n}=s.useContext(u.UNSAFE_NavigationContext),a=s.useContext(u.UNSAFE_RouteContext);a||(0,l.UNSAFE_invariant)(!1);var[o]=a.matches.slice(-1),i=c({},(0,u.useResolvedPath)(e||".",{relative:r})),d=(0,u.useLocation)();if(null==e&&(i.search=d.search,o.route.index)){var h=new URLSearchParams(i.search);h.delete("index"),i.search=h.toString()?"?"+h.toString():""}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:(0,l.joinPaths)([n,i.pathname])),(0,u.createPath)(i)}(i,{relative:p});return s.createElement("form",c({ref:t,method:y,action:b,onSubmit:r?h:e=>{if(h&&h(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||o;f(t||e.currentTarget,{method:r,replace:n,state:a,relative:p,preventScrollReset:v})}}},m))});(n=o||(o={})).UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",(a=i||(i={})).UseFetchers="useFetchers",a.UseScrollRestoration="useScrollRestoration"},46778:function(e,t,r){"use strict";r.r(t),r.d(t,{createPath:function(){return s.createPath}}),r.d(t,{Outlet:function(){return j},Route:function(){return F},RouterProvider:function(){return k},UNSAFE_DataRouterContext:function(){return l},UNSAFE_DataRouterStateContext:function(){return c},UNSAFE_NavigationContext:function(){return d},UNSAFE_RouteContext:function(){return f},UNSAFE_mapRouteProperties:function(){return T},UNSAFE_useRouteId:function(){return A},createRoutesFromElements:function(){return function e(t,r){void 0===r&&(r=[]);var n=[];return i.Children.forEach(t,(t,a)=>{if(i.isValidElement(t)){var o=[...r,a];if(t.type===i.Fragment){n.push.apply(n,e(t.props.children,o));return}t.type!==F&&(0,s.UNSAFE_invariant)(!1),!t.props.index||!t.props.children||(0,s.UNSAFE_invariant)(!1);var u={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(u.children=e(t.props.children,o)),n.push(u)}}),n}},useHref:function(){return v},useLocation:function(){return y},useMatches:function(){return _},useNavigate:function(){return b},useResolvedPath:function(){return w}});var n,a,o,i=r("57814"),s=r("15239");function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var l=i.createContext(null),c=i.createContext(null),d=i.createContext(null),h=i.createContext(null),f=i.createContext({outlet:null,matches:[],isDataRoute:!1}),p=i.createContext(null);function v(e,t){var{relative:r}=void 0===t?{}:t;m()||(0,s.UNSAFE_invariant)(!1);var{basename:n,navigator:a}=i.useContext(d),{hash:o,pathname:u,search:l}=w(e,{relative:r}),c=u;return"/"!==n&&(c="/"===u?n:(0,s.joinPaths)([n,u])),a.createHref({pathname:c,search:l,hash:o})}function m(){return null!=i.useContext(h)}function y(){return m()||(0,s.UNSAFE_invariant)(!1),i.useContext(h).location}function g(e){!i.useContext(d).static&&i.useLayoutEffect(e)}function b(){var{isDataRoute:e}=i.useContext(f);return e?function(){var e,t,{router:r}=(e=D.UseNavigateStable,t=i.useContext(l),t||(0,s.UNSAFE_invariant)(!1),t),n=C(P.UseNavigateStable),a=i.useRef(!1);return g(()=>{a.current=!0}),i.useCallback(function(e,t){void 0===t&&(t={}),a.current&&("number"==typeof e?r.navigate(e):r.navigate(e,u({fromRouteId:n},t)))},[r,n])}():function(){m()||(0,s.UNSAFE_invariant)(!1);var e=i.useContext(l),{basename:t,navigator:r}=i.useContext(d),{matches:n}=i.useContext(f),{pathname:a}=y(),o=JSON.stringify((0,s.UNSAFE_getPathContributingMatches)(n).map(e=>e.pathnameBase)),u=i.useRef(!1);return g(()=>{u.current=!0}),i.useCallback(function(n,i){if(void 0===i&&(i={}),u.current){if("number"==typeof n){r.go(n);return}var l=(0,s.resolveTo)(n,JSON.parse(o),a,"path"===i.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:(0,s.joinPaths)([t,l.pathname])),(i.replace?r.replace:r.push)(l,i.state,i)}},[t,r,o,a,e])}()}var E=i.createContext(null);function w(e,t){var{relative:r}=void 0===t?{}:t,{matches:n}=i.useContext(f),{pathname:a}=y(),o=JSON.stringify((0,s.UNSAFE_getPathContributingMatches)(n).map(e=>e.pathnameBase));return i.useMemo(()=>(0,s.resolveTo)(e,JSON.parse(o),a,"path"===r),[e,o,a,r])}var R=i.createElement(function(){var e=function(){var e,t=i.useContext(p),r=U(P.UseRouteError),n=C(P.UseRouteError);return t?t:null==(e=r.errors)?void 0:e[n]}(),t=(0,s.isRouteErrorResponse)(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return i.createElement(i.Fragment,null,i.createElement("h2",null,"Unexpected Application Error!"),i.createElement("h3",{style:{fontStyle:"italic"}},t),r?i.createElement("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"}},r):null,null)},null);class x extends i.Component{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:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?i.createElement(f.Provider,{value:this.props.routeContext},i.createElement(p.Provider,{value:this.state.error,children:this.props.component})):this.props.children}constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}}function S(e){var{routeContext:t,match:r,children:n}=e,a=i.useContext(l);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),i.createElement(f.Provider,{value:t},n)}var D=((n=D||{}).UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n);var P=((a=P||{}).UseBlocker="useBlocker",a.UseLoaderData="useLoaderData",a.UseActionData="useActionData",a.UseRouteError="useRouteError",a.UseNavigation="useNavigation",a.UseRouteLoaderData="useRouteLoaderData",a.UseMatches="useMatches",a.UseRevalidator="useRevalidator",a.UseNavigateStable="useNavigate",a.UseRouteId="useRouteId",a);function U(e){var t=i.useContext(c);return t||(0,s.UNSAFE_invariant)(!1),t}function C(e){var t,r,n=(t=0,r=i.useContext(f),r||(0,s.UNSAFE_invariant)(!1),r),a=n.matches[n.matches.length-1];return a.route.id||(0,s.UNSAFE_invariant)(!1),a.route.id}function A(){return C(P.UseRouteId)}function _(){var{matches:e,loaderData:t}=U(P.UseMatches);return i.useMemo(()=>e.map(e=>{var{pathname:r,params:n}=e;return{id:e.route.id,pathname:r,params:n,data:t[e.route.id],handle:e.route.handle}}),[e,t])}var M=i.startTransition;function k(e){var{fallbackElement:t,router:r,future:n}=e,[a,o]=i.useState(r.state),{v7_startTransition:s}=n||{},u=i.useCallback(e=>{s&&M?M(()=>o(e)):o(e)},[o,s]);i.useLayoutEffect(()=>r.subscribe(u),[r,u]);var d=i.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}),[r]),h=r.basename||"/",f=i.useMemo(()=>({router:r,navigator:d,static:!1,basename:h}),[r,d,h]);return i.createElement(i.Fragment,null,i.createElement(l.Provider,{value:f},i.createElement(c.Provider,{value:a},i.createElement(N,{basename:h,location:a.location,navigationType:a.historyAction,navigator:d},a.initialized?i.createElement(L,{routes:r.routes,state:a}):t))),null)}function L(e){var{routes:t,state:r}=e;return function(e,t,r){m()||(0,s.UNSAFE_invariant)(!1);var{navigator:n}=i.useContext(d),{matches:a}=i.useContext(f),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;var c=o?o.pathnameBase:"/";o&&o.route;var p=y();if(t){var v,g,b="string"==typeof t?(0,s.parsePath)(t):t;"/"===c||(null==(g=b.pathname)?void 0:g.startsWith(c))||(0,s.UNSAFE_invariant)(!1),v=b}else v=p;var E=v.pathname||"/",w="/"===c?E:E.slice(c.length)||"/",D=(0,s.matchRoutes)(e,{pathname:w}),P=function(e,t,r){if(void 0===t&&(t=[]),void 0===r&&(r=null),null==e){if(null==(a=r)||!a.errors)return null;e=r.matches}var n,a,o=e,u=null==(n=r)?void 0:n.errors;if(null!=u){var l=o.findIndex(e=>e.route.id&&(null==u?void 0:u[e.route.id]));l>=0||(0,s.UNSAFE_invariant)(!1),o=o.slice(0,Math.min(o.length,l+1))}return o.reduceRight((e,n,a)=>{var s=n.route.id?null==u?void 0:u[n.route.id]:null,l=null;r&&(l=n.route.errorElement||R);var c=t.concat(o.slice(0,a+1)),d=()=>{var t;return t=s?l:n.route.Component?i.createElement(n.route.Component,null):n.route.element?n.route.element:e,i.createElement(S,{match:n,routeContext:{outlet:e,matches:c,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?i.createElement(x,{location:r.location,revalidation:r.revalidation,component:l,error:s,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()},null)}(D&&D.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:(0,s.joinPaths)([c,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:(0,s.joinPaths)([c,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,r);return t&&P?i.createElement(h.Provider,{value:{location:u({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:s.Action.Pop}},P):P}(t,void 0,r)}function j(e){var t,r;return t=e.context,r=i.useContext(f).outlet,r?i.createElement(E.Provider,{value:t},r):r}function F(e){(0,s.UNSAFE_invariant)(!1)}function N(e){var{basename:t="/",children:r=null,location:n,navigationType:a=s.Action.Pop,navigator:o,static:u=!1}=e;m()&&(0,s.UNSAFE_invariant)(!1);var l=t.replace(/^\/*/,"/"),c=i.useMemo(()=>({basename:l,navigator:o,static:u}),[l,o,u]);"string"==typeof n&&(n=(0,s.parsePath)(n));var{pathname:f="/",search:p="",hash:v="",state:y=null,key:g="default"}=n,b=i.useMemo(()=>{var e=(0,s.stripBasename)(f,l);return null==e?null:{location:{pathname:e,search:p,hash:v,state:y,key:g},navigationType:a}},[l,f,p,v,y,g,a]);return null==b?null:i.createElement(d.Provider,{value:c},i.createElement(h.Provider,{children:r,value:b}))}var O=((o=O||{})[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",o);new Promise(()=>{});function T(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:i.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:i.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}}}]);
|
package/dist/static/js/{lib-router.b25b1e17.js.LICENSE.txt → lib-router.7b48a0f0.js.LICENSE.txt}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @remix-run/router v1.8.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* React Router DOM v6.15.0
|
|
14
14
|
*
|
|
15
15
|
* Copyright (c) Remix Software Inc.
|
|
16
16
|
*
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
* React Router v6.
|
|
24
|
+
* React Router v6.15.0
|
|
25
25
|
*
|
|
26
26
|
* Copyright (c) Remix Software Inc.
|
|
27
27
|
*
|