@techdocs/cli 1.8.17-next.2 → 1.8.17-next.3

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 (52) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/embedded-app/.config-schema.json +115 -115
  3. package/dist/embedded-app/index.html +1 -1
  4. package/dist/embedded-app/static/{124.a0a572f3.chunk.js → 124.7c4c81f4.chunk.js} +3 -3
  5. package/dist/embedded-app/static/124.7c4c81f4.chunk.js.map +1 -0
  6. package/dist/embedded-app/static/{2420.f9fbc916.chunk.js → 2420.1bc102de.chunk.js} +3 -3
  7. package/dist/embedded-app/static/2420.1bc102de.chunk.js.map +1 -0
  8. package/dist/embedded-app/static/4036.32efab46.chunk.js +3 -0
  9. package/dist/embedded-app/static/4036.32efab46.chunk.js.map +1 -0
  10. package/dist/embedded-app/static/{6271.1952ce76.chunk.js → 6271.d5297b21.chunk.js} +3 -3
  11. package/dist/embedded-app/static/6271.d5297b21.chunk.js.map +1 -0
  12. package/dist/embedded-app/static/{8384.96619c53.chunk.js → 8384.bfea9665.chunk.js} +3 -3
  13. package/dist/embedded-app/static/8384.bfea9665.chunk.js.map +1 -0
  14. package/dist/embedded-app/static/{898.815b96f0.chunk.js → 898.b3655147.chunk.js} +1 -1
  15. package/dist/embedded-app/static/{898.815b96f0.chunk.js.map → 898.b3655147.chunk.js.map} +1 -1
  16. package/dist/embedded-app/static/9605.92f660fa.chunk.js +11 -0
  17. package/dist/embedded-app/static/9605.92f660fa.chunk.js.map +1 -0
  18. package/dist/embedded-app/static/{9652.8daa9515.chunk.js → 9652.aec21fe8.chunk.js} +3 -3
  19. package/dist/embedded-app/static/9652.aec21fe8.chunk.js.map +1 -0
  20. package/dist/embedded-app/static/main.3d49bafb.js +509 -0
  21. package/dist/embedded-app/static/main.3d49bafb.js.map +1 -0
  22. package/dist/embedded-app/static/{module-material-table.695896b2.js → module-material-table.e3f26578.js} +2 -2
  23. package/dist/embedded-app/static/{module-material-table.695896b2.js.map → module-material-table.e3f26578.js.map} +1 -1
  24. package/dist/embedded-app/static/module-material-ui.f1846a3c.js +24 -0
  25. package/dist/embedded-app/static/module-material-ui.f1846a3c.js.map +1 -0
  26. package/dist/embedded-app/static/module-react-router-dom.0c2bb614.js +23 -0
  27. package/dist/embedded-app/static/module-react-router-dom.0c2bb614.js.map +1 -0
  28. package/dist/embedded-app/static/module-react-router.dac764ce.js +23 -0
  29. package/dist/embedded-app/static/module-react-router.dac764ce.js.map +1 -0
  30. package/dist/embedded-app/static/{runtime.6518d659.js → runtime.3d49bafb.js} +2 -2
  31. package/dist/embedded-app/static/{runtime.6518d659.js.map → runtime.3d49bafb.js.map} +1 -1
  32. package/dist/embedded-app/static/{vendor.6518d659.js → vendor.3d49bafb.js} +1 -1
  33. package/dist/embedded-app/static/{vendor.6518d659.js.map → vendor.3d49bafb.js.map} +1 -1
  34. package/dist/index.cjs.js +1 -1
  35. package/package.json +5 -5
  36. package/dist/embedded-app/static/124.a0a572f3.chunk.js.map +0 -1
  37. package/dist/embedded-app/static/2420.f9fbc916.chunk.js.map +0 -1
  38. package/dist/embedded-app/static/4036.a029793d.chunk.js +0 -3
  39. package/dist/embedded-app/static/4036.a029793d.chunk.js.map +0 -1
  40. package/dist/embedded-app/static/6271.1952ce76.chunk.js.map +0 -1
  41. package/dist/embedded-app/static/8384.96619c53.chunk.js.map +0 -1
  42. package/dist/embedded-app/static/9605.18e9db70.chunk.js +0 -11
  43. package/dist/embedded-app/static/9605.18e9db70.chunk.js.map +0 -1
  44. package/dist/embedded-app/static/9652.8daa9515.chunk.js.map +0 -1
  45. package/dist/embedded-app/static/main.6518d659.js +0 -509
  46. package/dist/embedded-app/static/main.6518d659.js.map +0 -1
  47. package/dist/embedded-app/static/module-material-ui.3807a580.js +0 -24
  48. package/dist/embedded-app/static/module-material-ui.3807a580.js.map +0 -1
  49. package/dist/embedded-app/static/module-react-router-dom.473a1e8a.js +0 -22
  50. package/dist/embedded-app/static/module-react-router-dom.473a1e8a.js.map +0 -1
  51. package/dist/embedded-app/static/module-react-router.933956ac.js +0 -22
  52. package/dist/embedded-app/static/module-react-router.933956ac.js.map +0 -1
@@ -1,22 +0,0 @@
1
- "use strict";(()=>{(self.webpackChunktechdocs_cli_embedded_app=self.webpackChunktechdocs_cli_embedded_app||[]).push([[2754],{18690:(Kr,$t,tt)=>{var z;tt.d($t,{$P:()=>we,AV:()=>Ge,BV:()=>lr,C5:()=>At,Ix:()=>mt,P1:()=>Dt,Ri:()=>ie,Ye:()=>St,Zp:()=>Ce,fS:()=>at,g:()=>Gt,jb:()=>se,qh:()=>Ut,sv:()=>ir,x$:()=>Pt,zy:()=>Te});var y=tt(14041),B=tt(74808);/**
2
- * React Router v6.22.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 Me(){return Me=Object.assign?Object.assign.bind():function(l){for(var u=1;u<arguments.length;u++){var v=arguments[u];for(var R in v)Object.prototype.hasOwnProperty.call(v,R)&&(l[R]=v[R])}return l},Me.apply(this,arguments)}const ft=y.createContext(null),Vt=y.createContext(null),H=y.createContext(null),se=y.createContext(null),We=y.createContext(null),ye=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Ee=y.createContext(null);function we(l,u){let{relative:v}=u===void 0?{}:u;ie()||(0,B.Oi)(!1);let{basename:R,navigator:S}=y.useContext(se),{hash:j,pathname:M,search:K}=Pt(l,{relative:v}),te=M;return R!=="/"&&(te=M==="/"?R:(0,B.HS)([R,M])),S.createHref({pathname:te,search:K,hash:j})}function ie(){return y.useContext(We)!=null}function Te(){return ie()||(0,B.Oi)(!1),y.useContext(We).location}function q(){return React.useContext(We).navigationType}function br(l){ie()||UNSAFE_invariant(!1);let{pathname:u}=Te();return React.useMemo(()=>matchPath(l,u),[u,l])}const Rr=null;function $e(l){y.useContext(se).static||y.useLayoutEffect(l)}function Ce(){let{isDataRoute:l}=y.useContext(ye);return l?ar():Jt()}function Jt(){ie()||(0,B.Oi)(!1);let l=y.useContext(ft),{basename:u,future:v,navigator:R}=y.useContext(se),{matches:S}=y.useContext(ye),{pathname:j}=Te(),M=JSON.stringify((0,B.yD)(S,v.v7_relativeSplatPath)),K=y.useRef(!1);return $e(()=>{K.current=!0}),y.useCallback(function(k,$){if($===void 0&&($={}),!K.current)return;if(typeof k=="number"){R.go(k);return}let T=(0,B.Gh)(k,JSON.parse(M),j,$.relative==="path");l==null&&u!=="/"&&(T.pathname=T.pathname==="/"?u:(0,B.HS)([u,T.pathname])),($.replace?R.replace:R.push)(T,$.state,$)},[u,R,M,j,l])}const ht=y.createContext(null);function Yt(){return React.useContext(ht)}function Dt(l){let u=y.useContext(ye).outlet;return u&&y.createElement(ht.Provider,{value:l},u)}function Gt(){let{matches:l}=y.useContext(ye),u=l[l.length-1];return u?u.params:{}}function Pt(l,u){let{relative:v}=u===void 0?{}:u,{future:R}=y.useContext(se),{matches:S}=y.useContext(ye),{pathname:j}=Te(),M=JSON.stringify((0,B.yD)(S,R.v7_relativeSplatPath));return y.useMemo(()=>(0,B.Gh)(l,JSON.parse(M),j,v==="path"),[l,M,j,v])}function St(l,u){return Ct(l,u)}function Ct(l,u,v,R){ie()||(0,B.Oi)(!1);let{navigator:S}=y.useContext(se),{matches:j}=y.useContext(ye),M=j[j.length-1],K=M?M.params:{},te=M?M.pathname:"/",k=M?M.pathnameBase:"/",$=M&&M.route,T=Te(),Q;if(u){var ae;let ue=typeof u=="string"?(0,B.Rr)(u):u;k==="/"||(ae=ue.pathname)!=null&&ae.startsWith(k)||(0,B.Oi)(!1),Q=ue}else Q=T;let me=Q.pathname||"/",xe=me;if(k!=="/"){let ue=k.replace(/^\//,"").split("/");xe="/"+me.replace(/^\//,"").split("/").slice(ue.length).join("/")}let De=(0,B.ue)(l,{pathname:xe}),je=Mt(De&&De.map(ue=>Object.assign({},ue,{params:Object.assign({},K,ue.params),pathname:(0,B.HS)([k,S.encodeLocation?S.encodeLocation(ue.pathname).pathname:ue.pathname]),pathnameBase:ue.pathnameBase==="/"?k:(0,B.HS)([k,S.encodeLocation?S.encodeLocation(ue.pathnameBase).pathname:ue.pathnameBase])})),j,v,R);return u&&je?y.createElement(We.Provider,{value:{location:Me({pathname:"/",search:"",hash:"",state:null,key:"default"},Q),navigationType:B.rc.Pop}},je):je}function Xt(){let l=rr(),u=(0,B.pX)(l)?l.status+" "+l.statusText:l instanceof Error?l.message:JSON.stringify(l),v=l instanceof Error?l.stack:null,R="rgba(200,200,200, 0.5)",S={padding:"0.5rem",backgroundColor:R},j={padding:"2px 4px",backgroundColor:R};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},u),v?y.createElement("pre",{style:S},v):null,null)}const Qt=y.createElement(Xt,null);class Lt extends y.Component{constructor(u){super(u),this.state={location:u.location,revalidation:u.revalidation,error:u.error}}static getDerivedStateFromError(u){return{error:u}}static getDerivedStateFromProps(u,v){return v.location!==u.location||v.revalidation!=="idle"&&u.revalidation==="idle"?{error:u.error,location:u.location,revalidation:u.revalidation}:{error:u.error!==void 0?u.error:v.error,location:v.location,revalidation:u.revalidation||v.revalidation}}componentDidCatch(u,v){console.error("React Router caught the following error during render",u,v)}render(){return this.state.error!==void 0?y.createElement(ye.Provider,{value:this.props.routeContext},y.createElement(Ee.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Zt(l){let{routeContext:u,match:v,children:R}=l,S=y.useContext(ft);return S&&S.static&&S.staticContext&&(v.route.errorElement||v.route.ErrorBoundary)&&(S.staticContext._deepestRenderedBoundaryId=v.route.id),y.createElement(ye.Provider,{value:u},R)}function Mt(l,u,v,R){var S;if(u===void 0&&(u=[]),v===void 0&&(v=null),R===void 0&&(R=null),l==null){var j;if((j=v)!=null&&j.errors)l=v.matches;else return null}let M=l,K=(S=v)==null?void 0:S.errors;if(K!=null){let $=M.findIndex(T=>T.route.id&&K?.[T.route.id]);$>=0||(0,B.Oi)(!1),M=M.slice(0,Math.min(M.length,$+1))}let te=!1,k=-1;if(v&&R&&R.v7_partialHydration)for(let $=0;$<M.length;$++){let T=M[$];if((T.route.HydrateFallback||T.route.hydrateFallbackElement)&&(k=$),T.route.id){let{loaderData:Q,errors:ae}=v,me=T.route.loader&&Q[T.route.id]===void 0&&(!ae||ae[T.route.id]===void 0);if(T.route.lazy||me){te=!0,k>=0?M=M.slice(0,k+1):M=[M[0]];break}}}return M.reduceRight(($,T,Q)=>{let ae,me=!1,xe=null,De=null;v&&(ae=K&&T.route.id?K[T.route.id]:void 0,xe=T.route.errorElement||Qt,te&&(k<0&&Q===0?(or("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),me=!0,De=null):k===Q&&(me=!0,De=T.route.hydrateFallbackElement||null)));let je=u.concat(M.slice(0,Q+1)),ue=()=>{let ve;return ae?ve=xe:me?ve=De:T.route.Component?ve=y.createElement(T.route.Component,null):T.route.element?ve=T.route.element:ve=$,y.createElement(Zt,{match:T,routeContext:{outlet:$,matches:je,isDataRoute:v!=null},children:ve})};return v&&(T.route.ErrorBoundary||T.route.errorElement||Q===0)?y.createElement(Lt,{location:v.location,revalidation:v.revalidation,component:xe,error:ae,children:ue(),routeContext:{outlet:null,matches:je,isDataRoute:!0}}):ue()},null)}var rt=function(l){return l.UseBlocker="useBlocker",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l}(rt||{}),he=function(l){return l.UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",l.UseNavigateStable="useNavigate",l.UseRouteId="useRouteId",l}(he||{});function Er(l){return l+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function pt(l){let u=y.useContext(ft);return u||(0,B.Oi)(!1),u}function _e(l){let u=y.useContext(Vt);return u||(0,B.Oi)(!1),u}function Ve(l){let u=y.useContext(ye);return u||(0,B.Oi)(!1),u}function Fe(l){let u=Ve(l),v=u.matches[u.matches.length-1];return v.route.id||(0,B.Oi)(!1),v.route.id}function wr(){return Fe(he.UseRouteId)}function _t(){return _e(he.UseNavigation).navigation}function qt(){let l=pt(rt.UseRevalidator),u=_e(he.UseRevalidator);return React.useMemo(()=>({revalidate:l.router.revalidate,state:u.revalidation}),[l.router.revalidate,u.revalidation])}function er(){let{matches:l,loaderData:u}=_e(he.UseMatches);return React.useMemo(()=>l.map(v=>UNSAFE_convertRouteMatchToUiMatch(v,u)),[l,u])}function tr(){let l=_e(he.UseLoaderData),u=Fe(he.UseLoaderData);if(l.errors&&l.errors[u]!=null){console.error("You cannot `useLoaderData` in an errorElement (routeId: "+u+")");return}return l.loaderData[u]}function Wr(l){return _e(he.UseRouteLoaderData).loaderData[l]}function Je(){let l=_e(he.UseActionData),u=Fe(he.UseLoaderData);return l.actionData?l.actionData[u]:void 0}function rr(){var l;let u=y.useContext(Ee),v=_e(he.UseRouteError),R=Fe(he.UseRouteError);return u!==void 0?u:(l=v.errors)==null?void 0:l[R]}function nr(){let l=React.useContext(H);return l?._data}function xr(){let l=React.useContext(H);return l?._error}let Dr=0;function Ot(l){let{router:u,basename:v}=pt(rt.UseBlocker),R=_e(he.UseBlocker),[S,j]=React.useState(""),M=React.useCallback(K=>{if(typeof l!="function")return!!l;if(v==="/")return l(K);let{currentLocation:te,nextLocation:k,historyAction:$}=K;return l({currentLocation:Me({},te,{pathname:stripBasename(te.pathname,v)||te.pathname}),nextLocation:Me({},k,{pathname:stripBasename(k.pathname,v)||k.pathname}),historyAction:$})},[v,l]);return React.useEffect(()=>{let K=String(++Dr);return j(K),()=>u.deleteBlocker(K)},[u]),React.useEffect(()=>{S!==""&&u.getBlocker(S,M)},[u,S,M]),S&&R.blockers.has(S)?R.blockers.get(S):IDLE_BLOCKER}function ar(){let{router:l}=pt(rt.UseNavigateStable),u=Fe(he.UseNavigateStable),v=y.useRef(!1);return $e(()=>{v.current=!0}),y.useCallback(function(S,j){j===void 0&&(j={}),v.current&&(typeof S=="number"?l.navigate(S):l.navigate(S,Me({fromRouteId:u},j)))},[l,u])}const Tt={};function or(l,u,v){!u&&!Tt[l]&&(Tt[l]=!0)}const nt=(z||(z=tt.t(y,2)))["startTransition"];function Vr(l){let{fallbackElement:u,router:v,future:R}=l,[S,j]=React.useState(v.state),{v7_startTransition:M}=R||{},K=React.useCallback(T=>{M&&nt?nt(()=>j(T)):j(T)},[j,M]);React.useLayoutEffect(()=>v.subscribe(K),[v,K]),React.useEffect(()=>{},[]);let te=React.useMemo(()=>({createHref:v.createHref,encodeLocation:v.encodeLocation,go:T=>v.navigate(T),push:(T,Q,ae)=>v.navigate(T,{state:Q,preventScrollReset:ae?.preventScrollReset}),replace:(T,Q,ae)=>v.navigate(T,{replace:!0,state:Q,preventScrollReset:ae?.preventScrollReset})}),[v]),k=v.basename||"/",$=React.useMemo(()=>({router:v,navigator:te,static:!1,basename:k}),[v,te,k]);return React.createElement(React.Fragment,null,React.createElement(ft.Provider,{value:$},React.createElement(Vt.Provider,{value:S},React.createElement(mt,{basename:k,location:S.location,navigationType:S.historyAction,navigator:te,future:{v7_relativeSplatPath:v.future.v7_relativeSplatPath}},S.initialized||v.future.v7_partialHydration?React.createElement(jt,{routes:v.routes,future:v.future,state:S}):u))),null)}function jt(l){let{routes:u,future:v,state:R}=l;return Ct(u,void 0,R,v)}function at(l){let{basename:u,children:v,initialEntries:R,initialIndex:S,future:j}=l,M=y.useRef();M.current==null&&(M.current=(0,B.sC)({initialEntries:R,initialIndex:S,v5Compat:!0}));let K=M.current,[te,k]=y.useState({action:K.action,location:K.location}),{v7_startTransition:$}=j||{},T=y.useCallback(Q=>{$&&nt?nt(()=>k(Q)):k(Q)},[k,$]);return y.useLayoutEffect(()=>K.listen(T),[K,T]),y.createElement(mt,{basename:u,children:v,location:te.location,navigationType:te.action,navigator:K,future:j})}function At(l){let{to:u,replace:v,state:R,relative:S}=l;ie()||(0,B.Oi)(!1);let{future:j,static:M}=y.useContext(se),{matches:K}=y.useContext(ye),{pathname:te}=Te(),k=Ce(),$=(0,B.Gh)(u,(0,B.yD)(K,j.v7_relativeSplatPath),te,S==="path"),T=JSON.stringify($);return y.useEffect(()=>k(JSON.parse(T),{replace:v,state:R,relative:S}),[k,T,S,v,R]),null}function ir(l){return Dt(l.context)}function Ut(l){(0,B.Oi)(!1)}function mt(l){let{basename:u="/",children:v=null,location:R,navigationType:S=B.rc.Pop,navigator:j,static:M=!1,future:K}=l;ie()&&(0,B.Oi)(!1);let te=u.replace(/^\/*/,"/"),k=y.useMemo(()=>({basename:te,navigator:j,static:M,future:Me({v7_relativeSplatPath:!1},K)}),[te,K,j,M]);typeof R=="string"&&(R=(0,B.Rr)(R));let{pathname:$="/",search:T="",hash:Q="",state:ae=null,key:me="default"}=R,xe=y.useMemo(()=>{let De=(0,B.pb)($,te);return De==null?null:{location:{pathname:De,search:T,hash:Q,state:ae,key:me},navigationType:S}},[te,$,T,Q,ae,me,S]);return xe==null?null:y.createElement(se.Provider,{value:k},y.createElement(We.Provider,{children:v,value:xe}))}function lr(l){let{children:u,location:v}=l;return St(Ge(u),v)}function Pr(l){let{children:u,errorElement:v,resolve:R}=l;return React.createElement(Ye,{resolve:R,errorElement:v},React.createElement(Ft,null,u))}var pe=function(l){return l[l.pending=0]="pending",l[l.success=1]="success",l[l.error=2]="error",l}(pe||{});const sr=new Promise(()=>{});class Ye extends y.Component{constructor(u){super(u),this.state={error:null}}static getDerivedStateFromError(u){return{error:u}}componentDidCatch(u,v){console.error("<Await> caught the following error during render",u,v)}render(){let{children:u,errorElement:v,resolve:R}=this.props,S=null,j=pe.pending;if(!(R instanceof Promise))j=pe.success,S=Promise.resolve(),Object.defineProperty(S,"_tracked",{get:()=>!0}),Object.defineProperty(S,"_data",{get:()=>R});else if(this.state.error){j=pe.error;let M=this.state.error;S=Promise.reject().catch(()=>{}),Object.defineProperty(S,"_tracked",{get:()=>!0}),Object.defineProperty(S,"_error",{get:()=>M})}else R._tracked?(S=R,j=S._error!==void 0?pe.error:S._data!==void 0?pe.success:pe.pending):(j=pe.pending,Object.defineProperty(R,"_tracked",{get:()=>!0}),S=R.then(M=>Object.defineProperty(R,"_data",{get:()=>M}),M=>Object.defineProperty(R,"_error",{get:()=>M})));if(j===pe.error&&S._error instanceof B.tH)throw sr;if(j===pe.error&&!v)throw S._error;if(j===pe.error)return y.createElement(H.Provider,{value:S,children:v});if(j===pe.success)return y.createElement(H.Provider,{value:S,children:u});throw S}}function Ft(l){let{children:u}=l,v=nr(),R=typeof u=="function"?u(v):u;return React.createElement(React.Fragment,null,R)}function Ge(l,u){u===void 0&&(u=[]);let v=[];return y.Children.forEach(l,(R,S)=>{if(!y.isValidElement(R))return;let j=[...u,S];if(R.type===y.Fragment){v.push.apply(v,Ge(R.props.children,j));return}R.type!==Ut&&(0,B.Oi)(!1),!R.props.index||!R.props.children||(0,B.Oi)(!1);let M={id:R.props.id||j.join("-"),caseSensitive:R.props.caseSensitive,element:R.props.element,Component:R.props.Component,index:R.props.index,path:R.props.path,loader:R.props.loader,action:R.props.action,errorElement:R.props.errorElement,ErrorBoundary:R.props.ErrorBoundary,hasErrorBoundary:R.props.ErrorBoundary!=null||R.props.errorElement!=null,shouldRevalidate:R.props.shouldRevalidate,handle:R.props.handle,lazy:R.props.lazy};R.props.children&&(M.children=Ge(R.props.children,j)),v.push(M)}),v}function ur(l){return Mt(l)}function Sr(l){let u={hasErrorBoundary:l.ErrorBoundary!=null||l.errorElement!=null};return l.Component&&Object.assign(u,{element:React.createElement(l.Component),Component:void 0}),l.HydrateFallback&&Object.assign(u,{hydrateFallbackElement:React.createElement(l.HydrateFallback),HydrateFallback:void 0}),l.ErrorBoundary&&Object.assign(u,{errorElement:React.createElement(l.ErrorBoundary),ErrorBoundary:void 0}),u}function Cr(l,u){return createRouter({basename:u?.basename,future:Me({},u?.future,{v7_prependBasename:!0}),history:createMemoryHistory({initialEntries:u?.initialEntries,initialIndex:u?.initialIndex}),hydrationData:u?.hydrationData,routes:l,mapRouteProperties:Sr}).initialize()}},74808:(Kr,$t,tt)=>{tt.d($t,{AO:()=>we,Gh:()=>tr,HS:()=>Je,Oi:()=>H,Rr:()=>ie,o1:()=>Fe,pX:()=>at,pb:()=>Ve,rc:()=>y,sC:()=>Me,tH:()=>Ot,tW:()=>he,ue:()=>Ce,yD:()=>er});/**
11
- * @remix-run/router v1.15.3
12
- *
13
- * Copyright (c) Remix Software Inc.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE.md file in the root directory of this source tree.
17
- *
18
- * @license MIT
19
- */function z(){return z=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},z.apply(this,arguments)}var y;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(y||(y={}));const B="popstate";function Me(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:r,v5Compat:n=!1}=e,a;a=t.map((D,C)=>m(D,typeof D=="string"?null:D.state,C===0?"default":void 0));let d=h(r??a.length-1),i=y.Pop,p=null;function h(D){return Math.min(Math.max(D,0),a.length-1)}function b(){return a[d]}function m(D,C,P){C===void 0&&(C=null);let w=Ee(a?b().pathname:"/",D,C,P);return se(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(D)),w}function _(D){return typeof D=="string"?D:we(D)}return{get index(){return d},get action(){return i},get location(){return b()},createHref:_,createURL(D){return new URL(_(D),"http://localhost")},encodeLocation(D){let C=typeof D=="string"?ie(D):D;return{pathname:C.pathname||"",search:C.search||"",hash:C.hash||""}},push(D,C){i=y.Push;let P=m(D,C);d+=1,a.splice(d,a.length,P),n&&p&&p({action:i,location:P,delta:1})},replace(D,C){i=y.Replace;let P=m(D,C);a[d]=P,n&&p&&p({action:i,location:P,delta:0})},go(D){i=y.Pop;let C=h(d+D),P=a[C];d=C,p&&p({action:i,location:P,delta:D})},listen(D){return p=D,()=>{p=null}}}}function ft(e){e===void 0&&(e={});function t(n,a){let{pathname:d,search:i,hash:p}=n.location;return Ee("",{pathname:d,search:i,hash:p},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:we(a)}return Te(t,r,null,e)}function Vt(e){e===void 0&&(e={});function t(a,d){let{pathname:i="/",search:p="",hash:h=""}=ie(a.location.hash.substr(1));return!i.startsWith("/")&&!i.startsWith(".")&&(i="/"+i),Ee("",{pathname:i,search:p,hash:h},d.state&&d.state.usr||null,d.state&&d.state.key||"default")}function r(a,d){let i=a.document.querySelector("base"),p="";if(i&&i.getAttribute("href")){let h=a.location.href,b=h.indexOf("#");p=b===-1?h:h.slice(0,b)}return p+"#"+(typeof d=="string"?d:we(d))}function n(a,d){se(a.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(d)+")")}return Te(t,r,n,e)}function H(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function se(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function We(){return Math.random().toString(36).substr(2,8)}function ye(e,t){return{usr:e.state,key:e.key,idx:t}}function Ee(e,t,r,n){return r===void 0&&(r=null),z({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ie(t):t,{state:r,key:t&&t.key||n||We()})}function we(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 ie(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 Te(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:d=!1}=n,i=a.history,p=y.Pop,h=null,b=m();b==null&&(b=0,i.replaceState(z({},i.state,{idx:b}),""));function m(){return(i.state||{idx:null}).idx}function _(){p=y.Pop;let w=m(),g=w==null?null:w-b;b=w,h&&h({action:p,location:P.location,delta:g})}function x(w,g){p=y.Push;let F=Ee(P.location,w,g);r&&r(F,w),b=m()+1;let J=ye(F,b),Y=P.createHref(F);try{i.pushState(J,"",Y)}catch(X){if(X instanceof DOMException&&X.name==="DataCloneError")throw X;a.location.assign(Y)}d&&h&&h({action:p,location:P.location,delta:1})}function D(w,g){p=y.Replace;let F=Ee(P.location,w,g);r&&r(F,w),b=m();let J=ye(F,b),Y=P.createHref(F);i.replaceState(J,"",Y),d&&h&&h({action:p,location:P.location,delta:0})}function C(w){let g=a.location.origin!=="null"?a.location.origin:a.location.href,F=typeof w=="string"?w:we(w);return F=F.replace(/ $/,"%20"),H(g,"No window.location.(origin|href) available to create URL for href: "+F),new URL(F,g)}let P={get action(){return p},get location(){return e(a,i)},listen(w){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(B,_),h=w,()=>{a.removeEventListener(B,_),h=null}},createHref(w){return t(a,w)},createURL:C,encodeLocation(w){let g=C(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:x,replace:D,go(w){return i.go(w)}};return P}var q;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(q||(q={}));const br=new Set(["lazy","caseSensitive","path","id","index","children"]);function Rr(e){return e.index===!0}function $e(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,d)=>{let i=[...r,d],p=typeof a.id=="string"?a.id:i.join("-");if(H(a.index!==!0||!a.children,"Cannot specify children on an index route"),H(!n[p],'Found a route id collision on id "'+p+`". Route id's must be globally unique within Data Router usages`),Rr(a)){let h=z({},a,t(a),{id:p});return n[p]=h,h}else{let h=z({},a,t(a),{id:p,children:void 0});return n[p]=h,a.children&&(h.children=$e(a.children,t,i,n)),h}})}function Ce(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?ie(t):t,a=Ve(n.pathname||"/",r);if(a==null)return null;let d=ht(e);Dt(d);let i=null;for(let p=0;i==null&&p<d.length;++p){let h=_e(a);i=rt(d[p],h)}return i}function Jt(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 ht(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(d,i,p)=>{let h={relativePath:p===void 0?d.path||"":p,caseSensitive:d.caseSensitive===!0,childrenIndex:i,route:d};h.relativePath.startsWith("/")&&(H(h.relativePath.startsWith(n),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(n.length));let b=Je([n,h.relativePath]),m=r.concat(h);d.children&&d.children.length>0&&(H(d.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+b+'".')),ht(d.children,t,m,b)),!(d.path==null&&!d.index)&&t.push({path:b,score:Zt(b,d.index),routesMeta:m})};return e.forEach((d,i)=>{var p;if(d.path===""||!((p=d.path)!=null&&p.includes("?")))a(d,i);else for(let h of Yt(d.path))a(d,i,h)}),t}function Yt(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),d=r.replace(/\?$/,"");if(n.length===0)return a?[d,""]:[d];let i=Yt(n.join("/")),p=[];return p.push(...i.map(h=>h===""?d:[d,h].join("/"))),a&&p.push(...i),p.map(h=>e.startsWith("/")&&h===""?"/":h)}function Dt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Mt(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Gt=/^:[\w-]+$/,Pt=3,St=2,Ct=1,Xt=10,Qt=-2,Lt=e=>e==="*";function Zt(e,t){let r=e.split("/"),n=r.length;return r.some(Lt)&&(n+=Qt),t&&(n+=St),r.filter(a=>!Lt(a)).reduce((a,d)=>a+(Gt.test(d)?Pt:d===""?Ct:Xt),n)}function Mt(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 rt(e,t){let{routesMeta:r}=e,n={},a="/",d=[];for(let i=0;i<r.length;++i){let p=r[i],h=i===r.length-1,b=a==="/"?t:t.slice(a.length)||"/",m=Er({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},b);if(!m)return null;Object.assign(n,m.params);let _=p.route;d.push({params:n,pathname:Je([a,m.pathname]),pathnameBase:rr(Je([a,m.pathnameBase])),route:_}),m.pathnameBase!=="/"&&(a=Je([a,m.pathnameBase]))}return d}function he(e,t){t===void 0&&(t={});let r=e;r.endsWith("*")&&r!=="*"&&!r.endsWith("/*")&&(se(!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),d=r.split(/\/+/).map((i,p,h)=>{if(p===h.length-1&&i==="*")return a(t["*"]);const m=i.match(/^:([\w-]+)(\??)$/);if(m){const[,_,x]=m;let D=t[_];return H(x==="?"||D!=null,'Missing ":'+_+'" param'),a(D)}return i.replace(/\?$/g,"")}).filter(i=>!!i);return n+d.join("/")}function Er(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=pt(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let d=a[0],i=d.replace(/(.)\/+$/,"$1"),p=a.slice(1);return{params:n.reduce((b,m,_)=>{let{paramName:x,isOptional:D}=m;if(x==="*"){let P=p[_]||"";i=d.slice(0,d.length-P.length).replace(/(.)\/+$/,"$1")}const C=p[_];return D&&!C?b[x]=void 0:b[x]=(C||"").replace(/%2F/g,"/"),b},{}),pathname:d,pathnameBase:i,pattern:e}}function pt(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),se(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,p,h)=>(n.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function _e(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return se(!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 Ve(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 Fe(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?ie(e):e;return{pathname:r?r.startsWith("/")?r:wr(r,t):t,search:nr(n),hash:xr(a)}}function wr(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 _t(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 qt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function er(e,t){let r=qt(e);return t?r.map((n,a)=>a===e.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function tr(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=ie(e):(a=z({},e),H(!a.pathname||!a.pathname.includes("?"),_t("?","pathname","search",a)),H(!a.pathname||!a.pathname.includes("#"),_t("#","pathname","hash",a)),H(!a.search||!a.search.includes("#"),_t("#","search","hash",a)));let d=e===""||a.pathname==="",i=d?"/":a.pathname,p;if(i==null)p=r;else{let _=t.length-1;if(!n&&i.startsWith("..")){let x=i.split("/");for(;x[0]==="..";)x.shift(),_-=1;a.pathname=x.join("/")}p=_>=0?t[_]:"/"}let h=Fe(a,p),b=i&&i!=="/"&&i.endsWith("/"),m=(d||i===".")&&r.endsWith("/");return!h.pathname.endsWith("/")&&(b||m)&&(h.pathname+="/"),h}function Wr(e){return e===""||e.pathname===""?"/":typeof e=="string"?ie(e).pathname:e.pathname}const Je=e=>e.join("/").replace(/\/\/+/g,"/"),rr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),nr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Dr=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),z({},n,{headers:a}))};class Ot extends Error{}class ar{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((d,i)=>n=i),this.controller=new AbortController;let a=()=>n(new Ot("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",a),this.controller.signal.addEventListener("abort",a),this.data=Object.entries(t).reduce((d,i)=>{let[p,h]=i;return Object.assign(d,{[p]:this.trackPromise(p,h)})},{}),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 Ot)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 d=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:()=>d}),this.emit(!1,r),Promise.reject(d)}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(d=>{t.removeEventListener("abort",n),(d||this.done)&&a(d)})})}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]:or(a)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function Tt(e){return e instanceof Promise&&e._tracked===!0}function or(e){if(!Tt(e))return e;if(e._error)throw e._error;return e._data}const $r=function(t,r){r===void 0&&(r={});let n=typeof r=="number"?{status:r}:r;return new ar(t,n)},nt=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,z({},n,{headers:a}))},Vr=(e,t)=>{let r=nt(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class jt{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 at(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const At=["post","put","patch","delete"],ir=new Set(At),Ut=["get",...At],mt=new Set(Ut),lr=new Set([301,302,303,307,308]),Pr=new Set([307,308]),pe={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sr={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},Ft=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ge=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ur="remix-router-transitions";function Sr(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 o=e.detectErrorBoundary;a=s=>({hasErrorBoundary:o(s)})}else a=Ge;let d={},i=$e(e.routes,a,void 0,d),p,h=e.basename||"/",b=z({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),m=null,_=new Set,x=null,D=null,C=null,P=e.hydrationData!=null,w=Ce(i,e.history.location,h),g=null;if(w==null){let o=oe(404,{pathname:e.history.location.pathname}),{matches:s,route:f}=It(i);w=s,g={[f.id]:o}}let F,J=w.some(o=>o.route.lazy),Y=w.some(o=>o.route.loader);if(J)F=!1;else if(!Y)F=!0;else if(b.v7_partialHydration){let o=e.hydrationData?e.hydrationData.loaderData:null,s=e.hydrationData?e.hydrationData.errors:null,f=E=>E.route.loader?E.route.loader.hydrate===!0?!1:o&&o[E.route.id]!==void 0||s&&s[E.route.id]!==void 0:!0;if(s){let E=w.findIndex(L=>s[L.route.id]!==void 0);F=w.slice(0,E+1).every(f)}else F=w.every(f)}else F=e.hydrationData!=null;let X,c={historyAction:e.history.action,location:e.history.location,matches:w,initialized:F,navigation:pe,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||g,fetchers:new Map,blockers:new Map},Z=y.Pop,V=!1,re,Oe=!1,Se=new Map,Le=null,it=!1,Xe=!1,Nt=[],Bt=[],le=new Map,Ht=0,yt=-1,lt=new Map,Ae=new Set,st=new Map,bt=new Map,Ue=new Set,Qe=new Map,Ze=new Map,hr=!1;function tn(){if(m=e.history.listen(o=>{let{action:s,location:f,delta:E}=o;if(hr){hr=!1;return}se(Ze.size===0||E!=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 L=Hr({currentLocation:c.location,nextLocation:f,historyAction:s});if(L&&E!=null){hr=!0,e.history.go(E*-1),zt(L,{state:"blocked",location:f,proceed(){zt(L,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),e.history.go(E)},reset(){let N=new Map(c.blockers);N.set(L,Ye),be({blockers:N})}});return}return qe(s,f)}),r){qr(t,Se);let o=()=>en(t,Se);t.addEventListener("pagehide",o),Le=()=>t.removeEventListener("pagehide",o)}return c.initialized||qe(y.Pop,c.location,{initialHydration:!0}),X}function rn(){m&&m(),Le&&Le(),_.clear(),re&&re.abort(),c.fetchers.forEach((o,s)=>kt(s)),c.blockers.forEach((o,s)=>Br(s))}function nn(o){return _.add(o),()=>_.delete(o)}function be(o,s){s===void 0&&(s={}),c=z({},c,o);let f=[],E=[];b.v7_fetcherPersist&&c.fetchers.forEach((L,N)=>{L.state==="idle"&&(Ue.has(N)?E.push(N):f.push(N))}),[..._].forEach(L=>L(c,{deletedFetchers:E,unstable_viewTransitionOpts:s.viewTransitionOpts,unstable_flushSync:s.flushSync===!0})),b.v7_fetcherPersist&&(f.forEach(L=>c.fetchers.delete(L)),E.forEach(L=>kt(L)))}function Rt(o,s,f){var E,L;let{flushSync:N}=f===void 0?{}:f,U=c.actionData!=null&&c.navigation.formMethod!=null&&Pe(c.navigation.formMethod)&&c.navigation.state==="loading"&&((E=o.state)==null?void 0:E._isRedirect)!==!0,A;s.actionData?Object.keys(s.actionData).length>0?A=s.actionData:A=null:U?A=c.actionData:A=null;let O=s.loaderData?ue(c.loaderData,s.loaderData,s.matches||[],s.errors):c.loaderData,W=c.blockers;W.size>0&&(W=new Map(W),W.forEach((ne,fe)=>W.set(fe,Ye)));let de=V===!0||c.navigation.formMethod!=null&&Pe(c.navigation.formMethod)&&((L=o.state)==null?void 0:L._isRedirect)!==!0;p&&(i=p,p=void 0),it||Z===y.Pop||(Z===y.Push?e.history.push(o,o.state):Z===y.Replace&&e.history.replace(o,o.state));let I;if(Z===y.Pop){let ne=Se.get(c.location.pathname);ne&&ne.has(o.pathname)?I={currentLocation:c.location,nextLocation:o}:Se.has(o.pathname)&&(I={currentLocation:o,nextLocation:c.location})}else if(Oe){let ne=Se.get(c.location.pathname);ne?ne.add(o.pathname):(ne=new Set([o.pathname]),Se.set(c.location.pathname,ne)),I={currentLocation:c.location,nextLocation:o}}be(z({},s,{actionData:A,loaderData:O,historyAction:Z,location:o,initialized:!0,navigation:pe,revalidation:"idle",restoreScrollPosition:zr(o,s.matches||c.matches),preventScrollReset:de,blockers:W}),{viewTransitionOpts:I,flushSync:N===!0}),Z=y.Pop,V=!1,Oe=!1,it=!1,Xe=!1,Nt=[],Bt=[]}async function jr(o,s){if(typeof o=="number"){e.history.go(o);return}let f=S(c.location,c.matches,h,b.v7_prependBasename,o,b.v7_relativeSplatPath,s?.fromRouteId,s?.relative),{path:E,submission:L,error:N}=j(b.v7_normalizeFormMethod,!1,f,s),U=c.location,A=Ee(c.location,E,s&&s.state);A=z({},A,e.history.encodeLocation(A));let O=s&&s.replace!=null?s.replace:void 0,W=y.Push;O===!0?W=y.Replace:O===!1||L!=null&&Pe(L.formMethod)&&L.formAction===c.location.pathname+c.location.search&&(W=y.Replace);let de=s&&"preventScrollReset"in s?s.preventScrollReset===!0:void 0,I=(s&&s.unstable_flushSync)===!0,ne=Hr({currentLocation:U,nextLocation:A,historyAction:W});if(ne){zt(ne,{state:"blocked",location:A,proceed(){zt(ne,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),jr(o,s)},reset(){let fe=new Map(c.blockers);fe.set(ne,Ye),be({blockers:fe})}});return}return await qe(W,A,{submission:L,pendingError:N,preventScrollReset:de,replace:s&&s.replace,enableViewTransition:s&&s.unstable_viewTransition,flushSync:I})}function an(){if(pr(),be({revalidation:"loading"}),c.navigation.state!=="submitting"){if(c.navigation.state==="idle"){qe(c.historyAction,c.location,{startUninterruptedRevalidation:!0});return}qe(Z||c.historyAction,c.navigation.location,{overrideNavigation:c.navigation})}}async function qe(o,s,f){re&&re.abort(),re=null,Z=o,it=(f&&f.startUninterruptedRevalidation)===!0,pn(c.location,c.matches),V=(f&&f.preventScrollReset)===!0,Oe=(f&&f.enableViewTransition)===!0;let E=p||i,L=f&&f.overrideNavigation,N=Ce(E,s,h),U=(f&&f.flushSync)===!0;if(!N){let fe=oe(404,{pathname:s.pathname}),{matches:Re,route:ce}=It(E);mr(),Rt(s,{matches:Re,loaderData:{},errors:{[ce.id]:fe}},{flushSync:U});return}if(c.initialized&&!Xe&&Jr(c.location,s)&&!(f&&f.submission&&Pe(f.submission.formMethod))){Rt(s,{matches:N},{flushSync:U});return}re=new AbortController;let A=ae(e.history,s,re.signal,f&&f.submission),O,W;if(f&&f.pendingError)W={[ve(N).route.id]:f.pendingError};else if(f&&f.submission&&Pe(f.submission.formMethod)){let fe=await on(A,s,f.submission,N,{replace:f.replace,flushSync:U});if(fe.shortCircuited)return;O=fe.pendingActionData,W=fe.pendingActionError,L=fr(s,f.submission),U=!1,A=new Request(A.url,{signal:A.signal})}let{shortCircuited:de,loaderData:I,errors:ne}=await ln(A,s,N,L,f&&f.submission,f&&f.fetcherSubmission,f&&f.replace,f&&f.initialHydration===!0,U,O,W);de||(re=null,Rt(s,z({matches:N},O?{actionData:O}:{},{loaderData:I,errors:ne})))}async function on(o,s,f,E,L){L===void 0&&(L={}),pr();let N=Qr(s,f);be({navigation:N},{flushSync:L.flushSync===!0});let U,A=vt(E,s);if(!A.route.action&&!A.route.lazy)U={type:q.error,error:oe(405,{method:o.method,pathname:s.pathname,routeId:A.route.id})};else if(U=await Q("action",o,A,E,d,a,h,b.v7_relativeSplatPath),o.signal.aborted)return{shortCircuited:!0};if(Be(U)){let O;return L&&L.replace!=null?O=L.replace:O=U.location===c.location.pathname+c.location.search,await Et(c,U,{submission:f,replace:O}),{shortCircuited:!0}}if(Ne(U)){let O=ve(E,A.route.id);return(L&&L.replace)!==!0&&(Z=y.Push),{pendingActionData:{},pendingActionError:{[O.route.id]:U.error}}}if(Ie(U))throw oe(400,{type:"defer-action"});return{pendingActionData:{[A.route.id]:U.data}}}async function ln(o,s,f,E,L,N,U,A,O,W,de){let I=E||fr(s,L),ne=L||N||Tr(I),fe=p||i,[Re,ce]=K(e.history,c,f,ne,s,b.v7_partialHydration&&A===!0,Xe,Nt,Bt,Ue,st,Ae,fe,h,W,de);if(mr(G=>!(f&&f.some(ee=>ee.route.id===G))||Re&&Re.some(ee=>ee.route.id===G)),yt=++Ht,Re.length===0&&ce.length===0){let G=Ir();return Rt(s,z({matches:f,loaderData:{},errors:de||null},W?{actionData:W}:{},G?{fetchers:new Map(c.fetchers)}:{}),{flushSync:O}),{shortCircuited:!0}}if(!it&&(!b.v7_partialHydration||!A)){ce.forEach(ee=>{let ge=c.fetchers.get(ee.key),Wt=gt(void 0,ge?ge.data:void 0);c.fetchers.set(ee.key,Wt)});let G=W||c.actionData;be(z({navigation:I},G?Object.keys(G).length===0?{actionData:null}:{actionData:G}:{},ce.length>0?{fetchers:new Map(c.fetchers)}:{}),{flushSync:O})}ce.forEach(G=>{le.has(G.key)&&ze(G.key),G.controller&&le.set(G.key,G.controller)});let ut=()=>ce.forEach(G=>ze(G.key));re&&re.signal.addEventListener("abort",ut);let{results:vr,loaderResults:dt,fetcherResults:Ke}=await Ar(c.matches,f,Re,ce,o);if(o.signal.aborted)return{shortCircuited:!0};re&&re.signal.removeEventListener("abort",ut),ce.forEach(G=>le.delete(G.key));let et=Lr(vr);if(et){if(et.idx>=Re.length){let G=ce[et.idx-Re.length].key;Ae.add(G)}return await Et(c,et.result,{replace:U}),{shortCircuited:!0}}let{loaderData:gr,errors:xt}=je(c,f,Re,dt,de,ce,Ke,Qe);Qe.forEach((G,ee)=>{G.subscribe(ge=>{(ge||G.done)&&Qe.delete(ee)})}),b.v7_partialHydration&&A&&c.errors&&Object.entries(c.errors).filter(G=>{let[ee]=G;return!Re.some(ge=>ge.route.id===ee)}).forEach(G=>{let[ee,ge]=G;xt=Object.assign(xt||{},{[ee]:ge})});let yr=Ir(),ct=Nr(yt),Kt=yr||ct||ce.length>0;return z({loaderData:gr,errors:xt},Kt?{fetchers:new Map(c.fetchers)}:{})}function sn(o,s,f,E){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.");le.has(o)&&ze(o);let L=(E&&E.unstable_flushSync)===!0,N=p||i,U=S(c.location,c.matches,h,b.v7_prependBasename,f,b.v7_relativeSplatPath,s,E?.relative),A=Ce(N,U,h);if(!A){wt(o,s,oe(404,{pathname:U}),{flushSync:L});return}let{path:O,submission:W,error:de}=j(b.v7_normalizeFormMethod,!0,U,E);if(de){wt(o,s,de,{flushSync:L});return}let I=vt(A,O);if(V=(E&&E.preventScrollReset)===!0,W&&Pe(W.formMethod)){un(o,s,O,I,A,L,W);return}st.set(o,{routeId:s,path:O}),dn(o,s,O,I,A,L,W)}async function un(o,s,f,E,L,N,U){if(pr(),st.delete(o),!E.route.action&&!E.route.lazy){let ee=oe(405,{method:U.formMethod,pathname:f,routeId:s});wt(o,s,ee,{flushSync:N});return}let A=c.fetchers.get(o);ke(o,Zr(U,A),{flushSync:N});let O=new AbortController,W=ae(e.history,f,O.signal,U);le.set(o,O);let de=Ht,I=await Q("action",W,E,L,d,a,h,b.v7_relativeSplatPath);if(W.signal.aborted){le.get(o)===O&&le.delete(o);return}if(b.v7_fetcherPersist&&Ue.has(o)){if(Be(I)||Ne(I)){ke(o,He(void 0));return}}else{if(Be(I))if(le.delete(o),yt>de){ke(o,He(void 0));return}else return Ae.add(o),ke(o,gt(U)),Et(c,I,{fetcherSubmission:U});if(Ne(I)){wt(o,s,I.error);return}}if(Ie(I))throw oe(400,{type:"defer-action"});let ne=c.navigation.location||c.location,fe=ae(e.history,ne,O.signal),Re=p||i,ce=c.navigation.state!=="idle"?Ce(Re,c.navigation.location,h):c.matches;H(ce,"Didn't find any matches after fetcher action");let ut=++Ht;lt.set(o,ut);let vr=gt(U,I.data);c.fetchers.set(o,vr);let[dt,Ke]=K(e.history,c,ce,U,ne,!1,Xe,Nt,Bt,Ue,st,Ae,Re,h,{[E.route.id]:I.data},void 0);Ke.filter(ee=>ee.key!==o).forEach(ee=>{let ge=ee.key,Wt=c.fetchers.get(ge),vn=gt(void 0,Wt?Wt.data:void 0);c.fetchers.set(ge,vn),le.has(ge)&&ze(ge),ee.controller&&le.set(ge,ee.controller)}),be({fetchers:new Map(c.fetchers)});let et=()=>Ke.forEach(ee=>ze(ee.key));O.signal.addEventListener("abort",et);let{results:gr,loaderResults:xt,fetcherResults:yr}=await Ar(c.matches,ce,dt,Ke,fe);if(O.signal.aborted)return;O.signal.removeEventListener("abort",et),lt.delete(o),le.delete(o),Ke.forEach(ee=>le.delete(ee.key));let ct=Lr(gr);if(ct){if(ct.idx>=dt.length){let ee=Ke[ct.idx-dt.length].key;Ae.add(ee)}return Et(c,ct.result)}let{loaderData:Kt,errors:G}=je(c,c.matches,dt,xt,void 0,Ke,yr,Qe);if(c.fetchers.has(o)){let ee=He(I.data);c.fetchers.set(o,ee)}Nr(ut),c.navigation.state==="loading"&&ut>yt?(H(Z,"Expected pending action"),re&&re.abort(),Rt(c.navigation.location,{matches:ce,loaderData:Kt,errors:G,fetchers:new Map(c.fetchers)})):(be({errors:G,loaderData:ue(c.loaderData,Kt,ce,G),fetchers:new Map(c.fetchers)}),Xe=!1)}async function dn(o,s,f,E,L,N,U){let A=c.fetchers.get(o);ke(o,gt(U,A?A.data:void 0),{flushSync:N});let O=new AbortController,W=ae(e.history,f,O.signal);le.set(o,O);let de=Ht,I=await Q("loader",W,E,L,d,a,h,b.v7_relativeSplatPath);if(Ie(I)&&(I=await Or(I,W.signal,!0)||I),le.get(o)===O&&le.delete(o),!W.signal.aborted){if(Ue.has(o)){ke(o,He(void 0));return}if(Be(I))if(yt>de){ke(o,He(void 0));return}else{Ae.add(o),await Et(c,I);return}if(Ne(I)){wt(o,s,I.error);return}H(!Ie(I),"Unhandled fetcher deferred data"),ke(o,He(I.data))}}async function Et(o,s,f){let{submission:E,fetcherSubmission:L,replace:N}=f===void 0?{}:f;s.revalidate&&(Xe=!0);let U=Ee(o.location,s.location,{_isRedirect:!0});if(H(U,"Expected a location on the redirect navigation"),r){let ne=!1;if(s.reloadDocument)ne=!0;else if(Ft.test(s.location)){const fe=e.history.createURL(s.location);ne=fe.origin!==t.location.origin||Ve(fe.pathname,h)==null}if(ne){N?t.location.replace(s.location):t.location.assign(s.location);return}}re=null;let A=N===!0?y.Replace:y.Push,{formMethod:O,formAction:W,formEncType:de}=o.navigation;!E&&!L&&O&&W&&de&&(E=Tr(o.navigation));let I=E||L;if(Pr.has(s.status)&&I&&Pe(I.formMethod))await qe(A,U,{submission:z({},I,{formAction:s.location}),preventScrollReset:V});else{let ne=fr(U,E);await qe(A,U,{overrideNavigation:ne,fetcherSubmission:L,preventScrollReset:V})}}async function Ar(o,s,f,E,L){let N=await Promise.all([...f.map(O=>Q("loader",L,O,s,d,a,h,b.v7_relativeSplatPath)),...E.map(O=>O.matches&&O.match&&O.controller?Q("loader",ae(e.history,O.path,O.controller.signal),O.match,O.matches,d,a,h,b.v7_relativeSplatPath):{type:q.error,error:oe(404,{pathname:O.path})})]),U=N.slice(0,f.length),A=N.slice(f.length);return await Promise.all([_r(o,f,U,U.map(()=>L.signal),!1,c.loaderData),_r(o,E.map(O=>O.match),A,E.map(O=>O.controller?O.controller.signal:null),!0)]),{results:N,loaderResults:U,fetcherResults:A}}function pr(){Xe=!0,Nt.push(...mr()),st.forEach((o,s)=>{le.has(s)&&(Bt.push(s),ze(s))})}function ke(o,s,f){f===void 0&&(f={}),c.fetchers.set(o,s),be({fetchers:new Map(c.fetchers)},{flushSync:(f&&f.flushSync)===!0})}function wt(o,s,f,E){E===void 0&&(E={});let L=ve(c.matches,s);kt(o),be({errors:{[L.route.id]:f},fetchers:new Map(c.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function Ur(o){return b.v7_fetcherPersist&&(bt.set(o,(bt.get(o)||0)+1),Ue.has(o)&&Ue.delete(o)),c.fetchers.get(o)||sr}function kt(o){let s=c.fetchers.get(o);le.has(o)&&!(s&&s.state==="loading"&&lt.has(o))&&ze(o),st.delete(o),lt.delete(o),Ae.delete(o),Ue.delete(o),c.fetchers.delete(o)}function cn(o){if(b.v7_fetcherPersist){let s=(bt.get(o)||0)-1;s<=0?(bt.delete(o),Ue.add(o)):bt.set(o,s)}else kt(o);be({fetchers:new Map(c.fetchers)})}function ze(o){let s=le.get(o);H(s,"Expected fetch controller: "+o),s.abort(),le.delete(o)}function Fr(o){for(let s of o){let f=Ur(s),E=He(f.data);c.fetchers.set(s,E)}}function Ir(){let o=[],s=!1;for(let f of Ae){let E=c.fetchers.get(f);H(E,"Expected fetcher: "+f),E.state==="loading"&&(Ae.delete(f),o.push(f),s=!0)}return Fr(o),s}function Nr(o){let s=[];for(let[f,E]of lt)if(E<o){let L=c.fetchers.get(f);H(L,"Expected fetcher: "+f),L.state==="loading"&&(ze(f),lt.delete(f),s.push(f))}return Fr(s),s.length>0}function fn(o,s){let f=c.blockers.get(o)||Ye;return Ze.get(o)!==s&&Ze.set(o,s),f}function Br(o){c.blockers.delete(o),Ze.delete(o)}function zt(o,s){let f=c.blockers.get(o)||Ye;H(f.state==="unblocked"&&s.state==="blocked"||f.state==="blocked"&&s.state==="blocked"||f.state==="blocked"&&s.state==="proceeding"||f.state==="blocked"&&s.state==="unblocked"||f.state==="proceeding"&&s.state==="unblocked","Invalid blocker state transition: "+f.state+" -> "+s.state);let E=new Map(c.blockers);E.set(o,s),be({blockers:E})}function Hr(o){let{currentLocation:s,nextLocation:f,historyAction:E}=o;if(Ze.size===0)return;Ze.size>1&&se(!1,"A router only supports one blocker at a time");let L=Array.from(Ze.entries()),[N,U]=L[L.length-1],A=c.blockers.get(N);if(!(A&&A.state==="proceeding")&&U({currentLocation:s,nextLocation:f,historyAction:E}))return N}function mr(o){let s=[];return Qe.forEach((f,E)=>{(!o||o(E))&&(f.cancel(),s.push(E),Qe.delete(E))}),s}function hn(o,s,f){if(x=o,C=s,D=f||null,!P&&c.navigation===pe){P=!0;let E=zr(c.location,c.matches);E!=null&&be({restoreScrollPosition:E})}return()=>{x=null,C=null,D=null}}function kr(o,s){return D&&D(o,s.map(E=>Jt(E,c.loaderData)))||o.key}function pn(o,s){if(x&&C){let f=kr(o,s);x[f]=C()}}function zr(o,s){if(x){let f=kr(o,s),E=x[f];if(typeof E=="number")return E}return null}function mn(o){d={},p=$e(o,a,void 0,d)}return X={get basename(){return h},get future(){return b},get state(){return c},get routes(){return i},get window(){return t},initialize:tn,subscribe:nn,enableScrollRestoration:hn,navigate:jr,fetch:sn,revalidate:an,createHref:o=>e.history.createHref(o),encodeLocation:o=>e.history.encodeLocation(o),getFetcher:Ur,deleteFetcher:cn,dispose:rn,getBlocker:fn,deleteBlocker:Br,_internalFetchControllers:le,_internalActiveDeferreds:Qe,_internalSetRoutes:mn},X}const Cr=Symbol("deferred");function l(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 x=t.detectErrorBoundary;a=D=>({hasErrorBoundary:x(D)})}else a=Ge;let d=z({v7_relativeSplatPath:!1,v7_throwAbortReason:!1},t?t.future:null),i=$e(e,a,void 0,r);async function p(x,D){let{requestContext:C}=D===void 0?{}:D,P=new URL(x.url),w=x.method,g=Ee("",we(P),null,"default"),F=Ce(i,g,n);if(!dr(w)&&w!=="HEAD"){let Y=oe(405,{method:w}),{matches:X,route:c}=It(i);return{basename:n,location:g,matches:X,loaderData:{},actionData:null,errors:{[c.id]:Y},statusCode:Y.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}else if(!F){let Y=oe(404,{pathname:g.pathname}),{matches:X,route:c}=It(i);return{basename:n,location:g,matches:X,loaderData:{},actionData:null,errors:{[c.id]:Y},statusCode:Y.status,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}let J=await b(x,g,F,C);return ot(J)?J:z({location:g,basename:n},J)}async function h(x,D){let{routeId:C,requestContext:P}=D===void 0?{}:D,w=new URL(x.url),g=x.method,F=Ee("",we(w),null,"default"),J=Ce(i,F,n);if(!dr(g)&&g!=="HEAD"&&g!=="OPTIONS")throw oe(405,{method:g});if(!J)throw oe(404,{pathname:F.pathname});let Y=C?J.find(V=>V.route.id===C):vt(J,F);if(C&&!Y)throw oe(403,{pathname:F.pathname,routeId:C});if(!Y)throw oe(404,{pathname:F.pathname});let X=await b(x,F,J,P,Y);if(ot(X))return X;let c=X.errors?Object.values(X.errors)[0]:void 0;if(c!==void 0)throw c;if(X.actionData)return Object.values(X.actionData)[0];if(X.loaderData){var Z;let V=Object.values(X.loaderData)[0];return(Z=X.activeDeferreds)!=null&&Z[Y.route.id]&&(V[Cr]=X.activeDeferreds[Y.route.id]),V}}async function b(x,D,C,P,w){H(x.signal,"query()/queryRoute() requests must contain an AbortController signal");try{if(Pe(x.method.toLowerCase()))return await m(x,C,w||vt(C,D),P,w!=null);let g=await _(x,C,P,w);return ot(g)?g:z({},g,{actionData:null,actionHeaders:{}})}catch(g){if(Xr(g)){if(g.type===q.error)throw g.response;return g.response}if(Gr(g))return g;throw g}}async function m(x,D,C,P,w){let g;if(!C.route.action&&!C.route.lazy){let Y=oe(405,{method:x.method,pathname:new URL(x.url).pathname,routeId:C.route.id});if(w)throw Y;g={type:q.error,error:Y}}else g=await Q("action",x,C,D,r,a,n,d.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:w,requestContext:P}),x.signal.aborted&&v(x,w,d);if(Be(g))throw new Response(null,{status:g.status,headers:{Location:g.location}});if(Ie(g)){let Y=oe(400,{type:"defer-action"});if(w)throw Y;g={type:q.error,error:Y}}if(w){if(Ne(g))throw g.error;return{matches:[C],loaderData:{},actionData:{[C.route.id]:g.data},errors:null,statusCode:200,loaderHeaders:{},actionHeaders:{},activeDeferreds:null}}if(Ne(g)){let Y=ve(D,C.route.id),X=await _(x,D,P,void 0,{[Y.route.id]:g.error});return z({},X,{statusCode:at(g.error)?g.error.status:500,actionData:null,actionHeaders:z({},g.headers?{[C.route.id]:g.headers}:{})})}let F=new Request(x.url,{headers:x.headers,redirect:x.redirect,signal:x.signal}),J=await _(F,D,P);return z({},J,g.statusCode?{statusCode:g.statusCode}:{},{actionData:{[C.route.id]:g.data},actionHeaders:z({},g.headers?{[C.route.id]:g.headers}:{})})}async function _(x,D,C,P,w){let g=P!=null;if(g&&!(P!=null&&P.route.loader)&&!(P!=null&&P.route.lazy))throw oe(400,{method:x.method,pathname:new URL(x.url).pathname,routeId:P?.route.id});let J=(P?[P]:M(D,Object.keys(w||{})[0])).filter(V=>V.route.loader||V.route.lazy);if(J.length===0)return{matches:D,loaderData:D.reduce((V,re)=>Object.assign(V,{[re.route.id]:null}),{}),errors:w||null,statusCode:200,loaderHeaders:{},activeDeferreds:null};let Y=await Promise.all([...J.map(V=>Q("loader",x,V,D,r,a,n,d.v7_relativeSplatPath,{isStaticRequest:!0,isRouteRequest:g,requestContext:C}))]);x.signal.aborted&&v(x,g,d);let X=new Map,c=De(D,J,Y,w,X),Z=new Set(J.map(V=>V.route.id));return D.forEach(V=>{Z.has(V.route.id)||(c.loaderData[V.route.id]=null)}),z({},c,{matches:D,activeDeferreds:X.size>0?Object.fromEntries(X.entries()):null})}return{dataRoutes:i,query:p,queryRoute:h}}function u(e,t,r){return z({},t,{statusCode:at(r)?r.status:500,errors:{[t._deepestRenderedBoundaryId||e[0].id]:r}})}function v(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 R(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function S(e,t,r,n,a,d,i,p){let h,b;if(i){h=[];for(let _ of t)if(h.push(_),_.route.id===i){b=_;break}}else h=t,b=t[t.length-1];let m=tr(a||".",er(h,d),Ve(e.pathname,r)||e.pathname,p==="path");return a==null&&(m.search=e.search,m.hash=e.hash),(a==null||a===""||a===".")&&b&&b.route.index&&!cr(m.search)&&(m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(m.pathname=m.pathname==="/"?r:Je([r,m.pathname])),we(m)}function j(e,t,r,n){if(!n||!R(n))return{path:r};if(n.formMethod&&!dr(n.formMethod))return{path:r,error:oe(405,{method:n.formMethod})};let a=()=>({path:r,error:oe(400,{type:"invalid-body"})}),d=n.formMethod||"get",i=e?d.toUpperCase():d.toLowerCase(),p=Mr(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Pe(i))return a();let x=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((D,C)=>{let[P,w]=C;return""+D+P+"="+w+`
20
- `},""):String(n.body);return{path:r,submission:{formMethod:i,formAction:p,formEncType:n.formEncType,formData:void 0,json:void 0,text:x}}}else if(n.formEncType==="application/json"){if(!Pe(i))return a();try{let x=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:i,formAction:p,formEncType:n.formEncType,formData:void 0,json:x,text:void 0}}}catch{return a()}}}H(typeof FormData=="function","FormData is not available in this environment");let h,b;if(n.formData)h=me(n.formData),b=n.formData;else if(n.body instanceof FormData)h=me(n.body),b=n.body;else if(n.body instanceof URLSearchParams)h=n.body,b=xe(h);else if(n.body==null)h=new URLSearchParams,b=new FormData;else try{h=new URLSearchParams(n.body),b=xe(h)}catch{return a()}let m={formMethod:i,formAction:p,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:b,json:void 0,text:void 0};if(Pe(m.formMethod))return{path:r,submission:m};let _=ie(r);return t&&_.search&&cr(_.search)&&h.append("index",""),_.search="?"+h,{path:we(_),submission:m}}function M(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 K(e,t,r,n,a,d,i,p,h,b,m,_,x,D,C,P){let w=P?Object.values(P)[0]:C?Object.values(C)[0]:void 0,g=e.createURL(t.location),F=e.createURL(a),J=P?Object.keys(P)[0]:void 0,X=M(r,J).filter((Z,V)=>{let{route:re}=Z;if(re.lazy)return!0;if(re.loader==null)return!1;if(d)return re.loader.hydrate?!0:t.loaderData[re.id]===void 0&&(!t.errors||t.errors[re.id]===void 0);if(te(t.loaderData,t.matches[V],Z)||p.some(Le=>Le===Z.route.id))return!0;let Oe=t.matches[V],Se=Z;return $(Z,z({currentUrl:g,currentParams:Oe.params,nextUrl:F,nextParams:Se.params},n,{actionResult:w,defaultShouldRevalidate:i||g.pathname+g.search===F.pathname+F.search||g.search!==F.search||k(Oe,Se)}))}),c=[];return m.forEach((Z,V)=>{if(d||!r.some(it=>it.route.id===Z.routeId)||b.has(V))return;let re=Ce(x,Z.path,D);if(!re){c.push({key:V,routeId:Z.routeId,path:Z.path,matches:null,match:null,controller:null});return}let Oe=t.fetchers.get(V),Se=vt(re,Z.path),Le=!1;_.has(V)?Le=!1:h.includes(V)?Le=!0:Oe&&Oe.state!=="idle"&&Oe.data===void 0?Le=i:Le=$(Se,z({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:F,nextParams:r[r.length-1].params},n,{actionResult:w,defaultShouldRevalidate:i})),Le&&c.push({key:V,routeId:Z.routeId,path:Z.path,matches:re,match:Se,controller:new AbortController})}),[X,c]}function te(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function k(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function $(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function T(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 d={};for(let i in n){let h=a[i]!==void 0&&i!=="hasErrorBoundary";se(!h,'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.')),!h&&!br.has(i)&&(d[i]=n[i])}Object.assign(a,d),Object.assign(a,z({},t(a),{lazy:void 0}))}async function Q(e,t,r,n,a,d,i,p,h){h===void 0&&(h={});let b,m,_,x=P=>{let w,g=new Promise((F,J)=>w=J);return _=()=>w(),t.signal.addEventListener("abort",_),Promise.race([P({request:t,params:r.params,context:h.requestContext}),g])};try{let P=r.route[e];if(r.route.lazy)if(P){let w,g=await Promise.all([x(P).catch(F=>{w=F}),T(r.route,d,a)]);if(w)throw w;m=g[0]}else if(await T(r.route,d,a),P=r.route[e],P)m=await x(P);else if(e==="action"){let w=new URL(t.url),g=w.pathname+w.search;throw oe(405,{method:t.method,pathname:g,routeId:r.route.id})}else return{type:q.data,data:void 0};else if(P)m=await x(P);else{let w=new URL(t.url),g=w.pathname+w.search;throw oe(404,{pathname:g})}H(m!==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){b=q.error,m=P}finally{_&&t.signal.removeEventListener("abort",_)}if(ot(m)){let P=m.status;if(lr.has(P)){let g=m.headers.get("Location");if(H(g,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ft.test(g))g=S(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,g,p);else if(!h.isStaticRequest){let F=new URL(t.url),J=g.startsWith("//")?new URL(F.protocol+g):new URL(g),Y=Ve(J.pathname,i)!=null;J.origin===F.origin&&Y&&(g=J.pathname+J.search+J.hash)}if(h.isStaticRequest)throw m.headers.set("Location",g),m;return{type:q.redirect,status:P,location:g,revalidate:m.headers.get("X-Remix-Revalidate")!==null,reloadDocument:m.headers.get("X-Remix-Reload-Document")!==null}}if(h.isRouteRequest)throw{type:b===q.error?q.error:q.data,response:m};let w;try{let g=m.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?m.body==null?w=null:w=await m.json():w=await m.text()}catch(g){return{type:q.error,error:g}}return b===q.error?{type:b,error:new jt(P,m.statusText,w),headers:m.headers}:{type:q.data,data:w,statusCode:m.status,headers:m.headers}}if(b===q.error)return{type:b,error:m};if(Yr(m)){var D,C;return{type:q.deferred,deferredData:m,statusCode:(D=m.init)==null?void 0:D.status,headers:((C=m.init)==null?void 0:C.headers)&&new Headers(m.init.headers)}}return{type:q.data,data:m}}function ae(e,t,r,n){let a=e.createURL(Mr(t)).toString(),d={signal:r};if(n&&Pe(n.formMethod)){let{formMethod:i,formEncType:p}=n;d.method=i.toUpperCase(),p==="application/json"?(d.headers=new Headers({"Content-Type":p}),d.body=JSON.stringify(n.json)):p==="text/plain"?d.body=n.text:p==="application/x-www-form-urlencoded"&&n.formData?d.body=me(n.formData):d.body=n.formData}return new Request(a,d)}function me(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function xe(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function De(e,t,r,n,a){let d={},i=null,p,h=!1,b={};return r.forEach((m,_)=>{let x=t[_].route.id;if(H(!Be(m),"Cannot handle redirect results in processLoaderData"),Ne(m)){let D=ve(e,x),C=m.error;n&&(C=Object.values(n)[0],n=void 0),i=i||{},i[D.route.id]==null&&(i[D.route.id]=C),d[x]=void 0,h||(h=!0,p=at(m.error)?m.error.status:500),m.headers&&(b[x]=m.headers)}else Ie(m)?(a.set(x,m.deferredData),d[x]=m.deferredData.data):d[x]=m.data,m.statusCode!=null&&m.statusCode!==200&&!h&&(p=m.statusCode),m.headers&&(b[x]=m.headers)}),n&&(i=n,d[Object.keys(n)[0]]=void 0),{loaderData:d,errors:i,statusCode:p||200,loaderHeaders:b}}function je(e,t,r,n,a,d,i,p){let{loaderData:h,errors:b}=De(t,r,n,a,p);for(let m=0;m<d.length;m++){let{key:_,match:x,controller:D}=d[m];H(i!==void 0&&i[m]!==void 0,"Did not find corresponding fetcher result");let C=i[m];if(!(D&&D.signal.aborted))if(Ne(C)){let P=ve(e.matches,x?.route.id);b&&b[P.route.id]||(b=z({},b,{[P.route.id]:C.error})),e.fetchers.delete(_)}else if(Be(C))H(!1,"Unhandled fetcher revalidation redirect");else if(Ie(C))H(!1,"Unhandled fetcher deferred data");else{let P=He(C.data);e.fetchers.set(_,P)}}return{loaderData:h,errors:b}}function ue(e,t,r,n){let a=z({},t);for(let d of r){let i=d.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(a[i]=t[i]):e[i]!==void 0&&d.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function ve(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 It(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 oe(e,t){let{pathname:r,routeId:n,method:a,type:d}=t===void 0?{}:t,i="Unknown Server Error",p="Unknown @remix-run/router error";return e===400?(i="Bad Request",a&&r&&n?p="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.":d==="defer-action"?p="defer() is not supported in actions":d==="invalid-body"&&(p="Unable to encode submission body")):e===403?(i="Forbidden",p='Route "'+n+'" does not match URL "'+r+'"'):e===404?(i="Not Found",p='No route matches URL "'+r+'"'):e===405&&(i="Method Not Allowed",a&&r&&n?p="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&&(p='Invalid request method "'+a.toUpperCase()+'"')),new jt(e||500,i,new Error(p),!0)}function Lr(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Be(r))return{result:r,idx:t}}}function Mr(e){let t=typeof e=="string"?ie(e):e;return we(z({},t,{hash:""}))}function Jr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ie(e){return e.type===q.deferred}function Ne(e){return e.type===q.error}function Be(e){return(e&&e.type)===q.redirect}function Yr(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 ot(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Gr(e){if(!ot(e))return!1;let t=e.status,r=e.headers.get("Location");return t>=300&&t<=399&&r!=null}function Xr(e){return e&&ot(e.response)&&(e.type===q.data||e.type===q.error)}function dr(e){return mt.has(e.toLowerCase())}function Pe(e){return ir.has(e.toLowerCase())}async function _r(e,t,r,n,a,d){for(let i=0;i<r.length;i++){let p=r[i],h=t[i];if(!h)continue;let b=e.find(_=>_.route.id===h.route.id),m=b!=null&&!k(b,h)&&(d&&d[h.route.id])!==void 0;if(Ie(p)&&(a||m)){let _=n[i];H(_,"Expected an AbortSignal for revalidating fetcher deferred result"),await Or(p,_,a).then(x=>{x&&(r[i]=x||r[i])})}}}async function Or(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:q.data,data:e.deferredData.unwrappedData}}catch(a){return{type:q.error,error:a}}return{type:q.data,data:e.deferredData.data}}}function cr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function vt(e,t){let r=typeof t=="string"?ie(t).search:t.search;if(e[e.length-1].route.index&&cr(r||""))return e[e.length-1];let n=qt(e);return n[n.length-1]}function Tr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:d,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(d!=null)return{formMethod:t,formAction:r,formEncType:n,formData:d,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 fr(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 Qr(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 gt(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 Zr(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 He(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 qr(e,t){try{let r=e.sessionStorage.getItem(ur);if(r){let n=JSON.parse(r);for(let[a,d]of Object.entries(n||{}))d&&Array.isArray(d)&&t.set(a,new Set(d||[]))}}catch{}}function en(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(ur,JSON.stringify(r))}catch(n){se(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}}}]);})();
21
-
22
- //# sourceMappingURL=module-react-router.933956ac.js.map