@techdocs/cli 1.2.4-next.0 → 1.2.4-next.1
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/CHANGELOG.md +11 -0
- package/dist/embedded-app/index.html +1 -1
- package/dist/embedded-app/static/5837.f53a69b0.chunk.js +3 -0
- package/dist/embedded-app/static/{5837.45e6ec1d.chunk.js.map → 5837.f53a69b0.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{6051.3f1d6d7c.chunk.js → 6051.d2e9db23.chunk.js} +2 -2
- package/dist/embedded-app/static/{6051.3f1d6d7c.chunk.js.map → 6051.d2e9db23.chunk.js.map} +1 -1
- package/dist/embedded-app/static/{8951.b74cd97a.chunk.js → 8951.131e35ed.chunk.js} +2 -2
- package/dist/embedded-app/static/{8951.b74cd97a.chunk.js.map → 8951.131e35ed.chunk.js.map} +1 -1
- package/dist/embedded-app/static/main.8e467e32.js +494 -0
- package/dist/embedded-app/static/main.8e467e32.js.map +1 -0
- package/dist/embedded-app/static/module-luxon.8ea19264.js +3 -0
- package/dist/embedded-app/static/module-luxon.8ea19264.js.map +1 -0
- package/dist/embedded-app/static/module-remix-run.df834241.js +12 -0
- package/dist/embedded-app/static/module-remix-run.df834241.js.map +1 -0
- package/dist/embedded-app/static/{module-yaml.b5c4d531.js → module-yaml.cb32d5ca.js} +58 -58
- package/dist/embedded-app/static/module-yaml.cb32d5ca.js.map +1 -0
- package/dist/embedded-app/static/{runtime.4fdcff32.js → runtime.8e467e32.js} +2 -2
- package/dist/embedded-app/static/{runtime.4fdcff32.js.map → runtime.8e467e32.js.map} +1 -1
- package/dist/embedded-app/static/vendor.8e467e32.js +236 -0
- package/dist/embedded-app/static/vendor.8e467e32.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/package.json +6 -6
- package/dist/embedded-app/static/5837.45e6ec1d.chunk.js +0 -3
- package/dist/embedded-app/static/main.4fdcff32.js +0 -494
- package/dist/embedded-app/static/main.4fdcff32.js.map +0 -1
- package/dist/embedded-app/static/module-luxon.1ec72e86.js +0 -3
- package/dist/embedded-app/static/module-luxon.1ec72e86.js.map +0 -1
- package/dist/embedded-app/static/module-yaml.b5c4d531.js.map +0 -1
- package/dist/embedded-app/static/vendor.4fdcff32.js +0 -236
- package/dist/embedded-app/static/vendor.4fdcff32.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[5924],{16060:function(fr,yt,wt){wt.d(yt,{Ep:function(){return O},Gn:function(){return Nt},PP:function(){return vt},RQ:function(){return ee},WK:function(){return Re},Zn:function(){return Ie},Zq:function(){return be},aU:function(){return T},cP:function(){return K},fp:function(){return Y},i3:function(){return Be},kG:function(){return x},lX:function(){return bt},pC:function(){return $e}});/**
|
|
2
|
+
* @remix-run/router v1.0.3
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Remix Software Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/function R(){return R=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},R.apply(this,arguments)}var T;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(T||(T={}));const Ne="popstate";function vt(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:a=!1}=e,i;i=t.map((r,m)=>f(r,typeof r=="string"?null:r.state,m===0?"default":void 0));let l=d(n==null?i.length-1:n),s=T.Pop,c=null;function d(r){return Math.min(Math.max(r,0),i.length-1)}function p(){return i[l]}function f(r,m,y){m===void 0&&(m=null);let w=$(i?p().pathname:"/",r,m,y);return Fe(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(r)),w}return{get index(){return l},get action(){return s},get location(){return p()},createHref(r){return typeof r=="string"?r:O(r)},encodeLocation(r){return r},push(r,m){s=T.Push;let y=f(r,m);l+=1,i.splice(l,i.length,y),a&&c&&c({action:s,location:y})},replace(r,m){s=T.Replace;let y=f(r,m);i[l]=y,a&&c&&c({action:s,location:y})},go(r){s=T.Pop,l=d(l+r),c&&c({action:s,location:p()})},listen(r){return c=r,()=>{c=null}}}}function bt(e){e===void 0&&(e={});function t(a,i){let{pathname:l,search:s,hash:c}=a.location;return $("",{pathname:l,search:s,hash:c},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(a,i){return typeof i=="string"?i:O(i)}return Oe(t,n,null,e)}function hr(e){e===void 0&&(e={});function t(i,l){let{pathname:s="/",search:c="",hash:d=""}=K(i.location.hash.substr(1));return $("",{pathname:s,search:c,hash:d},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(i,l){let s=i.document.querySelector("base"),c="";if(s&&s.getAttribute("href")){let d=i.location.href,p=d.indexOf("#");c=p===-1?d:d.slice(0,p)}return c+"#"+(typeof l=="string"?l:O(l))}function a(i,l){Fe(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(l)+")")}return Oe(t,n,a,e)}function Fe(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function Rt(){return Math.random().toString(36).substr(2,8)}function He(e){return{usr:e.state,key:e.key}}function $(e,t,n,a){return n===void 0&&(n=null),R({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?K(t):t,{state:n,key:t&&t.key||a||Rt()})}function O(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function K(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function le(e){let t=typeof window!="undefined"&&typeof window.location!="undefined"&&window.location.origin!=="null"?window.location.origin:"unknown://unknown",n=typeof e=="string"?e:O(e);return new URL(n,t)}function Oe(e,t,n,a){a===void 0&&(a={});let{window:i=document.defaultView,v5Compat:l=!1}=a,s=i.history,c=T.Pop,d=null;function p(){c=T.Pop,d&&d({action:c,location:r.location})}function f(m,y){c=T.Push;let w=$(r.location,m,y);n&&n(w,m);let _=He(w),D=r.createHref(w);try{s.pushState(_,"",D)}catch{i.location.assign(D)}l&&d&&d({action:c,location:r.location})}function g(m,y){c=T.Replace;let w=$(r.location,m,y);n&&n(w,m);let _=He(w),D=r.createHref(w);s.replaceState(_,"",D),l&&d&&d({action:c,location:r.location})}let r={get action(){return c},get location(){return e(i,s)},listen(m){if(d)throw new Error("A history only accepts one active listener");return i.addEventListener(Ne,p),d=m,()=>{i.removeEventListener(Ne,p),d=null}},createHref(m){return t(i,m)},encodeLocation(m){let y=le(O(m));return R({},m,{pathname:y.pathname,search:y.search,hash:y.hash})},push:f,replace:g,go(m){return s.go(m)}};return r}var N;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(N||(N={}));function Dt(e){return e.index===!0}function ye(e,t,n){return t===void 0&&(t=[]),n===void 0&&(n=new Set),e.map((a,i)=>{let l=[...t,i],s=typeof a.id=="string"?a.id:l.join("-");return x(a.index!==!0||!a.children,"Cannot specify children on an index route"),x(!n.has(s),'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),n.add(s),Dt(a)?R({},a,{id:s}):R({},a,{id:s,children:a.children?ye(a.children,l,n):void 0})})}function Y(e,t,n){n===void 0&&(n="/");let a=typeof t=="string"?K(t):t,i=Ie(a.pathname||"/",n);if(i==null)return null;let l=je(e);Pt(l);let s=null;for(let c=0;s==null&&c<l.length;++c)s=_t(l[c],Ot(i));return s}function je(e,t,n,a){return t===void 0&&(t=[]),n===void 0&&(n=[]),a===void 0&&(a=""),e.forEach((i,l)=>{let s={relativePath:i.path||"",caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};s.relativePath.startsWith("/")&&(x(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));let c=ee([a,s.relativePath]),d=n.concat(s);i.children&&i.children.length>0&&(x(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),je(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:At(c,i.index),routesMeta:d})}),t}function Pt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Tt(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}const Et=/^:\w+$/,xt=3,Mt=2,St=1,Ct=10,Lt=-2,Ue=e=>e==="*";function At(e,t){let n=e.split("/"),a=n.length;return n.some(Ue)&&(a+=Lt),t&&(a+=Mt),n.filter(i=>!Ue(i)).reduce((i,l)=>i+(Et.test(l)?xt:l===""?St:Ct),a)}function Tt(e,t){return e.length===t.length&&e.slice(0,-1).every((a,i)=>a===t[i])?e[e.length-1]-t[t.length-1]:0}function _t(e,t){let{routesMeta:n}=e,a={},i="/",l=[];for(let s=0;s<n.length;++s){let c=n[s],d=s===n.length-1,p=i==="/"?t:t.slice(i.length)||"/",f=Ft({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},p);if(!f)return null;Object.assign(a,f.params);let g=c.route;l.push({params:a,pathname:ee([i,f.pathname]),pathnameBase:It(ee([i,f.pathnameBase])),route:g}),f.pathnameBase!=="/"&&(i=ee([i,f.pathnameBase]))}return l}function Nt(e,t){return t===void 0&&(t={}),e.replace(/:(\w+)/g,(n,a)=>(x(t[a]!=null,'Missing ":'+a+'" param'),t[a])).replace(/(\/?)\*/,(n,a,i,l)=>{const s="*";return t[s]==null?l==="/*"?"/":"":""+a+t[s]})}function Ft(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=Ht(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let l=i[0],s=l.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:a.reduce((p,f,g)=>{if(f==="*"){let r=c[g]||"";s=l.slice(0,l.length-r.length).replace(/(.)\/+$/,"$1")}return p[f]=jt(c[g]||"",f),p},{}),pathname:l,pathnameBase:s,pattern:e}}function Ht(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),we(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 a=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(s,c)=>(a.push(c),"([^\\/]+)"));return e.endsWith("*")?(a.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),a]}function Ot(e){try{return decodeURI(e)}catch(t){return we(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function jt(e,t){try{return decodeURIComponent(e)}catch(n){return we(!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 ("+n+").")),e}}function Ie(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function x(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function we(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function Be(e,t){t===void 0&&(t="/");let{pathname:n,search:a="",hash:i=""}=typeof e=="string"?K(e):e;return{pathname:n?n.startsWith("/")?n:Ut(n,t):t,search:Bt(a),hash:$t(i)}}function Ut(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ve(e,t,n,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function be(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function $e(e,t,n,a){a===void 0&&(a=!1);let i;typeof e=="string"?i=K(e):(i=R({},e),x(!i.pathname||!i.pathname.includes("?"),ve("?","pathname","search",i)),x(!i.pathname||!i.pathname.includes("#"),ve("#","pathname","hash",i)),x(!i.search||!i.search.includes("#"),ve("#","search","hash",i)));let l=e===""||i.pathname==="",s=l?"/":i.pathname,c;if(a||s==null)c=n;else{let g=t.length-1;if(s.startsWith("..")){let r=s.split("/");for(;r[0]==="..";)r.shift(),g-=1;i.pathname=r.join("/")}c=g>=0?t[g]:"/"}let d=Be(i,c),p=s&&s!=="/"&&s.endsWith("/"),f=(l||s===".")&&n.endsWith("/");return!d.pathname.endsWith("/")&&(p||f)&&(d.pathname+="/"),d}function pr(e){return e===""||e.pathname===""?"/":typeof e=="string"?K(e).pathname:e.pathname}const ee=e=>e.join("/").replace(/\/\/+/g,"/"),It=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Bt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$t=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mr=function(t,n){n===void 0&&(n={});let a=typeof n=="number"?{status:n}:n,i=new Headers(a.headers);return i.has("Content-Type")||i.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),R({},a,{headers:i}))};class We extends Error{}class Ke{constructor(t){this.pendingKeys=new Set,this.subscriber=void 0,x(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((i,l)=>n=l),this.controller=new AbortController;let a=()=>n(new We("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((i,l)=>{let[s,c]=l;return Object.assign(i,{[s]:this.trackPromise(s,c)})},{})}trackPromise(t,n){if(!(n instanceof Promise))return n;this.pendingKeys.add(t);let a=Promise.race([n,this.abortPromise]).then(i=>this.onSettle(a,t,null,i),i=>this.onSettle(a,t,i));return a.catch(()=>{}),Object.defineProperty(a,"_tracked",{get:()=>!0}),a}onSettle(t,n,a,i){if(this.controller.signal.aborted&&a instanceof We)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>a}),Promise.reject(a);this.pendingKeys.delete(n),this.done&&this.unlistenAbortSignal();const l=this.subscriber;return a?(Object.defineProperty(t,"_error",{get:()=>a}),l&&l(!1),Promise.reject(a)):(Object.defineProperty(t,"_data",{get:()=>i}),l&&l(!1),i)}subscribe(t){this.subscriber=t}cancel(){this.controller.abort(),this.pendingKeys.forEach((n,a)=>this.pendingKeys.delete(a));let t=this.subscriber;t&&t(!0)}async resolveData(t){let n=!1;if(!this.done){let a=()=>this.cancel();t.addEventListener("abort",a),n=await new Promise(i=>{this.subscribe(l=>{t.removeEventListener("abort",a),(l||this.done)&&i(l)})})}return n}get done(){return this.pendingKeys.size===0}get unwrappedData(){return x(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,n)=>{let[a,i]=n;return Object.assign(t,{[a]:Kt(i)})},{})}}function Wt(e){return e instanceof Promise&&e._tracked===!0}function Kt(e){if(!Wt(e))return e;if(e._error)throw e._error;return e._data}function gr(e){return new Ke(e)}const yr=function(t,n){n===void 0&&(n=302);let a=n;typeof a=="number"?a={status:a}:typeof a.status=="undefined"&&(a.status=302);let i=new Headers(a.headers);return i.set("Location",t),new Response(null,R({},a,{headers:i}))};class te{constructor(t,n,a){this.status=t,this.statusText=n||"",this.data=a}}function Re(e){return e instanceof te}const De={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},zt={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Vt=!(typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined");function vr(e){x(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=ye(e.routes),n=null,a=new Set,i=null,l=null,s=null,c=!1,d=Y(t,e.history.location,e.basename),p=null;if(d==null){let{matches:o,route:u,error:h}=xe(t);d=o,p={[u.id]:h}}let f=!d.some(o=>o.route.loader)||e.hydrationData!=null,g,r={historyAction:e.history.action,location:e.history.location,matches:d,initialized:f,navigation:De,restoreScrollPosition:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||p,fetchers:new Map},m=T.Pop,y=!1,w,_=!1,D=!1,I=[],B=[],L=new Map,st=0,Se=-1,de=new Map,pe=new Set,re=new Map,k=new Map;function Xt(){return n=e.history.listen(o=>{let{action:u,location:h}=o;return ne(u,h)}),r.initialized||ne(T.Pop,r.location),g}function Zt(){n&&n(),a.clear(),w&&w.abort(),r.fetchers.forEach((o,u)=>Ae(u))}function kt(o){return a.add(o),()=>a.delete(o)}function U(o){r=R({},r,o),a.forEach(u=>u(r))}function ue(o,u){var h;let v=r.actionData!=null&&r.navigation.formMethod!=null&&r.navigation.state==="loading"&&((h=r.navigation.formAction)==null?void 0:h.split("?")[0])===o.pathname,b=u.loaderData?{loaderData:Ee(r.loaderData,u.loaderData,u.matches||[])}:{};U(R({},v?{}:{actionData:null},u,b,{historyAction:m,location:o,initialized:!0,navigation:De,revalidation:"idle",restoreScrollPosition:r.navigation.formData?!1:ht(o,u.matches||r.matches),preventScrollReset:y})),_||m===T.Pop||(m===T.Push?e.history.push(o,o.state):m===T.Replace&&e.history.replace(o,o.state)),m=T.Pop,y=!1,_=!1,D=!1,I=[],B=[]}async function qt(o,u){if(typeof o=="number"){e.history.go(o);return}let{path:h,submission:v,error:b}=Ge(o,u),P=$(r.location,h,u&&u.state);P=e.history.encodeLocation(P);let E=(u&&u.replace)===!0||v!=null?T.Replace:T.Push,M=u&&"preventScrollReset"in u?u.preventScrollReset===!0:void 0;return await ne(E,P,{submission:v,pendingError:b,preventScrollReset:M,replace:u&&u.replace})}function er(){if(Ce(),U({revalidation:"loading"}),r.navigation.state!=="submitting"){if(r.navigation.state==="idle"){ne(r.historyAction,r.location,{startUninterruptedRevalidation:!0});return}ne(m||r.historyAction,r.navigation.location,{overrideNavigation:r.navigation})}}async function ne(o,u,h){w&&w.abort(),w=null,m=o,_=(h&&h.startUninterruptedRevalidation)===!0,sr(r.location,r.matches),y=(h&&h.preventScrollReset)===!0;let v=h&&h.overrideNavigation,b=Y(t,u,e.basename);if(!b){let{matches:F,route:ae,error:V}=xe(t);Te(),ue(u,{matches:F,loaderData:{},errors:{[ae.id]:V}});return}if(Yt(r.location,u)){ue(u,{matches:b});return}w=new AbortController;let P=se(u,w.signal,h&&h.submission),E,M;if(h&&h.pendingError)M={[J(b).route.id]:h.pendingError};else if(h&&h.submission){let F=await tr(P,u,h.submission,b,{replace:h.replace});if(F.shortCircuited)return;E=F.pendingActionData,M=F.pendingActionError,v=R({state:"loading",location:u},h.submission)}let{shortCircuited:S,loaderData:C,errors:A}=await rr(P,u,b,v,h&&h.submission,h&&h.replace,E,M);S||(w=null,ue(u,{matches:b,loaderData:C,errors:A}))}async function tr(o,u,h,v,b){Ce();let P=R({state:"submitting",location:u},h);U({navigation:P});let E,M=he(v,u);if(!M.route.action)E=Me(u);else if(E=await Q("action",o,M,v,g.basename),o.signal.aborted)return{shortCircuited:!0};if(Z(E)){let S=R({state:"loading",location:$(r.location,E.location)},h);return await ce(E,S,b&&b.replace),{shortCircuited:!0}}if(X(E)){let S=J(v,M.route.id);return(b&&b.replace)!==!0&&(m=T.Push),{pendingActionError:{[S.route.id]:E.error}}}if(z(E))throw new Error("defer() is not supported in actions");return{pendingActionData:{[M.route.id]:E.data}}}async function rr(o,u,h,v,b,P,E,M){let S=v;S||(S={state:"loading",location:u,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0});let[C,A]=Ye(r,h,b,u,D,I,B,E,M,re);if(Te(H=>!(h&&h.some(j=>j.route.id===H))||C&&C.some(j=>j.route.id===H)),C.length===0&&A.length===0)return ue(u,{matches:h,loaderData:Ee(r.loaderData,{},h),errors:M||null,actionData:E||null}),{shortCircuited:!0};_||(A.forEach(H=>{let[j]=H,oe=r.fetchers.get(j),fe={state:"loading",data:oe&&oe.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0};r.fetchers.set(j,fe)}),U(R({navigation:S,actionData:E||r.actionData||null},A.length>0?{fetchers:new Map(r.fetchers)}:{}))),Se=++st,A.forEach(H=>{let[j]=H;return L.set(j,w)});let{results:F,loaderResults:ae,fetcherResults:V}=await ut(r.matches,h,C,A,o);if(o.signal.aborted)return{shortCircuited:!0};A.forEach(H=>{let[j]=H;return L.delete(j)});let q=tt(F);if(q){let H=Pe(r,q);return await ce(q,H,P),{shortCircuited:!0}}let{loaderData:_e,errors:ge}=qe(r,h,C,ae,M,A,V,k);k.forEach((H,j)=>{H.subscribe(oe=>{(oe||H.done)&&k.delete(j)})}),or();let ie=ft(Se);return R({loaderData:_e,errors:ge},ie||A.length>0?{fetchers:new Map(r.fetchers)}:{})}function dt(o){return r.fetchers.get(o)||zt}function nr(o,u,h,v){if(Vt)throw new 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.");L.has(o)&&me(o);let b=Y(t,h,e.basename);if(!b){Le(o,u,new te(404,"Not Found",null));return}let{path:P,submission:E}=Ge(h,v,!0),M=he(b,P);if(E){ar(o,u,P,M,b,E);return}re.set(o,[P,M,b]),ir(o,u,P,M,b)}async function ar(o,u,h,v,b,P){if(Ce(),re.delete(o),!v.route.action){let{error:W}=Me(h);Le(o,u,W);return}let E=r.fetchers.get(o),M=R({state:"submitting"},P,{data:E&&E.data});r.fetchers.set(o,M),U({fetchers:new Map(r.fetchers)});let S=new AbortController,C=se(h,S.signal,P);L.set(o,S);let A=await Q("action",C,v,b,g.basename);if(C.signal.aborted){L.get(o)===S&&L.delete(o);return}if(Z(A)){L.delete(o),pe.add(o);let W=R({state:"loading"},P,{data:void 0});r.fetchers.set(o,W),U({fetchers:new Map(r.fetchers)});let G=R({state:"loading",location:$(r.location,A.location)},P);await ce(A,G);return}if(X(A)){Le(o,u,A.error);return}z(A)&&x(!1,"defer() is not supported in actions");let F=r.navigation.location||r.location,ae=se(F,S.signal),V=r.navigation.state!=="idle"?Y(t,r.navigation.location,e.basename):r.matches;x(V,"Didn't find any matches after fetcher action");let q=++st;de.set(o,q);let _e=R({state:"loading",data:A.data},P);r.fetchers.set(o,_e);let[ge,ie]=Ye(r,V,P,F,D,I,B,{[v.route.id]:A.data},void 0,re);ie.filter(W=>{let[G]=W;return G!==o}).forEach(W=>{let[G]=W,gt=r.fetchers.get(G),cr={state:"loading",data:gt&>.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0};r.fetchers.set(G,cr),L.set(G,S)}),U({fetchers:new Map(r.fetchers)});let{results:H,loaderResults:j,fetcherResults:oe}=await ut(r.matches,V,ge,ie,ae);if(S.signal.aborted)return;de.delete(o),L.delete(o),ie.forEach(W=>{let[G]=W;return L.delete(G)});let fe=tt(H);if(fe){let W=Pe(r,fe);await ce(fe,W);return}let{loaderData:pt,errors:mt}=qe(r,r.matches,ge,j,void 0,ie,oe,k),dr={state:"idle",data:A.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0};r.fetchers.set(o,dr);let ur=ft(q);r.navigation.state==="loading"&&q>Se?(x(m,"Expected pending action"),w&&w.abort(),ue(r.navigation.location,{matches:V,loaderData:pt,errors:mt,fetchers:new Map(r.fetchers)})):(U(R({errors:mt,loaderData:Ee(r.loaderData,pt,V)},ur?{fetchers:new Map(r.fetchers)}:{})),D=!1)}async function ir(o,u,h,v,b){let P=r.fetchers.get(o),E={state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,data:P&&P.data};r.fetchers.set(o,E),U({fetchers:new Map(r.fetchers)});let M=new AbortController,S=se(h,M.signal);L.set(o,M);let C=await Q("loader",S,v,b,g.basename);if(z(C)&&(C=await it(C,S.signal,!0)||C),L.get(o)===M&&L.delete(o),S.signal.aborted)return;if(Z(C)){let F=Pe(r,C);await ce(C,F);return}if(X(C)){let F=J(r.matches,u);r.fetchers.delete(o),U({fetchers:new Map(r.fetchers),errors:{[F.route.id]:C.error}});return}x(!z(C),"Unhandled fetcher deferred data");let A={state:"idle",data:C.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0};r.fetchers.set(o,A),U({fetchers:new Map(r.fetchers)})}async function ce(o,u,h){o.revalidate&&(D=!0),x(u.location,"Expected a location on the redirect navigation"),w=null;let v=h===!0?T.Replace:T.Push;await ne(v,u.location,{overrideNavigation:u})}async function ut(o,u,h,v,b){let P=await Promise.all([...h.map(S=>Q("loader",b,S,u,g.basename)),...v.map(S=>{let[,C,A,F]=S;return Q("loader",se(C,b.signal),A,F,g.basename)})]),E=P.slice(0,h.length),M=P.slice(h.length);return await Promise.all([at(o,h,E,b.signal,!1,r.loaderData),at(o,v.map(S=>{let[,,C]=S;return C}),M,b.signal,!0)]),{results:P,loaderResults:E,fetcherResults:M}}function Ce(){D=!0,I.push(...Te()),re.forEach((o,u)=>{L.has(u)&&(B.push(u),me(u))})}function Le(o,u,h){let v=J(r.matches,u);Ae(o),U({errors:{[v.route.id]:h},fetchers:new Map(r.fetchers)})}function Ae(o){L.has(o)&&me(o),re.delete(o),de.delete(o),pe.delete(o),r.fetchers.delete(o)}function me(o){let u=L.get(o);x(u,"Expected fetch controller: "+o),u.abort(),L.delete(o)}function ct(o){for(let u of o){let v={state:"idle",data:dt(u).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0};r.fetchers.set(u,v)}}function or(){let o=[];for(let u of pe){let h=r.fetchers.get(u);x(h,"Expected fetcher: "+u),h.state==="loading"&&(pe.delete(u),o.push(u))}ct(o)}function ft(o){let u=[];for(let[h,v]of de)if(v<o){let b=r.fetchers.get(h);x(b,"Expected fetcher: "+h),b.state==="loading"&&(me(h),de.delete(h),u.push(h))}return ct(u),u.length>0}function Te(o){let u=[];return k.forEach((h,v)=>{(!o||o(v))&&(h.cancel(),u.push(v),k.delete(v))}),u}function lr(o,u,h){if(i=o,s=u,l=h||(v=>v.key),!c&&r.navigation===De){c=!0;let v=ht(r.location,r.matches);v!=null&&U({restoreScrollPosition:v})}return()=>{i=null,s=null,l=null}}function sr(o,u){if(i&&l&&s){let h=u.map(b=>lt(b,r.loaderData)),v=l(o,h)||o.key;i[v]=s()}}function ht(o,u){if(i&&l&&s){let h=u.map(P=>lt(P,r.loaderData)),v=l(o,h)||o.key,b=i[v];if(typeof b=="number")return b}return null}return g={get basename(){return e.basename},get state(){return r},get routes(){return t},initialize:Xt,subscribe:kt,enableScrollRestoration:lr,navigate:qt,fetch:nr,revalidate:er,createHref:o=>e.history.createHref(o),getFetcher:dt,deleteFetcher:Ae,dispose:Zt,_internalFetchControllers:L,_internalActiveDeferreds:k},g}const ze=new Set(["POST","PUT","PATCH","DELETE"]),Ve=new Set(["GET","HEAD",...ze]);function br(e){x(e.length>0,"You must provide a non-empty routes array to unstable_createStaticHandler");let t=ye(e);async function n(d){let p=new URL(d.url),f=$("",O(p),null,"default"),g=Y(t,f);if(Ve.has(d.method)){if(!g){let{matches:m,route:y,error:w}=xe(t);return{location:f,matches:m,loaderData:{},actionData:null,errors:{[y.id]:w},statusCode:w.status,loaderHeaders:{},actionHeaders:{}}}}else{let{matches:m,route:y,error:w}=Jt(t);return{location:f,matches:m,loaderData:{},actionData:null,errors:{[y.id]:w},statusCode:w.status,loaderHeaders:{},actionHeaders:{}}}let r=await i(d,f,g);return r instanceof Response?r:R({location:f},r)}async function a(d,p){let f=new URL(d.url),g=$("",O(f),null,"default"),r=Y(t,g);if(Ve.has(d.method)){if(!r)throw c(null,{status:404,statusText:"Not Found"})}else throw c(null,{status:405,statusText:"Method Not Allowed"});let m=p?r.find(D=>D.route.id===p):he(r,g);if(!m)throw c(null,{status:404,statusText:"Not Found"});let y=await i(d,g,r,m);if(y instanceof Response)return y;let w=y.errors?Object.values(y.errors)[0]:void 0;if(w!==void 0)throw w;let _=[y.actionData,y.loaderData].find(D=>D);return Object.values(_||{})[0]}async function i(d,p,f,g){x(d.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(ze.has(d.method))return await l(d,f,g||he(f,p),g!=null);let r=await s(d,f,g);return r instanceof Response?r:R({},r,{actionData:null,actionHeaders:{}})}catch(r){if(Qt(r)){if(r.type===N.error&&!nt(r.response))throw r.response;return r.response}if(nt(r))return r;throw r}}async function l(d,p,f,g){let r;if(f.route.action){if(r=await Q("action",d,f,p,void 0,!0,g),d.signal.aborted){let y=g?"queryRoute":"query";throw new Error(y+"() call aborted")}}else{if(g)throw c(null,{status:405,statusText:"Method Not Allowed"});r=Me(d.url)}if(Z(r))throw new Response(null,{status:r.status,headers:{Location:r.location}});if(z(r))throw new Error("defer() is not supported in actions");if(g){if(X(r)){let y=J(p,f.route.id);return{matches:[f],loaderData:{},actionData:null,errors:{[y.route.id]:r.error},statusCode:500,loaderHeaders:{},actionHeaders:{}}}return{matches:[f],loaderData:{},actionData:{[f.route.id]:r.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{}}}if(X(r)){let y=J(p,f.route.id),w=await s(d,p,void 0,{[y.route.id]:r.error});return R({},w,{statusCode:Re(r.error)?r.error.status:500,actionData:null,actionHeaders:R({},r.headers?{[f.route.id]:r.headers}:{})})}let m=await s(d,p);return R({},m,r.statusCode?{statusCode:r.statusCode}:{},{actionData:{[f.route.id]:r.data},actionHeaders:R({},r.headers?{[f.route.id]:r.headers}:{})})}async function s(d,p,f,g){let r=f!=null,y=(f?[f]:Je(p,Object.keys(g||{})[0])).filter(D=>D.route.loader);if(y.length===0)return{matches:p,loaderData:{},errors:g||null,statusCode:200,loaderHeaders:{}};let w=await Promise.all([...y.map(D=>Q("loader",d,D,p,void 0,!0,r))]);if(d.signal.aborted){let D=r?"queryRoute":"query";throw new Error(D+"() call aborted")}w.forEach(D=>{z(D)&&D.deferredData.cancel()});let _=ke(p,y,w,g);return R({},_,{matches:p})}function c(d,p){return new Response(d,R({},p,{headers:R({},p.headers,{"X-Remix-Router-Error":"yes"})}))}return{dataRoutes:t,query:n,queryRoute:a}}function Rr(e,t,n){return R({},t,{statusCode:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:n}})}function Ge(e,t,n){n===void 0&&(n=!1);let a=typeof e=="string"?e:O(e);if(!t||!("formMethod"in t)&&!("formData"in t))return{path:a};if(t.formMethod!=null&&t.formMethod!=="get")return{path:a,submission:{formMethod:t.formMethod,formAction:rt(a),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData}};if(!t.formData)return{path:a};let i=K(a);try{let l=Ze(t.formData);n&&i.search&&ot(i.search)&&l.append("index",""),i.search="?"+l}catch{return{path:a,error:new te(400,"Bad Request","Cannot submit binary form data using GET")}}return{path:O(i)}}function Pe(e,t){let{formMethod:n,formAction:a,formEncType:i,formData:l}=e.navigation;return{state:"loading",location:$(e.location,t.location),formMethod:n||void 0,formAction:a||void 0,formEncType:i||void 0,formData:l||void 0}}function Je(e,t){let n=e;if(t){let a=e.findIndex(i=>i.route.id===t);a>=0&&(n=e.slice(0,a))}return n}function Ye(e,t,n,a,i,l,s,c,d,p){let f=d?Object.values(d)[0]:c?Object.values(c)[0]:null,g=d?Object.keys(d)[0]:void 0,m=Je(t,g).filter((w,_)=>w.route.loader!=null&&(Gt(e.loaderData,e.matches[_],w)||l.some(D=>D===w.route.id)||Xe(e.location,e.matches[_],n,a,w,i,f))),y=[];return p&&p.forEach((w,_)=>{let[D,I,B]=w;s.includes(_)?y.push([_,D,I,B]):i&&Xe(D,I,n,D,I,i,f)&&y.push([_,D,I,B])}),[m,y]}function Gt(e,t,n){let a=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return a||i}function Qe(e,t){let n=e.route.path;return e.pathname!==t.pathname||n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Xe(e,t,n,a,i,l,s){let c=le(e),d=t.params,p=le(a),f=i.params,g=Qe(t,i)||c.toString()===p.toString()||c.search!==p.search||l;if(i.route.shouldRevalidate){let r=i.route.shouldRevalidate(R({currentUrl:c,currentParams:d,nextUrl:p,nextParams:f},n,{actionResult:s,defaultShouldRevalidate:g}));if(typeof r=="boolean")return r}return g}async function Q(e,t,n,a,i,l,s){l===void 0&&(l=!1),s===void 0&&(s=!1);let c,d,p,f=new Promise((r,m)=>p=m),g=()=>p();t.signal.addEventListener("abort",g);try{let r=n.route[e];x(r,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),d=await Promise.race([r({request:t,params:n.params}),f])}catch(r){c=N.error,d=r}finally{t.signal.removeEventListener("abort",g)}if(d instanceof Response){let r=d.status;if(r>=300&&r<=399){let w=d.headers.get("Location");x(w,"Redirects returned/thrown from loaders/actions must have a Location header");let _=a.slice(0,a.indexOf(n)+1),D=be(_).map(L=>L.pathnameBase),I=le(t.url).pathname,B=$e(w,D,I);if(x(O(B),"Unable to resolve redirect location: "+d.headers.get("Location")),i){let L=B.pathname;B.pathname=L==="/"?i:ee([i,L])}if(w=O(B),l)throw d.headers.set("Location",w),d;return{type:N.redirect,status:r,location:w,revalidate:d.headers.get("X-Remix-Revalidate")!==null}}if(s)throw{type:c||N.data,response:d};let m,y=d.headers.get("Content-Type");return y&&y.startsWith("application/json")?m=await d.json():m=await d.text(),c===N.error?{type:c,error:new te(r,d.statusText,m),headers:d.headers}:{type:N.data,data:m,statusCode:d.status,headers:d.headers}}return c===N.error?{type:c,error:d}:d instanceof Ke?{type:N.deferred,deferredData:d}:{type:N.data,data:d}}function se(e,t,n){let a=le(rt(e)).toString(),i={signal:t};if(n){let{formMethod:l,formEncType:s,formData:c}=n;i.method=l.toUpperCase(),i.body=s==="application/x-www-form-urlencoded"?Ze(c):c}return new Request(a,i)}function Ze(e){let t=new URLSearchParams;for(let[n,a]of e.entries())x(typeof a=="string",'File inputs are not supported with encType "application/x-www-form-urlencoded", please use "multipart/form-data" instead.'),t.append(n,a);return t}function ke(e,t,n,a,i){let l={},s=null,c,d=!1,p={};return n.forEach((f,g)=>{let r=t[g].route.id;if(x(!Z(f),"Cannot handle redirect results in processLoaderData"),X(f)){let m=J(e,r),y=f.error;a&&(y=Object.values(a)[0],a=void 0),s=Object.assign(s||{},{[m.route.id]:y}),d||(d=!0,c=Re(f.error)?f.error.status:500),f.headers&&(p[r]=f.headers)}else z(f)?(i&&i.set(r,f.deferredData),l[r]=f.deferredData.data):(l[r]=f.data,f.statusCode!=null&&f.statusCode!==200&&!d&&(c=f.statusCode),f.headers&&(p[r]=f.headers))}),a&&(s=a),{loaderData:l,errors:s,statusCode:c||200,loaderHeaders:p}}function qe(e,t,n,a,i,l,s,c){let{loaderData:d,errors:p}=ke(t,n,a,i,c);for(let f=0;f<l.length;f++){let[g,,r]=l[f];x(s!==void 0&&s[f]!==void 0,"Did not find corresponding fetcher result");let m=s[f];if(X(m)){let y=J(e.matches,r.route.id);p&&p[y.route.id]||(p=R({},p,{[y.route.id]:m.error})),e.fetchers.delete(g)}else{if(Z(m))throw new Error("Unhandled fetcher revalidation redirect");if(z(m))throw new Error("Unhandled fetcher deferred data");{let y={state:"idle",data:m.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0};e.fetchers.set(g,y)}}}return{loaderData:d,errors:p}}function Ee(e,t,n){let a=R({},t);return n.forEach(i=>{let l=i.route.id;t[l]===void 0&&e[l]!==void 0&&(a[l]=e[l])}),a}function J(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function et(e,t,n){let a=e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-"+t+"-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:a}],route:a,error:new te(t,n,null)}}function xe(e){return et(e,404,"Not Found")}function Jt(e){return et(e,405,"Method Not Allowed")}function Me(e){let t=typeof e=="string"?e:O(e);return console.warn("You're trying to submit to a route that does not have an action. To fix this, please add an `action` function to the route for "+("["+t+"]")),{type:N.error,error:new te(405,"Method Not Allowed","")}}function tt(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Z(n))return n}}function rt(e){let t=typeof e=="string"?K(e):e;return O(R({},t,{hash:""}))}function Yt(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function z(e){return e.type===N.deferred}function X(e){return e.type===N.error}function Z(e){return(e&&e.type)===N.redirect}function nt(e){if(!(e instanceof Response))return!1;let t=e.status,n=e.headers.get("Location");return t>=300&&t<=399&&n!=null}function Qt(e){return e&&e.response instanceof Response&&(e.type===N.data||N.error)}async function at(e,t,n,a,i,l){for(let s=0;s<n.length;s++){let c=n[s],d=t[s],p=e.find(g=>g.route.id===d.route.id),f=p!=null&&!Qe(p,d)&&(l&&l[d.route.id])!==void 0;z(c)&&(i||f)&&await it(c,a,i).then(g=>{g&&(n[s]=g||n[s])})}}async function it(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:N.data,data:e.deferredData.unwrappedData}}catch(i){return{type:N.error,error:i}}return{type:N.data,data:e.deferredData.data}}}function ot(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function lt(e,t){let{route:n,pathname:a,params:i}=e;return{id:n.id,pathname:a,params:i,data:t[n.id],handle:n.handle}}function he(e,t){let n=typeof t=="string"?K(t).search:t.search;if(e[e.length-1].route.index&&ot(n||""))return e[e.length-1];let a=be(e);return a[a.length-1]}}}]);})();
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=module-remix-run.df834241.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["webpack://techdocs-cli-embedded-app/../node_modules/@remix-run/router/dist/router.js"],"names":["_extends","target","i","source","key","Action","PopStateEventType","createMemoryHistory","options","initialEntries","initialIndex","v5Compat","entries","entry","index","createMemoryLocation","clampIndex","action","listener","n","getCurrentLocation","to","state","location","createLocation","warning$1","createPath","nextLocation","delta","fn","createBrowserHistory","createBrowserLocation","window","globalHistory","pathname","search","hash","createBrowserHref","getUrlBasedHistory","createHashHistory","createHashLocation","parsePath","createHashHref","base","href","url","hashIndex","validateHashLocation","cond","message","createKey","getHistoryState","current","_ref","path","parsedPath","searchIndex","createURL","getLocation","createHref","validateLocation","handlePop","history","push","historyState","replace","ResultType","isIndexRoute","route","convertRoutesToDataRoutes","routes","parentPath","allIds","treePath","id","invariant","matchRoutes","locationArg","basename","stripBasename","branches","flattenRoutes","rankRouteBranches","matches","matchRouteBranch","safelyDecodeURI","parentsMeta","meta","joinPaths","routesMeta","computeScore","a","b","compareIndexes","paramRe","dynamicSegmentValue","indexRouteValue","emptySegmentValue","staticSegmentValue","splatPenalty","isSplat","s","segments","initialScore","score","segment","branch","matchedParams","matchedPathname","end","remainingPathname","match","matchPath","normalizePathname","generatePath","params","_","prefix","__","str","star","pattern","matcher","paramNames","compilePath","pathnameBase","captureGroups","memo","paramName","splatValue","safelyDecodeURIComponent","caseSensitive","warning","regexpSource","value","error","startIndex","nextChar","resolvePath","fromPathname","toPathname","resolvePathname","normalizeSearch","normalizeHash","relativePath","getInvalidPathError","char","field","dest","getPathContributingMatches","resolveTo","toArg","routePathnames","locationPathname","isPathRelative","isEmptyPath","from","routePathnameIndex","toSegments","hasExplicitTrailingSlash","hasCurrentTrailingSlash","getToPathname","paths","json","data","init","responseInit","headers","AbortedDeferredError","DeferredData","reject","r","onAbort","acc","promise","subscriber","v","k","signal","aborted","resolve","_ref2","unwrapTrackedPromise","isTrackedPromise","defer","redirect","ErrorResponse","status","statusText","isRouteErrorResponse","IDLE_NAVIGATION","IDLE_FETCHER","isServer","createRouter","dataRoutes","unlistenHistory","subscribers","savedScrollPositions","getScrollRestorationKey","getScrollPosition","initialScrollRestored","initialMatches","initialErrors","getNotFoundMatches","initialized","m","router","pendingAction","pendingPreventScrollReset","pendingNavigationController","isUninterruptedRevalidation","isRevalidationRequired","cancelledDeferredRoutes","cancelledFetcherLoads","fetchControllers","incrementingLoadId","pendingNavigationLoadId","fetchReloadIds","fetchRedirectIds","fetchLoadMatches","activeDeferreds","initialize","historyAction","startNavigation","dispose","deleteFetcher","subscribe","updateState","newState","completeNavigation","_state$navigation$for","isActionReload","newLoaderData","mergeLoaderData","getSavedScrollPosition","navigate","opts","submission","normalizeNavigateOptions","preventScrollReset","revalidate","interruptActiveLoads","saveScrollPosition","loadingNavigation","notFoundMatches","cancelActiveDeferreds","isHashChangeOnly","request","createRequest","pendingActionData","pendingError","findNearestBoundary","actionOutput","handleAction","shortCircuited","loaderData","errors","handleLoaders","navigation","result","actionMatch","getTargetMatch","getMethodNotAllowedResult","callLoaderOrAction","isRedirectResult","redirectNavigation","startRedirectNavigation","isErrorResult","boundaryMatch","isDeferredResult","overrideNavigation","matchesToLoad","revalidatingFetchers","getMatchesToLoad","routeId","fetcher","revalidatingFetcher","_ref3","results","loaderResults","fetcherResults","callLoadersAndMaybeResolveData","_ref4","findRedirect","getLoaderRedirect","processLoaderData","deferredData","markFetchRedirectsDone","didAbortFetchLoads","abortStaleFetchLoads","getFetcher","fetch","abortFetcher","setFetcherError","handleFetcherAction","handleFetcherLoader","requestMatches","existingFetcher","abortController","fetchRequest","actionResult","loadingFetcher","revalidationRequest","loadId","loadFetcher","_ref5","staleKey","_ref6","_ref7","doneFetcher","resolveDeferredData","redirectHistoryAction","currentMatches","fetchersToLoad","_ref8","fetchMatches","resolveDeferredResults","_ref9","controller","markFetchersDone","keys","doneKeys","landedId","yeetedKeys","predicate","cancelledRouteIds","dfd","enableScrollRestoration","positions","getPosition","getKey","y","userMatches","createUseMatchesMatch","validActionMethods","validRequestMethods","unstable_createStaticHandler","query","methodNotAllowedMatches","getMethodNotAllowedMatches","queryImpl","queryRoute","createRouterErrorResponse","routeData","routeMatch","submit","loadRouteData","e","isQueryRouteResponse","isRedirectResponse","isRouteRequest","method","context","pendingActionError","getLoaderMatchesUntilBoundary","processRouteLoaderData","body","getStaticContextFromError","isFetcher","stripHashFromPath","searchParams","convertFormDataToSearchParams","hasNakedIndexQuery","formMethod","formAction","formEncType","formData","boundaryId","boundaryMatches","navigationMatches","isNewLoader","shouldRevalidateLoader","_ref10","currentLoaderData","currentMatch","isNew","isMissingData","isNewRouteInstance","currentPath","currentLocation","currentUrl","currentParams","nextUrl","nextParams","defaultShouldRevalidate","routeChoice","type","isStaticRequest","resultType","abortPromise","onReject","handler","activeMatches","requestPath","resolvedLocation","contentType","statusCode","foundError","loaderHeaders","mergedLoaderData","getShortCircuitMatches","obj","isRevalidatingLoader","unwrap","pathMatches"],"mappings":"0fAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUA,SAASA,GAAW,CAClB,OAAAA,EAAW,OAAO,OAAS,OAAO,OAAO,KAAK,EAAI,SAAUC,EAAQ,CAClE,QAASC,EAAI,EAAGA,EAAI,UAAU,OAAQA,IAAK,CACzC,IAAIC,EAAS,UAAUD,GAEvB,QAASE,KAAOD,EACV,OAAO,UAAU,eAAe,KAAKA,EAAQC,CAAG,IAClDH,EAAOG,GAAOD,EAAOC,GAG3B,CAEA,OAAOH,CACT,EACOD,EAAS,MAAM,KAAM,SAAS,CACvC,CASA,IAAIK,GAEH,SAAUA,EAAQ,CAQjBA,EAAO,IAAS,MAOhBA,EAAO,KAAU,OAMjBA,EAAO,QAAa,SACtB,GAAGA,IAAWA,EAAS,CAAC,EAAE,E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,IAAW,SACbA,EAAS,IAGG,OAAMhJ,EAAO,aAAa,YAAYjF,CAAM,EAM1D,IAAIiO,EACF,GAAI,CACF,MAAO,CACL,KAAMjV,EAAW,KACjB,KAAMiM,EAAO,aAAa,aAC5B,CACF,OAASwF,EAAP,CAEA,MAAO,CACL,KAAMzR,EAAW,MACjB,MAAOyR,CACT,CACF,CAGF,MAAO,CACL,KAAMzR,EAAW,KACjB,KAAMiM,EAAO,aAAa,IAC5B,EACF,CAEA,SAASuG,GAAmBvU,EAAQ,CAClC,OAAO,IAAI,gBAAgBA,CAAM,EAAE,OAAO,OAAO,EAAE,KAAK6I,GAAKA,IAAM,EAAE,CACvE,CAIA,SAAS6J,GAAsB9N,EAAOgJ,EAAY,CAChD,GAAI,CACF,MAAA3L,EACA,SAAAlC,EACA,OAAAiF,CACF,EAAIJ,EACJ,MAAO,CACL,GAAI3C,EAAM,GACV,SAAAlC,EACA,OAAAiF,EACA,KAAM4I,EAAW3L,EAAM,IACvB,OAAQA,EAAM,MAChB,CACF,CAEA,SAASiM,GAAelL,EAAS5D,EAAU,CACzC,IAAIY,EAAS,OAAOZ,GAAa,SAAWkB,EAAUlB,CAAQ,EAAE,OAASA,EAAS,OAElF,GAAI4D,EAAQA,EAAQ,OAAS,GAAG,MAAM,OAASuR,GAAmBvU,GAAU,EAAE,EAE5E,OAAOgD,EAAQA,EAAQ,OAAS,GAKlC,IAAIiU,EAAc/P,GAA2BlE,CAAO,EACpD,OAAOiU,EAAYA,EAAY,OAAS,EAC1C,C","file":"static/module-remix-run.df834241.js","sourcesContent":["/**\n * @remix-run/router v1.0.3\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Types and Constants\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Actions represent the type of change to a location value.\n */\nvar Action;\n\n(function (Action) {\n /**\n * A POP indicates a change to an arbitrary index in the history stack, such\n * as a back or forward navigation. It does not describe the direction of the\n * navigation, only that the current index changed.\n *\n * Note: This is the default action for newly created history objects.\n */\n Action[\"Pop\"] = \"POP\";\n /**\n * A PUSH indicates a new entry being added to the history stack, such as when\n * a link is clicked and a new page loads. When this happens, all subsequent\n * entries in the stack are lost.\n */\n\n Action[\"Push\"] = \"PUSH\";\n /**\n * A REPLACE indicates the entry at the current index in the history stack\n * being replaced by a new one.\n */\n\n Action[\"Replace\"] = \"REPLACE\";\n})(Action || (Action = {}));\n\nconst PopStateEventType = \"popstate\";\n/**\n * Memory history stores the current location in memory. It is designed for use\n * in stateful non-browser environments like tests and React Native.\n */\n\nfunction createMemoryHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n let {\n initialEntries = [\"/\"],\n initialIndex,\n v5Compat = false\n } = options;\n let entries; // Declare so we can access from createMemoryLocation\n\n entries = initialEntries.map((entry, index) => createMemoryLocation(entry, typeof entry === \"string\" ? null : entry.state, index === 0 ? \"default\" : undefined));\n let index = clampIndex(initialIndex == null ? entries.length - 1 : initialIndex);\n let action = Action.Pop;\n let listener = null;\n\n function clampIndex(n) {\n return Math.min(Math.max(n, 0), entries.length - 1);\n }\n\n function getCurrentLocation() {\n return entries[index];\n }\n\n function createMemoryLocation(to, state, key) {\n if (state === void 0) {\n state = null;\n }\n\n let location = createLocation(entries ? getCurrentLocation().pathname : \"/\", to, state, key);\n warning$1(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in memory history: \" + JSON.stringify(to));\n return location;\n }\n\n let history = {\n get index() {\n return index;\n },\n\n get action() {\n return action;\n },\n\n get location() {\n return getCurrentLocation();\n },\n\n createHref(to) {\n return typeof to === \"string\" ? to : createPath(to);\n },\n\n encodeLocation(location) {\n return location;\n },\n\n push(to, state) {\n action = Action.Push;\n let nextLocation = createMemoryLocation(to, state);\n index += 1;\n entries.splice(index, entries.length, nextLocation);\n\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation\n });\n }\n },\n\n replace(to, state) {\n action = Action.Replace;\n let nextLocation = createMemoryLocation(to, state);\n entries[index] = nextLocation;\n\n if (v5Compat && listener) {\n listener({\n action,\n location: nextLocation\n });\n }\n },\n\n go(delta) {\n action = Action.Pop;\n index = clampIndex(index + delta);\n\n if (listener) {\n listener({\n action,\n location: getCurrentLocation()\n });\n }\n },\n\n listen(fn) {\n listener = fn;\n return () => {\n listener = null;\n };\n }\n\n };\n return history;\n}\n/**\n * Browser history stores the location in regular URLs. This is the standard for\n * most web apps, but it requires some configuration on the server to ensure you\n * serve the same app at multiple URLs.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory\n */\n\nfunction createBrowserHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n function createBrowserLocation(window, globalHistory) {\n let {\n pathname,\n search,\n hash\n } = window.location;\n return createLocation(\"\", {\n pathname,\n search,\n hash\n }, // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n\n function createBrowserHref(window, to) {\n return typeof to === \"string\" ? to : createPath(to);\n }\n\n return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);\n}\n/**\n * Hash history stores the location in window.location.hash. This makes it ideal\n * for situations where you don't want to send the location to the server for\n * some reason, either because you do cannot configure it or the URL space is\n * reserved for something else.\n *\n * @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory\n */\n\nfunction createHashHistory(options) {\n if (options === void 0) {\n options = {};\n }\n\n function createHashLocation(window, globalHistory) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = parsePath(window.location.hash.substr(1));\n return createLocation(\"\", {\n pathname,\n search,\n hash\n }, // state defaults to `null` because `window.history.state` does\n globalHistory.state && globalHistory.state.usr || null, globalHistory.state && globalHistory.state.key || \"default\");\n }\n\n function createHashHref(window, to) {\n let base = window.document.querySelector(\"base\");\n let href = \"\";\n\n if (base && base.getAttribute(\"href\")) {\n let url = window.location.href;\n let hashIndex = url.indexOf(\"#\");\n href = hashIndex === -1 ? url : url.slice(0, hashIndex);\n }\n\n return href + \"#\" + (typeof to === \"string\" ? to : createPath(to));\n }\n\n function validateHashLocation(location, to) {\n warning$1(location.pathname.charAt(0) === \"/\", \"relative pathnames are not supported in hash history.push(\" + JSON.stringify(to) + \")\");\n }\n\n return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region UTILS\n////////////////////////////////////////////////////////////////////////////////\n\nfunction warning$1(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging history!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n\nfunction createKey() {\n return Math.random().toString(36).substr(2, 8);\n}\n/**\n * For browser-based histories, we combine the state and key into an object\n */\n\n\nfunction getHistoryState(location) {\n return {\n usr: location.state,\n key: location.key\n };\n}\n/**\n * Creates a Location object with a unique key from the given Path\n */\n\n\nfunction createLocation(current, to, state, key) {\n if (state === void 0) {\n state = null;\n }\n\n let location = _extends({\n pathname: typeof current === \"string\" ? current : current.pathname,\n search: \"\",\n hash: \"\"\n }, typeof to === \"string\" ? parsePath(to) : to, {\n state,\n // TODO: This could be cleaned up. push/replace should probably just take\n // full Locations now and avoid the need to run through this flow at all\n // But that's a pretty big refactor to the current test suite so going to\n // keep as is for the time being and just let any incoming keys take precedence\n key: to && to.key || key || createKey()\n });\n\n return location;\n}\n/**\n * Creates a string URL path from the given pathname, search, and hash components.\n */\n\nfunction createPath(_ref) {\n let {\n pathname = \"/\",\n search = \"\",\n hash = \"\"\n } = _ref;\n if (search && search !== \"?\") pathname += search.charAt(0) === \"?\" ? search : \"?\" + search;\n if (hash && hash !== \"#\") pathname += hash.charAt(0) === \"#\" ? hash : \"#\" + hash;\n return pathname;\n}\n/**\n * Parses a string URL path into its separate pathname, search, and hash components.\n */\n\nfunction parsePath(path) {\n let parsedPath = {};\n\n if (path) {\n let hashIndex = path.indexOf(\"#\");\n\n if (hashIndex >= 0) {\n parsedPath.hash = path.substr(hashIndex);\n path = path.substr(0, hashIndex);\n }\n\n let searchIndex = path.indexOf(\"?\");\n\n if (searchIndex >= 0) {\n parsedPath.search = path.substr(searchIndex);\n path = path.substr(0, searchIndex);\n }\n\n if (path) {\n parsedPath.pathname = path;\n }\n }\n\n return parsedPath;\n}\nfunction createURL(location) {\n // window.location.origin is \"null\" (the literal string value) in Firefox\n // under certain conditions, notably when serving from a local HTML file\n // See https://bugzilla.mozilla.org/show_bug.cgi?id=878297\n let base = typeof window !== \"undefined\" && typeof window.location !== \"undefined\" && window.location.origin !== \"null\" ? window.location.origin : \"unknown://unknown\";\n let href = typeof location === \"string\" ? location : createPath(location);\n return new URL(href, base);\n}\n\nfunction getUrlBasedHistory(getLocation, createHref, validateLocation, options) {\n if (options === void 0) {\n options = {};\n }\n\n let {\n window = document.defaultView,\n v5Compat = false\n } = options;\n let globalHistory = window.history;\n let action = Action.Pop;\n let listener = null;\n\n function handlePop() {\n action = Action.Pop;\n\n if (listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n function push(to, state) {\n action = Action.Push;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n let historyState = getHistoryState(location);\n let url = history.createHref(location); // try...catch because iOS limits us to 100 pushState calls :/\n\n try {\n globalHistory.pushState(historyState, \"\", url);\n } catch (error) {\n // They are going to lose state here, but there is no real\n // way to warn them about it since the page will refresh...\n window.location.assign(url);\n }\n\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n function replace(to, state) {\n action = Action.Replace;\n let location = createLocation(history.location, to, state);\n if (validateLocation) validateLocation(location, to);\n let historyState = getHistoryState(location);\n let url = history.createHref(location);\n globalHistory.replaceState(historyState, \"\", url);\n\n if (v5Compat && listener) {\n listener({\n action,\n location: history.location\n });\n }\n }\n\n let history = {\n get action() {\n return action;\n },\n\n get location() {\n return getLocation(window, globalHistory);\n },\n\n listen(fn) {\n if (listener) {\n throw new Error(\"A history only accepts one active listener\");\n }\n\n window.addEventListener(PopStateEventType, handlePop);\n listener = fn;\n return () => {\n window.removeEventListener(PopStateEventType, handlePop);\n listener = null;\n };\n },\n\n createHref(to) {\n return createHref(window, to);\n },\n\n encodeLocation(location) {\n // Encode a Location the same way window.location would\n let url = createURL(createPath(location));\n return _extends({}, location, {\n pathname: url.pathname,\n search: url.search,\n hash: url.hash\n });\n },\n\n push,\n replace,\n\n go(n) {\n return globalHistory.go(n);\n }\n\n };\n return history;\n} //#endregion\n\nvar ResultType;\n\n(function (ResultType) {\n ResultType[\"data\"] = \"data\";\n ResultType[\"deferred\"] = \"deferred\";\n ResultType[\"redirect\"] = \"redirect\";\n ResultType[\"error\"] = \"error\";\n})(ResultType || (ResultType = {}));\n\nfunction isIndexRoute(route) {\n return route.index === true;\n} // Walk the route tree generating unique IDs where necessary so we are working\n// solely with AgnosticDataRouteObject's within the Router\n\n\nfunction convertRoutesToDataRoutes(routes, parentPath, allIds) {\n if (parentPath === void 0) {\n parentPath = [];\n }\n\n if (allIds === void 0) {\n allIds = new Set();\n }\n\n return routes.map((route, index) => {\n let treePath = [...parentPath, index];\n let id = typeof route.id === \"string\" ? route.id : treePath.join(\"-\");\n invariant(route.index !== true || !route.children, \"Cannot specify children on an index route\");\n invariant(!allIds.has(id), \"Found a route id collision on id \\\"\" + id + \"\\\". Route \" + \"id's must be globally unique within Data Router usages\");\n allIds.add(id);\n\n if (isIndexRoute(route)) {\n let indexRoute = _extends({}, route, {\n id\n });\n\n return indexRoute;\n } else {\n let pathOrLayoutRoute = _extends({}, route, {\n id,\n children: route.children ? convertRoutesToDataRoutes(route.children, treePath, allIds) : undefined\n });\n\n return pathOrLayoutRoute;\n }\n });\n}\n/**\n * Matches the given routes to a location and returns the match data.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/match-routes\n */\n\nfunction matchRoutes(routes, locationArg, basename) {\n if (basename === void 0) {\n basename = \"/\";\n }\n\n let location = typeof locationArg === \"string\" ? parsePath(locationArg) : locationArg;\n let pathname = stripBasename(location.pathname || \"/\", basename);\n\n if (pathname == null) {\n return null;\n }\n\n let branches = flattenRoutes(routes);\n rankRouteBranches(branches);\n let matches = null;\n\n for (let i = 0; matches == null && i < branches.length; ++i) {\n matches = matchRouteBranch(branches[i], // Incoming pathnames are generally encoded from either window.location\n // or from router.navigate, but we want to match against the unencoded\n // paths in the route definitions. Memory router locations won't be\n // encoded here but there also shouldn't be anything to decode so this\n // should be a safe operation. This avoids needing matchRoutes to be\n // history-aware.\n safelyDecodeURI(pathname));\n }\n\n return matches;\n}\n\nfunction flattenRoutes(routes, branches, parentsMeta, parentPath) {\n if (branches === void 0) {\n branches = [];\n }\n\n if (parentsMeta === void 0) {\n parentsMeta = [];\n }\n\n if (parentPath === void 0) {\n parentPath = \"\";\n }\n\n routes.forEach((route, index) => {\n let meta = {\n relativePath: route.path || \"\",\n caseSensitive: route.caseSensitive === true,\n childrenIndex: index,\n route\n };\n\n if (meta.relativePath.startsWith(\"/\")) {\n invariant(meta.relativePath.startsWith(parentPath), \"Absolute route path \\\"\" + meta.relativePath + \"\\\" nested under path \" + (\"\\\"\" + parentPath + \"\\\" is not valid. An absolute child route path \") + \"must start with the combined path of all its parent routes.\");\n meta.relativePath = meta.relativePath.slice(parentPath.length);\n }\n\n let path = joinPaths([parentPath, meta.relativePath]);\n let routesMeta = parentsMeta.concat(meta); // Add the children before adding this route to the array so we traverse the\n // route tree depth-first and child routes appear before their parents in\n // the \"flattened\" version.\n\n if (route.children && route.children.length > 0) {\n invariant( // Our types know better, but runtime JS may not!\n // @ts-expect-error\n route.index !== true, \"Index routes must not have child routes. Please remove \" + (\"all child routes from route path \\\"\" + path + \"\\\".\"));\n flattenRoutes(route.children, branches, routesMeta, path);\n } // Routes without a path shouldn't ever match by themselves unless they are\n // index routes, so don't add them to the list of possible branches.\n\n\n if (route.path == null && !route.index) {\n return;\n }\n\n branches.push({\n path,\n score: computeScore(path, route.index),\n routesMeta\n });\n });\n return branches;\n}\n\nfunction rankRouteBranches(branches) {\n branches.sort((a, b) => a.score !== b.score ? b.score - a.score // Higher score first\n : compareIndexes(a.routesMeta.map(meta => meta.childrenIndex), b.routesMeta.map(meta => meta.childrenIndex)));\n}\n\nconst paramRe = /^:\\w+$/;\nconst dynamicSegmentValue = 3;\nconst indexRouteValue = 2;\nconst emptySegmentValue = 1;\nconst staticSegmentValue = 10;\nconst splatPenalty = -2;\n\nconst isSplat = s => s === \"*\";\n\nfunction computeScore(path, index) {\n let segments = path.split(\"/\");\n let initialScore = segments.length;\n\n if (segments.some(isSplat)) {\n initialScore += splatPenalty;\n }\n\n if (index) {\n initialScore += indexRouteValue;\n }\n\n return segments.filter(s => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === \"\" ? emptySegmentValue : staticSegmentValue), initialScore);\n}\n\nfunction compareIndexes(a, b) {\n let siblings = a.length === b.length && a.slice(0, -1).every((n, i) => n === b[i]);\n return siblings ? // If two routes are siblings, we should try to match the earlier sibling\n // first. This allows people to have fine-grained control over the matching\n // behavior by simply putting routes with identical paths in the order they\n // want them tried.\n a[a.length - 1] - b[b.length - 1] : // Otherwise, it doesn't really make sense to rank non-siblings by index,\n // so they sort equally.\n 0;\n}\n\nfunction matchRouteBranch(branch, pathname) {\n let {\n routesMeta\n } = branch;\n let matchedParams = {};\n let matchedPathname = \"/\";\n let matches = [];\n\n for (let i = 0; i < routesMeta.length; ++i) {\n let meta = routesMeta[i];\n let end = i === routesMeta.length - 1;\n let remainingPathname = matchedPathname === \"/\" ? pathname : pathname.slice(matchedPathname.length) || \"/\";\n let match = matchPath({\n path: meta.relativePath,\n caseSensitive: meta.caseSensitive,\n end\n }, remainingPathname);\n if (!match) return null;\n Object.assign(matchedParams, match.params);\n let route = meta.route;\n matches.push({\n // TODO: Can this as be avoided?\n params: matchedParams,\n pathname: joinPaths([matchedPathname, match.pathname]),\n pathnameBase: normalizePathname(joinPaths([matchedPathname, match.pathnameBase])),\n route\n });\n\n if (match.pathnameBase !== \"/\") {\n matchedPathname = joinPaths([matchedPathname, match.pathnameBase]);\n }\n }\n\n return matches;\n}\n/**\n * Returns a path with params interpolated.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/generate-path\n */\n\n\nfunction generatePath(path, params) {\n if (params === void 0) {\n params = {};\n }\n\n return path.replace(/:(\\w+)/g, (_, key) => {\n invariant(params[key] != null, \"Missing \\\":\" + key + \"\\\" param\");\n return params[key];\n }).replace(/(\\/?)\\*/, (_, prefix, __, str) => {\n const star = \"*\";\n\n if (params[star] == null) {\n // If no splat was provided, trim the trailing slash _unless_ it's\n // the entire path\n return str === \"/*\" ? \"/\" : \"\";\n } // Apply the splat\n\n\n return \"\" + prefix + params[star];\n });\n}\n/**\n * Performs pattern matching on a URL pathname and returns information about\n * the match.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/match-path\n */\n\nfunction matchPath(pattern, pathname) {\n if (typeof pattern === \"string\") {\n pattern = {\n path: pattern,\n caseSensitive: false,\n end: true\n };\n }\n\n let [matcher, paramNames] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);\n let match = pathname.match(matcher);\n if (!match) return null;\n let matchedPathname = match[0];\n let pathnameBase = matchedPathname.replace(/(.)\\/+$/, \"$1\");\n let captureGroups = match.slice(1);\n let params = paramNames.reduce((memo, paramName, index) => {\n // We need to compute the pathnameBase here using the raw splat value\n // instead of using params[\"*\"] later because it will be decoded then\n if (paramName === \"*\") {\n let splatValue = captureGroups[index] || \"\";\n pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\\/+$/, \"$1\");\n }\n\n memo[paramName] = safelyDecodeURIComponent(captureGroups[index] || \"\", paramName);\n return memo;\n }, {});\n return {\n params,\n pathname: matchedPathname,\n pathnameBase,\n pattern\n };\n}\n\nfunction compilePath(path, caseSensitive, end) {\n if (caseSensitive === void 0) {\n caseSensitive = false;\n }\n\n if (end === void 0) {\n end = true;\n }\n\n warning(path === \"*\" || !path.endsWith(\"*\") || path.endsWith(\"/*\"), \"Route path \\\"\" + path + \"\\\" will be treated as if it were \" + (\"\\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\" because the `*` character must \") + \"always follow a `/` in the pattern. To get rid of this warning, \" + (\"please change the route path to \\\"\" + path.replace(/\\*$/, \"/*\") + \"\\\".\"));\n let paramNames = [];\n let regexpSource = \"^\" + path.replace(/\\/*\\*?$/, \"\") // Ignore trailing / and /*, we'll handle it below\n .replace(/^\\/*/, \"/\") // Make sure it has a leading /\n .replace(/[\\\\.*+^$?{}|()[\\]]/g, \"\\\\$&\") // Escape special regex chars\n .replace(/:(\\w+)/g, (_, paramName) => {\n paramNames.push(paramName);\n return \"([^\\\\/]+)\";\n });\n\n if (path.endsWith(\"*\")) {\n paramNames.push(\"*\");\n regexpSource += path === \"*\" || path === \"/*\" ? \"(.*)$\" // Already matched the initial /, just match the rest\n : \"(?:\\\\/(.+)|\\\\/*)$\"; // Don't include the / in params[\"*\"]\n } else if (end) {\n // When matching to the end, ignore trailing slashes\n regexpSource += \"\\\\/*$\";\n } else if (path !== \"\" && path !== \"/\") {\n // If our path is non-empty and contains anything beyond an initial slash,\n // then we have _some_ form of path in our regex so we should expect to\n // match only if we find the end of this path segment. Look for an optional\n // non-captured trailing slash (to match a portion of the URL) or the end\n // of the path (if we've matched to the end). We used to do this with a\n // word boundary but that gives false positives on routes like\n // /user-preferences since `-` counts as a word boundary.\n regexpSource += \"(?:(?=\\\\/|$))\";\n } else ;\n\n let matcher = new RegExp(regexpSource, caseSensitive ? undefined : \"i\");\n return [matcher, paramNames];\n}\n\nfunction safelyDecodeURI(value) {\n try {\n return decodeURI(value);\n } catch (error) {\n warning(false, \"The URL path \\\"\" + value + \"\\\" could not be decoded because it is is a \" + \"malformed URL segment. This is probably due to a bad percent \" + (\"encoding (\" + error + \").\"));\n return value;\n }\n}\n\nfunction safelyDecodeURIComponent(value, paramName) {\n try {\n return decodeURIComponent(value);\n } catch (error) {\n warning(false, \"The value for the URL param \\\"\" + paramName + \"\\\" will not be decoded because\" + (\" the string \\\"\" + value + \"\\\" is a malformed URL segment. This is probably\") + (\" due to a bad percent encoding (\" + error + \").\"));\n return value;\n }\n}\n/**\n * @private\n */\n\n\nfunction stripBasename(pathname, basename) {\n if (basename === \"/\") return pathname;\n\n if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {\n return null;\n } // We want to leave trailing slash behavior in the user's control, so if they\n // specify a basename with a trailing slash, we should support it\n\n\n let startIndex = basename.endsWith(\"/\") ? basename.length - 1 : basename.length;\n let nextChar = pathname.charAt(startIndex);\n\n if (nextChar && nextChar !== \"/\") {\n // pathname does not start with basename/\n return null;\n }\n\n return pathname.slice(startIndex) || \"/\";\n}\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n/**\n * @private\n */\n\nfunction warning(cond, message) {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging React Router!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message); // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n/**\n * Returns a resolved path object relative to the given pathname.\n *\n * @see https://reactrouter.com/docs/en/v6/utils/resolve-path\n */\n\nfunction resolvePath(to, fromPathname) {\n if (fromPathname === void 0) {\n fromPathname = \"/\";\n }\n\n let {\n pathname: toPathname,\n search = \"\",\n hash = \"\"\n } = typeof to === \"string\" ? parsePath(to) : to;\n let pathname = toPathname ? toPathname.startsWith(\"/\") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;\n return {\n pathname,\n search: normalizeSearch(search),\n hash: normalizeHash(hash)\n };\n}\n\nfunction resolvePathname(relativePath, fromPathname) {\n let segments = fromPathname.replace(/\\/+$/, \"\").split(\"/\");\n let relativeSegments = relativePath.split(\"/\");\n relativeSegments.forEach(segment => {\n if (segment === \"..\") {\n // Keep the root \"\" segment so the pathname starts at /\n if (segments.length > 1) segments.pop();\n } else if (segment !== \".\") {\n segments.push(segment);\n }\n });\n return segments.length > 1 ? segments.join(\"/\") : \"/\";\n}\n\nfunction getInvalidPathError(char, field, dest, path) {\n return \"Cannot include a '\" + char + \"' character in a manually specified \" + (\"`to.\" + field + \"` field [\" + JSON.stringify(path) + \"]. Please separate it out to the \") + (\"`to.\" + dest + \"` field. Alternatively you may provide the full path as \") + \"a string in <Link to=\\\"...\\\"> and the router will parse it for you.\";\n}\n/**\n * @private\n *\n * When processing relative navigation we want to ignore ancestor routes that\n * do not contribute to the path, such that index/pathless layout routes don't\n * interfere.\n *\n * For example, when moving a route element into an index route and/or a\n * pathless layout route, relative link behavior contained within should stay\n * the same. Both of the following examples should link back to the root:\n *\n * <Route path=\"/\">\n * <Route path=\"accounts\" element={<Link to=\"..\"}>\n * </Route>\n *\n * <Route path=\"/\">\n * <Route path=\"accounts\">\n * <Route element={<AccountsLayout />}> // <-- Does not contribute\n * <Route index element={<Link to=\"..\"} /> // <-- Does not contribute\n * </Route\n * </Route>\n * </Route>\n */\n\n\nfunction getPathContributingMatches(matches) {\n return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);\n}\n/**\n * @private\n */\n\nfunction resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {\n if (isPathRelative === void 0) {\n isPathRelative = false;\n }\n\n let to;\n\n if (typeof toArg === \"string\") {\n to = parsePath(toArg);\n } else {\n to = _extends({}, toArg);\n invariant(!to.pathname || !to.pathname.includes(\"?\"), getInvalidPathError(\"?\", \"pathname\", \"search\", to));\n invariant(!to.pathname || !to.pathname.includes(\"#\"), getInvalidPathError(\"#\", \"pathname\", \"hash\", to));\n invariant(!to.search || !to.search.includes(\"#\"), getInvalidPathError(\"#\", \"search\", \"hash\", to));\n }\n\n let isEmptyPath = toArg === \"\" || to.pathname === \"\";\n let toPathname = isEmptyPath ? \"/\" : to.pathname;\n let from; // Routing is relative to the current pathname if explicitly requested.\n //\n // If a pathname is explicitly provided in `to`, it should be relative to the\n // route context. This is explained in `Note on `<Link to>` values` in our\n // migration guide from v5 as a means of disambiguation between `to` values\n // that begin with `/` and those that do not. However, this is problematic for\n // `to` values that do not provide a pathname. `to` can simply be a search or\n // hash string, in which case we should assume that the navigation is relative\n // to the current location's pathname and *not* the route pathname.\n\n if (isPathRelative || toPathname == null) {\n from = locationPathname;\n } else {\n let routePathnameIndex = routePathnames.length - 1;\n\n if (toPathname.startsWith(\"..\")) {\n let toSegments = toPathname.split(\"/\"); // Each leading .. segment means \"go up one route\" instead of \"go up one\n // URL segment\". This is a key difference from how <a href> works and a\n // major reason we call this a \"to\" value instead of a \"href\".\n\n while (toSegments[0] === \"..\") {\n toSegments.shift();\n routePathnameIndex -= 1;\n }\n\n to.pathname = toSegments.join(\"/\");\n } // If there are more \"..\" segments than parent routes, resolve relative to\n // the root / URL.\n\n\n from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : \"/\";\n }\n\n let path = resolvePath(to, from); // Ensure the pathname has a trailing slash if the original \"to\" had one\n\n let hasExplicitTrailingSlash = toPathname && toPathname !== \"/\" && toPathname.endsWith(\"/\"); // Or if this was a link to the current path which has a trailing slash\n\n let hasCurrentTrailingSlash = (isEmptyPath || toPathname === \".\") && locationPathname.endsWith(\"/\");\n\n if (!path.pathname.endsWith(\"/\") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {\n path.pathname += \"/\";\n }\n\n return path;\n}\n/**\n * @private\n */\n\nfunction getToPathname(to) {\n // Empty strings should be treated the same as / paths\n return to === \"\" || to.pathname === \"\" ? \"/\" : typeof to === \"string\" ? parsePath(to).pathname : to.pathname;\n}\n/**\n * @private\n */\n\nconst joinPaths = paths => paths.join(\"/\").replace(/\\/\\/+/g, \"/\");\n/**\n * @private\n */\n\nconst normalizePathname = pathname => pathname.replace(/\\/+$/, \"\").replace(/^\\/*/, \"/\");\n/**\n * @private\n */\n\nconst normalizeSearch = search => !search || search === \"?\" ? \"\" : search.startsWith(\"?\") ? search : \"?\" + search;\n/**\n * @private\n */\n\nconst normalizeHash = hash => !hash || hash === \"#\" ? \"\" : hash.startsWith(\"#\") ? hash : \"#\" + hash;\n/**\n * This is a shortcut for creating `application/json` responses. Converts `data`\n * to JSON and sets the `Content-Type` header.\n */\n\nconst json = function json(data, init) {\n if (init === void 0) {\n init = {};\n }\n\n let responseInit = typeof init === \"number\" ? {\n status: init\n } : init;\n let headers = new Headers(responseInit.headers);\n\n if (!headers.has(\"Content-Type\")) {\n headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n }\n\n return new Response(JSON.stringify(data), _extends({}, responseInit, {\n headers\n }));\n};\nclass AbortedDeferredError extends Error {}\nclass DeferredData {\n constructor(data) {\n this.pendingKeys = new Set();\n this.subscriber = undefined;\n invariant(data && typeof data === \"object\" && !Array.isArray(data), \"defer() only accepts plain objects\"); // Set up an AbortController + Promise we can race against to exit early\n // cancellation\n\n let reject;\n this.abortPromise = new Promise((_, r) => reject = r);\n this.controller = new AbortController();\n\n let onAbort = () => reject(new AbortedDeferredError(\"Deferred data aborted\"));\n\n this.unlistenAbortSignal = () => this.controller.signal.removeEventListener(\"abort\", onAbort);\n\n this.controller.signal.addEventListener(\"abort\", onAbort);\n this.data = Object.entries(data).reduce((acc, _ref) => {\n let [key, value] = _ref;\n return Object.assign(acc, {\n [key]: this.trackPromise(key, value)\n });\n }, {});\n }\n\n trackPromise(key, value) {\n if (!(value instanceof Promise)) {\n return value;\n }\n\n this.pendingKeys.add(key); // We store a little wrapper promise that will be extended with\n // _data/_error props upon resolve/reject\n\n let promise = Promise.race([value, this.abortPromise]).then(data => this.onSettle(promise, key, null, data), error => this.onSettle(promise, key, error)); // Register rejection listeners to avoid uncaught promise rejections on\n // errors or aborted deferred values\n\n promise.catch(() => {});\n Object.defineProperty(promise, \"_tracked\", {\n get: () => true\n });\n return promise;\n }\n\n onSettle(promise, key, error, data) {\n if (this.controller.signal.aborted && error instanceof AbortedDeferredError) {\n this.unlistenAbortSignal();\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n return Promise.reject(error);\n }\n\n this.pendingKeys.delete(key);\n\n if (this.done) {\n // Nothing left to abort!\n this.unlistenAbortSignal();\n }\n\n const subscriber = this.subscriber;\n\n if (error) {\n Object.defineProperty(promise, \"_error\", {\n get: () => error\n });\n subscriber && subscriber(false);\n return Promise.reject(error);\n }\n\n Object.defineProperty(promise, \"_data\", {\n get: () => data\n });\n subscriber && subscriber(false);\n return data;\n }\n\n subscribe(fn) {\n this.subscriber = fn;\n }\n\n cancel() {\n this.controller.abort();\n this.pendingKeys.forEach((v, k) => this.pendingKeys.delete(k));\n let subscriber = this.subscriber;\n subscriber && subscriber(true);\n }\n\n async resolveData(signal) {\n let aborted = false;\n\n if (!this.done) {\n let onAbort = () => this.cancel();\n\n signal.addEventListener(\"abort\", onAbort);\n aborted = await new Promise(resolve => {\n this.subscribe(aborted => {\n signal.removeEventListener(\"abort\", onAbort);\n\n if (aborted || this.done) {\n resolve(aborted);\n }\n });\n });\n }\n\n return aborted;\n }\n\n get done() {\n return this.pendingKeys.size === 0;\n }\n\n get unwrappedData() {\n invariant(this.data !== null && this.done, \"Can only unwrap data on initialized and settled deferreds\");\n return Object.entries(this.data).reduce((acc, _ref2) => {\n let [key, value] = _ref2;\n return Object.assign(acc, {\n [key]: unwrapTrackedPromise(value)\n });\n }, {});\n }\n\n}\n\nfunction isTrackedPromise(value) {\n return value instanceof Promise && value._tracked === true;\n}\n\nfunction unwrapTrackedPromise(value) {\n if (!isTrackedPromise(value)) {\n return value;\n }\n\n if (value._error) {\n throw value._error;\n }\n\n return value._data;\n}\n\nfunction defer(data) {\n return new DeferredData(data);\n}\n/**\n * A redirect response. Sets the status code and the `Location` header.\n * Defaults to \"302 Found\".\n */\n\nconst redirect = function redirect(url, init) {\n if (init === void 0) {\n init = 302;\n }\n\n let responseInit = init;\n\n if (typeof responseInit === \"number\") {\n responseInit = {\n status: responseInit\n };\n } else if (typeof responseInit.status === \"undefined\") {\n responseInit.status = 302;\n }\n\n let headers = new Headers(responseInit.headers);\n headers.set(\"Location\", url);\n return new Response(null, _extends({}, responseInit, {\n headers\n }));\n};\n/**\n * @private\n * Utility class we use to hold auto-unwrapped 4xx/5xx Response bodies\n */\n\nclass ErrorResponse {\n constructor(status, statusText, data) {\n this.status = status;\n this.statusText = statusText || \"\";\n this.data = data;\n }\n\n}\n/**\n * Check if the given error is an ErrorResponse generated from a 4xx/5xx\n * Response throw from an action/loader\n */\n\nfunction isRouteErrorResponse(e) {\n return e instanceof ErrorResponse;\n}\n\nconst IDLE_NAVIGATION = {\n state: \"idle\",\n location: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n};\nconst isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.document.createElement !== \"undefined\";\nconst isServer = !isBrowser; //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createRouter\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Create a router and listen to history POP navigations\n */\n\nfunction createRouter(init) {\n invariant(init.routes.length > 0, \"You must provide a non-empty routes array to createRouter\");\n let dataRoutes = convertRoutesToDataRoutes(init.routes); // Cleanup function for history\n\n let unlistenHistory = null; // Externally-provided functions to call on all state changes\n\n let subscribers = new Set(); // Externally-provided object to hold scroll restoration locations during routing\n\n let savedScrollPositions = null; // Externally-provided function to get scroll restoration keys\n\n let getScrollRestorationKey = null; // Externally-provided function to get current scroll position\n\n let getScrollPosition = null; // One-time flag to control the initial hydration scroll restoration. Because\n // we don't get the saved positions from <ScrollRestoration /> until _after_\n // the initial render, we need to manually trigger a separate updateState to\n // send along the restoreScrollPosition\n\n let initialScrollRestored = false;\n let initialMatches = matchRoutes(dataRoutes, init.history.location, init.basename);\n let initialErrors = null;\n\n if (initialMatches == null) {\n // If we do not match a user-provided-route, fall back to the root\n // to allow the error boundary to take over\n let {\n matches,\n route,\n error\n } = getNotFoundMatches(dataRoutes);\n initialMatches = matches;\n initialErrors = {\n [route.id]: error\n };\n }\n\n let initialized = !initialMatches.some(m => m.route.loader) || init.hydrationData != null;\n let router;\n let state = {\n historyAction: init.history.action,\n location: init.history.location,\n matches: initialMatches,\n initialized,\n navigation: IDLE_NAVIGATION,\n restoreScrollPosition: null,\n preventScrollReset: false,\n revalidation: \"idle\",\n loaderData: init.hydrationData && init.hydrationData.loaderData || {},\n actionData: init.hydrationData && init.hydrationData.actionData || null,\n errors: init.hydrationData && init.hydrationData.errors || initialErrors,\n fetchers: new Map()\n }; // -- Stateful internal variables to manage navigations --\n // Current navigation in progress (to be committed in completeNavigation)\n\n let pendingAction = Action.Pop; // Should the current navigation prevent the scroll reset if scroll cannot\n // be restored?\n\n let pendingPreventScrollReset = false; // AbortController for the active navigation\n\n let pendingNavigationController; // We use this to avoid touching history in completeNavigation if a\n // revalidation is entirely uninterrupted\n\n let isUninterruptedRevalidation = false; // Use this internal flag to force revalidation of all loaders:\n // - submissions (completed or interrupted)\n // - useRevalidate()\n // - X-Remix-Revalidate (from redirect)\n\n let isRevalidationRequired = false; // Use this internal array to capture routes that require revalidation due\n // to a cancelled deferred on action submission\n\n let cancelledDeferredRoutes = []; // Use this internal array to capture fetcher loads that were cancelled by an\n // action navigation and require revalidation\n\n let cancelledFetcherLoads = []; // AbortControllers for any in-flight fetchers\n\n let fetchControllers = new Map(); // Track loads based on the order in which they started\n\n let incrementingLoadId = 0; // Track the outstanding pending navigation data load to be compared against\n // the globally incrementing load when a fetcher load lands after a completed\n // navigation\n\n let pendingNavigationLoadId = -1; // Fetchers that triggered data reloads as a result of their actions\n\n let fetchReloadIds = new Map(); // Fetchers that triggered redirect navigations from their actions\n\n let fetchRedirectIds = new Set(); // Most recent href/match for fetcher.load calls for fetchers\n\n let fetchLoadMatches = new Map(); // Store DeferredData instances for active route matches. When a\n // route loader returns defer() we stick one in here. Then, when a nested\n // promise resolves we update loaderData. If a new navigation starts we\n // cancel active deferreds for eliminated routes.\n\n let activeDeferreds = new Map(); // Initialize the router, all side effects should be kicked off from here.\n // Implemented as a Fluent API for ease of:\n // let router = createRouter(init).initialize();\n\n function initialize() {\n // If history informs us of a POP navigation, start the navigation but do not update\n // state. We'll update our own state once the navigation completes\n unlistenHistory = init.history.listen(_ref => {\n let {\n action: historyAction,\n location\n } = _ref;\n return startNavigation(historyAction, location);\n }); // Kick off initial data load if needed. Use Pop to avoid modifying history\n\n if (!state.initialized) {\n startNavigation(Action.Pop, state.location);\n }\n\n return router;\n } // Clean up a router and it's side effects\n\n\n function dispose() {\n if (unlistenHistory) {\n unlistenHistory();\n }\n\n subscribers.clear();\n pendingNavigationController && pendingNavigationController.abort();\n state.fetchers.forEach((_, key) => deleteFetcher(key));\n } // Subscribe to state updates for the router\n\n\n function subscribe(fn) {\n subscribers.add(fn);\n return () => subscribers.delete(fn);\n } // Update our state and notify the calling context of the change\n\n\n function updateState(newState) {\n state = _extends({}, state, newState);\n subscribers.forEach(subscriber => subscriber(state));\n } // Complete a navigation returning the state.navigation back to the IDLE_NAVIGATION\n // and setting state.[historyAction/location/matches] to the new route.\n // - Location is a required param\n // - Navigation will always be set to IDLE_NAVIGATION\n // - Can pass any other state in newState\n\n\n function completeNavigation(location, newState) {\n var _state$navigation$for;\n\n // Deduce if we're in a loading/actionReload state:\n // - We have committed actionData in the store\n // - The current navigation was a submission\n // - We're past the submitting state and into the loading state\n // - The location we've finished loading is different from the submission\n // location, indicating we redirected from the action (avoids false\n // positives for loading/submissionRedirect when actionData returned\n // on a prior submission)\n let isActionReload = state.actionData != null && state.navigation.formMethod != null && state.navigation.state === \"loading\" && ((_state$navigation$for = state.navigation.formAction) == null ? void 0 : _state$navigation$for.split(\"?\")[0]) === location.pathname; // Always preserve any existing loaderData from re-used routes\n\n let newLoaderData = newState.loaderData ? {\n loaderData: mergeLoaderData(state.loaderData, newState.loaderData, newState.matches || [])\n } : {};\n updateState(_extends({}, isActionReload ? {} : {\n actionData: null\n }, newState, newLoaderData, {\n historyAction: pendingAction,\n location,\n initialized: true,\n navigation: IDLE_NAVIGATION,\n revalidation: \"idle\",\n // Don't restore on submission navigations\n restoreScrollPosition: state.navigation.formData ? false : getSavedScrollPosition(location, newState.matches || state.matches),\n preventScrollReset: pendingPreventScrollReset\n }));\n\n if (isUninterruptedRevalidation) ; else if (pendingAction === Action.Pop) ; else if (pendingAction === Action.Push) {\n init.history.push(location, location.state);\n } else if (pendingAction === Action.Replace) {\n init.history.replace(location, location.state);\n } // Reset stateful navigation vars\n\n\n pendingAction = Action.Pop;\n pendingPreventScrollReset = false;\n isUninterruptedRevalidation = false;\n isRevalidationRequired = false;\n cancelledDeferredRoutes = [];\n cancelledFetcherLoads = [];\n } // Trigger a navigation event, which can either be a numerical POP or a PUSH\n // replace with an optional submission\n\n\n async function navigate(to, opts) {\n if (typeof to === \"number\") {\n init.history.go(to);\n return;\n }\n\n let {\n path,\n submission,\n error\n } = normalizeNavigateOptions(to, opts);\n let location = createLocation(state.location, path, opts && opts.state); // When using navigate as a PUSH/REPLACE we aren't reading an already-encoded\n // URL from window.location, so we need to encode it here so the behavior\n // remains the same as POP and non-data-router usages. new URL() does all\n // the same encoding we'd get from a history.pushState/window.location read\n // without having to touch history\n\n location = init.history.encodeLocation(location);\n let historyAction = (opts && opts.replace) === true || submission != null ? Action.Replace : Action.Push;\n let preventScrollReset = opts && \"preventScrollReset\" in opts ? opts.preventScrollReset === true : undefined;\n return await startNavigation(historyAction, location, {\n submission,\n // Send through the formData serialization error if we have one so we can\n // render at the right error boundary after we match routes\n pendingError: error,\n preventScrollReset,\n replace: opts && opts.replace\n });\n } // Revalidate all current loaders. If a navigation is in progress or if this\n // is interrupted by a navigation, allow this to \"succeed\" by calling all\n // loaders during the next loader round\n\n\n function revalidate() {\n interruptActiveLoads();\n updateState({\n revalidation: \"loading\"\n }); // If we're currently submitting an action, we don't need to start a new\n // navigation, we'll just let the follow up loader execution call all loaders\n\n if (state.navigation.state === \"submitting\") {\n return;\n } // If we're currently in an idle state, start a new navigation for the current\n // action/location and mark it as uninterrupted, which will skip the history\n // update in completeNavigation\n\n\n if (state.navigation.state === \"idle\") {\n startNavigation(state.historyAction, state.location, {\n startUninterruptedRevalidation: true\n });\n return;\n } // Otherwise, if we're currently in a loading state, just start a new\n // navigation to the navigation.location but do not trigger an uninterrupted\n // revalidation so that history correctly updates once the navigation completes\n\n\n startNavigation(pendingAction || state.historyAction, state.navigation.location, {\n overrideNavigation: state.navigation\n });\n } // Start a navigation to the given action/location. Can optionally provide a\n // overrideNavigation which will override the normalLoad in the case of a redirect\n // navigation\n\n\n async function startNavigation(historyAction, location, opts) {\n // Abort any in-progress navigations and start a new one. Unset any ongoing\n // uninterrupted revalidations unless told otherwise, since we want this\n // new navigation to update history normally\n pendingNavigationController && pendingNavigationController.abort();\n pendingNavigationController = null;\n pendingAction = historyAction;\n isUninterruptedRevalidation = (opts && opts.startUninterruptedRevalidation) === true; // Save the current scroll position every time we start a new navigation,\n // and track whether we should reset scroll on completion\n\n saveScrollPosition(state.location, state.matches);\n pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;\n let loadingNavigation = opts && opts.overrideNavigation;\n let matches = matchRoutes(dataRoutes, location, init.basename); // Short circuit with a 404 on the root error boundary if we match nothing\n\n if (!matches) {\n let {\n matches: notFoundMatches,\n route,\n error\n } = getNotFoundMatches(dataRoutes); // Cancel all pending deferred on 404s since we don't keep any routes\n\n cancelActiveDeferreds();\n completeNavigation(location, {\n matches: notFoundMatches,\n loaderData: {},\n errors: {\n [route.id]: error\n }\n });\n return;\n } // Short circuit if it's only a hash change\n\n\n if (isHashChangeOnly(state.location, location)) {\n completeNavigation(location, {\n matches\n });\n return;\n } // Create a controller/Request for this navigation\n\n\n pendingNavigationController = new AbortController();\n let request = createRequest(location, pendingNavigationController.signal, opts && opts.submission);\n let pendingActionData;\n let pendingError;\n\n if (opts && opts.pendingError) {\n // If we have a pendingError, it means the user attempted a GET submission\n // with binary FormData so assign here and skip to handleLoaders. That\n // way we handle calling loaders above the boundary etc. It's not really\n // different from an actionError in that sense.\n pendingError = {\n [findNearestBoundary(matches).route.id]: opts.pendingError\n };\n } else if (opts && opts.submission) {\n // Call action if we received an action submission\n let actionOutput = await handleAction(request, location, opts.submission, matches, {\n replace: opts.replace\n });\n\n if (actionOutput.shortCircuited) {\n return;\n }\n\n pendingActionData = actionOutput.pendingActionData;\n pendingError = actionOutput.pendingActionError;\n\n let navigation = _extends({\n state: \"loading\",\n location\n }, opts.submission);\n\n loadingNavigation = navigation;\n } // Call loaders\n\n\n let {\n shortCircuited,\n loaderData,\n errors\n } = await handleLoaders(request, location, matches, loadingNavigation, opts && opts.submission, opts && opts.replace, pendingActionData, pendingError);\n\n if (shortCircuited) {\n return;\n } // Clean up now that the action/loaders have completed. Don't clean up if\n // we short circuited because pendingNavigationController will have already\n // been assigned to a new controller for the next navigation\n\n\n pendingNavigationController = null;\n completeNavigation(location, {\n matches,\n loaderData,\n errors\n });\n } // Call the action matched by the leaf route for this navigation and handle\n // redirects/errors\n\n\n async function handleAction(request, location, submission, matches, opts) {\n interruptActiveLoads(); // Put us in a submitting state\n\n let navigation = _extends({\n state: \"submitting\",\n location\n }, submission);\n\n updateState({\n navigation\n }); // Call our action and get the result\n\n let result;\n let actionMatch = getTargetMatch(matches, location);\n\n if (!actionMatch.route.action) {\n result = getMethodNotAllowedResult(location);\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, router.basename);\n\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n }\n }\n\n if (isRedirectResult(result)) {\n let redirectNavigation = _extends({\n state: \"loading\",\n location: createLocation(state.location, result.location)\n }, submission);\n\n await startRedirectNavigation(result, redirectNavigation, opts && opts.replace);\n return {\n shortCircuited: true\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id); // By default, all submissions are REPLACE navigations, but if the\n // action threw an error that'll be rendered in an errorElement, we fall\n // back to PUSH so that the user can use the back button to get back to\n // the pre-submission form location to try again\n\n if ((opts && opts.replace) !== true) {\n pendingAction = Action.Push;\n }\n\n return {\n pendingActionError: {\n [boundaryMatch.route.id]: result.error\n }\n };\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n return {\n pendingActionData: {\n [actionMatch.route.id]: result.data\n }\n };\n } // Call all applicable loaders for the given matches, handling redirects,\n // errors, etc.\n\n\n async function handleLoaders(request, location, matches, overrideNavigation, submission, replace, pendingActionData, pendingError) {\n // Figure out the right navigation we want to use for data loading\n let loadingNavigation = overrideNavigation;\n\n if (!loadingNavigation) {\n let navigation = {\n state: \"loading\",\n location,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n loadingNavigation = navigation;\n }\n\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, pendingActionData, pendingError, fetchLoadMatches); // Cancel pending deferreds for no-longer-matched routes or routes we're\n // about to reload. Note that if this is an action reload we would have\n // already cancelled all pending deferreds so this would be a no-op\n\n cancelActiveDeferreds(routeId => !(matches && matches.some(m => m.route.id === routeId)) || matchesToLoad && matchesToLoad.some(m => m.route.id === routeId)); // Short circuit if we have no loaders to run\n\n if (matchesToLoad.length === 0 && revalidatingFetchers.length === 0) {\n completeNavigation(location, {\n matches,\n loaderData: mergeLoaderData(state.loaderData, {}, matches),\n // Commit pending error if we're short circuiting\n errors: pendingError || null,\n actionData: pendingActionData || null\n });\n return {\n shortCircuited: true\n };\n } // If this is an uninterrupted revalidation, we remain in our current idle\n // state. If not, we need to switch to our loading state and load data,\n // preserving any new action data or existing action data (in the case of\n // a revalidation interrupting an actionReload)\n\n\n if (!isUninterruptedRevalidation) {\n revalidatingFetchers.forEach(_ref2 => {\n let [key] = _ref2;\n let fetcher = state.fetchers.get(key);\n let revalidatingFetcher = {\n state: \"loading\",\n data: fetcher && fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, revalidatingFetcher);\n });\n updateState(_extends({\n navigation: loadingNavigation,\n actionData: pendingActionData || state.actionData || null\n }, revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n }\n\n pendingNavigationLoadId = ++incrementingLoadId;\n revalidatingFetchers.forEach(_ref3 => {\n let [key] = _ref3;\n return fetchControllers.set(key, pendingNavigationController);\n });\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, request);\n\n if (request.signal.aborted) {\n return {\n shortCircuited: true\n };\n } // Clean up _after_ loaders have completed. Don't clean up if we short\n // circuited because fetchControllers would have been aborted and\n // reassigned to new controllers for the next navigation\n\n\n revalidatingFetchers.forEach(_ref4 => {\n let [key] = _ref4;\n return fetchControllers.delete(key);\n }); // If any loaders returned a redirect Response, start a new REPLACE navigation\n\n let redirect = findRedirect(results);\n\n if (redirect) {\n let redirectNavigation = getLoaderRedirect(state, redirect);\n await startRedirectNavigation(redirect, redirectNavigation, replace);\n return {\n shortCircuited: true\n };\n } // Process and commit output from loaders\n\n\n let {\n loaderData,\n errors\n } = processLoaderData(state, matches, matchesToLoad, loaderResults, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds); // Wire up subscribers to update loaderData as promises settle\n\n activeDeferreds.forEach((deferredData, routeId) => {\n deferredData.subscribe(aborted => {\n // Note: No need to updateState here since the TrackedPromise on\n // loaderData is stable across resolve/reject\n // Remove this instance if we were aborted or if promises have settled\n if (aborted || deferredData.done) {\n activeDeferreds.delete(routeId);\n }\n });\n });\n markFetchRedirectsDone();\n let didAbortFetchLoads = abortStaleFetchLoads(pendingNavigationLoadId);\n return _extends({\n loaderData,\n errors\n }, didAbortFetchLoads || revalidatingFetchers.length > 0 ? {\n fetchers: new Map(state.fetchers)\n } : {});\n }\n\n function getFetcher(key) {\n return state.fetchers.get(key) || IDLE_FETCHER;\n } // Trigger a fetcher load/submit for the given fetcher key\n\n\n function fetch(key, routeId, href, opts) {\n if (isServer) {\n throw new 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.\");\n }\n\n if (fetchControllers.has(key)) abortFetcher(key);\n let matches = matchRoutes(dataRoutes, href, init.basename);\n\n if (!matches) {\n setFetcherError(key, routeId, new ErrorResponse(404, \"Not Found\", null));\n return;\n }\n\n let {\n path,\n submission\n } = normalizeNavigateOptions(href, opts, true);\n let match = getTargetMatch(matches, path);\n\n if (submission) {\n handleFetcherAction(key, routeId, path, match, matches, submission);\n return;\n } // Store off the match so we can call it's shouldRevalidate on subsequent\n // revalidations\n\n\n fetchLoadMatches.set(key, [path, match, matches]);\n handleFetcherLoader(key, routeId, path, match, matches);\n } // Call the action for the matched fetcher.submit(), and then handle redirects,\n // errors, and revalidation\n\n\n async function handleFetcherAction(key, routeId, path, match, requestMatches, submission) {\n interruptActiveLoads();\n fetchLoadMatches.delete(key);\n\n if (!match.route.action) {\n let {\n error\n } = getMethodNotAllowedResult(path);\n setFetcherError(key, routeId, error);\n return;\n } // Put this fetcher into it's submitting state\n\n\n let existingFetcher = state.fetchers.get(key);\n\n let fetcher = _extends({\n state: \"submitting\"\n }, submission, {\n data: existingFetcher && existingFetcher.data\n });\n\n state.fetchers.set(key, fetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }); // Call the action for the fetcher\n\n let abortController = new AbortController();\n let fetchRequest = createRequest(path, abortController.signal, submission);\n fetchControllers.set(key, abortController);\n let actionResult = await callLoaderOrAction(\"action\", fetchRequest, match, requestMatches, router.basename);\n\n if (fetchRequest.signal.aborted) {\n // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-submit which would have put _new_ controller is in fetchControllers\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n return;\n }\n\n if (isRedirectResult(actionResult)) {\n fetchControllers.delete(key);\n fetchRedirectIds.add(key);\n\n let loadingFetcher = _extends({\n state: \"loading\"\n }, submission, {\n data: undefined\n });\n\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n\n let redirectNavigation = _extends({\n state: \"loading\",\n location: createLocation(state.location, actionResult.location)\n }, submission);\n\n await startRedirectNavigation(actionResult, redirectNavigation);\n return;\n } // Process any non-redirect errors thrown\n\n\n if (isErrorResult(actionResult)) {\n setFetcherError(key, routeId, actionResult.error);\n return;\n }\n\n if (isDeferredResult(actionResult)) {\n invariant(false, \"defer() is not supported in actions\");\n } // Start the data load for current matches, or the next location if we're\n // in the middle of a navigation\n\n\n let nextLocation = state.navigation.location || state.location;\n let revalidationRequest = createRequest(nextLocation, abortController.signal);\n let matches = state.navigation.state !== \"idle\" ? matchRoutes(dataRoutes, state.navigation.location, init.basename) : state.matches;\n invariant(matches, \"Didn't find any matches after fetcher action\");\n let loadId = ++incrementingLoadId;\n fetchReloadIds.set(key, loadId);\n\n let loadFetcher = _extends({\n state: \"loading\",\n data: actionResult.data\n }, submission);\n\n state.fetchers.set(key, loadFetcher);\n let [matchesToLoad, revalidatingFetchers] = getMatchesToLoad(state, matches, submission, nextLocation, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, {\n [match.route.id]: actionResult.data\n }, undefined, // No need to send through errors since we short circuit above\n fetchLoadMatches); // Put all revalidating fetchers into the loading state, except for the\n // current fetcher which we want to keep in it's current loading state which\n // contains it's action submission info + action data\n\n revalidatingFetchers.filter(_ref5 => {\n let [staleKey] = _ref5;\n return staleKey !== key;\n }).forEach(_ref6 => {\n let [staleKey] = _ref6;\n let existingFetcher = state.fetchers.get(staleKey);\n let revalidatingFetcher = {\n state: \"loading\",\n data: existingFetcher && existingFetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(staleKey, revalidatingFetcher);\n fetchControllers.set(staleKey, abortController);\n });\n updateState({\n fetchers: new Map(state.fetchers)\n });\n let {\n results,\n loaderResults,\n fetcherResults\n } = await callLoadersAndMaybeResolveData(state.matches, matches, matchesToLoad, revalidatingFetchers, revalidationRequest);\n\n if (abortController.signal.aborted) {\n return;\n }\n\n fetchReloadIds.delete(key);\n fetchControllers.delete(key);\n revalidatingFetchers.forEach(_ref7 => {\n let [staleKey] = _ref7;\n return fetchControllers.delete(staleKey);\n });\n let redirect = findRedirect(results);\n\n if (redirect) {\n let redirectNavigation = getLoaderRedirect(state, redirect);\n await startRedirectNavigation(redirect, redirectNavigation);\n return;\n } // Process and commit output from loaders\n\n\n let {\n loaderData,\n errors\n } = processLoaderData(state, state.matches, matchesToLoad, loaderResults, undefined, revalidatingFetchers, fetcherResults, activeDeferreds);\n let doneFetcher = {\n state: \"idle\",\n data: actionResult.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n let didAbortFetchLoads = abortStaleFetchLoads(loadId); // If we are currently in a navigation loading state and this fetcher is\n // more recent than the navigation, we want the newer data so abort the\n // navigation and complete it with the fetcher data\n\n if (state.navigation.state === \"loading\" && loadId > pendingNavigationLoadId) {\n invariant(pendingAction, \"Expected pending action\");\n pendingNavigationController && pendingNavigationController.abort();\n completeNavigation(state.navigation.location, {\n matches,\n loaderData,\n errors,\n fetchers: new Map(state.fetchers)\n });\n } else {\n // otherwise just update with the fetcher data, preserving any existing\n // loaderData for loaders that did not need to reload. We have to\n // manually merge here since we aren't going through completeNavigation\n updateState(_extends({\n errors,\n loaderData: mergeLoaderData(state.loaderData, loaderData, matches)\n }, didAbortFetchLoads ? {\n fetchers: new Map(state.fetchers)\n } : {}));\n isRevalidationRequired = false;\n }\n } // Call the matched loader for fetcher.load(), handling redirects, errors, etc.\n\n\n async function handleFetcherLoader(key, routeId, path, match, matches) {\n let existingFetcher = state.fetchers.get(key); // Put this fetcher into it's loading state\n\n let loadingFetcher = {\n state: \"loading\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n data: existingFetcher && existingFetcher.data\n };\n state.fetchers.set(key, loadingFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n }); // Call the loader for this fetcher route match\n\n let abortController = new AbortController();\n let fetchRequest = createRequest(path, abortController.signal);\n fetchControllers.set(key, abortController);\n let result = await callLoaderOrAction(\"loader\", fetchRequest, match, matches, router.basename); // Deferred isn't supported or fetcher loads, await everything and treat it\n // as a normal load. resolveDeferredData will return undefined if this\n // fetcher gets aborted, so we just leave result untouched and short circuit\n // below if that happens\n\n if (isDeferredResult(result)) {\n result = (await resolveDeferredData(result, fetchRequest.signal, true)) || result;\n } // We can delete this so long as we weren't aborted by ou our own fetcher\n // re-load which would have put _new_ controller is in fetchControllers\n\n\n if (fetchControllers.get(key) === abortController) {\n fetchControllers.delete(key);\n }\n\n if (fetchRequest.signal.aborted) {\n return;\n } // If the loader threw a redirect Response, start a new REPLACE navigation\n\n\n if (isRedirectResult(result)) {\n let redirectNavigation = getLoaderRedirect(state, result);\n await startRedirectNavigation(result, redirectNavigation);\n return;\n } // Process any non-redirect errors thrown\n\n\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n state.fetchers.delete(key); // TODO: In remix, this would reset to IDLE_NAVIGATION if it was a catch -\n // do we need to behave any differently with our non-redirect errors?\n // What if it was a non-redirect Response?\n\n updateState({\n fetchers: new Map(state.fetchers),\n errors: {\n [boundaryMatch.route.id]: result.error\n }\n });\n return;\n }\n\n invariant(!isDeferredResult(result), \"Unhandled fetcher deferred data\"); // Put the fetcher back into an idle state\n\n let doneFetcher = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n updateState({\n fetchers: new Map(state.fetchers)\n });\n }\n /**\n * Utility function to handle redirects returned from an action or loader.\n * Normally, a redirect \"replaces\" the navigation that triggered it. So, for\n * example:\n *\n * - user is on /a\n * - user clicks a link to /b\n * - loader for /b redirects to /c\n *\n * In a non-JS app the browser would track the in-flight navigation to /b and\n * then replace it with /c when it encountered the redirect response. In\n * the end it would only ever update the URL bar with /c.\n *\n * In client-side routing using pushState/replaceState, we aim to emulate\n * this behavior and we also do not update history until the end of the\n * navigation (including processed redirects). This means that we never\n * actually touch history until we've processed redirects, so we just use\n * the history action from the original navigation (PUSH or REPLACE).\n */\n\n\n async function startRedirectNavigation(redirect, navigation, replace) {\n if (redirect.revalidate) {\n isRevalidationRequired = true;\n }\n\n invariant(navigation.location, \"Expected a location on the redirect navigation\"); // There's no need to abort on redirects, since we don't detect the\n // redirect until the action/loaders have settled\n\n pendingNavigationController = null;\n let redirectHistoryAction = replace === true ? Action.Replace : Action.Push;\n await startNavigation(redirectHistoryAction, navigation.location, {\n overrideNavigation: navigation\n });\n }\n\n async function callLoadersAndMaybeResolveData(currentMatches, matches, matchesToLoad, fetchersToLoad, request) {\n // Call all navigation loaders and revalidating fetcher loaders in parallel,\n // then slice off the results into separate arrays so we can handle them\n // accordingly\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, router.basename)), ...fetchersToLoad.map(_ref8 => {\n let [, href, match, fetchMatches] = _ref8;\n return callLoaderOrAction(\"loader\", createRequest(href, request.signal), match, fetchMatches, router.basename);\n })]);\n let loaderResults = results.slice(0, matchesToLoad.length);\n let fetcherResults = results.slice(matchesToLoad.length);\n await Promise.all([resolveDeferredResults(currentMatches, matchesToLoad, loaderResults, request.signal, false, state.loaderData), resolveDeferredResults(currentMatches, fetchersToLoad.map(_ref9 => {\n let [,, match] = _ref9;\n return match;\n }), fetcherResults, request.signal, true)]);\n return {\n results,\n loaderResults,\n fetcherResults\n };\n }\n\n function interruptActiveLoads() {\n // Every interruption triggers a revalidation\n isRevalidationRequired = true; // Cancel pending route-level deferreds and mark cancelled routes for\n // revalidation\n\n cancelledDeferredRoutes.push(...cancelActiveDeferreds()); // Abort in-flight fetcher loads\n\n fetchLoadMatches.forEach((_, key) => {\n if (fetchControllers.has(key)) {\n cancelledFetcherLoads.push(key);\n abortFetcher(key);\n }\n });\n }\n\n function setFetcherError(key, routeId, error) {\n let boundaryMatch = findNearestBoundary(state.matches, routeId);\n deleteFetcher(key);\n updateState({\n errors: {\n [boundaryMatch.route.id]: error\n },\n fetchers: new Map(state.fetchers)\n });\n }\n\n function deleteFetcher(key) {\n if (fetchControllers.has(key)) abortFetcher(key);\n fetchLoadMatches.delete(key);\n fetchReloadIds.delete(key);\n fetchRedirectIds.delete(key);\n state.fetchers.delete(key);\n }\n\n function abortFetcher(key) {\n let controller = fetchControllers.get(key);\n invariant(controller, \"Expected fetch controller: \" + key);\n controller.abort();\n fetchControllers.delete(key);\n }\n\n function markFetchersDone(keys) {\n for (let key of keys) {\n let fetcher = getFetcher(key);\n let doneFetcher = {\n state: \"idle\",\n data: fetcher.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n function markFetchRedirectsDone() {\n let doneKeys = [];\n\n for (let key of fetchRedirectIds) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n\n if (fetcher.state === \"loading\") {\n fetchRedirectIds.delete(key);\n doneKeys.push(key);\n }\n }\n\n markFetchersDone(doneKeys);\n }\n\n function abortStaleFetchLoads(landedId) {\n let yeetedKeys = [];\n\n for (let [key, id] of fetchReloadIds) {\n if (id < landedId) {\n let fetcher = state.fetchers.get(key);\n invariant(fetcher, \"Expected fetcher: \" + key);\n\n if (fetcher.state === \"loading\") {\n abortFetcher(key);\n fetchReloadIds.delete(key);\n yeetedKeys.push(key);\n }\n }\n }\n\n markFetchersDone(yeetedKeys);\n return yeetedKeys.length > 0;\n }\n\n function cancelActiveDeferreds(predicate) {\n let cancelledRouteIds = [];\n activeDeferreds.forEach((dfd, routeId) => {\n if (!predicate || predicate(routeId)) {\n // Cancel the deferred - but do not remove from activeDeferreds here -\n // we rely on the subscribers to do that so our tests can assert proper\n // cleanup via _internalActiveDeferreds\n dfd.cancel();\n cancelledRouteIds.push(routeId);\n activeDeferreds.delete(routeId);\n }\n });\n return cancelledRouteIds;\n } // Opt in to capturing and reporting scroll positions during navigations,\n // used by the <ScrollRestoration> component\n\n\n function enableScrollRestoration(positions, getPosition, getKey) {\n savedScrollPositions = positions;\n getScrollPosition = getPosition;\n\n getScrollRestorationKey = getKey || (location => location.key); // Perform initial hydration scroll restoration, since we miss the boat on\n // the initial updateState() because we've not yet rendered <ScrollRestoration/>\n // and therefore have no savedScrollPositions available\n\n\n if (!initialScrollRestored && state.navigation === IDLE_NAVIGATION) {\n initialScrollRestored = true;\n let y = getSavedScrollPosition(state.location, state.matches);\n\n if (y != null) {\n updateState({\n restoreScrollPosition: y\n });\n }\n }\n\n return () => {\n savedScrollPositions = null;\n getScrollPosition = null;\n getScrollRestorationKey = null;\n };\n }\n\n function saveScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map(m => createUseMatchesMatch(m, state.loaderData));\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n savedScrollPositions[key] = getScrollPosition();\n }\n }\n\n function getSavedScrollPosition(location, matches) {\n if (savedScrollPositions && getScrollRestorationKey && getScrollPosition) {\n let userMatches = matches.map(m => createUseMatchesMatch(m, state.loaderData));\n let key = getScrollRestorationKey(location, userMatches) || location.key;\n let y = savedScrollPositions[key];\n\n if (typeof y === \"number\") {\n return y;\n }\n }\n\n return null;\n }\n\n router = {\n get basename() {\n return init.basename;\n },\n\n get state() {\n return state;\n },\n\n get routes() {\n return dataRoutes;\n },\n\n initialize,\n subscribe,\n enableScrollRestoration,\n navigate,\n fetch,\n revalidate,\n // Passthrough to history-aware createHref used by useHref so we get proper\n // hash-aware URLs in DOM paths\n createHref: to => init.history.createHref(to),\n getFetcher,\n deleteFetcher,\n dispose,\n _internalFetchControllers: fetchControllers,\n _internalActiveDeferreds: activeDeferreds\n };\n return router;\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region createStaticHandler\n////////////////////////////////////////////////////////////////////////////////\n\nconst validActionMethods = new Set([\"POST\", \"PUT\", \"PATCH\", \"DELETE\"]);\nconst validRequestMethods = new Set([\"GET\", \"HEAD\", ...validActionMethods]);\nfunction unstable_createStaticHandler(routes) {\n invariant(routes.length > 0, \"You must provide a non-empty routes array to unstable_createStaticHandler\");\n let dataRoutes = convertRoutesToDataRoutes(routes);\n /**\n * The query() method is intended for document requests, in which we want to\n * call an optional action and potentially multiple loaders for all nested\n * routes. It returns a StaticHandlerContext object, which is very similar\n * to the router state (location, loaderData, actionData, errors, etc.) and\n * also adds SSR-specific information such as the statusCode and headers\n * from action/loaders Responses.\n *\n * It _should_ never throw and should report all errors through the\n * returned context.errors object, properly associating errors to their error\n * boundary. Additionally, it tracks _deepestRenderedBoundaryId which can be\n * used to emulate React error boundaries during SSr by performing a second\n * pass only down to the boundaryId.\n *\n * The one exception where we do not return a StaticHandlerContext is when a\n * redirect response is returned or thrown from any action/loader. We\n * propagate that out and return the raw Response so the HTTP server can\n * return it directly.\n */\n\n async function query(request) {\n let url = new URL(request.url);\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location);\n\n if (!validRequestMethods.has(request.method)) {\n let {\n matches: methodNotAllowedMatches,\n route,\n error\n } = getMethodNotAllowedMatches(dataRoutes);\n return {\n location,\n matches: methodNotAllowedMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n } else if (!matches) {\n let {\n matches: notFoundMatches,\n route,\n error\n } = getNotFoundMatches(dataRoutes);\n return {\n location,\n matches: notFoundMatches,\n loaderData: {},\n actionData: null,\n errors: {\n [route.id]: error\n },\n statusCode: error.status,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n let result = await queryImpl(request, location, matches);\n\n if (result instanceof Response) {\n return result;\n } // When returning StaticHandlerContext, we patch back in the location here\n // since we need it for React Context. But this helps keep our submit and\n // loadRouteData operating on a Request instead of a Location\n\n\n return _extends({\n location\n }, result);\n }\n /**\n * The queryRoute() method is intended for targeted route requests, either\n * for fetch ?_data requests or resource route requests. In this case, we\n * are only ever calling a single action or loader, and we are returning the\n * returned value directly. In most cases, this will be a Response returned\n * from the action/loader, but it may be a primitive or other value as well -\n * and in such cases the calling context should handle that accordingly.\n *\n * We do respect the throw/return differentiation, so if an action/loader\n * throws, then this method will throw the value. This is important so we\n * can do proper boundary identification in Remix where a thrown Response\n * must go to the Catch Boundary but a returned Response is happy-path.\n *\n * One thing to note is that any Router-initiated thrown Response (such as a\n * 404 or 405) will have a custom X-Remix-Router-Error: \"yes\" header on it\n * in order to differentiate from responses thrown from user actions/loaders.\n */\n\n\n async function queryRoute(request, routeId) {\n let url = new URL(request.url);\n let location = createLocation(\"\", createPath(url), null, \"default\");\n let matches = matchRoutes(dataRoutes, location);\n\n if (!validRequestMethods.has(request.method)) {\n throw createRouterErrorResponse(null, {\n status: 405,\n statusText: \"Method Not Allowed\"\n });\n } else if (!matches) {\n throw createRouterErrorResponse(null, {\n status: 404,\n statusText: \"Not Found\"\n });\n }\n\n let match = routeId ? matches.find(m => m.route.id === routeId) : getTargetMatch(matches, location);\n\n if (!match) {\n throw createRouterErrorResponse(null, {\n status: 404,\n statusText: \"Not Found\"\n });\n }\n\n let result = await queryImpl(request, location, matches, match);\n\n if (result instanceof Response) {\n return result;\n }\n\n let error = result.errors ? Object.values(result.errors)[0] : undefined;\n\n if (error !== undefined) {\n // If we got back result.errors, that means the loader/action threw\n // _something_ that wasn't a Response, but it's not guaranteed/required\n // to be an `instanceof Error` either, so we have to use throw here to\n // preserve the \"error\" state outside of queryImpl.\n throw error;\n } // Pick off the right state value to return\n\n\n let routeData = [result.actionData, result.loaderData].find(v => v);\n return Object.values(routeData || {})[0];\n }\n\n async function queryImpl(request, location, matches, routeMatch) {\n invariant(request.signal, \"query()/queryRoute() requests must contain an AbortController signal\");\n\n try {\n if (validActionMethods.has(request.method)) {\n let result = await submit(request, matches, routeMatch || getTargetMatch(matches, location), routeMatch != null);\n return result;\n }\n\n let result = await loadRouteData(request, matches, routeMatch);\n return result instanceof Response ? result : _extends({}, result, {\n actionData: null,\n actionHeaders: {}\n });\n } catch (e) {\n // If the user threw/returned a Response in callLoaderOrAction, we throw\n // it to bail out and then return or throw here based on whether the user\n // returned or threw\n if (isQueryRouteResponse(e)) {\n if (e.type === ResultType.error && !isRedirectResponse(e.response)) {\n throw e.response;\n }\n\n return e.response;\n } // Redirects are always returned since they don't propagate to catch\n // boundaries\n\n\n if (isRedirectResponse(e)) {\n return e;\n }\n\n throw e;\n }\n }\n\n async function submit(request, matches, actionMatch, isRouteRequest) {\n let result;\n\n if (!actionMatch.route.action) {\n if (isRouteRequest) {\n throw createRouterErrorResponse(null, {\n status: 405,\n statusText: \"Method Not Allowed\"\n });\n }\n\n result = getMethodNotAllowedResult(request.url);\n } else {\n result = await callLoaderOrAction(\"action\", request, actionMatch, matches, undefined, // Basename not currently supported in static handlers\n true, isRouteRequest);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted\");\n }\n }\n\n if (isRedirectResult(result)) {\n // Uhhhh - this should never happen, we should always throw these from\n // callLoaderOrAction, but the type narrowing here keeps TS happy and we\n // can get back on the \"throw all redirect responses\" train here should\n // this ever happen :/\n throw new Response(null, {\n status: result.status,\n headers: {\n Location: result.location\n }\n });\n }\n\n if (isDeferredResult(result)) {\n throw new Error(\"defer() is not supported in actions\");\n }\n\n if (isRouteRequest) {\n // Note: This should only be non-Response values if we get here, since\n // isRouteRequest should throw any Response received in callLoaderOrAction\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: null,\n errors: {\n [boundaryMatch.route.id]: result.error\n },\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 500,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n return {\n matches: [actionMatch],\n loaderData: {},\n actionData: {\n [actionMatch.route.id]: result.data\n },\n errors: null,\n // Note: statusCode + headers are unused here since queryRoute will\n // return the raw Response or value\n statusCode: 200,\n loaderHeaders: {},\n actionHeaders: {}\n };\n }\n\n if (isErrorResult(result)) {\n // Store off the pending error - we use it to determine which loaders\n // to call and will commit it when we complete the navigation\n let boundaryMatch = findNearestBoundary(matches, actionMatch.route.id);\n let context = await loadRouteData(request, matches, undefined, {\n [boundaryMatch.route.id]: result.error\n }); // action status codes take precedence over loader status codes\n\n return _extends({}, context, {\n statusCode: isRouteErrorResponse(result.error) ? result.error.status : 500,\n actionData: null,\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n\n let context = await loadRouteData(request, matches);\n return _extends({}, context, result.statusCode ? {\n statusCode: result.statusCode\n } : {}, {\n actionData: {\n [actionMatch.route.id]: result.data\n },\n actionHeaders: _extends({}, result.headers ? {\n [actionMatch.route.id]: result.headers\n } : {})\n });\n }\n\n async function loadRouteData(request, matches, routeMatch, pendingActionError) {\n let isRouteRequest = routeMatch != null;\n let requestMatches = routeMatch ? [routeMatch] : getLoaderMatchesUntilBoundary(matches, Object.keys(pendingActionError || {})[0]);\n let matchesToLoad = requestMatches.filter(m => m.route.loader); // Short circuit if we have no loaders to run\n\n if (matchesToLoad.length === 0) {\n return {\n matches,\n loaderData: {},\n errors: pendingActionError || null,\n statusCode: 200,\n loaderHeaders: {}\n };\n }\n\n let results = await Promise.all([...matchesToLoad.map(match => callLoaderOrAction(\"loader\", request, match, matches, undefined, // Basename not currently supported in static handlers\n true, isRouteRequest))]);\n\n if (request.signal.aborted) {\n let method = isRouteRequest ? \"queryRoute\" : \"query\";\n throw new Error(method + \"() call aborted\");\n } // Can't do anything with these without the Remix side of things, so just\n // cancel them for now\n\n\n results.forEach(result => {\n if (isDeferredResult(result)) {\n result.deferredData.cancel();\n }\n }); // Process and commit output from loaders\n\n let context = processRouteLoaderData(matches, matchesToLoad, results, pendingActionError);\n return _extends({}, context, {\n matches\n });\n }\n\n function createRouterErrorResponse(body, init) {\n return new Response(body, _extends({}, init, {\n headers: _extends({}, init.headers, {\n \"X-Remix-Router-Error\": \"yes\"\n })\n }));\n }\n\n return {\n dataRoutes,\n query,\n queryRoute\n };\n} //#endregion\n////////////////////////////////////////////////////////////////////////////////\n//#region Helpers\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Given an existing StaticHandlerContext and an error thrown at render time,\n * provide an updated StaticHandlerContext suitable for a second SSR render\n */\n\nfunction getStaticContextFromError(routes, context, error) {\n let newContext = _extends({}, context, {\n statusCode: 500,\n errors: {\n [context._deepestRenderedBoundaryId || routes[0].id]: error\n }\n });\n\n return newContext;\n} // Normalize navigation options by converting formMethod=GET formData objects to\n// URLSearchParams so they behave identically to links with query params\n\nfunction normalizeNavigateOptions(to, opts, isFetcher) {\n if (isFetcher === void 0) {\n isFetcher = false;\n }\n\n let path = typeof to === \"string\" ? to : createPath(to); // Return location verbatim on non-submission navigations\n\n if (!opts || !(\"formMethod\" in opts) && !(\"formData\" in opts)) {\n return {\n path\n };\n } // Create a Submission on non-GET navigations\n\n\n if (opts.formMethod != null && opts.formMethod !== \"get\") {\n return {\n path,\n submission: {\n formMethod: opts.formMethod,\n formAction: stripHashFromPath(path),\n formEncType: opts && opts.formEncType || \"application/x-www-form-urlencoded\",\n formData: opts.formData\n }\n };\n } // No formData to flatten for GET submission\n\n\n if (!opts.formData) {\n return {\n path\n };\n } // Flatten submission onto URLSearchParams for GET submissions\n\n\n let parsedPath = parsePath(path);\n\n try {\n let searchParams = convertFormDataToSearchParams(opts.formData); // Since fetcher GET submissions only run a single loader (as opposed to\n // navigation GET submissions which run all loaders), we need to preserve\n // any incoming ?index params\n\n if (isFetcher && parsedPath.search && hasNakedIndexQuery(parsedPath.search)) {\n searchParams.append(\"index\", \"\");\n }\n\n parsedPath.search = \"?\" + searchParams;\n } catch (e) {\n return {\n path,\n error: new ErrorResponse(400, \"Bad Request\", \"Cannot submit binary form data using GET\")\n };\n }\n\n return {\n path: createPath(parsedPath)\n };\n}\n\nfunction getLoaderRedirect(state, redirect) {\n let {\n formMethod,\n formAction,\n formEncType,\n formData\n } = state.navigation;\n let navigation = {\n state: \"loading\",\n location: createLocation(state.location, redirect.location),\n formMethod: formMethod || undefined,\n formAction: formAction || undefined,\n formEncType: formEncType || undefined,\n formData: formData || undefined\n };\n return navigation;\n} // Filter out all routes below any caught error as they aren't going to\n// render so we don't need to load them\n\n\nfunction getLoaderMatchesUntilBoundary(matches, boundaryId) {\n let boundaryMatches = matches;\n\n if (boundaryId) {\n let index = matches.findIndex(m => m.route.id === boundaryId);\n\n if (index >= 0) {\n boundaryMatches = matches.slice(0, index);\n }\n }\n\n return boundaryMatches;\n}\n\nfunction getMatchesToLoad(state, matches, submission, location, isRevalidationRequired, cancelledDeferredRoutes, cancelledFetcherLoads, pendingActionData, pendingError, fetchLoadMatches) {\n let actionResult = pendingError ? Object.values(pendingError)[0] : pendingActionData ? Object.values(pendingActionData)[0] : null; // Pick navigation matches that are net-new or qualify for revalidation\n\n let boundaryId = pendingError ? Object.keys(pendingError)[0] : undefined;\n let boundaryMatches = getLoaderMatchesUntilBoundary(matches, boundaryId);\n let navigationMatches = boundaryMatches.filter((match, index) => match.route.loader != null && (isNewLoader(state.loaderData, state.matches[index], match) || // If this route had a pending deferred cancelled it must be revalidated\n cancelledDeferredRoutes.some(id => id === match.route.id) || shouldRevalidateLoader(state.location, state.matches[index], submission, location, match, isRevalidationRequired, actionResult))); // Pick fetcher.loads that need to be revalidated\n\n let revalidatingFetchers = [];\n fetchLoadMatches && fetchLoadMatches.forEach((_ref10, key) => {\n let [href, match, fetchMatches] = _ref10;\n\n // This fetcher was cancelled from a prior action submission - force reload\n if (cancelledFetcherLoads.includes(key)) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n } else if (isRevalidationRequired) {\n let shouldRevalidate = shouldRevalidateLoader(href, match, submission, href, match, isRevalidationRequired, actionResult);\n\n if (shouldRevalidate) {\n revalidatingFetchers.push([key, href, match, fetchMatches]);\n }\n }\n });\n return [navigationMatches, revalidatingFetchers];\n}\n\nfunction isNewLoader(currentLoaderData, currentMatch, match) {\n let isNew = // [a] -> [a, b]\n !currentMatch || // [a, b] -> [a, c]\n match.route.id !== currentMatch.route.id; // Handle the case that we don't have data for a re-used route, potentially\n // from a prior error or from a cancelled pending deferred\n\n let isMissingData = currentLoaderData[match.route.id] === undefined; // Always load if this is a net-new route or we don't yet have data\n\n return isNew || isMissingData;\n}\n\nfunction isNewRouteInstance(currentMatch, match) {\n let currentPath = currentMatch.route.path;\n return (// param change for this match, /users/123 -> /users/456\n currentMatch.pathname !== match.pathname || // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n currentPath && currentPath.endsWith(\"*\") && currentMatch.params[\"*\"] !== match.params[\"*\"]\n );\n}\n\nfunction shouldRevalidateLoader(currentLocation, currentMatch, submission, location, match, isRevalidationRequired, actionResult) {\n let currentUrl = createURL(currentLocation);\n let currentParams = currentMatch.params;\n let nextUrl = createURL(location);\n let nextParams = match.params; // This is the default implementation as to when we revalidate. If the route\n // provides it's own implementation, then we give them full control but\n // provide this value so they can leverage it if needed after they check\n // their own specific use cases\n // Note that fetchers always provide the same current/next locations so the\n // URL-based checks here don't apply to fetcher shouldRevalidate calls\n\n let defaultShouldRevalidate = isNewRouteInstance(currentMatch, match) || // Clicked the same link, resubmitted a GET form\n currentUrl.toString() === nextUrl.toString() || // Search params affect all loaders\n currentUrl.search !== nextUrl.search || // Forced revalidation due to submission, useRevalidate, or X-Remix-Revalidate\n isRevalidationRequired;\n\n if (match.route.shouldRevalidate) {\n let routeChoice = match.route.shouldRevalidate(_extends({\n currentUrl,\n currentParams,\n nextUrl,\n nextParams\n }, submission, {\n actionResult,\n defaultShouldRevalidate\n }));\n\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n\n return defaultShouldRevalidate;\n}\n\nasync function callLoaderOrAction(type, request, match, matches, basename, isStaticRequest, isRouteRequest) {\n if (isStaticRequest === void 0) {\n isStaticRequest = false;\n }\n\n if (isRouteRequest === void 0) {\n isRouteRequest = false;\n }\n\n let resultType;\n let result; // Setup a promise we can race against so that abort signals short circuit\n\n let reject;\n let abortPromise = new Promise((_, r) => reject = r);\n\n let onReject = () => reject();\n\n request.signal.addEventListener(\"abort\", onReject);\n\n try {\n let handler = match.route[type];\n invariant(handler, \"Could not find the \" + type + \" to run on the \\\"\" + match.route.id + \"\\\" route\");\n result = await Promise.race([handler({\n request,\n params: match.params\n }), abortPromise]);\n } catch (e) {\n resultType = ResultType.error;\n result = e;\n } finally {\n request.signal.removeEventListener(\"abort\", onReject);\n }\n\n if (result instanceof Response) {\n let status = result.status; // Process redirects\n\n if (status >= 300 && status <= 399) {\n let location = result.headers.get(\"Location\");\n invariant(location, \"Redirects returned/thrown from loaders/actions must have a Location header\"); // Support relative routing in redirects\n\n let activeMatches = matches.slice(0, matches.indexOf(match) + 1);\n let routePathnames = getPathContributingMatches(activeMatches).map(match => match.pathnameBase);\n let requestPath = createURL(request.url).pathname;\n let resolvedLocation = resolveTo(location, routePathnames, requestPath);\n invariant(createPath(resolvedLocation), \"Unable to resolve redirect location: \" + result.headers.get(\"Location\")); // Prepend the basename to the redirect location if we have one\n\n if (basename) {\n let path = resolvedLocation.pathname;\n resolvedLocation.pathname = path === \"/\" ? basename : joinPaths([basename, path]);\n }\n\n location = createPath(resolvedLocation); // Don't process redirects in the router during static requests requests.\n // Instead, throw the Response and let the server handle it with an HTTP\n // redirect. We also update the Location header in place in this flow so\n // basename and relative routing is taken into account\n\n if (isStaticRequest) {\n result.headers.set(\"Location\", location);\n throw result;\n }\n\n return {\n type: ResultType.redirect,\n status,\n location,\n revalidate: result.headers.get(\"X-Remix-Revalidate\") !== null\n };\n } // For SSR single-route requests, we want to hand Responses back directly\n // without unwrapping. We do this with the QueryRouteResponse wrapper\n // interface so we can know whether it was returned or thrown\n\n\n if (isRouteRequest) {\n // eslint-disable-next-line no-throw-literal\n throw {\n type: resultType || ResultType.data,\n response: result\n };\n }\n\n let data;\n let contentType = result.headers.get(\"Content-Type\");\n\n if (contentType && contentType.startsWith(\"application/json\")) {\n data = await result.json();\n } else {\n data = await result.text();\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: new ErrorResponse(status, result.statusText, data),\n headers: result.headers\n };\n }\n\n return {\n type: ResultType.data,\n data,\n statusCode: result.status,\n headers: result.headers\n };\n }\n\n if (resultType === ResultType.error) {\n return {\n type: resultType,\n error: result\n };\n }\n\n if (result instanceof DeferredData) {\n return {\n type: ResultType.deferred,\n deferredData: result\n };\n }\n\n return {\n type: ResultType.data,\n data: result\n };\n}\n\nfunction createRequest(location, signal, submission) {\n let url = createURL(stripHashFromPath(location)).toString();\n let init = {\n signal\n };\n\n if (submission) {\n let {\n formMethod,\n formEncType,\n formData\n } = submission;\n init.method = formMethod.toUpperCase();\n init.body = formEncType === \"application/x-www-form-urlencoded\" ? convertFormDataToSearchParams(formData) : formData;\n } // Content-Type is inferred (https://fetch.spec.whatwg.org/#dom-request)\n\n\n return new Request(url, init);\n}\n\nfunction convertFormDataToSearchParams(formData) {\n let searchParams = new URLSearchParams();\n\n for (let [key, value] of formData.entries()) {\n invariant(typeof value === \"string\", 'File inputs are not supported with encType \"application/x-www-form-urlencoded\", ' + 'please use \"multipart/form-data\" instead.');\n searchParams.append(key, value);\n }\n\n return searchParams;\n}\n\nfunction processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds) {\n // Fill in loaderData/errors from our loaders\n let loaderData = {};\n let errors = null;\n let statusCode;\n let foundError = false;\n let loaderHeaders = {}; // Process loader results into state.loaderData/state.errors\n\n results.forEach((result, index) => {\n let id = matchesToLoad[index].route.id;\n invariant(!isRedirectResult(result), \"Cannot handle redirect results in processLoaderData\");\n\n if (isErrorResult(result)) {\n // Look upwards from the matched route for the closest ancestor\n // error boundary, defaulting to the root match\n let boundaryMatch = findNearestBoundary(matches, id);\n let error = result.error; // If we have a pending action error, we report it at the highest-route\n // that throws a loader error, and then clear it out to indicate that\n // it was consumed\n\n if (pendingError) {\n error = Object.values(pendingError)[0];\n pendingError = undefined;\n }\n\n errors = Object.assign(errors || {}, {\n [boundaryMatch.route.id]: error\n }); // Once we find our first (highest) error, we set the status code and\n // prevent deeper status codes from overriding\n\n if (!foundError) {\n foundError = true;\n statusCode = isRouteErrorResponse(result.error) ? result.error.status : 500;\n }\n\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n } else if (isDeferredResult(result)) {\n activeDeferreds && activeDeferreds.set(id, result.deferredData);\n loaderData[id] = result.deferredData.data; // TODO: Add statusCode/headers once we wire up streaming in Remix\n } else {\n loaderData[id] = result.data; // Error status codes always override success status codes, but if all\n // loaders are successful we take the deepest status code.\n\n if (result.statusCode != null && result.statusCode !== 200 && !foundError) {\n statusCode = result.statusCode;\n }\n\n if (result.headers) {\n loaderHeaders[id] = result.headers;\n }\n }\n }); // If we didn't consume the pending action error (i.e., all loaders\n // resolved), then consume it here\n\n if (pendingError) {\n errors = pendingError;\n }\n\n return {\n loaderData,\n errors,\n statusCode: statusCode || 200,\n loaderHeaders\n };\n}\n\nfunction processLoaderData(state, matches, matchesToLoad, results, pendingError, revalidatingFetchers, fetcherResults, activeDeferreds) {\n let {\n loaderData,\n errors\n } = processRouteLoaderData(matches, matchesToLoad, results, pendingError, activeDeferreds); // Process results from our revalidating fetchers\n\n for (let index = 0; index < revalidatingFetchers.length; index++) {\n let [key,, match] = revalidatingFetchers[index];\n invariant(fetcherResults !== undefined && fetcherResults[index] !== undefined, \"Did not find corresponding fetcher result\");\n let result = fetcherResults[index]; // Process fetcher non-redirect errors\n\n if (isErrorResult(result)) {\n let boundaryMatch = findNearestBoundary(state.matches, match.route.id);\n\n if (!(errors && errors[boundaryMatch.route.id])) {\n errors = _extends({}, errors, {\n [boundaryMatch.route.id]: result.error\n });\n }\n\n state.fetchers.delete(key);\n } else if (isRedirectResult(result)) {\n // Should never get here, redirects should get processed above, but we\n // keep this to type narrow to a success result in the else\n throw new Error(\"Unhandled fetcher revalidation redirect\");\n } else if (isDeferredResult(result)) {\n // Should never get here, deferred data should be awaited for fetchers\n // in resolveDeferredResults\n throw new Error(\"Unhandled fetcher deferred data\");\n } else {\n let doneFetcher = {\n state: \"idle\",\n data: result.data,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined\n };\n state.fetchers.set(key, doneFetcher);\n }\n }\n\n return {\n loaderData,\n errors\n };\n}\n\nfunction mergeLoaderData(loaderData, newLoaderData, matches) {\n let mergedLoaderData = _extends({}, newLoaderData);\n\n matches.forEach(match => {\n let id = match.route.id;\n\n if (newLoaderData[id] === undefined && loaderData[id] !== undefined) {\n mergedLoaderData[id] = loaderData[id];\n }\n });\n return mergedLoaderData;\n} // Find the nearest error boundary, looking upwards from the leaf route (or the\n// route specified by routeId) for the closest ancestor error boundary,\n// defaulting to the root match\n\n\nfunction findNearestBoundary(matches, routeId) {\n let eligibleMatches = routeId ? matches.slice(0, matches.findIndex(m => m.route.id === routeId) + 1) : [...matches];\n return eligibleMatches.reverse().find(m => m.route.hasErrorBoundary === true) || matches[0];\n}\n\nfunction getShortCircuitMatches(routes, status, statusText) {\n // Prefer a root layout route if present, otherwise shim in a route object\n let route = routes.find(r => r.index || !r.path || r.path === \"/\") || {\n id: \"__shim-\" + status + \"-route__\"\n };\n return {\n matches: [{\n params: {},\n pathname: \"\",\n pathnameBase: \"\",\n route\n }],\n route,\n error: new ErrorResponse(status, statusText, null)\n };\n}\n\nfunction getNotFoundMatches(routes) {\n return getShortCircuitMatches(routes, 404, \"Not Found\");\n}\n\nfunction getMethodNotAllowedMatches(routes) {\n return getShortCircuitMatches(routes, 405, \"Method Not Allowed\");\n}\n\nfunction getMethodNotAllowedResult(path) {\n let href = typeof path === \"string\" ? path : createPath(path);\n console.warn(\"You're trying to submit to a route that does not have an action. To \" + \"fix this, please add an `action` function to the route for \" + (\"[\" + href + \"]\"));\n return {\n type: ResultType.error,\n error: new ErrorResponse(405, \"Method Not Allowed\", \"\")\n };\n} // Find any returned redirect errors, starting from the lowest match\n\n\nfunction findRedirect(results) {\n for (let i = results.length - 1; i >= 0; i--) {\n let result = results[i];\n\n if (isRedirectResult(result)) {\n return result;\n }\n }\n}\n\nfunction stripHashFromPath(path) {\n let parsedPath = typeof path === \"string\" ? parsePath(path) : path;\n return createPath(_extends({}, parsedPath, {\n hash: \"\"\n }));\n}\n\nfunction isHashChangeOnly(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash !== b.hash;\n}\n\nfunction isDeferredResult(result) {\n return result.type === ResultType.deferred;\n}\n\nfunction isErrorResult(result) {\n return result.type === ResultType.error;\n}\n\nfunction isRedirectResult(result) {\n return (result && result.type) === ResultType.redirect;\n}\n\nfunction isRedirectResponse(result) {\n if (!(result instanceof Response)) {\n return false;\n }\n\n let status = result.status;\n let location = result.headers.get(\"Location\");\n return status >= 300 && status <= 399 && location != null;\n}\n\nfunction isQueryRouteResponse(obj) {\n return obj && obj.response instanceof Response && (obj.type === ResultType.data || ResultType.error);\n}\n\nasync function resolveDeferredResults(currentMatches, matchesToLoad, results, signal, isFetcher, currentLoaderData) {\n for (let index = 0; index < results.length; index++) {\n let result = results[index];\n let match = matchesToLoad[index];\n let currentMatch = currentMatches.find(m => m.route.id === match.route.id);\n let isRevalidatingLoader = currentMatch != null && !isNewRouteInstance(currentMatch, match) && (currentLoaderData && currentLoaderData[match.route.id]) !== undefined;\n\n if (isDeferredResult(result) && (isFetcher || isRevalidatingLoader)) {\n // Note: we do not have to touch activeDeferreds here since we race them\n // against the signal in resolveDeferredData and they'll get aborted\n // there if needed\n await resolveDeferredData(result, signal, isFetcher).then(result => {\n if (result) {\n results[index] = result || results[index];\n }\n });\n }\n }\n}\n\nasync function resolveDeferredData(result, signal, unwrap) {\n if (unwrap === void 0) {\n unwrap = false;\n }\n\n let aborted = await result.deferredData.resolveData(signal);\n\n if (aborted) {\n return;\n }\n\n if (unwrap) {\n try {\n return {\n type: ResultType.data,\n data: result.deferredData.unwrappedData\n };\n } catch (e) {\n // Handle any TrackedPromise._error values encountered while unwrapping\n return {\n type: ResultType.error,\n error: e\n };\n }\n }\n\n return {\n type: ResultType.data,\n data: result.deferredData.data\n };\n}\n\nfunction hasNakedIndexQuery(search) {\n return new URLSearchParams(search).getAll(\"index\").some(v => v === \"\");\n} // Note: This should match the format exported by useMatches, so if you change\n// this please also change that :) Eventually we'll DRY this up\n\n\nfunction createUseMatchesMatch(match, loaderData) {\n let {\n route,\n pathname,\n params\n } = match;\n return {\n id: route.id,\n pathname,\n params,\n data: loaderData[route.id],\n handle: route.handle\n };\n}\n\nfunction getTargetMatch(matches, location) {\n let search = typeof location === \"string\" ? parsePath(location).search : location.search;\n\n if (matches[matches.length - 1].route.index && hasNakedIndexQuery(search || \"\")) {\n // Return the leaf index route when index is present\n return matches[matches.length - 1];\n } // Otherwise grab the deepest \"path contributing\" match (ignoring index and\n // pathless layout routes)\n\n\n let pathMatches = getPathContributingMatches(matches);\n return pathMatches[pathMatches.length - 1];\n} //#endregion\n\nexport { AbortedDeferredError, Action, ErrorResponse, IDLE_FETCHER, IDLE_NAVIGATION, convertRoutesToDataRoutes as UNSAFE_convertRoutesToDataRoutes, getPathContributingMatches as UNSAFE_getPathContributingMatches, createBrowserHistory, createHashHistory, createMemoryHistory, createPath, createRouter, defer, generatePath, getStaticContextFromError, getToPathname, invariant, isRouteErrorResponse, joinPaths, json, matchPath, matchRoutes, normalizePathname, parsePath, redirect, resolvePath, resolveTo, stripBasename, unstable_createStaticHandler, warning };\n//# sourceMappingURL=router.js.map\n"],"sourceRoot":""}
|