@techdocs/cli 1.8.19-next.0 → 1.8.19-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.
Files changed (60) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +355 -310
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/1902.44584bca.chunk.js +10 -0
  5. package/dist/embedded-app/static/1902.44584bca.chunk.js.map +1 -0
  6. package/dist/embedded-app/static/{3182.62f19265.chunk.js → 3182.9657b1ff.chunk.js} +1 -1
  7. package/dist/embedded-app/static/{3182.62f19265.chunk.js.map → 3182.9657b1ff.chunk.js.map} +1 -1
  8. package/dist/embedded-app/static/{3308.82562d2f.chunk.js → 3308.c146ba21.chunk.js} +1 -1
  9. package/dist/embedded-app/static/{3308.82562d2f.chunk.js.map → 3308.c146ba21.chunk.js.map} +1 -1
  10. package/dist/embedded-app/static/{3720.6737494a.chunk.js → 3720.98f39354.chunk.js} +1 -1
  11. package/dist/embedded-app/static/{3720.6737494a.chunk.js.map → 3720.98f39354.chunk.js.map} +1 -1
  12. package/dist/embedded-app/static/{4036.66c4b641.chunk.js → 4036.fef63266.chunk.js} +1 -1
  13. package/dist/embedded-app/static/{4036.66c4b641.chunk.js.map → 4036.fef63266.chunk.js.map} +1 -1
  14. package/dist/embedded-app/static/{4516.cb7b4abb.chunk.js → 4516.cd8a0387.chunk.js} +1 -1
  15. package/dist/embedded-app/static/{4516.cb7b4abb.chunk.js.map → 4516.cd8a0387.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/{5788.791edd6a.chunk.js → 5788.ede5f049.chunk.js} +1 -1
  17. package/dist/embedded-app/static/{5788.791edd6a.chunk.js.map → 5788.ede5f049.chunk.js.map} +1 -1
  18. package/dist/embedded-app/static/8115.60e192eb.chunk.js +3 -0
  19. package/dist/embedded-app/static/8115.60e192eb.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/{8307.77d02788.chunk.js → 8307.48c99c9a.chunk.js} +1 -1
  21. package/dist/embedded-app/static/{8307.77d02788.chunk.js.map → 8307.48c99c9a.chunk.js.map} +1 -1
  22. package/dist/embedded-app/static/898.6dc29f65.chunk.js +4 -0
  23. package/dist/embedded-app/static/{898.ca4c8c81.chunk.js.map → 898.6dc29f65.chunk.js.map} +1 -1
  24. package/dist/embedded-app/static/{9234.d383e83b.chunk.js → 9234.d73cb688.chunk.js} +1 -1
  25. package/dist/embedded-app/static/{9234.d383e83b.chunk.js.map → 9234.d73cb688.chunk.js.map} +1 -1
  26. package/dist/embedded-app/static/{9605.1e25e9dd.chunk.js → 9605.9dfa2d00.chunk.js} +1 -1
  27. package/dist/embedded-app/static/{9605.1e25e9dd.chunk.js.map → 9605.9dfa2d00.chunk.js.map} +1 -1
  28. package/dist/embedded-app/static/main.304a0771.js +509 -0
  29. package/dist/embedded-app/static/main.304a0771.js.map +1 -0
  30. package/dist/embedded-app/static/{module-date-fns.9ba6144d.js → module-date-fns.2e1096cc.js} +1 -1
  31. package/dist/embedded-app/static/{module-date-fns.9ba6144d.js.map → module-date-fns.2e1096cc.js.map} +1 -1
  32. package/dist/embedded-app/static/{module-material-ui.3f32753b.js → module-material-ui.9dcefdc1.js} +1 -1
  33. package/dist/embedded-app/static/{module-material-ui.3f32753b.js.map → module-material-ui.9dcefdc1.js.map} +1 -1
  34. package/dist/embedded-app/static/module-mui.05cfef7f.js +3 -0
  35. package/dist/embedded-app/static/module-mui.05cfef7f.js.map +1 -0
  36. package/dist/embedded-app/static/module-react-router-dom.54955edf.js +23 -0
  37. package/dist/embedded-app/static/module-react-router-dom.54955edf.js.map +1 -0
  38. package/dist/embedded-app/static/module-react-router.0dc172f6.js +23 -0
  39. package/dist/embedded-app/static/module-react-router.0dc172f6.js.map +1 -0
  40. package/dist/embedded-app/static/{runtime.c7b3b8b8.js → runtime.304a0771.js} +2 -2
  41. package/dist/embedded-app/static/{runtime.c7b3b8b8.js.map → runtime.304a0771.js.map} +1 -1
  42. package/dist/embedded-app/static/vendor.304a0771.js +151 -0
  43. package/dist/embedded-app/static/vendor.304a0771.js.map +1 -0
  44. package/dist/index.cjs.js +1 -1
  45. package/package.json +4 -4
  46. package/dist/embedded-app/static/1902.74e9d604.chunk.js +0 -10
  47. package/dist/embedded-app/static/1902.74e9d604.chunk.js.map +0 -1
  48. package/dist/embedded-app/static/4919.72f5403e.chunk.js +0 -3
  49. package/dist/embedded-app/static/4919.72f5403e.chunk.js.map +0 -1
  50. package/dist/embedded-app/static/898.ca4c8c81.chunk.js +0 -4
  51. package/dist/embedded-app/static/main.c7b3b8b8.js +0 -509
  52. package/dist/embedded-app/static/main.c7b3b8b8.js.map +0 -1
  53. package/dist/embedded-app/static/module-mui.0ed988ce.js +0 -3
  54. package/dist/embedded-app/static/module-mui.0ed988ce.js.map +0 -1
  55. package/dist/embedded-app/static/module-react-router-dom.3e907de2.js +0 -23
  56. package/dist/embedded-app/static/module-react-router-dom.3e907de2.js.map +0 -1
  57. package/dist/embedded-app/static/module-react-router.f207f6b1.js +0 -23
  58. package/dist/embedded-app/static/module-react-router.f207f6b1.js.map +0 -1
  59. package/dist/embedded-app/static/vendor.c7b3b8b8.js +0 -155
  60. package/dist/embedded-app/static/vendor.c7b3b8b8.js.map +0 -1
@@ -1,23 +0,0 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[9669],{73970:(_a,Hr,_e)=>{_e.d(Hr,{Kd:()=>qn,N_:()=>ra});var ie=_e(14041),Nt=_e.t(ie,2),zr=_e(43144),Br=_e.t(zr,2),Ue=_e(18690),It=_e(74808);/**
2
- * @remix-run/router v1.18.0
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 j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j.apply(this,arguments)}var G;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(G||(G={}));const Ot="popstate";function Ca(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((v,g)=>p(v,typeof v=="string"?null:v.state,g===0?"default":void 0));let o=u(r??a.length-1),i=G.Pop,s=null;function u(v){return Math.min(Math.max(v,0),a.length-1)}function f(){return a[o]}function p(v,g,b){g===void 0&&(g=null);let x=fe(a?f().pathname:"/",v,g,b);return de(x.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(v)),x}function m(v){return typeof v=="string"?v:he(v)}return{get index(){return o},get action(){return i},get location(){return f()},createHref:m,createURL(v){return new URL(m(v),"http://localhost")},encodeLocation(v){let g=typeof v=="string"?ue(v):v;return{pathname:g.pathname||"",search:g.search||"",hash:g.hash||""}},push(v,g){i=G.Push;let b=p(v,g);o+=1,a.splice(o,a.length,b),n&&s&&s({action:i,location:b,delta:1})},replace(v,g){i=G.Replace;let b=p(v,g);a[o]=b,n&&s&&s({action:i,location:b,delta:0})},go(v){i=G.Pop;let g=u(o+v),b=a[g];o=g,s&&s({action:i,location:b,delta:v})},listen(v){return s=v,()=>{s=null}}}}function kr(e){e===void 0&&(e={});function t(n,a){let{pathname:o,search:i,hash:s}=n.location;return fe("",{pathname:o,search:i,hash:s},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:he(a)}return Ht(t,r,null,e)}function Ta(e){e===void 0&&(e={});function t(a,o){let{pathname:i="/",search:s="",hash:u=""}=ue(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),fe("",{pathname:i,search:s,hash:u},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(a,o){let i=a.document.querySelector("base"),s="";if(i&&i.getAttribute("href")){let u=a.location.href,f=u.indexOf("#");s=f===-1?u:u.slice(0,f)}return s+"#"+(typeof o=="string"?o:he(o))}function n(a,o){de(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return Ht(t,r,n,e)}function H(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function de(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Kr(){return Math.random().toString(36).substr(2,8)}function jt(e,t){return{usr:e.state,key:e.key,idx:t}}function fe(e,t,r,n){return r===void 0&&(r=null),j({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ue(t):t,{state:r,key:t&&t.key||n||Kr()})}function he(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function ue(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function Ht(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=G.Pop,u=null,f=p();f==null&&(f=0,i.replaceState(j({},i.state,{idx:f}),""));function p(){return(i.state||{idx:null}).idx}function m(){s=G.Pop;let x=p(),A=x==null?null:x-f;f=x,u&&u({action:s,location:b.location,delta:A})}function w(x,A){s=G.Push;let E=fe(b.location,x,A);r&&r(E,x),f=p()+1;let D=jt(E,f),R=b.createHref(E);try{i.pushState(D,"",R)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;a.location.assign(R)}o&&u&&u({action:s,location:b.location,delta:1})}function v(x,A){s=G.Replace;let E=fe(b.location,x,A);r&&r(E,x),f=p();let D=jt(E,f),R=b.createHref(E);i.replaceState(D,"",R),o&&u&&u({action:s,location:b.location,delta:0})}function g(x){let A=a.location.origin!=="null"?a.location.origin:a.location.href,E=typeof x=="string"?x:he(x);return E=E.replace(/ $/,"%20"),H(A,"No window.location.(origin|href) available to create URL for href: "+E),new URL(E,A)}let b={get action(){return s},get location(){return e(a,i)},listen(x){if(u)throw new Error("A history only accepts one active listener");return a.addEventListener(Ot,m),u=x,()=>{a.removeEventListener(Ot,m),u=null}},createHref(x){return t(a,x)},createURL:g,encodeLocation(x){let A=g(x);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:w,replace:v,go(x){return i.go(x)}};return b}var B;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(B||(B={}));const Wr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Vr(e){return e.index===!0}function Ne(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,o)=>{let i=[...r,String(o)],s=typeof a.id=="string"?a.id:i.join("-");if(H(a.index!==!0||!a.children,"Cannot specify children on an index route"),H(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),Vr(a)){let u=j({},a,t(a),{id:s});return n[s]=u,u}else{let u=j({},a,t(a),{id:s,children:void 0});return n[s]=u,a.children&&(u.children=Ne(a.children,t,i,n)),u}})}function ge(e,t,r){return r===void 0&&(r="/"),rt(e,t,r,!1)}function rt(e,t,r,n){let a=typeof t=="string"?ue(t):t,o=We(a.pathname||"/",r);if(o==null)return null;let i=zt(e);Yr(i);let s=null;for(let u=0;s==null&&u<i.length;++u){let f=an(o);s=rn(i[u],f,n)}return s}function $r(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function zt(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(o,i,s)=>{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(H(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let f=Ve([n,u.relativePath]),p=r.concat(u);o.children&&o.children.length>0&&(H(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),zt(o.children,t,p,f)),!(o.path==null&&!o.index)&&t.push({path:f,score:en(f,o.index),routesMeta:p})};return e.forEach((o,i)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))a(o,i);else for(let u of Bt(o.path))a(o,i,u)}),t}function Bt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Bt(n.join("/")),s=[];return s.push(...i.map(u=>u===""?o:[o,u].join("/"))),a&&s.push(...i),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Yr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:tn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Jr=/^:[\w-]+$/,Gr=3,Xr=2,Qr=1,Zr=10,qr=null,kt=e=>e==="*";function en(e,t){let r=e.split("/"),n=r.length;return r.some(kt)&&(n+=qr),t&&(n+=Xr),r.filter(a=>!kt(a)).reduce((a,o)=>a+(Jr.test(o)?Gr:o===""?Qr:Zr),n)}function tn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function rn(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},o="/",i=[];for(let s=0;s<n.length;++s){let u=n[s],f=s===n.length-1,p=o==="/"?t:t.slice(o.length)||"/",m=Kt({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},p),w=u.route;if(!m&&f&&r&&!n[n.length-1].route.index&&(m=Kt({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},p)),!m)return null;Object.assign(a,m.params),i.push({params:a,pathname:Ve([o,m.pathname]),pathnameBase:cn(Ve([o,m.pathnameBase])),route:w}),m.pathnameBase!=="/"&&(o=Ve([o,m.pathnameBase]))}return i}function Fa(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(de(!1,'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".')),r=r.replace(/\*$/,"/*"));const n=r.startsWith("/")?"/":"",a=i=>i==null?"":typeof i=="string"?i:String(i),o=r.split(/\/+/).map((i,s,u)=>{if(s===u.length-1&&i==="*")return a(t["*"]);const p=i.match(/^:([\w-]+)(\??)$/);if(p){const[,m,w]=p;let v=t[m];return H(w==="?"||v!=null,'Missing ":'+m+'" param'),a(v)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+o.join("/")}function Kt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=nn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:n.reduce((f,p,m)=>{let{paramName:w,isOptional:v}=p;if(w==="*"){let b=s[m]||"";i=o.slice(0,o.length-b.length).replace(/(.)\/+$/,"$1")}const g=s[m];return v&&!g?f[w]=void 0:f[w]=(g||"").replace(/%2F/g,"/"),f},{}),pathname:o,pathnameBase:i,pattern:e}}function nn(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),de(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,s,u)=>(n.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function an(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return de(!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 We(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function on(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ue(e):e;return{pathname:r?r.startsWith("/")?r:ln(r,t):t,search:dn(n),hash:fn(a)}}function ln(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function vt(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Wt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function sn(e,t){let r=Wt(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function un(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ue(e):(a=j({},e),H(!a.pathname||!a.pathname.includes("?"),vt("?","pathname","search",a)),H(!a.pathname||!a.pathname.includes("#"),vt("#","pathname","hash",a)),H(!a.search||!a.search.includes("#"),vt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,s;if(i==null)s=r;else{let m=t.length-1;if(!n&&i.startsWith("..")){let w=i.split("/");for(;w[0]==="..";)w.shift(),m-=1;a.pathname=w.join("/")}s=m>=0?t[m]:"/"}let u=on(a,s),f=i&&i!=="/"&&i.endsWith("/"),p=(o||i===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(f||p)&&(u.pathname+="/"),u}function Ma(e){return e===""||e.pathname===""?"/":typeof e=="string"?ue(e).pathname:e.pathname}const Ve=e=>e.join("/").replace(/\/\/+/g,"/"),cn=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dn=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fn=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Aa=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r,a=new Headers(n.headers);return a.has("Content-Type")||a.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(t),j({},n,{headers:a}))};class Vt extends null{}class hn{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],H(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((o,i)=>n=i),this.controller=new AbortController;let a=()=>n(new Vt("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((o,i)=>{let[s,u]=i;return Object.assign(o,{[s]:this.trackPromise(s,u)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(a=>this.onSettle(n,t,void 0,a),a=>this.onSettle(n,t,a));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,a){if(this.controller.signal.aborted&&n instanceof Vt)return this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n);if(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n===void 0&&a===void 0){let o=new Error('Deferred data for key "'+r+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(t,"_error",{get:()=>o}),this.emit(!1,r),Promise.reject(o)}return a===void 0?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>a}),this.emit(!1,r),a)}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=()=>this.cancel();t.addEventListener("abort",n),r=await new Promise(a=>{this.subscribe(o=>{t.removeEventListener("abort",n),(o||this.done)&&a(o)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return H(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,a]=r;return Object.assign(t,{[n]:pn(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function mn(e){return e instanceof Promise&&e._tracked===!0}function pn(e){if(!mn(e))return e;if(e._error)throw e._error;return e._data}const Ua=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new hn(t,n)},yn=function(t,r){r===void 0&&(r=302);let n=r;typeof n=="number"?n={status:n}:typeof n.status>"u"&&(n.status=302);let a=new Headers(n.headers);return a.set("Location",t),new Response(null,j({},n,{headers:a}))},Na=(e,t)=>{let r=yn(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class $t{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function $e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Yt=["post","put","patch","delete"],vn=new Set(Yt),gn=["get",...Yt],wn=new Set(gn),bn=new Set([301,302,303,307,308]),Rn=new Set([307,308]),gt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Sn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ye={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jt=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gt="remix-router-transitions";function Ia(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;H(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let l=e.detectErrorBoundary;a=c=>({hasErrorBoundary:l(c)})}else a=Jt;let o={},i=Ne(e.routes,a,void 0,o),s,u=e.basename||"/",f=e.unstable_dataStrategy||ar,p=e.unstable_patchRoutesOnMiss,m=j({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),w=null,v=new Set,g=null,b=null,x=null,A=e.hydrationData!=null,E=ge(i,e.history.location,u),D=null;if(E==null&&!p){let l=Y(404,{pathname:e.history.location.pathname}),{matches:c,route:d}=nt(i);E=c,D={[d.id]:l}}E&&p&&!e.hydrationData&&Ut(E,i,e.history.location.pathname).active&&(E=null);let R;if(!E)R=!1,E=[];else if(E.some(l=>l.route.lazy))R=!1;else if(!E.some(l=>l.route.loader))R=!0;else if(m.v7_partialHydration){let l=e.hydrationData?e.hydrationData.loaderData:null,c=e.hydrationData?e.hydrationData.errors:null,d=y=>y.route.loader?typeof y.route.loader=="function"&&y.route.loader.hydrate===!0?!1:l&&l[y.route.id]!==void 0||c&&c[y.route.id]!==void 0:!0;if(c){let y=E.findIndex(P=>c[P.route.id]!==void 0);R=E.slice(0,y+1).every(d)}else R=E.every(d)}else R=e.hydrationData!=null;let O,h={historyAction:e.history.action,location:e.history.location,matches:E,initialized:R,navigation:gt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||D,fetchers:new Map,blockers:new Map},M=G.Pop,U=!1,T,z=!1,k=new Map,Z=null,se=!1,X=!1,Pe=[],st=[],q=new Map,ut=0,Qe=-1,je=new Map,me=new Set,He=new Map,Ze=new Map,pe=new Set,Fe=new Map,Me=new Map,ca=new Map,Tt=!1;function da(){if(w=e.history.listen(l=>{let{action:c,location:d,delta:y}=l;if(Tt){Tt=!1;return}de(Me.size===0||y!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let P=Nr({currentLocation:h.location,nextLocation:d,historyAction:c});if(P&&y!=null){Tt=!0,e.history.go(y*-1),dt(P,{state:"blocked",location:d,proceed(){dt(P,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),e.history.go(y)},reset(){let L=new Map(h.blockers);L.set(P,Ye),ne({blockers:L})}});return}return Ae(c,d)}),r){Nn(t,k);let l=()=>In(t,k);t.addEventListener("pagehide",l),Z=()=>t.removeEventListener("pagehide",l)}return h.initialized||Ae(G.Pop,h.location,{initialHydration:!0}),O}function fa(){w&&w(),Z&&Z(),v.clear(),T&&T.abort(),h.fetchers.forEach((l,c)=>ct(c)),h.blockers.forEach((l,c)=>Ur(c))}function ha(l){return v.add(l),()=>v.delete(l)}function ne(l,c){c===void 0&&(c={}),h=j({},h,l);let d=[],y=[];m.v7_fetcherPersist&&h.fetchers.forEach((P,L)=>{P.state==="idle"&&(pe.has(L)?y.push(L):d.push(L))}),[...v].forEach(P=>P(h,{deletedFetchers:y,unstable_viewTransitionOpts:c.viewTransitionOpts,unstable_flushSync:c.flushSync===!0})),m.v7_fetcherPersist&&(d.forEach(P=>h.fetchers.delete(P)),y.forEach(P=>ct(P)))}function ze(l,c,d){var y,P;let{flushSync:L}=d===void 0?{}:d,F=h.actionData!=null&&h.navigation.formMethod!=null&&oe(h.navigation.formMethod)&&h.navigation.state==="loading"&&((y=l.state)==null?void 0:y._isRedirect)!==!0,S;c.actionData?Object.keys(c.actionData).length>0?S=c.actionData:S=null:F?S=h.actionData:S=null;let N=c.loaderData?fr(h.loaderData,c.loaderData,c.matches||[],c.errors):h.loaderData,_=h.blockers;_.size>0&&(_=new Map(_),_.forEach((W,$)=>_.set($,Ye)));let C=U===!0||h.navigation.formMethod!=null&&oe(h.navigation.formMethod)&&((P=l.state)==null?void 0:P._isRedirect)!==!0;s&&(i=s,s=void 0),se||M===G.Pop||(M===G.Push?e.history.push(l,l.state):M===G.Replace&&e.history.replace(l,l.state));let V;if(M===G.Pop){let W=k.get(h.location.pathname);W&&W.has(l.pathname)?V={currentLocation:h.location,nextLocation:l}:k.has(l.pathname)&&(V={currentLocation:l,nextLocation:h.location})}else if(z){let W=k.get(h.location.pathname);W?W.add(l.pathname):(W=new Set([l.pathname]),k.set(h.location.pathname,W)),V={currentLocation:h.location,nextLocation:l}}ne(j({},c,{actionData:S,loaderData:N,historyAction:M,location:l,initialized:!0,navigation:gt,revalidation:"idle",restoreScrollPosition:Or(l,c.matches||h.matches),preventScrollReset:C,blockers:_}),{viewTransitionOpts:V,flushSync:L===!0}),M=G.Pop,U=!1,z=!1,se=!1,X=!1,Pe=[],st=[]}async function Lr(l,c){if(typeof l=="number"){e.history.go(l);return}let d=bt(h.location,h.matches,u,m.v7_prependBasename,l,m.v7_relativeSplatPath,c?.fromRouteId,c?.relative),{path:y,submission:P,error:L}=Qt(m.v7_normalizeFormMethod,!1,d,c),F=h.location,S=fe(h.location,y,c&&c.state);S=j({},S,e.history.encodeLocation(S));let N=c&&c.replace!=null?c.replace:void 0,_=G.Push;N===!0?_=G.Replace:N===!1||P!=null&&oe(P.formMethod)&&P.formAction===h.location.pathname+h.location.search&&(_=G.Replace);let C=c&&"preventScrollReset"in c?c.preventScrollReset===!0:void 0,V=(c&&c.unstable_flushSync)===!0,W=Nr({currentLocation:F,nextLocation:S,historyAction:_});if(W){dt(W,{state:"blocked",location:S,proceed(){dt(W,{state:"proceeding",proceed:void 0,reset:void 0,location:S}),Lr(l,c)},reset(){let $=new Map(h.blockers);$.set(W,Ye),ne({blockers:$})}});return}return await Ae(_,S,{submission:P,pendingError:L,preventScrollReset:C,replace:c&&c.replace,enableViewTransition:c&&c.unstable_viewTransition,flushSync:V})}function ma(){if(Ft(),ne({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){Ae(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}Ae(M||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation})}}async function Ae(l,c,d){T&&T.abort(),T=null,M=l,se=(d&&d.startUninterruptedRevalidation)===!0,Pa(h.location,h.matches),U=(d&&d.preventScrollReset)===!0,z=(d&&d.enableViewTransition)===!0;let y=s||i,P=d&&d.overrideNavigation,L=ge(y,c,u),F=(d&&d.flushSync)===!0,S=Ut(L,y,c.pathname);if(S.active&&S.matches&&(L=S.matches),!L){let{error:K,notFoundMatches:re,route:ee}=Mt(c.pathname);ze(c,{matches:re,loaderData:{},errors:{[ee.id]:K}},{flushSync:F});return}if(h.initialized&&!X&&_n(h.location,c)&&!(d&&d.submission&&oe(d.submission.formMethod))){ze(c,{matches:L},{flushSync:F});return}T=new AbortController;let N=Ie(e.history,c,T.signal,d&&d.submission),_;if(d&&d.pendingError)_=[Ce(L).route.id,{type:B.error,error:d.pendingError}];else if(d&&d.submission&&oe(d.submission.formMethod)){let K=await pa(N,c,d.submission,L,S.active,{replace:d.replace,flushSync:F});if(K.shortCircuited)return;if(K.pendingActionResult){let[re,ee]=K.pendingActionResult;if(te(ee)&&$e(ee.error)&&ee.error.status===404){T=null,ze(c,{matches:K.matches,loaderData:{},errors:{[re]:ee.error}});return}}L=K.matches||L,_=K.pendingActionResult,P=Pt(c,d.submission),F=!1,S.active=!1,N=Ie(e.history,N.url,N.signal)}let{shortCircuited:C,matches:V,loaderData:W,errors:$}=await ya(N,c,L,S.active,P,d&&d.submission,d&&d.fetcherSubmission,d&&d.replace,d&&d.initialHydration===!0,F,_);C||(T=null,ze(c,j({matches:V||L},hr(_),{loaderData:W,errors:$})))}async function pa(l,c,d,y,P,L){L===void 0&&(L={}),Ft();let F=An(c,d);if(ne({navigation:F},{flushSync:L.flushSync===!0}),P){let _=await ht(y,c.pathname,l.signal);if(_.type==="aborted")return{shortCircuited:!0};if(_.type==="error"){let{boundaryId:C,error:V}=ft(c.pathname,_);return{matches:_.partialMatches,pendingActionResult:[C,{type:B.error,error:V}]}}else if(_.matches)y=_.matches;else{let{notFoundMatches:C,error:V,route:W}=Mt(c.pathname);return{matches:C,pendingActionResult:[W.id,{type:B.error,error:V}]}}}let S,N=Te(y,c);if(!N.route.action&&!N.route.lazy)S={type:B.error,error:Y(405,{method:l.method,pathname:c.pathname,routeId:N.route.id})};else if(S=(await et("action",l,[N],y))[0],l.signal.aborted)return{shortCircuited:!0};if(be(S)){let _;return L&&L.replace!=null?_=L.replace:_=sr(S.response.headers.get("Location"),new URL(l.url),u)===h.location.pathname+h.location.search,await qe(l,S,{submission:d,replace:_}),{shortCircuited:!0}}if(we(S))throw Y(400,{type:"defer-action"});if(te(S)){let _=Ce(y,N.route.id);return(L&&L.replace)!==!0&&(M=G.Push),{matches:y,pendingActionResult:[_.route.id,S]}}return{matches:y,pendingActionResult:[N.route.id,S]}}async function ya(l,c,d,y,P,L,F,S,N,_,C){let V=P||Pt(c,L),W=L||F||wr(V),$=!se&&(!m.v7_partialHydration||!N);if(y){if($){let Q=_r(C);ne(j({navigation:V},Q!==void 0?{actionData:Q}:{}),{flushSync:_})}let I=await ht(d,c.pathname,l.signal);if(I.type==="aborted")return{shortCircuited:!0};if(I.type==="error"){let{boundaryId:Q,error:ae}=ft(c.pathname,I);return{matches:I.partialMatches,loaderData:{},errors:{[Q]:ae}}}else if(I.matches)d=I.matches;else{let{error:Q,notFoundMatches:ae,route:J}=Mt(c.pathname);return{matches:ae,loaderData:{},errors:{[J.id]:Q}}}}let K=s||i,[re,ee]=qt(e.history,h,d,W,c,m.v7_partialHydration&&N===!0,m.v7_skipActionErrorRevalidation,X,Pe,st,pe,He,me,K,u,C);if(At(I=>!(d&&d.some(Q=>Q.route.id===I))||re&&re.some(Q=>Q.route.id===I)),Qe=++ut,re.length===0&&ee.length===0){let I=Mr();return ze(c,j({matches:d,loaderData:{},errors:C&&te(C[1])?{[C[0]]:C[1].error}:null},hr(C),I?{fetchers:new Map(h.fetchers)}:{}),{flushSync:_}),{shortCircuited:!0}}if($){let I={};if(!y){I.navigation=V;let Q=_r(C);Q!==void 0&&(I.actionData=Q)}ee.length>0&&(I.fetchers=va(ee)),ne(I,{flushSync:_})}ee.forEach(I=>{q.has(I.key)&&De(I.key),I.controller&&q.set(I.key,I.controller)});let tt=()=>ee.forEach(I=>De(I.key));T&&T.signal.addEventListener("abort",tt);let{loaderResults:Le,fetcherResults:Be}=await Cr(h.matches,d,re,ee,l);if(l.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",tt),ee.forEach(I=>q.delete(I.key));let ke=mr([...Le,...Be]);if(ke){if(ke.idx>=re.length){let I=ee[ke.idx-re.length].key;me.add(I)}return await qe(l,ke.result,{replace:S}),{shortCircuited:!0}}let{loaderData:Ke,errors:ce}=dr(h,d,re,Le,C,ee,Be,Fe);Fe.forEach((I,Q)=>{I.subscribe(ae=>{(ae||I.done)&&Fe.delete(Q)})}),m.v7_partialHydration&&N&&h.errors&&Object.entries(h.errors).filter(I=>{let[Q]=I;return!re.some(ae=>ae.route.id===Q)}).forEach(I=>{let[Q,ae]=I;ce=Object.assign(ce||{},{[Q]:ae})});let mt=Mr(),pt=Ar(Qe),yt=mt||pt||ee.length>0;return j({matches:d,loaderData:Ke,errors:ce},yt?{fetchers:new Map(h.fetchers)}:{})}function _r(l){if(l&&!te(l[1]))return{[l[0]]:l[1].data};if(h.actionData)return Object.keys(h.actionData).length===0?null:h.actionData}function va(l){return l.forEach(c=>{let d=h.fetchers.get(c.key),y=Je(void 0,d?d.data:void 0);h.fetchers.set(c.key,y)}),new Map(h.fetchers)}function ga(l,c,d,y){if(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.");q.has(l)&&De(l);let P=(y&&y.unstable_flushSync)===!0,L=s||i,F=bt(h.location,h.matches,u,m.v7_prependBasename,d,m.v7_relativeSplatPath,c,y?.relative),S=ge(L,F,u),N=Ut(S,L,F);if(N.active&&N.matches&&(S=N.matches),!S){ye(l,c,Y(404,{pathname:F}),{flushSync:P});return}let{path:_,submission:C,error:V}=Qt(m.v7_normalizeFormMethod,!0,F,y);if(V){ye(l,c,V,{flushSync:P});return}let W=Te(S,_);if(U=(y&&y.preventScrollReset)===!0,C&&oe(C.formMethod)){wa(l,c,_,W,S,N.active,P,C);return}He.set(l,{routeId:c,path:_}),ba(l,c,_,W,S,N.active,P,C)}async function wa(l,c,d,y,P,L,F,S){Ft(),He.delete(l);function N(J){if(!J.route.action&&!J.route.lazy){let ve=Y(405,{method:S.formMethod,pathname:d,routeId:c});return ye(l,c,ve,{flushSync:F}),!0}return!1}if(!L&&N(y))return;let _=h.fetchers.get(l);xe(l,Un(S,_),{flushSync:F});let C=new AbortController,V=Ie(e.history,d,C.signal,S);if(L){let J=await ht(P,d,V.signal);if(J.type==="aborted")return;if(J.type==="error"){let{error:ve}=ft(d,J);ye(l,c,ve,{flushSync:F});return}else if(J.matches){if(P=J.matches,y=Te(P,d),N(y))return}else{ye(l,c,Y(404,{pathname:d}),{flushSync:F});return}}q.set(l,C);let W=ut,K=(await et("action",V,[y],P))[0];if(V.signal.aborted){q.get(l)===C&&q.delete(l);return}if(m.v7_fetcherPersist&&pe.has(l)){if(be(K)||te(K)){xe(l,Se(void 0));return}}else{if(be(K))if(q.delete(l),Qe>W){xe(l,Se(void 0));return}else return me.add(l),xe(l,Je(S)),qe(V,K,{fetcherSubmission:S});if(te(K)){ye(l,c,K.error);return}}if(we(K))throw Y(400,{type:"defer-action"});let re=h.navigation.location||h.location,ee=Ie(e.history,re,C.signal),tt=s||i,Le=h.navigation.state!=="idle"?ge(tt,h.navigation.location,u):h.matches;H(Le,"Didn't find any matches after fetcher action");let Be=++ut;je.set(l,Be);let ke=Je(S,K.data);h.fetchers.set(l,ke);let[Ke,ce]=qt(e.history,h,Le,S,re,!1,m.v7_skipActionErrorRevalidation,X,Pe,st,pe,He,me,tt,u,[y.route.id,K]);ce.filter(J=>J.key!==l).forEach(J=>{let ve=J.key,jr=h.fetchers.get(ve),La=Je(void 0,jr?jr.data:void 0);h.fetchers.set(ve,La),q.has(ve)&&De(ve),J.controller&&q.set(ve,J.controller)}),ne({fetchers:new Map(h.fetchers)});let mt=()=>ce.forEach(J=>De(J.key));C.signal.addEventListener("abort",mt);let{loaderResults:pt,fetcherResults:yt}=await Cr(h.matches,Le,Ke,ce,ee);if(C.signal.aborted)return;C.signal.removeEventListener("abort",mt),je.delete(l),q.delete(l),ce.forEach(J=>q.delete(J.key));let I=mr([...pt,...yt]);if(I){if(I.idx>=Ke.length){let J=ce[I.idx-Ke.length].key;me.add(J)}return qe(ee,I.result)}let{loaderData:Q,errors:ae}=dr(h,h.matches,Ke,pt,void 0,ce,yt,Fe);if(h.fetchers.has(l)){let J=Se(K.data);h.fetchers.set(l,J)}Ar(Be),h.navigation.state==="loading"&&Be>Qe?(H(M,"Expected pending action"),T&&T.abort(),ze(h.navigation.location,{matches:Le,loaderData:Q,errors:ae,fetchers:new Map(h.fetchers)})):(ne({errors:ae,loaderData:fr(h.loaderData,Q,Le,ae),fetchers:new Map(h.fetchers)}),X=!1)}async function ba(l,c,d,y,P,L,F,S){let N=h.fetchers.get(l);xe(l,Je(S,N?N.data:void 0),{flushSync:F});let _=new AbortController,C=Ie(e.history,d,_.signal);if(L){let K=await ht(P,d,C.signal);if(K.type==="aborted")return;if(K.type==="error"){let{error:re}=ft(d,K);ye(l,c,re,{flushSync:F});return}else if(K.matches)P=K.matches,y=Te(P,d);else{ye(l,c,Y(404,{pathname:d}),{flushSync:F});return}}q.set(l,_);let V=ut,$=(await et("loader",C,[y],P))[0];if(we($)&&($=await gr($,C.signal,!0)||$),q.get(l)===_&&q.delete(l),!C.signal.aborted){if(pe.has(l)){xe(l,Se(void 0));return}if(be($))if(Qe>V){xe(l,Se(void 0));return}else{me.add(l),await qe(C,$);return}if(te($)){ye(l,c,$.error);return}H(!we($),"Unhandled fetcher deferred data"),xe(l,Se($.data))}}async function qe(l,c,d){let{submission:y,fetcherSubmission:P,replace:L}=d===void 0?{}:d;c.response.headers.has("X-Remix-Revalidate")&&(X=!0);let F=c.response.headers.get("Location");H(F,"Expected a Location header on the redirect Response"),F=sr(F,new URL(l.url),u);let S=fe(h.location,F,{_isRedirect:!0});if(r){let $=!1;if(c.response.headers.has("X-Remix-Reload-Document"))$=!0;else if(wt.test(F)){const K=e.history.createURL(F);$=K.origin!==t.location.origin||We(K.pathname,u)==null}if($){L?t.location.replace(F):t.location.assign(F);return}}T=null;let N=L===!0?G.Replace:G.Push,{formMethod:_,formAction:C,formEncType:V}=h.navigation;!y&&!P&&_&&C&&V&&(y=wr(h.navigation));let W=y||P;if(Rn.has(c.response.status)&&W&&oe(W.formMethod))await Ae(N,S,{submission:j({},W,{formAction:F}),preventScrollReset:U});else{let $=Pt(S,y);await Ae(N,S,{overrideNavigation:$,fetcherSubmission:P,preventScrollReset:U})}}async function et(l,c,d,y){try{let P=await ir(f,l,c,d,y,o,a);return await Promise.all(P.map((L,F)=>{if(yr(L)){let S=L.result;return{type:B.redirect,response:lr(S,c,d[F].route.id,y,u,m.v7_relativeSplatPath)}}return or(L)}))}catch(P){return d.map(()=>({type:B.error,error:P}))}}async function Cr(l,c,d,y,P){let[L,...F]=await Promise.all([d.length?et("loader",P,d,c):[],...y.map(S=>{if(S.matches&&S.match&&S.controller){let N=Ie(e.history,S.path,S.controller.signal);return et("loader",N,[S.match],S.matches).then(_=>_[0])}else return Promise.resolve({type:B.error,error:Y(404,{pathname:S.path})})})]);return await Promise.all([vr(l,d,L,L.map(()=>P.signal),!1,h.loaderData),vr(l,y.map(S=>S.match),F,y.map(S=>S.controller?S.controller.signal:null),!0)]),{loaderResults:L,fetcherResults:F}}function Ft(){X=!0,Pe.push(...At()),He.forEach((l,c)=>{q.has(c)&&(st.push(c),De(c))})}function xe(l,c,d){d===void 0&&(d={}),h.fetchers.set(l,c),ne({fetchers:new Map(h.fetchers)},{flushSync:(d&&d.flushSync)===!0})}function ye(l,c,d,y){y===void 0&&(y={});let P=Ce(h.matches,c);ct(l),ne({errors:{[P.route.id]:d},fetchers:new Map(h.fetchers)},{flushSync:(y&&y.flushSync)===!0})}function Tr(l){return m.v7_fetcherPersist&&(Ze.set(l,(Ze.get(l)||0)+1),pe.has(l)&&pe.delete(l)),h.fetchers.get(l)||Sn}function ct(l){let c=h.fetchers.get(l);q.has(l)&&!(c&&c.state==="loading"&&je.has(l))&&De(l),He.delete(l),je.delete(l),me.delete(l),pe.delete(l),h.fetchers.delete(l)}function Ra(l){if(m.v7_fetcherPersist){let c=(Ze.get(l)||0)-1;c<=0?(Ze.delete(l),pe.add(l)):Ze.set(l,c)}else ct(l);ne({fetchers:new Map(h.fetchers)})}function De(l){let c=q.get(l);H(c,"Expected fetch controller: "+l),c.abort(),q.delete(l)}function Fr(l){for(let c of l){let d=Tr(c),y=Se(d.data);h.fetchers.set(c,y)}}function Mr(){let l=[],c=!1;for(let d of me){let y=h.fetchers.get(d);H(y,"Expected fetcher: "+d),y.state==="loading"&&(me.delete(d),l.push(d),c=!0)}return Fr(l),c}function Ar(l){let c=[];for(let[d,y]of je)if(y<l){let P=h.fetchers.get(d);H(P,"Expected fetcher: "+d),P.state==="loading"&&(De(d),je.delete(d),c.push(d))}return Fr(c),c.length>0}function Sa(l,c){let d=h.blockers.get(l)||Ye;return Me.get(l)!==c&&Me.set(l,c),d}function Ur(l){h.blockers.delete(l),Me.delete(l)}function dt(l,c){let d=h.blockers.get(l)||Ye;H(d.state==="unblocked"&&c.state==="blocked"||d.state==="blocked"&&c.state==="blocked"||d.state==="blocked"&&c.state==="proceeding"||d.state==="blocked"&&c.state==="unblocked"||d.state==="proceeding"&&c.state==="unblocked","Invalid blocker state transition: "+d.state+" -> "+c.state);let y=new Map(h.blockers);y.set(l,c),ne({blockers:y})}function Nr(l){let{currentLocation:c,nextLocation:d,historyAction:y}=l;if(Me.size===0)return;Me.size>1&&de(!1,"A router only supports one blocker at a time");let P=Array.from(Me.entries()),[L,F]=P[P.length-1],S=h.blockers.get(L);if(!(S&&S.state==="proceeding")&&F({currentLocation:c,nextLocation:d,historyAction:y}))return L}function Mt(l){let c=Y(404,{pathname:l}),d=s||i,{matches:y,route:P}=nt(d);return At(),{notFoundMatches:y,route:P,error:c}}function ft(l,c){return{boundaryId:Ce(c.partialMatches).route.id,error:Y(400,{type:"route-discovery",pathname:l,message:c.error!=null&&"message"in c.error?c.error:String(c.error)})}}function At(l){let c=[];return Fe.forEach((d,y)=>{(!l||l(y))&&(d.cancel(),c.push(y),Fe.delete(y))}),c}function Ea(l,c,d){if(g=l,x=c,b=d||null,!A&&h.navigation===gt){A=!0;let y=Or(h.location,h.matches);y!=null&&ne({restoreScrollPosition:y})}return()=>{g=null,x=null,b=null}}function Ir(l,c){return b&&b(l,c.map(y=>$r(y,h.loaderData)))||l.key}function Pa(l,c){if(g&&x){let d=Ir(l,c);g[d]=x()}}function Or(l,c){if(g){let d=Ir(l,c),y=g[d];if(typeof y=="number")return y}return null}function Ut(l,c,d){if(p)if(l){let y=l[l.length-1].route;if(y.path&&(y.path==="*"||y.path.endsWith("/*")))return{active:!0,matches:rt(c,d,u,!0)}}else return{active:!0,matches:rt(c,d,u,!0)||[]};return{active:!1,matches:null}}async function ht(l,c,d){let y=l,P=y.length>0?y[y.length-1].route:null;for(;;){let L=s==null,F=s||i;try{await Dn(p,c,y,F,o,a,ca,d)}catch(C){return{type:"error",error:C,partialMatches:y}}finally{L&&(i=[...i])}if(d.aborted)return{type:"aborted"};let S=ge(F,c,u),N=!1;if(S){let C=S[S.length-1].route;if(C.index)return{type:"success",matches:S};if(C.path&&C.path.length>0)if(C.path==="*")N=!0;else return{type:"success",matches:S}}let _=rt(F,c,u,!0);if(!_||y.map(C=>C.route.id).join("-")===_.map(C=>C.route.id).join("-"))return{type:"success",matches:N?S:null};if(y=_,P=y[y.length-1].route,P.path==="*")return{type:"success",matches:y}}}function xa(l){o={},s=Ne(l,a,void 0,o)}function Da(l,c){let d=s==null;rr(l,c,s||i,o,a),d&&(i=[...i],ne({}))}return O={get basename(){return u},get future(){return m},get state(){return h},get routes(){return i},get window(){return t},initialize:da,subscribe:ha,enableScrollRestoration:Ea,navigate:Lr,fetch:ga,revalidate:ma,createHref:l=>e.history.createHref(l),encodeLocation:l=>e.history.encodeLocation(l),getFetcher:Tr,deleteFetcher:Ra,dispose:fa,getBlocker:Sa,deleteBlocker:Ur,patchRoutes:Da,_internalFetchControllers:q,_internalActiveDeferreds:Fe,_internalSetRoutes:xa},O}const En=Symbol("deferred");function Oa(e,t){H(e.length>0,"You must provide a non-empty routes array to createStaticHandler");let r={},n=(t?t.basename:null)||"/",a;if(t!=null&&t.mapRouteProperties)a=t.mapRouteProperties;else if(t!=null&&t.detectErrorBoundary){let v=t.detectErrorBoundary;a=g=>({hasErrorBoundary:v(g)})}else a=Jt;let o=j({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),i=Ne(e,a,void 0,r);async function s(v,g){let{requestContext:b,skipLoaderErrorBubbling:x,unstable_dataStrategy:A}=g===void 0?{}:g,E=new URL(v.url),D=v.method,R=fe("",he(E),null,"default"),O=ge(i,R,n);if(!St(D)&&D!=="HEAD"){let M=Y(405,{method:D}),{matches:U,route:T}=nt(i);return{basename:n,location:R,matches:U,loaderData:{},actionData:null,errors:{[T.id]:M},statusCode:M.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!O){let M=Y(404,{pathname:R.pathname}),{matches:U,route:T}=nt(i);return{basename:n,location:R,matches:U,loaderData:{},actionData:null,errors:{[T.id]:M},statusCode:M.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let h=await f(v,R,O,b,A||null,x===!0,null);return Re(h)?h:j({location:R,basename:n},h)}async function u(v,g){let{routeId:b,requestContext:x,unstable_dataStrategy:A}=g===void 0?{}:g,E=new URL(v.url),D=v.method,R=fe("",he(E),null,"default"),O=ge(i,R,n);if(!St(D)&&D!=="HEAD"&&D!=="OPTIONS")throw Y(405,{method:D});if(!O)throw Y(404,{pathname:R.pathname});let h=b?O.find(z=>z.route.id===b):Te(O,R);if(b&&!h)throw Y(403,{pathname:R.pathname,routeId:b});if(!h)throw Y(404,{pathname:R.pathname});let M=await f(v,R,O,x,A||null,!1,h);if(Re(M))return M;let U=M.errors?Object.values(M.errors)[0]:void 0;if(U!==void 0)throw U;if(M.actionData)return Object.values(M.actionData)[0];if(M.loaderData){var T;let z=Object.values(M.loaderData)[0];return(T=M.activeDeferreds)!=null&&T[h.route.id]&&(z[En]=M.activeDeferreds[h.route.id]),z}}async function f(v,g,b,x,A,E,D){H(v.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(oe(v.method.toLowerCase()))return await p(v,b,D||Te(b,g),x,A,E,D!=null);let R=await m(v,b,x,A,E,D);return Re(R)?R:j({},R,{actionData:null,actionHeaders:{}})}catch(R){if(Tn(R)&&Re(R.result)){if(R.type===B.error)throw R.result;return R.result}if(Mn(R))return R;throw R}}async function p(v,g,b,x,A,E,D){let R;if(!b.route.action&&!b.route.lazy){let M=Y(405,{method:v.method,pathname:new URL(v.url).pathname,routeId:b.route.id});if(D)throw M;R={type:B.error,error:M}}else R=(await w("action",v,[b],g,D,x,A))[0],v.signal.aborted&&Xt(v,D,o);if(be(R))throw new Response(null,{status:R.response.status,headers:{Location:R.response.headers.get("Location")}});if(we(R)){let M=Y(400,{type:"defer-action"});if(D)throw M;R={type:B.error,error:M}}if(D){if(te(R))throw R.error;return{matches:[b],loaderData:{},actionData:{[b.route.id]:R.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let O=new Request(v.url,{headers:v.headers,redirect:v.redirect,signal:v.signal});if(te(R)){let M=E?b:Ce(g,b.route.id),U=await m(O,g,x,A,E,null,[M.route.id,R]);return j({},U,{statusCode:$e(R.error)?R.error.status:R.statusCode!=null?R.statusCode:500,actionData:null,actionHeaders:j({},R.headers?{[b.route.id]:R.headers}:{})})}let h=await m(O,g,x,A,E,null);return j({},h,{actionData:{[b.route.id]:R.data}},R.statusCode?{statusCode:R.statusCode}:{},{actionHeaders:R.headers?{[b.route.id]:R.headers}:{}})}async function m(v,g,b,x,A,E,D){let R=E!=null;if(R&&!(E!=null&&E.route.loader)&&!(E!=null&&E.route.lazy))throw Y(400,{method:v.method,pathname:new URL(v.url).pathname,routeId:E?.route.id});let h=(E?[E]:D&&te(D[1])?Zt(g,D[0]):g).filter(k=>k.route.loader||k.route.lazy);if(h.length===0)return{matches:g,loaderData:g.reduce((k,Z)=>Object.assign(k,{[Z.route.id]:null}),{}),errors:D&&te(D[1])?{[D[0]]:D[1].error}:null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let M=await w("loader",v,h,g,R,b,x);v.signal.aborted&&Xt(v,R,o);let U=new Map,T=cr(g,h,M,D,U,A),z=new Set(h.map(k=>k.route.id));return g.forEach(k=>{z.has(k.route.id)||(T.loaderData[k.route.id]=null)}),j({},T,{matches:g,activeDeferreds:U.size>0?Object.fromEntries(U.entries()):null})}async function w(v,g,b,x,A,E,D){let R=await ir(D||ar,v,g,b,x,r,a,E);return await Promise.all(R.map((O,h)=>{if(yr(O)){let M=O.result;throw lr(M,g,b[h].route.id,x,n,o.v7_relativeSplatPath)}if(Re(O.result)&&A)throw O;return or(O)}))}return{dataRoutes:i,query:s,queryRoute:u}}function ja(e,t,r){return j({},t,{statusCode:$e(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function Xt(e,t,r){if(r.v7_throwAbortReason&&e.signal.reason!==void 0)throw e.signal.reason;let n=t?"queryRoute":"query";throw new Error(n+"() call aborted: "+e.method+" "+e.url)}function Pn(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function bt(e,t,r,n,a,o,i,s){let u,f;if(i){u=[];for(let m of t)if(u.push(m),m.route.id===i){f=m;break}}else u=t,f=t[t.length-1];let p=un(a||".",sn(u,o),We(e.pathname,r)||e.pathname,s==="path");return a==null&&(p.search=e.search,p.hash=e.hash),(a==null||a===""||a===".")&&f&&f.route.index&&!Et(p.search)&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(p.pathname=p.pathname==="/"?r:Ve([r,p.pathname])),he(p)}function Qt(e,t,r,n){if(!n||!Pn(n))return{path:r};if(n.formMethod&&!St(n.formMethod))return{path:r,error:Y(405,{method:n.formMethod})};let a=()=>({path:r,error:Y(400,{type:"invalid-body"})}),o=n.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),s=pr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!oe(i))return a();let w=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((v,g)=>{let[b,x]=g;return""+v+b+"="+x+`
11
- `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:w}}}else if(n.formEncType==="application/json"){if(!oe(i))return a();try{let w=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:s,formEncType:n.formEncType,formData:void 0,json:w,text:void 0}}}catch{return a()}}}H(typeof FormData=="function","FormData is not available in this environment");let u,f;if(n.formData)u=Rt(n.formData),f=n.formData;else if(n.body instanceof FormData)u=Rt(n.body),f=n.body;else if(n.body instanceof URLSearchParams)u=n.body,f=ur(u);else if(n.body==null)u=new URLSearchParams,f=new FormData;else try{u=new URLSearchParams(n.body),f=ur(u)}catch{return a()}let p={formMethod:i,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:f,json:void 0,text:void 0};if(oe(p.formMethod))return{path:r,submission:p};let m=ue(r);return t&&m.search&&Et(m.search)&&u.append("index",""),m.search="?"+u,{path:he(m),submission:p}}function Zt(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function qt(e,t,r,n,a,o,i,s,u,f,p,m,w,v,g,b){let x=b?te(b[1])?b[1].error:b[1].data:void 0,A=e.createURL(t.location),E=e.createURL(a),D=b&&te(b[1])?b[0]:void 0,R=D?Zt(r,D):r,O=b?b[1].statusCode:void 0,h=i&&O&&O>=400,M=R.filter((T,z)=>{let{route:k}=T;if(k.lazy)return!0;if(k.loader==null)return!1;if(o)return typeof k.loader!="function"||k.loader.hydrate?!0:t.loaderData[k.id]===void 0&&(!t.errors||t.errors[k.id]===void 0);if(xn(t.loaderData,t.matches[z],T)||u.some(X=>X===T.route.id))return!0;let Z=t.matches[z],se=T;return tr(T,j({currentUrl:A,currentParams:Z.params,nextUrl:E,nextParams:se.params},n,{actionResult:x,actionStatus:O,defaultShouldRevalidate:h?!1:s||A.pathname+A.search===E.pathname+E.search||A.search!==E.search||er(Z,se)}))}),U=[];return m.forEach((T,z)=>{if(o||!r.some(Pe=>Pe.route.id===T.routeId)||p.has(z))return;let k=ge(v,T.path,g);if(!k){U.push({key:z,routeId:T.routeId,path:T.path,matches:null,match:null,controller:null});return}let Z=t.fetchers.get(z),se=Te(k,T.path),X=!1;w.has(z)?X=!1:f.includes(z)?X=!0:Z&&Z.state!=="idle"&&Z.data===void 0?X=s:X=tr(se,j({currentUrl:A,currentParams:t.matches[t.matches.length-1].params,nextUrl:E,nextParams:r[r.length-1].params},n,{actionResult:x,actionStatus:O,defaultShouldRevalidate:h?!1:s})),X&&U.push({key:z,routeId:T.routeId,path:T.path,matches:k,match:se,controller:new AbortController})}),[M,U]}function xn(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function er(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function tr(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function Dn(e,t,r,n,a,o,i,s){let u=[t,...r.map(f=>f.route.id)].join("-");try{let f=i.get(u);f||(f=e({path:t,matches:r,patch:(p,m)=>{s.aborted||rr(p,m,n,a,o)}}),i.set(u,f)),f&&Cn(f)&&await f}finally{i.delete(u)}}function rr(e,t,r,n,a){if(e){var o;let i=n[e];H(i,"No route found to patch children into: routeId = "+e);let s=Ne(t,a,[e,"patch",String(((o=i.children)==null?void 0:o.length)||"0")],n);i.children?i.children.push(...s):i.children=s}else{let i=Ne(t,a,["patch",String(r.length||"0")],n);r.push(...i)}}async function nr(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];H(a,"No route found in manifest");let o={};for(let i in n){let u=a[i]!==void 0&&i!=="hasErrorBoundary";de(!u,'Route "'+a.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!Wr.has(i)&&(o[i]=n[i])}Object.assign(a,o),Object.assign(a,j({},t(a),{lazy:void 0}))}function ar(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ir(e,t,r,n,a,o,i,s){let u=n.reduce((m,w)=>m.add(w.route.id),new Set),f=new Set,p=await e({matches:a.map(m=>{let w=u.has(m.route.id);return j({},m,{shouldLoad:w,resolve:g=>(f.add(m.route.id),w?Ln(t,r,m,o,i,g,s):Promise.resolve({type:B.data,result:void 0}))})}),request:r,params:a[0].params,context:s});return a.forEach(m=>H(f.has(m.route.id),'`match.resolve()` was not called for route id "'+m.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),p.filter((m,w)=>u.has(a[w].route.id))}async function Ln(e,t,r,n,a,o,i){let s,u,f=p=>{let m,w=new Promise((b,x)=>m=x);u=()=>m(),t.signal.addEventListener("abort",u);let v=b=>typeof p!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):p({request:t,params:r.params,context:i},...b!==void 0?[b]:[]),g;return o?g=o(b=>v(b)):g=(async()=>{try{return{type:"data",result:await v()}}catch(b){return{type:"error",result:b}}})(),Promise.race([g,w])};try{let p=r.route[e];if(r.route.lazy)if(p){let m,[w]=await Promise.all([f(p).catch(v=>{m=v}),nr(r.route,a,n)]);if(m!==void 0)throw m;s=w}else if(await nr(r.route,a,n),p=r.route[e],p)s=await f(p);else if(e==="action"){let m=new URL(t.url),w=m.pathname+m.search;throw Y(405,{method:t.method,pathname:w,routeId:r.route.id})}else return{type:B.data,result:void 0};else if(p)s=await f(p);else{let m=new URL(t.url),w=m.pathname+m.search;throw Y(404,{pathname:w})}H(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(p){return{type:B.error,result:p}}finally{u&&t.signal.removeEventListener("abort",u)}return s}async function or(e){let{result:t,type:r,status:n}=e;if(Re(t)){let i;try{let s=t.headers.get("Content-Type");s&&/\bapplication\/json\b/.test(s)?t.body==null?i=null:i=await t.json():i=await t.text()}catch(s){return{type:B.error,error:s}}return r===B.error?{type:B.error,error:new $t(t.status,t.statusText,i),statusCode:t.status,headers:t.headers}:{type:B.data,data:i,statusCode:t.status,headers:t.headers}}if(r===B.error)return{type:B.error,error:t,statusCode:$e(t)?t.status:n};if(Fn(t)){var a,o;return{type:B.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((o=t.init)==null?void 0:o.headers)&&new Headers(t.init.headers)}}return{type:B.data,data:t,statusCode:n}}function lr(e,t,r,n,a,o){let i=e.headers.get("Location");if(H(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!wt.test(i)){let s=n.slice(0,n.findIndex(u=>u.route.id===r)+1);i=bt(new URL(t.url),s,a,!0,i,o),e.headers.set("Location",i)}return e}function sr(e,t,r){if(wt.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=We(a.pathname,r)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Ie(e,t,r,n){let a=e.createURL(pr(t)).toString(),o={signal:r};if(n&&oe(n.formMethod)){let{formMethod:i,formEncType:s}=n;o.method=i.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(n.json)):s==="text/plain"?o.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?o.body=Rt(n.formData):o.body=n.formData}return new Request(a,o)}function Rt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function ur(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function cr(e,t,r,n,a,o){let i={},s=null,u,f=!1,p={},m=n&&te(n[1])?n[1].error:void 0;return r.forEach((w,v)=>{let g=t[v].route.id;if(H(!be(w),"Cannot handle redirect results in processLoaderData"),te(w)){let b=w.error;if(m!==void 0&&(b=m,m=void 0),s=s||{},o)s[g]=b;else{let x=Ce(e,g);s[x.route.id]==null&&(s[x.route.id]=b)}i[g]=void 0,f||(f=!0,u=$e(w.error)?w.error.status:500),w.headers&&(p[g]=w.headers)}else we(w)?(a.set(g,w.deferredData),i[g]=w.deferredData.data,w.statusCode!=null&&w.statusCode!==200&&!f&&(u=w.statusCode),w.headers&&(p[g]=w.headers)):(i[g]=w.data,w.statusCode&&w.statusCode!==200&&!f&&(u=w.statusCode),w.headers&&(p[g]=w.headers))}),m!==void 0&&n&&(s={[n[0]]:m},i[n[0]]=void 0),{loaderData:i,errors:s,statusCode:u||200,loaderHeaders:p}}function dr(e,t,r,n,a,o,i,s){let{loaderData:u,errors:f}=cr(t,r,n,a,s,!1);for(let p=0;p<o.length;p++){let{key:m,match:w,controller:v}=o[p];H(i!==void 0&&i[p]!==void 0,"Did not find corresponding fetcher result");let g=i[p];if(!(v&&v.signal.aborted))if(te(g)){let b=Ce(e.matches,w?.route.id);f&&f[b.route.id]||(f=j({},f,{[b.route.id]:g.error})),e.fetchers.delete(m)}else if(be(g))H(!1,"Unhandled fetcher revalidation redirect");else if(we(g))H(!1,"Unhandled fetcher deferred data");else{let b=Se(g.data);e.fetchers.set(m,b)}}return{loaderData:u,errors:f}}function fr(e,t,r,n){let a=j({},t);for(let o of r){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function hr(e){return e?te(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ce(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function nt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Y(e,t){let{pathname:r,routeId:n,method:a,type:o,message:i}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",o==="route-discovery"?u='Unable to match URL "'+r+'" - the `unstable_patchRoutesOnMiss()` '+(`function threw the following error:
12
- `+i):a&&r&&n?u="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+n+'" does not match URL "'+r+'"'):e===404?(s="Not Found",u='No route matches URL "'+r+'"'):e===405&&(s="Method Not Allowed",a&&r&&n?u="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(u='Invalid request method "'+a.toUpperCase()+'"')),new $t(e||500,s,new Error(u),!0)}function mr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(be(r))return{result:r,idx:t}}}function pr(e){let t=typeof e=="string"?ue(e):e;return he(j({},t,{hash:""}))}function _n(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Cn(e){return typeof e=="object"&&e!=null&&"then"in e}function Tn(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type===B.data||e.type===B.error)}function yr(e){return Re(e.result)&&bn.has(e.result.status)}function we(e){return e.type===B.deferred}function te(e){return e.type===B.error}function be(e){return(e&&e.type)===B.redirect}function Fn(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Re(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Mn(e){if(!Re(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function St(e){return wn.has(e.toLowerCase())}function oe(e){return vn.has(e.toLowerCase())}async function vr(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let s=r[i],u=t[i];if(!u)continue;let f=e.find(m=>m.route.id===u.route.id),p=f!=null&&!er(f,u)&&(o&&o[u.route.id])!==void 0;if(we(s)&&(a||p)){let m=n[i];H(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await gr(s,m,a).then(w=>{w&&(r[i]=w||r[i])})}}}async function gr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:B.data,data:e.deferredData.unwrappedData}}catch(a){return{type:B.error,error:a}}return{type:B.data,data:e.deferredData.data}}}function Et(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Te(e,t){let r=typeof t=="string"?ue(t).search:t.search;if(e[e.length-1].route.index&&Et(r||""))return e[e.length-1];let n=Wt(e);return n[n.length-1]}function wr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function Pt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function An(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Je(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Un(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Se(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Nn(e,t){try{let r=e.sessionStorage.getItem(Gt);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function In(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Gt,JSON.stringify(r))}catch(n){de(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
13
- * React Router DOM v6.25.1
14
- *
15
- * Copyright (c) Remix Software Inc.
16
- *
17
- * This source code is licensed under the MIT license found in the
18
- * LICENSE.md file in the root directory of this source tree.
19
- *
20
- * @license MIT
21
- */function le(){return le=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},le.apply(this,arguments)}function On(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o<n.length;o++)a=n[o],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}const xt="get",Dt="application/x-www-form-urlencoded";function at(e){return e!=null&&typeof e.tagName=="string"}function jn(e){return at(e)&&e.tagName.toLowerCase()==="button"}function Hn(e){return at(e)&&e.tagName.toLowerCase()==="form"}function zn(e){return at(e)&&e.tagName.toLowerCase()==="input"}function Bn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function kn(e,t){return e.button===0&&(!t||t==="_self")&&!Bn(e)}function Lt(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function Kn(e,t){let r=Lt(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(o=>{r.append(a,o)})}),r}let it=null;function Wn(){if(it===null)try{new FormData(document.createElement("form"),0),it=!1}catch{it=!0}return it}const Vn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function _t(e){return e!=null&&!Vn.has(e)?null:e}function $n(e,t){let r,n,a,o,i;if(Hn(e)){let s=e.getAttribute("action");n=s?stripBasename(s,t):null,r=e.getAttribute("method")||xt,a=_t(e.getAttribute("enctype"))||Dt,o=new FormData(e)}else if(jn(e)||zn(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||s.getAttribute("action");if(n=u?stripBasename(u,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||xt,a=_t(e.getAttribute("formenctype"))||_t(s.getAttribute("enctype"))||Dt,o=new FormData(s,e),!Wn()){let{name:f,type:p,value:m}=e;if(p==="image"){let w=f?f+".":"";o.append(w+"x","0"),o.append(w+"y","0")}else f&&o.append(f,m)}}else{if(at(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=xt,n=null,a=Dt,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const Yn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Ha=null,za=null,Jn="6";try{window.__reactRouterVersion=Jn}catch{}function Ba(e,t){return createRouter({basename:t?.basename,future:le({},t?.future,{v7_prependBasename:!0}),history:createBrowserHistory({window:t?.window}),hydrationData:t?.hydrationData||br(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,unstable_dataStrategy:t?.unstable_dataStrategy,unstable_patchRoutesOnMiss:t?.unstable_patchRoutesOnMiss,window:t?.window}).initialize()}function ka(e,t){return createRouter({basename:t?.basename,future:le({},t?.future,{v7_prependBasename:!0}),history:createHashHistory({window:t?.window}),hydrationData:t?.hydrationData||br(),routes:e,mapRouteProperties:UNSAFE_mapRouteProperties,unstable_dataStrategy:t?.unstable_dataStrategy,unstable_patchRoutesOnMiss:t?.unstable_patchRoutesOnMiss,window:t?.window}).initialize()}function br(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=le({},t,{errors:Gn(t.errors)})),t}function Gn(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new UNSAFE_ErrorResponseImpl(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack="",r[n]=o}}else r[n]=a;return r}const Rr=ie.createContext({isTransitioning:!1}),Sr=ie.createContext(new Map),Ee=Nt["startTransition"],Er=Br["flushSync"],Pr=Nt["useId"];function Xn(e){Ee?Ee(e):e()}function Ge(e){Er?Er(e):e()}class Qn{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function $a(e){let{fallbackElement:t,router:r,future:n}=e,[a,o]=React.useState(r.state),[i,s]=React.useState(),[u,f]=React.useState({isTransitioning:!1}),[p,m]=React.useState(),[w,v]=React.useState(),[g,b]=React.useState(),x=React.useRef(new Map),{v7_startTransition:A}=n||{},E=React.useCallback(U=>{A?Xn(U):U()},[A]),D=React.useCallback((U,T)=>{let{deletedFetchers:z,unstable_flushSync:k,unstable_viewTransitionOpts:Z}=T;z.forEach(X=>x.current.delete(X)),U.fetchers.forEach((X,Pe)=>{X.data!==void 0&&x.current.set(Pe,X.data)});let se=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!Z||se){k?Ge(()=>o(U)):E(()=>o(U));return}if(k){Ge(()=>{w&&(p&&p.resolve(),w.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let X=r.window.document.startViewTransition(()=>{Ge(()=>o(U))});X.finished.finally(()=>{Ge(()=>{m(void 0),v(void 0),s(void 0),f({isTransitioning:!1})})}),Ge(()=>v(X));return}w?(p&&p.resolve(),w.skipTransition(),b({state:U,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(s(U),f({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[r.window,w,p,x,E]);React.useLayoutEffect(()=>r.subscribe(D),[r,D]),React.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new Qn)},[u]),React.useEffect(()=>{if(p&&i&&r.window){let U=i,T=p.promise,z=r.window.document.startViewTransition(async()=>{E(()=>o(U)),await T});z.finished.finally(()=>{m(void 0),v(void 0),s(void 0),f({isTransitioning:!1})}),v(z)}},[E,i,p,r.window]),React.useEffect(()=>{p&&i&&a.location.key===i.location.key&&p.resolve()},[p,w,a.location,i]),React.useEffect(()=>{!u.isTransitioning&&g&&(s(g.state),f({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),b(void 0))},[u.isTransitioning,g]),React.useEffect(()=>{},[]);let R=React.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:U=>r.navigate(U),push:(U,T,z)=>r.navigate(U,{state:T,preventScrollReset:z?.preventScrollReset}),replace:(U,T,z)=>r.navigate(U,{replace:!0,state:T,preventScrollReset:z?.preventScrollReset})}),[r]),O=r.basename||"/",h=React.useMemo(()=>({router:r,navigator:R,static:!1,basename:O}),[r,R,O]),M=React.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return React.createElement(React.Fragment,null,React.createElement(UNSAFE_DataRouterContext.Provider,{value:h},React.createElement(UNSAFE_DataRouterStateContext.Provider,{value:a},React.createElement(Sr.Provider,{value:x.current},React.createElement(Rr.Provider,{value:u},React.createElement(Router,{basename:O,location:a.location,navigationType:a.historyAction,navigator:R,future:M},a.initialized||r.future.v7_partialHydration?React.createElement(Zn,{routes:r.routes,future:r.future,state:a}):t))))),null)}const Zn=null;function Ya(e){let{routes:t,future:r,state:n}=e;return UNSAFE_useRoutesImpl(t,void 0,n,r)}function qn(e){let{basename:t,children:r,future:n,window:a}=e,o=ie.useRef();o.current==null&&(o.current=kr({window:a,v5Compat:!0}));let i=o.current,[s,u]=ie.useState({action:i.action,location:i.location}),{v7_startTransition:f}=n||{},p=ie.useCallback(m=>{f&&Ee?Ee(()=>u(m)):u(m)},[u,f]);return ie.useLayoutEffect(()=>i.listen(p),[i,p]),ie.createElement(Ue.Ix,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function Ja(e){let{basename:t,children:r,future:n,window:a}=e,o=React.useRef();o.current==null&&(o.current=createHashHistory({window:a,v5Compat:!0}));let i=o.current,[s,u]=React.useState({action:i.action,location:i.location}),{v7_startTransition:f}=n||{},p=React.useCallback(m=>{f&&Ee?Ee(()=>u(m)):u(m)},[u,f]);return React.useLayoutEffect(()=>i.listen(p),[i,p]),React.createElement(Router,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:i,future:n})}function Ga(e){let{basename:t,children:r,future:n,history:a}=e,[o,i]=React.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},u=React.useCallback(f=>{s&&Ee?Ee(()=>i(f)):i(f)},[i,s]);return React.useLayoutEffect(()=>a.listen(u),[a,u]),React.createElement(Router,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:a,future:n})}const ea=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ta=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ra=ie.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:o,replace:i,state:s,target:u,to:f,preventScrollReset:p,unstable_viewTransition:m}=t,w=On(t,Yn),{basename:v}=ie.useContext(Ue.jb),g,b=!1;if(typeof f=="string"&&ta.test(f)&&(g=f,ea))try{let D=new URL(window.location.href),R=f.startsWith("//")?new URL(D.protocol+f):new URL(f),O=We(R.pathname,v);R.origin===D.origin&&O!=null?f=O+R.search+R.hash:b=!0}catch{}let x=(0,Ue.$P)(f,{relative:a}),A=aa(f,{replace:i,state:s,target:u,preventScrollReset:p,relative:a,unstable_viewTransition:m});function E(D){n&&n(D),D.defaultPrevented||A(D)}return ie.createElement("a",le({},w,{href:g||x,onClick:b||o?n:E,ref:r,target:u}))}),Xa=null,na=null;function Qa(e){let{getKey:t,storageKey:r}=e;return sa({getKey:t,storageKey:r}),null}var Oe;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Oe||(Oe={}));var Xe;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Xe||(Xe={}));function Za(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function ot(e){let t=React.useContext(UNSAFE_DataRouterContext);return t||UNSAFE_invariant(!1),t}function Ct(e){let t=React.useContext(UNSAFE_DataRouterStateContext);return t||UNSAFE_invariant(!1),t}function aa(e,t){let{target:r,replace:n,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:s}=t===void 0?{}:t,u=(0,Ue.Zp)(),f=(0,Ue.zy)(),p=(0,Ue.x$)(e,{relative:i});return ie.useCallback(m=>{if(kn(m,r)){m.preventDefault();let w=n!==void 0?n:(0,It.AO)(f)===(0,It.AO)(p);u(e,{replace:w,state:a,preventScrollReset:o,relative:i,unstable_viewTransition:s})}},[f,u,p,n,a,r,e,o,i,s])}function qa(e){let t=React.useRef(Lt(e)),r=React.useRef(!1),n=useLocation(),a=React.useMemo(()=>Kn(n.search,r.current?null:t.current),[n.search]),o=useNavigate(),i=React.useCallback((s,u)=>{const f=Lt(typeof s=="function"?s(a):s);r.current=!0,o("?"+f,u)},[o,a]);return[a,i]}function ia(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let oa=0,xr=()=>"__"+String(++oa)+"__";function la(){let{router:e}=ot(Oe.UseSubmit),{basename:t}=React.useContext(UNSAFE_NavigationContext),r=UNSAFE_useRouteId();return React.useCallback(function(n,a){a===void 0&&(a={}),ia();let{action:o,method:i,encType:s,formData:u,body:f}=$n(n,t);if(a.navigate===!1){let p=a.fetcherKey||xr();e.fetch(p,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:u,body:f,formMethod:a.method||i,formEncType:a.encType||s,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:u,body:f,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})},[e,t,r])}function ei(e,t){let{relative:r}=t===void 0?{}:t,{basename:n}=React.useContext(UNSAFE_NavigationContext),a=React.useContext(UNSAFE_RouteContext);a||UNSAFE_invariant(!1);let[o]=a.matches.slice(-1),i=le({},useResolvedPath(e||".",{relative:r})),s=useLocation();if(e==null){i.search=s.search;let u=new URLSearchParams(i.search);u.has("index")&&u.get("index")===""&&(u.delete("index"),i.search=u.toString()?"?"+u.toString():"")}return(!e||e===".")&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(i.pathname=i.pathname==="/"?n:joinPaths([n,i.pathname])),createPath(i)}function ti(e){var t;let{key:r}=e===void 0?{}:e,{router:n}=ot(Oe.UseFetcher),a=Ct(Xe.UseFetcher),o=React.useContext(Sr),i=React.useContext(UNSAFE_RouteContext),s=(t=i.matches[i.matches.length-1])==null?void 0:t.route.id;o||UNSAFE_invariant(!1),i||UNSAFE_invariant(!1),s==null&&UNSAFE_invariant(!1);let u=Pr?Pr():"",[f,p]=React.useState(r||u);r&&r!==f?p(r):f||p(xr()),React.useEffect(()=>(n.getFetcher(f),()=>{n.deleteFetcher(f)}),[n,f]);let m=React.useCallback((E,D)=>{s||UNSAFE_invariant(!1),n.fetch(f,s,E,D)},[f,s,n]),w=la(),v=React.useCallback((E,D)=>{w(E,le({},D,{navigate:!1,fetcherKey:f}))},[f,w]),g=React.useMemo(()=>React.forwardRef((D,R)=>React.createElement(na,le({},D,{navigate:!1,fetcherKey:f,ref:R}))),[f]),b=a.fetchers.get(f)||IDLE_FETCHER,x=o.get(f);return React.useMemo(()=>le({Form:g,submit:v,load:m},b,{data:x}),[g,v,m,b,x])}function ri(){let e=Ct(Xe.UseFetchers);return Array.from(e.fetchers.entries()).map(t=>{let[r,n]=t;return le({},n,{key:r})})}const Dr="react-router-scroll-positions";let lt={};function sa(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=ot(Oe.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:o}=Ct(Xe.UseScrollRestoration),{basename:i}=React.useContext(UNSAFE_NavigationContext),s=useLocation(),u=useMatches(),f=useNavigation();React.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),ua(React.useCallback(()=>{if(f.state==="idle"){let p=(t?t(s,u):null)||s.key;lt[p]=window.scrollY}try{sessionStorage.setItem(r||Dr,JSON.stringify(lt))}catch{}window.history.scrollRestoration="auto"},[r,t,f.state,s,u])),typeof document<"u"&&(React.useLayoutEffect(()=>{try{let p=sessionStorage.getItem(r||Dr);p&&(lt=JSON.parse(p))}catch{}},[r]),React.useLayoutEffect(()=>{let p=t&&i!=="/"?(w,v)=>t(le({},w,{pathname:stripBasename(w.pathname,i)||w.pathname}),v):t,m=n?.enableScrollRestoration(lt,()=>window.scrollY,p);return()=>m&&m()},[n,i,t]),React.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let p=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(p){p.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[s,a,o]))}function ni(e,t){let{capture:r}=t||{};React.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("beforeunload",e,n),()=>{window.removeEventListener("beforeunload",e,n)}},[e,r])}function ua(e,t){let{capture:r}=t||{};React.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function ai(e){let{when:t,message:r}=e,n=useBlocker(t);React.useEffect(()=>{n.state==="blocked"&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),React.useEffect(()=>{n.state==="blocked"&&!t&&n.reset()},[n,t])}function ii(e,t){t===void 0&&(t={});let r=React.useContext(Rr);r==null&&UNSAFE_invariant(!1);let{basename:n}=ot(Oe.useViewTransitionState),a=useResolvedPath(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=stripBasename(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=stripBasename(r.nextLocation.pathname,n)||r.nextLocation.pathname;return matchPath(a.pathname,i)!=null||matchPath(a.pathname,o)!=null}}}]);})();
22
-
23
- //# sourceMappingURL=module-react-router-dom.3e907de2.js.map