@kne-components/react-file-type 1.0.6

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 (53) hide show
  1. package/build/asset-manifest.json +48 -0
  2. package/build/favicon.svg +1 -0
  3. package/build/index.html +1 -0
  4. package/build/logo192.png +0 -0
  5. package/build/logo512.png +0 -0
  6. package/build/manifest.json +25 -0
  7. package/build/remoteEntry.js +2 -0
  8. package/build/remoteEntry.js.map +1 -0
  9. package/build/static/css/680.ed92da7d.chunk.css +12 -0
  10. package/build/static/css/680.ed92da7d.chunk.css.map +1 -0
  11. package/build/static/js/136.79c48b06.chunk.js +3 -0
  12. package/build/static/js/136.79c48b06.chunk.js.LICENSE.txt +9 -0
  13. package/build/static/js/136.79c48b06.chunk.js.map +1 -0
  14. package/build/static/js/16.eea8ef63.chunk.js +3 -0
  15. package/build/static/js/16.eea8ef63.chunk.js.LICENSE.txt +19 -0
  16. package/build/static/js/16.eea8ef63.chunk.js.map +1 -0
  17. package/build/static/js/328.3ef513ff.chunk.js +3 -0
  18. package/build/static/js/328.3ef513ff.chunk.js.LICENSE.txt +32 -0
  19. package/build/static/js/328.3ef513ff.chunk.js.map +1 -0
  20. package/build/static/js/368.678bacfa.chunk.js +2 -0
  21. package/build/static/js/368.678bacfa.chunk.js.map +1 -0
  22. package/build/static/js/392.5dffdfe7.chunk.js +3 -0
  23. package/build/static/js/392.5dffdfe7.chunk.js.LICENSE.txt +9 -0
  24. package/build/static/js/392.5dffdfe7.chunk.js.map +1 -0
  25. package/build/static/js/460.2c4dddc6.chunk.js +2 -0
  26. package/build/static/js/460.2c4dddc6.chunk.js.map +1 -0
  27. package/build/static/js/466.606fc3e3.chunk.js +2 -0
  28. package/build/static/js/466.606fc3e3.chunk.js.map +1 -0
  29. package/build/static/js/564.134ea906.chunk.js +2 -0
  30. package/build/static/js/564.134ea906.chunk.js.map +1 -0
  31. package/build/static/js/624.d7591dac.chunk.js +2 -0
  32. package/build/static/js/624.d7591dac.chunk.js.map +1 -0
  33. package/build/static/js/648.6be58726.chunk.js +2 -0
  34. package/build/static/js/648.6be58726.chunk.js.map +1 -0
  35. package/build/static/js/680.728f86b8.chunk.js +2 -0
  36. package/build/static/js/680.728f86b8.chunk.js.map +1 -0
  37. package/build/static/js/688.b0c52041.chunk.js +3 -0
  38. package/build/static/js/688.b0c52041.chunk.js.LICENSE.txt +7 -0
  39. package/build/static/js/688.b0c52041.chunk.js.map +1 -0
  40. package/build/static/js/704.34484f1e.chunk.js +3 -0
  41. package/build/static/js/704.34484f1e.chunk.js.LICENSE.txt +23 -0
  42. package/build/static/js/704.34484f1e.chunk.js.map +1 -0
  43. package/build/static/js/80.5d74e76d.chunk.js +2 -0
  44. package/build/static/js/80.5d74e76d.chunk.js.map +1 -0
  45. package/build/static/js/85.8d5bc718.chunk.js +2 -0
  46. package/build/static/js/85.8d5bc718.chunk.js.map +1 -0
  47. package/build/static/js/868.950c3e49.chunk.js +2 -0
  48. package/build/static/js/868.950c3e49.chunk.js.map +1 -0
  49. package/build/static/js/96.70bdbffb.chunk.js +2 -0
  50. package/build/static/js/96.70bdbffb.chunk.js.map +1 -0
  51. package/build/static/js/main.45acfb3d.js +2 -0
  52. package/build/static/js/main.45acfb3d.js.map +1 -0
  53. package/package.json +53 -0
@@ -0,0 +1,3 @@
1
+ /*! For license information please see 328.3ef513ff.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_kne_components_react_file_type=self.webpackChunk_kne_components_react_file_type||[]).push([[328],{45948:(e,t,r)=>{r.r(t),r.d(t,{AbortedDeferredError:()=>V,Await:()=>$t,BrowserRouter:()=>Cr,Form:()=>Ur,HashRouter:()=>Lr,Link:()=>Tr,MemoryRouter:()=>Bt,NavLink:()=>Ar,Navigate:()=>It,NavigationType:()=>n,Outlet:()=>zt,Route:()=>Ht,Router:()=>Wt,RouterProvider:()=>xr,Routes:()=>Kt,ScrollRestoration:()=>Mr,UNSAFE_DataRouterContext:()=>Ye,UNSAFE_DataRouterStateContext:()=>Xe,UNSAFE_FetchersContext:()=>gr,UNSAFE_LocationContext:()=>Ze,UNSAFE_NavigationContext:()=>Qe,UNSAFE_RouteContext:()=>et,UNSAFE_ViewTransitionContext:()=>yr,UNSAFE_useRouteId:()=>Dt,UNSAFE_useScrollRestoration:()=>Yr,createBrowserRouter:()=>fr,createHashRouter:()=>pr,createMemoryRouter:()=>Zt,createPath:()=>m,createRoutesFromChildren:()=>Xt,createRoutesFromElements:()=>Xt,createSearchParams:()=>or,defer:()=>G,generatePath:()=>M,isRouteErrorResponse:()=>te,json:()=>q,matchPath:()=>j,matchRoutes:()=>E,parsePath:()=>v,redirect:()=>Q,redirectDocument:()=>Z,renderMatches:()=>Gt,resolvePath:()=>N,unstable_HistoryRouter:()=>Pr,unstable_usePrompt:()=>Gr,unstable_useViewTransitionState:()=>Qr,useActionData:()=>Tt,useAsyncError:()=>Mt,useAsyncValue:()=>Ut,useBeforeUnload:()=>Xr,useBlocker:()=>Ot,useFetcher:()=>$r,useFetchers:()=>Jr,useFormAction:()=>Kr,useHref:()=>rt,useInRouterContext:()=>nt,useLinkClickHandler:()=>Br,useLoaderData:()=>kt,useLocation:()=>at,useMatch:()=>it,useMatches:()=>Pt,useNavigate:()=>st,useNavigation:()=>Ct,useNavigationType:()=>ot,useOutlet:()=>dt,useOutletContext:()=>ct,useParams:()=>ht,useResolvedPath:()=>ft,useRevalidator:()=>Lt,useRouteError:()=>At,useRouteLoaderData:()=>_t,useRoutes:()=>pt,useSearchParams:()=>Ir,useSubmit:()=>Wr});var n,a=r(49256),o=r(60016);function i(){return i=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},i.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));const l="popstate";function s(e){void 0===e&&(e={});let t,{initialEntries:r=["/"],initialIndex:a,v5Compat:o=!1}=e;t=r.map(((e,t)=>d(e,"string"===typeof e?null:e.state,0===t?"default":void 0)));let i=u(null==a?t.length-1:a),l=n.Pop,s=null;function u(e){return Math.min(Math.max(e,0),t.length-1)}function c(){return t[i]}function d(e,r,n){void 0===r&&(r=null);let a=p(t?c().pathname:"/",e,r,n);return h("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function f(e){return"string"===typeof e?e:m(e)}return{get index(){return i},get action(){return l},get location(){return c()},createHref:f,createURL:e=>new URL(f(e),"http://localhost"),encodeLocation(e){let t="string"===typeof e?v(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,r){l=n.Push;let a=d(e,r);i+=1,t.splice(i,t.length,a),o&&s&&s({action:l,location:a,delta:1})},replace(e,r){l=n.Replace;let a=d(e,r);t[i]=a,o&&s&&s({action:l,location:a,delta:0})},go(e){l=n.Pop;let r=u(i+e),a=t[r];i=r,s&&s({action:l,location:a,delta:e})},listen:e=>(s=e,()=>{s=null})}}function u(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:r,search:n,hash:a}=e.location;return p("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"===typeof t?t:m(t)}),null,e)}function c(e){return void 0===e&&(e={}),y((function(e,t){let{pathname:r="/",search:n="",hash:a=""}=v(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),p("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"===typeof t?t:m(t))}),(function(e,t){h("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")}),e)}function d(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function h(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(r){}}}function f(e,t){return{usr:e.state,key:e.key,idx:t}}function p(e,t,r,n){return void 0===r&&(r=null),i({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?v(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function m(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 v(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 y(e,t,r,a){void 0===a&&(a={});let{window:o=document.defaultView,v5Compat:s=!1}=a,u=o.history,c=n.Pop,h=null,v=y();function y(){return(u.state||{idx:null}).idx}function g(){c=n.Pop;let e=y(),t=null==e?null:e-v;v=e,h&&h({action:c,location:w.location,delta:t})}function b(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,r="string"===typeof e?e:m(e);return d(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==v&&(v=0,u.replaceState(i({},u.state,{idx:v}),""));let w={get action(){return c},get location(){return e(o,u)},listen(e){if(h)throw new Error("A history only accepts one active listener");return o.addEventListener(l,g),h=e,()=>{o.removeEventListener(l,g),h=null}},createHref:e=>t(o,e),createURL:b,encodeLocation(e){let t=b(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=n.Push;let a=p(w.location,e,t);r&&r(a,e),v=y()+1;let i=f(a,v),l=w.createHref(a);try{u.pushState(i,"",l)}catch(d){if(d instanceof DOMException&&"DataCloneError"===d.name)throw d;o.location.assign(l)}s&&h&&h({action:c,location:w.location,delta:1})},replace:function(e,t){c=n.Replace;let a=p(w.location,e,t);r&&r(a,e),v=y();let o=f(a,v),i=w.createHref(a);u.replaceState(o,"",i),s&&h&&h({action:c,location:w.location,delta:0})},go:e=>u.go(e)};return w}var g;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(g||(g={}));const b=new Set(["lazy","caseSensitive","path","id","index","children"]);function w(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map(((e,a)=>{let o=[...r,a],l="string"===typeof e.id?e.id:o.join("-");if(d(!0!==e.index||!e.children,"Cannot specify children on an index route"),d(!n[l],'Found a route id collision on id "'+l+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){let r=i({},e,t(e),{id:l});return n[l]=r,r}{let r=i({},e,t(e),{id:l,children:void 0});return n[l]=r,e.children&&(r.children=w(e.children,t,o,n)),r}}))}function E(e,t,r){void 0===r&&(r="/");let n=F(("string"===typeof t?v(t):t).pathname||"/",r);if(null==n)return null;let a=R(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(a);let o=null;for(let i=0;null==o&&i<a.length;++i)o=U(a[i],O(n));return o}function S(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 R(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");let a=(e,a,o)=>{let i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(d(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));let l=W([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(d(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),R(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:A(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let n of x(e.path))a(e,t,n);else a(e,t)})),t}function x(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=x(n.join("/")),l=[];return l.push(...i.map((e=>""===e?o:[o,e].join("/")))),a&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const D=/^:[\w-]+$/,C=3,L=2,P=1,k=10,_=-2,T=e=>"*"===e;function A(e,t){let r=e.split("/"),n=r.length;return r.some(T)&&(n+=_),t&&(n+=L),r.filter((e=>!T(e))).reduce(((e,t)=>e+(D.test(t)?C:""===t?P:k)),n)}function U(e,t){let{routesMeta:r}=e,n={},a="/",o=[];for(let i=0;i<r.length;++i){let e=r[i],l=i===r.length-1,s="/"===a?t:t.slice(a.length)||"/",u=j({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},s);if(!u)return null;Object.assign(n,u.params);let c=e.route;o.push({params:n,pathname:W([a,u.pathname]),pathnameBase:K(W([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=W([a,u.pathnameBase]))}return o}function M(e,t){void 0===t&&(t={});let r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(h(!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=e=>null==e?"":"string"===typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e){return a(t["*"])}const o=e.match(/^:([\w-]+)(\??)$/);if(o){const[,e,r]=o;let n=t[e];return d("?"===r||null!=n,'Missing ":'+e+'" param'),a(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function j(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=function(e,t,r){void 0===t&&(t=!1);void 0===r&&(r=!0);h("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,((e,t,r)=>(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))");let o=new RegExp(a,t?void 0:"i");return[o,n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce(((e,t,r)=>{let{paramName:n,isOptional:a}=t;if("*"===n){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const s=l[r];return e[n]=a&&!s?void 0:function(e,t){try{return decodeURIComponent(e)}catch(r){return h(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(s||"",n),e}),{}),pathname:o,pathnameBase:i,pattern:e}}function O(e){try{return decodeURI(e)}catch(t){return h(!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 F(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 N(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:a=""}="string"===typeof e?v(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:$(n),hash:J(a)}}function B(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 I(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function z(e,t){let r=I(e);return t?r.map(((t,r)=>r===e.length-1?t.pathname:t.pathnameBase)):r.map((e=>e.pathnameBase))}function H(e,t,r,n){let a;void 0===n&&(n=!1),"string"===typeof e?a=v(e):(a=i({},e),d(!a.pathname||!a.pathname.includes("?"),B("?","pathname","search",a)),d(!a.pathname||!a.pathname.includes("#"),B("#","pathname","hash",a)),d(!a.search||!a.search.includes("#"),B("#","search","hash",a)));let o,l=""===e||""===a.pathname,s=l?"/":a.pathname;if(null==s)o=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=N(a,o),c=s&&"/"!==s&&s.endsWith("/"),h=(l||"."===s)&&r.endsWith("/");return u.pathname.endsWith("/")||!c&&!h||(u.pathname+="/"),u}const W=e=>e.join("/").replace(/\/\/+/g,"/"),K=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",J=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",q=function(e,t){void 0===t&&(t={});let r="number"===typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),i({},r,{headers:n}))};class V extends Error{}class Y{constructor(e,t){let r;this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],d(e&&"object"===typeof e&&!Array.isArray(e),"defer() only accepts plain objects"),this.abortPromise=new Promise(((e,t)=>r=t)),this.controller=new AbortController;let n=()=>r(new V("Deferred data aborted"));this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",n),this.controller.signal.addEventListener("abort",n),this.data=Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:this.trackPromise(r,n)})}),{}),this.done&&this.unlistenAbortSignal(),this.init=t}trackPromise(e,t){if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);let r=Promise.race([t,this.abortPromise]).then((t=>this.onSettle(r,e,void 0,t)),(t=>this.onSettle(r,e,t)));return r.catch((()=>{})),Object.defineProperty(r,"_tracked",{get:()=>!0}),r}onSettle(e,t,r,n){if(this.controller.signal.aborted&&r instanceof V)return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:()=>r}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){let r=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)}return void 0===n?(Object.defineProperty(e,"_error",{get:()=>r}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:()=>n}),this.emit(!1,t),n)}emit(e,t){this.subscribers.forEach((r=>r(e,t)))}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach(((e,t)=>this.pendingKeysSet.delete(t))),this.emit(!0)}async resolveData(e){let t=!1;if(!this.done){let r=()=>this.cancel();e.addEventListener("abort",r),t=await new Promise((t=>{this.subscribe((n=>{e.removeEventListener("abort",r),(n||this.done)&&t(n)}))}))}return t}get done(){return 0===this.pendingKeysSet.size}get unwrappedData(){return d(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(((e,t)=>{let[r,n]=t;return Object.assign(e,{[r]:X(n)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function X(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const G=function(e,t){return void 0===t&&(t={}),new Y(e,"number"===typeof t?{status:t}:t)},Q=function(e,t){void 0===t&&(t=302);let r=t;"number"===typeof r?r={status:r}:"undefined"===typeof r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,i({},r,{headers:n}))},Z=(e,t)=>{let r=Q(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class ee{constructor(e,t,r,n){void 0===n&&(n=!1),this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function te(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}const re=["post","put","patch","delete"],ne=new Set(re),ae=["get",...re],oe=new Set(ae),ie=new Set([301,302,303,307,308]),le=new Set([307,308]),se={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ue={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ce={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},de=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,he=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),fe="remix-router-transitions";function pe(e){const t=e.window?e.window:"undefined"!==typeof window?window:void 0,r="undefined"!==typeof t&&"undefined"!==typeof t.document&&"undefined"!==typeof t.document.createElement,a=!r;let o;if(d(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;o=e=>({hasErrorBoundary:t(e)})}else o=he;let l,s,u={},c=w(e.routes,o,void 0,u),f=e.basename||"/",m=i({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),v=null,y=new Set,b=null,R=null,x=null,D=null!=e.hydrationData,C=E(c,e.history.location,f),L=null;if(null==C){let t=Te(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=_e(c);C=r,L={[n.id]:t}}let P,k=C.some((e=>e.route.lazy)),_=C.some((e=>e.route.loader));if(k)s=!1;else if(_)if(m.v7_partialHydration){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null;s=C.every((e=>e.route.loader&&!0!==e.route.loader.hydrate&&(t&&void 0!==t[e.route.id]||r&&void 0!==r[e.route.id])))}else s=null!=e.hydrationData;else s=!0;let T,A={historyAction:e.history.action,location:e.history.location,matches:C,initialized:s,navigation:se,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||L,fetchers:new Map,blockers:new Map},U=n.Pop,M=!1,j=!1,O=new Map,N=null,B=!1,I=!1,z=[],H=[],W=new Map,K=0,$=-1,J=new Map,q=new Set,V=new Map,Y=new Map,X=new Set,G=new Map,Q=new Map,Z=!1;function ee(e,t){void 0===t&&(t={}),A=i({},A,e);let r=[],n=[];m.v7_fetcherPersist&&A.fetchers.forEach(((e,t)=>{"idle"===e.state&&(X.has(t)?n.push(t):r.push(t))})),[...y].forEach((e=>e(A,{deletedFetchers:n,unstable_viewTransitionOpts:t.viewTransitionOpts,unstable_flushSync:!0===t.flushSync}))),m.v7_fetcherPersist&&(r.forEach((e=>A.fetchers.delete(e))),n.forEach((e=>be(e))))}function te(t,r,a){var o,s;let u,{flushSync:d}=void 0===a?{}:a,h=null!=A.actionData&&null!=A.navigation.formMethod&&Be(A.navigation.formMethod)&&"loading"===A.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);u=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:h?A.actionData:null;let f=r.loaderData?Pe(A.loaderData,r.loaderData,r.matches||[],r.errors):A.loaderData,p=A.blockers;p.size>0&&(p=new Map(p),p.forEach(((e,t)=>p.set(t,ce))));let m,v=!0===M||null!=A.navigation.formMethod&&Be(A.navigation.formMethod)&&!0!==(null==(s=t.state)?void 0:s._isRedirect);if(l&&(c=l,l=void 0),B||U===n.Pop||(U===n.Push?e.history.push(t,t.state):U===n.Replace&&e.history.replace(t,t.state)),U===n.Pop){let e=O.get(A.location.pathname);e&&e.has(t.pathname)?m={currentLocation:A.location,nextLocation:t}:O.has(t.pathname)&&(m={currentLocation:t,nextLocation:A.location})}else if(j){let e=O.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),O.set(A.location.pathname,e)),m={currentLocation:A.location,nextLocation:t}}ee(i({},r,{actionData:u,loaderData:f,historyAction:U,location:t,initialized:!0,navigation:se,revalidation:"idle",restoreScrollPosition:Ve(t,r.matches||A.matches),preventScrollReset:v,blockers:p}),{viewTransitionOpts:m,flushSync:!0===d}),U=n.Pop,M=!1,j=!1,B=!1,I=!1,z=[],H=[]}async function re(t,r,a){T&&T.abort(),T=null,U=t,B=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(b&&x){let r=He(e,t);b[r]=x()}}(A.location,A.matches),M=!0===(a&&a.preventScrollReset),j=!0===(a&&a.enableViewTransition);let s=l||c,d=a&&a.overrideNavigation,h=E(s,r,f),p=!0===(a&&a.flushSync);if(!h){let e=Te(404,{pathname:r.pathname}),{matches:t,route:n}=_e(s);return Ne(),void te(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:p})}if(A.initialized&&!I&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(A.location,r)&&!(a&&a.submission&&Be(a.submission.formMethod)))return void te(r,{matches:h},{flushSync:p});T=new AbortController;let v,y,w=Re(e.history,r,T.signal,a&&a.submission);if(a&&a.pendingError)y={[ke(h).route.id]:a.pendingError};else if(a&&a.submission&&Be(a.submission.formMethod)){let e=await async function(e,t,r,a,i){void 0===i&&(i={});oe();let l,s=function(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}(t,r);ee({navigation:s},{flushSync:!0===i.flushSync});let c=We(a,t);if(c.route.action||c.route.lazy){if(l=await Se("action",e,c,a,u,o,f,m.v7_relativeSplatPath),e.signal.aborted)return{shortCircuited:!0}}else l={type:g.error,error:Te(405,{method:e.method,pathname:t.pathname,routeId:c.route.id})};if(Oe(l)){let e;return e=i&&null!=i.replace?i.replace:l.location===A.location.pathname+A.location.search,await ne(A,l,{submission:r,replace:e}),{shortCircuited:!0}}if(je(l)){let e=ke(a,c.route.id);return!0!==(i&&i.replace)&&(U=n.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:l.error}}}if(Me(l))throw Te(400,{type:"defer-action"});return{pendingActionData:{[c.route.id]:l.data}}}(w,r,a.submission,h,{replace:a.replace,flushSync:p});if(e.shortCircuited)return;v=e.pendingActionData,y=e.pendingActionError,d=$e(r,a.submission),p=!1,w=new Request(w.url,{signal:w.signal})}let{shortCircuited:S,loaderData:R,errors:D}=await async function(t,r,n,a,o,s,u,d,h,p,v){let y=a||$e(r,o),g=o||s||Ke(y),b=l||c,[w,E]=ge(e.history,A,n,g,r,m.v7_partialHydration&&!0===d,I,z,H,X,V,q,b,f,p,v);if(Ne((e=>!(n&&n.some((t=>t.route.id===e)))||w&&w.some((t=>t.route.id===e)))),$=++K,0===w.length&&0===E.length){let e=xe();return te(r,i({matches:n,loaderData:{},errors:v||null},p?{actionData:p}:{},e?{fetchers:new Map(A.fetchers)}:{}),{flushSync:h}),{shortCircuited:!0}}if(!B&&(!m.v7_partialHydration||!d)){E.forEach((e=>{let t=A.fetchers.get(e.key),r=Je(void 0,t?t.data:void 0);A.fetchers.set(e.key,r)}));let e=p||A.actionData;ee(i({navigation:y},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},E.length>0?{fetchers:new Map(A.fetchers)}:{}),{flushSync:h})}E.forEach((e=>{W.has(e.key)&&we(e.key),e.controller&&W.set(e.key,e.controller)}));let S=()=>E.forEach((e=>we(e.key)));T&&T.signal.addEventListener("abort",S);let{results:R,loaderResults:x,fetcherResults:D}=await ae(A.matches,n,w,E,t);if(t.signal.aborted)return{shortCircuited:!0};T&&T.signal.removeEventListener("abort",S);E.forEach((e=>W.delete(e.key)));let C=Ae(R);if(C){if(C.idx>=w.length){let e=E[C.idx-w.length].key;q.add(e)}return await ne(A,C.result,{replace:u}),{shortCircuited:!0}}let{loaderData:L,errors:P}=Le(A,n,w,x,v,E,D,G);G.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&G.delete(t)}))}));let k=xe(),_=De($),U=k||_||E.length>0;return i({loaderData:L,errors:P},U?{fetchers:new Map(A.fetchers)}:{})}(w,r,h,d,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,p,v,y);S||(T=null,te(r,i({matches:h},v?{actionData:v}:{},{loaderData:R,errors:D})))}async function ne(a,o,l){let{submission:s,fetcherSubmission:u,replace:c}=void 0===l?{}:l;o.revalidate&&(I=!0);let h=p(a.location,o.location,{_isRedirect:!0});if(d(h,"Expected a location on the redirect navigation"),r){let r=!1;if(o.reloadDocument)r=!0;else if(de.test(o.location)){const n=e.history.createURL(o.location);r=n.origin!==t.location.origin||null==F(n.pathname,f)}if(r)return void(c?t.location.replace(o.location):t.location.assign(o.location))}T=null;let m=!0===c?n.Replace:n.Push,{formMethod:v,formAction:y,formEncType:g}=a.navigation;!s&&!u&&v&&y&&g&&(s=Ke(a.navigation));let b=s||u;if(le.has(o.status)&&b&&Be(b.formMethod))await re(m,h,{submission:i({},b,{formAction:o.location}),preventScrollReset:M});else{let e=$e(h,s);await re(m,h,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:M})}}async function ae(t,r,n,a,i){let l=await Promise.all([...n.map((e=>Se("loader",i,e,r,u,o,f,m.v7_relativeSplatPath))),...a.map((t=>{if(t.matches&&t.match&&t.controller)return Se("loader",Re(e.history,t.path,t.controller.signal),t.match,t.matches,u,o,f,m.v7_relativeSplatPath);return{type:g.error,error:Te(404,{pathname:t.path})}}))]),s=l.slice(0,n.length),c=l.slice(n.length);return await Promise.all([Ie(t,n,s,s.map((()=>i.signal)),!1,A.loaderData),Ie(t,a.map((e=>e.match)),c,a.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:l,loaderResults:s,fetcherResults:c}}function oe(){I=!0,z.push(...Ne()),V.forEach(((e,t)=>{W.has(t)&&(H.push(t),we(t))}))}function ie(e,t,r){void 0===r&&(r={}),A.fetchers.set(e,t),ee({fetchers:new Map(A.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function pe(e,t,r,n){void 0===n&&(n={});let a=ke(A.matches,t);be(e),ee({errors:{[a.route.id]:r},fetchers:new Map(A.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function ye(e){return m.v7_fetcherPersist&&(Y.set(e,(Y.get(e)||0)+1),X.has(e)&&X.delete(e)),A.fetchers.get(e)||ue}function be(e){let t=A.fetchers.get(e);!W.has(e)||t&&"loading"===t.state&&J.has(e)||we(e),V.delete(e),J.delete(e),q.delete(e),X.delete(e),A.fetchers.delete(e)}function we(e){let t=W.get(e);d(t,"Expected fetch controller: "+e),t.abort(),W.delete(e)}function Ee(e){for(let t of e){let e=qe(ye(t).data);A.fetchers.set(t,e)}}function xe(){let e=[],t=!1;for(let r of q){let n=A.fetchers.get(r);d(n,"Expected fetcher: "+r),"loading"===n.state&&(q.delete(r),e.push(r),t=!0)}return Ee(e),t}function De(e){let t=[];for(let[r,n]of J)if(n<e){let e=A.fetchers.get(r);d(e,"Expected fetcher: "+r),"loading"===e.state&&(we(r),J.delete(r),t.push(r))}return Ee(t),t.length>0}function Ce(e){A.blockers.delete(e),Q.delete(e)}function Ue(e,t){let r=A.blockers.get(e)||ce;d("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);let n=new Map(A.blockers);n.set(e,t),ee({blockers:n})}function Fe(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===Q.size)return;Q.size>1&&h(!1,"A router only supports one blocker at a time");let a=Array.from(Q.entries()),[o,i]=a[a.length-1],l=A.blockers.get(o);return l&&"proceeding"===l.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?o:void 0}function Ne(e){let t=[];return G.forEach(((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),G.delete(n))})),t}function He(e,t){if(R){return R(e,t.map((e=>S(e,A.loaderData))))||e.key}return e.key}function Ve(e,t){if(b){let r=He(e,t),n=b[r];if("number"===typeof n)return n}return null}return P={get basename(){return f},get future(){return m},get state(){return A},get routes(){return c},get window(){return t},initialize:function(){if(v=e.history.listen((t=>{let{action:r,location:n,delta:a}=t;if(Z)return void(Z=!1);h(0===Q.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Fe({currentLocation:A.location,nextLocation:n,historyAction:r});return o&&null!=a?(Z=!0,e.history.go(-1*a),void Ue(o,{state:"blocked",location:n,proceed(){Ue(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(a)},reset(){let e=new Map(A.blockers);e.set(o,ce),ee({blockers:e})}})):re(r,n)})),r){!function(e,t){try{let r=e.sessionStorage.getItem(fe);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(r){}}(t,O);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(fe,JSON.stringify(n))}catch(r){h(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}(t,O);t.addEventListener("pagehide",e),N=()=>t.removeEventListener("pagehide",e)}return A.initialized||re(n.Pop,A.location,{initialHydration:!0}),P},subscribe:function(e){return y.add(e),()=>y.delete(e)},enableScrollRestoration:function(e,t,r){if(b=e,x=t,R=r||null,!D&&A.navigation===se){D=!0;let e=Ve(A.location,A.matches);null!=e&&ee({restoreScrollPosition:e})}return()=>{b=null,x=null,R=null}},navigate:async function t(r,a){if("number"===typeof r)return void e.history.go(r);let o=me(A.location,A.matches,f,m.v7_prependBasename,r,m.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),{path:l,submission:s,error:u}=ve(m.v7_normalizeFormMethod,!1,o,a),c=A.location,d=p(A.location,l,a&&a.state);d=i({},d,e.history.encodeLocation(d));let h=a&&null!=a.replace?a.replace:void 0,v=n.Push;!0===h?v=n.Replace:!1===h||null!=s&&Be(s.formMethod)&&s.formAction===A.location.pathname+A.location.search&&(v=n.Replace);let y=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,g=!0===(a&&a.unstable_flushSync),b=Fe({currentLocation:c,nextLocation:d,historyAction:v});if(!b)return await re(v,d,{submission:s,pendingError:u,preventScrollReset:y,replace:a&&a.replace,enableViewTransition:a&&a.unstable_viewTransition,flushSync:g});Ue(b,{state:"blocked",location:d,proceed(){Ue(b,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,a)},reset(){let e=new Map(A.blockers);e.set(b,ce),ee({blockers:e})}})},fetch:function(t,r,n,i){if(a)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.");W.has(t)&&we(t);let s=!0===(i&&i.unstable_flushSync),h=l||c,p=me(A.location,A.matches,f,m.v7_prependBasename,n,m.v7_relativeSplatPath,r,null==i?void 0:i.relative),v=E(h,p,f);if(!v)return void pe(t,r,Te(404,{pathname:p}),{flushSync:s});let{path:y,submission:g,error:b}=ve(m.v7_normalizeFormMethod,!0,p,i);if(b)return void pe(t,r,b,{flushSync:s});let w=We(v,y);M=!0===(i&&i.preventScrollReset),g&&Be(g.formMethod)?async function(t,r,n,a,i,s,h){if(oe(),V.delete(t),!a.route.action&&!a.route.lazy){let e=Te(405,{method:h.formMethod,pathname:n,routeId:r});return void pe(t,r,e,{flushSync:s})}let p=A.fetchers.get(t);ie(t,function(e,t){let r={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};return r}(h,p),{flushSync:s});let v=new AbortController,y=Re(e.history,n,v.signal,h);W.set(t,v);let g=K,b=await Se("action",y,a,i,u,o,f,m.v7_relativeSplatPath);if(y.signal.aborted)return void(W.get(t)===v&&W.delete(t));if(m.v7_fetcherPersist&&X.has(t)){if(Oe(b)||je(b))return void ie(t,qe(void 0))}else{if(Oe(b))return W.delete(t),$>g?void ie(t,qe(void 0)):(q.add(t),ie(t,Je(h)),ne(A,b,{fetcherSubmission:h}));if(je(b))return void pe(t,r,b.error)}if(Me(b))throw Te(400,{type:"defer-action"});let w=A.navigation.location||A.location,S=Re(e.history,w,v.signal),R=l||c,x="idle"!==A.navigation.state?E(R,A.navigation.location,f):A.matches;d(x,"Didn't find any matches after fetcher action");let D=++K;J.set(t,D);let C=Je(h,b.data);A.fetchers.set(t,C);let[L,P]=ge(e.history,A,x,h,w,!1,I,z,H,X,V,q,R,f,{[a.route.id]:b.data},void 0);P.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=A.fetchers.get(t),n=Je(void 0,r?r.data:void 0);A.fetchers.set(t,n),W.has(t)&&we(t),e.controller&&W.set(t,e.controller)})),ee({fetchers:new Map(A.fetchers)});let k=()=>P.forEach((e=>we(e.key)));v.signal.addEventListener("abort",k);let{results:_,loaderResults:M,fetcherResults:j}=await ae(A.matches,x,L,P,S);if(v.signal.aborted)return;v.signal.removeEventListener("abort",k),J.delete(t),W.delete(t),P.forEach((e=>W.delete(e.key)));let O=Ae(_);if(O){if(O.idx>=L.length){let e=P[O.idx-L.length].key;q.add(e)}return ne(A,O.result)}let{loaderData:F,errors:N}=Le(A,A.matches,L,M,void 0,P,j,G);if(A.fetchers.has(t)){let e=qe(b.data);A.fetchers.set(t,e)}De(D),"loading"===A.navigation.state&&D>$?(d(U,"Expected pending action"),T&&T.abort(),te(A.navigation.location,{matches:x,loaderData:F,errors:N,fetchers:new Map(A.fetchers)})):(ee({errors:N,loaderData:Pe(A.loaderData,F,x,N),fetchers:new Map(A.fetchers)}),I=!1)}(t,r,y,w,v,s,g):(V.set(t,{routeId:r,path:y}),async function(t,r,n,a,i,l,s){let c=A.fetchers.get(t);ie(t,Je(s,c?c.data:void 0),{flushSync:l});let h=new AbortController,p=Re(e.history,n,h.signal);W.set(t,h);let v=K,y=await Se("loader",p,a,i,u,o,f,m.v7_relativeSplatPath);Me(y)&&(y=await ze(y,p.signal,!0)||y);W.get(t)===h&&W.delete(t);if(p.signal.aborted)return;if(X.has(t))return void ie(t,qe(void 0));if(Oe(y))return $>v?void ie(t,qe(void 0)):(q.add(t),void await ne(A,y));if(je(y))return void pe(t,r,y.error);d(!Me(y),"Unhandled fetcher deferred data"),ie(t,qe(y.data))}(t,r,y,w,v,s,g))},revalidate:function(){oe(),ee({revalidation:"loading"}),"submitting"!==A.navigation.state&&("idle"!==A.navigation.state?re(U||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation}):re(A.historyAction,A.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:ye,deleteFetcher:function(e){if(m.v7_fetcherPersist){let t=(Y.get(e)||0)-1;t<=0?(Y.delete(e),X.add(e)):Y.set(e,t)}else be(e);ee({fetchers:new Map(A.fetchers)})},dispose:function(){v&&v(),N&&N(),y.clear(),T&&T.abort(),A.fetchers.forEach(((e,t)=>be(t))),A.blockers.forEach(((e,t)=>Ce(t)))},getBlocker:function(e,t){let r=A.blockers.get(e)||ce;return Q.get(e)!==t&&Q.set(e,t),r},deleteBlocker:Ce,_internalFetchControllers:W,_internalActiveDeferreds:G,_internalSetRoutes:function(e){u={},l=w(e,o,void 0,u)}},P}Symbol("deferred");function me(e,t,r,n,a,o,i,l){let s,u;if(i){s=[];for(let e of t)if(s.push(e),e.route.id===i){u=e;break}}else s=t,u=t[t.length-1];let c=H(a||".",z(s,o),F(e.pathname,r)||e.pathname,"path"===l);return null==a&&(c.search=e.search,c.hash=e.hash),null!=a&&""!==a&&"."!==a||!u||!u.route.index||He(c.search)||(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(c.pathname="/"===c.pathname?r:W([r,c.pathname])),m(c)}function ve(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&!Ne(n.formMethod))return{path:r,error:Te(405,{method:n.formMethod})};let a,o,i=()=>({path:r,error:Te(400,{type:"invalid-body"})}),l=n.formMethod||"get",s=e?l.toUpperCase():l.toLowerCase(),u=Ue(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!Be(s))return i();let e="string"===typeof n.body?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce(((e,t)=>{let[r,n]=t;return""+e+r+"="+n+"\n"}),""):String(n.body);return{path:r,submission:{formMethod:s,formAction:u,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!Be(s))return i();try{let e="string"===typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:s,formAction:u,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(f){return i()}}}if(d("function"===typeof FormData,"FormData is not available in this environment"),n.formData)a=xe(n.formData),o=n.formData;else if(n.body instanceof FormData)a=xe(n.body),o=n.body;else if(n.body instanceof URLSearchParams)a=n.body,o=De(a);else if(null==n.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(n.body),o=De(a)}catch(f){return i()}let c={formMethod:s,formAction:u,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Be(c.formMethod))return{path:r,submission:c};let h=v(r);return t&&h.search&&He(h.search)&&a.append("index",""),h.search="?"+a,{path:m(h),submission:c}}function ye(e,t){let r=e;if(t){let n=e.findIndex((e=>e.route.id===t));n>=0&&(r=e.slice(0,n))}return r}function ge(e,t,r,n,a,o,l,s,u,c,d,h,f,p,m,v){let y=v?Object.values(v)[0]:m?Object.values(m)[0]:void 0,g=e.createURL(t.location),b=e.createURL(a),w=v?Object.keys(v)[0]:void 0,S=ye(r,w).filter(((e,r)=>{let{route:a}=e;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return!!a.loader.hydrate||void 0===t.loaderData[a.id]&&(!t.errors||void 0===t.errors[a.id]);if(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||s.some((t=>t===e.route.id)))return!0;let u=t.matches[r],c=e;return we(e,i({currentUrl:g,currentParams:u.params,nextUrl:b,nextParams:c.params},n,{actionResult:y,defaultShouldRevalidate:l||g.pathname+g.search===b.pathname+b.search||g.search!==b.search||be(u,c)}))})),R=[];return d.forEach(((e,a)=>{if(o||!r.some((t=>t.route.id===e.routeId))||c.has(a))return;let s=E(f,e.path,p);if(!s)return void R.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let d=t.fetchers.get(a),m=We(s,e.path),v=!1;v=!h.has(a)&&(!!u.includes(a)||(d&&"idle"!==d.state&&void 0===d.data?l:we(m,i({currentUrl:g,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:y,defaultShouldRevalidate:l})))),v&&R.push({key:a,routeId:e.routeId,path:e.path,matches:s,match:m,controller:new AbortController})})),[S,R]}function be(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function we(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"===typeof r)return r}return t.defaultShouldRevalidate}async function Ee(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];d(a,"No route found in manifest");let o={};for(let i in n){let e=void 0!==a[i]&&"hasErrorBoundary"!==i;h(!e,'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.'),e||b.has(i)||(o[i]=n[i])}Object.assign(a,o),Object.assign(a,i({},t(a),{lazy:void 0}))}async function Se(e,t,r,n,a,o,i,l,s){let u,c,h;void 0===s&&(s={});let f=e=>{let n,a=new Promise(((e,t)=>n=t));return h=()=>n(),t.signal.addEventListener("abort",h),Promise.race([e({request:t,params:r.params,context:s.requestContext}),a])};try{let n=r.route[e];if(r.route.lazy)if(n){let e,t=await Promise.all([f(n).catch((t=>{e=t})),Ee(r.route,o,a)]);if(e)throw e;c=t[0]}else{if(await Ee(r.route,o,a),n=r.route[e],!n){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Te(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:g.data,data:void 0}}c=await f(n)}else{if(!n){let e=new URL(t.url);throw Te(404,{pathname:e.pathname+e.search})}c=await f(n)}d(void 0!==c,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(v){u=g.error,c=v}finally{h&&t.signal.removeEventListener("abort",h)}if(Fe(c)){let e,a=c.status;if(ie.has(a)){let e=c.headers.get("Location");if(d(e,"Redirects returned/thrown from loaders/actions must have a Location header"),de.test(e)){if(!s.isStaticRequest){let r=new URL(t.url),n=e.startsWith("//")?new URL(r.protocol+e):new URL(e),a=null!=F(n.pathname,i);n.origin===r.origin&&a&&(e=n.pathname+n.search+n.hash)}}else e=me(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e,l);if(s.isStaticRequest)throw c.headers.set("Location",e),c;return{type:g.redirect,status:a,location:e,revalidate:null!==c.headers.get("X-Remix-Revalidate"),reloadDocument:null!==c.headers.get("X-Remix-Reload-Document")}}if(s.isRouteRequest){throw{type:u===g.error?g.error:g.data,response:c}}try{let t=c.headers.get("Content-Type");e=t&&/\bapplication\/json\b/.test(t)?null==c.body?null:await c.json():await c.text()}catch(v){return{type:g.error,error:v}}return u===g.error?{type:u,error:new ee(a,c.statusText,e),headers:c.headers}:{type:g.data,data:e,statusCode:c.status,headers:c.headers}}return u===g.error?{type:u,error:c}:function(e){let t=e;return t&&"object"===typeof t&&"object"===typeof t.data&&"function"===typeof t.subscribe&&"function"===typeof t.cancel&&"function"===typeof t.resolveData}(c)?{type:g.deferred,deferredData:c,statusCode:null==(p=c.init)?void 0:p.status,headers:(null==(m=c.init)?void 0:m.headers)&&new Headers(c.init.headers)}:{type:g.data,data:c};var p,m}function Re(e,t,r,n){let a=e.createURL(Ue(t)).toString(),o={signal:r};if(n&&Be(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=xe(n.formData):o.body=n.formData}return new Request(a,o)}function xe(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"===typeof n?n:n.name);return t}function De(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ce(e,t,r,n,a){let o,i={},l=null,s=!1,u={};return r.forEach(((r,c)=>{let h=t[c].route.id;if(d(!Oe(r),"Cannot handle redirect results in processLoaderData"),je(r)){let t=ke(e,h),a=r.error;n&&(a=Object.values(n)[0],n=void 0),l=l||{},null==l[t.route.id]&&(l[t.route.id]=a),i[h]=void 0,s||(s=!0,o=te(r.error)?r.error.status:500),r.headers&&(u[h]=r.headers)}else Me(r)?(a.set(h,r.deferredData),i[h]=r.deferredData.data):i[h]=r.data,null==r.statusCode||200===r.statusCode||s||(o=r.statusCode),r.headers&&(u[h]=r.headers)})),n&&(l=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:l,statusCode:o||200,loaderHeaders:u}}function Le(e,t,r,n,a,o,l,s){let{loaderData:u,errors:c}=Ce(t,r,n,a,s);for(let h=0;h<o.length;h++){let{key:t,match:r,controller:n}=o[h];d(void 0!==l&&void 0!==l[h],"Did not find corresponding fetcher result");let a=l[h];if(!n||!n.signal.aborted)if(je(a)){let n=ke(e.matches,null==r?void 0:r.route.id);c&&c[n.route.id]||(c=i({},c,{[n.route.id]:a.error})),e.fetchers.delete(t)}else if(Oe(a))d(!1,"Unhandled fetcher revalidation redirect");else if(Me(a))d(!1,"Unhandled fetcher deferred data");else{let r=qe(a.data);e.fetchers.set(t,r)}}return{loaderData:u,errors:c}}function Pe(e,t,r,n){let a=i({},t);for(let o of r){let r=o.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(a[r]=t[r]):void 0!==e[r]&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function ke(e,t){return(t?e.slice(0,e.findIndex((e=>e.route.id===t))+1):[...e]).reverse().find((e=>!0===e.route.hasErrorBoundary))||e[0]}function _e(e){let t=1===e.length?e[0]:e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Te(e,t){let{pathname:r,routeId:n,method:a,type:o}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===o?l="defer() is not supported in actions":"invalid-body"===o&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):404===e?(i="Not Found",l='No route matches URL "'+r+'"'):405===e&&(i="Method Not Allowed",a&&r&&n?l="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&&(l='Invalid request method "'+a.toUpperCase()+'"')),new ee(e||500,i,new Error(l),!0)}function Ae(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Oe(r))return{result:r,idx:t}}}function Ue(e){return m(i({},"string"===typeof e?v(e):e,{hash:""}))}function Me(e){return e.type===g.deferred}function je(e){return e.type===g.error}function Oe(e){return(e&&e.type)===g.redirect}function Fe(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function Ne(e){return oe.has(e.toLowerCase())}function Be(e){return ne.has(e.toLowerCase())}async function Ie(e,t,r,n,a,o){for(let i=0;i<r.length;i++){let l=r[i],s=t[i];if(!s)continue;let u=e.find((e=>e.route.id===s.route.id)),c=null!=u&&!be(u,s)&&void 0!==(o&&o[s.route.id]);if(Me(l)&&(a||c)){let e=n[i];d(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await ze(l,e,a).then((e=>{e&&(r[i]=e||r[i])}))}}}async function ze(e,t,r){if(void 0===r&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:g.data,data:e.deferredData.unwrappedData}}catch(n){return{type:g.error,error:n}}return{type:g.data,data:e.deferredData.data}}}function He(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function We(e,t){let r="string"===typeof t?v(t).search:t.search;if(e[e.length-1].route.index&&He(r||""))return e[e.length-1];let n=I(e);return n[n.length-1]}function Ke(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function $e(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Je(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function qe(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 Ve(){return Ve=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},Ve.apply(this,arguments)}const Ye=a.createContext(null);const Xe=a.createContext(null);const Ge=a.createContext(null);const Qe=a.createContext(null);const Ze=a.createContext(null);const et=a.createContext({outlet:null,matches:[],isDataRoute:!1});const tt=a.createContext(null);function rt(e,t){let{relative:r}=void 0===t?{}:t;nt()||d(!1);let{basename:n,navigator:o}=a.useContext(Qe),{hash:i,pathname:l,search:s}=ft(e,{relative:r}),u=l;return"/"!==n&&(u="/"===l?n:W([n,l])),o.createHref({pathname:u,search:s,hash:i})}function nt(){return null!=a.useContext(Ze)}function at(){return nt()||d(!1),a.useContext(Ze).location}function ot(){return a.useContext(Ze).navigationType}function it(e){nt()||d(!1);let{pathname:t}=at();return a.useMemo((()=>j(e,t)),[t,e])}function lt(e){a.useContext(Qe).static||a.useLayoutEffect(e)}function st(){let{isDataRoute:e}=a.useContext(et);return e?function(){let{router:e}=St(wt.UseNavigateStable),t=xt(Et.UseNavigateStable),r=a.useRef(!1);return lt((()=>{r.current=!0})),a.useCallback((function(n,a){void 0===a&&(a={}),r.current&&("number"===typeof n?e.navigate(n):e.navigate(n,Ve({fromRouteId:t},a)))}),[e,t])}():function(){nt()||d(!1);let e=a.useContext(Ye),{basename:t,future:r,navigator:n}=a.useContext(Qe),{matches:o}=a.useContext(et),{pathname:i}=at(),l=JSON.stringify(z(o,r.v7_relativeSplatPath)),s=a.useRef(!1);return lt((()=>{s.current=!0})),a.useCallback((function(r,a){if(void 0===a&&(a={}),!s.current)return;if("number"===typeof r)return void n.go(r);let o=H(r,JSON.parse(l),i,"path"===a.relative);null==e&&"/"!==t&&(o.pathname="/"===o.pathname?t:W([t,o.pathname])),(a.replace?n.replace:n.push)(o,a.state,a)}),[t,n,l,i,e])}()}const ut=a.createContext(null);function ct(){return a.useContext(ut)}function dt(e){let t=a.useContext(et).outlet;return t?a.createElement(ut.Provider,{value:e},t):t}function ht(){let{matches:e}=a.useContext(et),t=e[e.length-1];return t?t.params:{}}function ft(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=a.useContext(Qe),{matches:o}=a.useContext(et),{pathname:i}=at(),l=JSON.stringify(z(o,n.v7_relativeSplatPath));return a.useMemo((()=>H(e,JSON.parse(l),i,"path"===r)),[e,l,i,r])}function pt(e,t){return mt(e,t)}function mt(e,t,r,o){nt()||d(!1);let{navigator:i}=a.useContext(Qe),{matches:l}=a.useContext(et),s=l[l.length-1],u=s?s.params:{},c=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let h,f=at();if(t){var p;let e="string"===typeof t?v(t):t;"/"===c||(null==(p=e.pathname)?void 0:p.startsWith(c))||d(!1),h=e}else h=f;let m=h.pathname||"/",y=E(e,{pathname:"/"===c?m:m.slice(c.length)||"/"});let g=bt(y&&y.map((e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:W([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:W([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),l,r,o);return t&&g?a.createElement(Ze.Provider,{value:{location:Ve({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:n.Pop}},g):g}const vt=a.createElement((function(){let e=At(),t=te(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n};return a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:o},r):null,null)}),null);class yt extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?a.createElement(et.Provider,{value:this.props.routeContext},a.createElement(tt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gt(e){let{routeContext:t,match:r,children:n}=e,o=a.useContext(Ye);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),a.createElement(et.Provider,{value:t},n)}function bt(e,t,r,n){var o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var i;if(null==(i=r)||!i.errors)return null;e=r.matches}let l=e,s=null==(o=r)?void 0:o.errors;if(null!=s){let e=l.findIndex((e=>e.route.id&&(null==s?void 0:s[e.route.id])));e>=0||d(!1),l=l.slice(0,Math.min(l.length,e+1))}let u=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let a=0;a<l.length;a++){let e=l[a];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(c=a),e.route.id){let{loaderData:t,errors:n}=r,a=e.route.loader&&void 0===t[e.route.id]&&(!n||void 0===n[e.route.id]);if(e.route.lazy||a){u=!0,l=c>=0?l.slice(0,c+1):[l[0]];break}}}return l.reduceRight(((e,n,o)=>{let i,d=!1,h=null,f=null;var p;r&&(i=s&&n.route.id?s[n.route.id]:void 0,h=n.route.errorElement||vt,u&&(c<0&&0===o?(p="route-fallback",!1||Ft[p]||(Ft[p]=!0),d=!0,f=null):c===o&&(d=!0,f=n.route.hydrateFallbackElement||null)));let m=t.concat(l.slice(0,o+1)),v=()=>{let t;return t=i?h:d?f:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(gt,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===o)?a.createElement(yt,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()}),null)}var wt=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wt||{}),Et=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Et||{});function St(e){let t=a.useContext(Ye);return t||d(!1),t}function Rt(e){let t=a.useContext(Xe);return t||d(!1),t}function xt(e){let t=function(e){let t=a.useContext(et);return t||d(!1),t}(),r=t.matches[t.matches.length-1];return r.route.id||d(!1),r.route.id}function Dt(){return xt(Et.UseRouteId)}function Ct(){return Rt(Et.UseNavigation).navigation}function Lt(){let e=St(wt.UseRevalidator),t=Rt(Et.UseRevalidator);return a.useMemo((()=>({revalidate:e.router.revalidate,state:t.revalidation})),[e.router.revalidate,t.revalidation])}function Pt(){let{matches:e,loaderData:t}=Rt(Et.UseMatches);return a.useMemo((()=>e.map((e=>S(e,t)))),[e,t])}function kt(){let e=Rt(Et.UseLoaderData),t=xt(Et.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function _t(e){return Rt(Et.UseRouteLoaderData).loaderData[e]}function Tt(){let e=Rt(Et.UseActionData),t=xt(Et.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function At(){var e;let t=a.useContext(tt),r=Rt(Et.UseRouteError),n=xt(Et.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function Ut(){let e=a.useContext(Ge);return null==e?void 0:e._data}function Mt(){let e=a.useContext(Ge);return null==e?void 0:e._error}let jt=0;function Ot(e){let{router:t,basename:r}=St(wt.UseBlocker),n=Rt(Et.UseBlocker),[o,i]=a.useState(""),l=a.useCallback((t=>{if("function"!==typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:a,historyAction:o}=t;return e({currentLocation:Ve({},n,{pathname:F(n.pathname,r)||n.pathname}),nextLocation:Ve({},a,{pathname:F(a.pathname,r)||a.pathname}),historyAction:o})}),[r,e]);return a.useEffect((()=>{let e=String(++jt);return i(e),()=>t.deleteBlocker(e)}),[t]),a.useEffect((()=>{""!==o&&t.getBlocker(o,l)}),[t,o,l]),o&&n.blockers.has(o)?n.blockers.get(o):ce}const Ft={};const Nt=a.startTransition;function Bt(e){let{basename:t,children:r,initialEntries:n,initialIndex:o,future:i}=e,l=a.useRef();null==l.current&&(l.current=s({initialEntries:n,initialIndex:o,v5Compat:!0}));let u=l.current,[c,d]=a.useState({action:u.action,location:u.location}),{v7_startTransition:h}=i||{},f=a.useCallback((e=>{h&&Nt?Nt((()=>d(e))):d(e)}),[d,h]);return a.useLayoutEffect((()=>u.listen(f)),[u,f]),a.createElement(Wt,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:i})}function It(e){let{to:t,replace:r,state:n,relative:o}=e;nt()||d(!1);let{future:i,static:l}=a.useContext(Qe),{matches:s}=a.useContext(et),{pathname:u}=at(),c=st(),h=H(t,z(s,i.v7_relativeSplatPath),u,"path"===o),f=JSON.stringify(h);return a.useEffect((()=>c(JSON.parse(f),{replace:r,state:n,relative:o})),[c,f,o,r,n]),null}function zt(e){return dt(e.context)}function Ht(e){d(!1)}function Wt(e){let{basename:t="/",children:r=null,location:o,navigationType:i=n.Pop,navigator:l,static:s=!1,future:u}=e;nt()&&d(!1);let c=t.replace(/^\/*/,"/"),h=a.useMemo((()=>({basename:c,navigator:l,static:s,future:Ve({v7_relativeSplatPath:!1},u)})),[c,u,l,s]);"string"===typeof o&&(o=v(o));let{pathname:f="/",search:p="",hash:m="",state:y=null,key:g="default"}=o,b=a.useMemo((()=>{let e=F(f,c);return null==e?null:{location:{pathname:e,search:p,hash:m,state:y,key:g},navigationType:i}}),[c,f,p,m,y,g,i]);return null==b?null:a.createElement(Qe.Provider,{value:h},a.createElement(Ze.Provider,{children:r,value:b}))}function Kt(e){let{children:t,location:r}=e;return pt(Xt(t),r)}function $t(e){let{children:t,errorElement:r,resolve:n}=e;return a.createElement(Vt,{resolve:n,errorElement:r},a.createElement(Yt,null,t))}var Jt=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Jt||{});const qt=new Promise((()=>{}));class Vt extends a.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,o=Jt.pending;if(r instanceof Promise)if(this.state.error){o=Jt.error;let e=this.state.error;n=Promise.reject().catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?(n=r,o=void 0!==n._error?Jt.error:void 0!==n._data?Jt.success:Jt.pending):(o=Jt.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),n=r.then((e=>Object.defineProperty(r,"_data",{get:()=>e})),(e=>Object.defineProperty(r,"_error",{get:()=>e}))));else o=Jt.success,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(o===Jt.error&&n._error instanceof V)throw qt;if(o===Jt.error&&!t)throw n._error;if(o===Jt.error)return a.createElement(Ge.Provider,{value:n,children:t});if(o===Jt.success)return a.createElement(Ge.Provider,{value:n,children:e});throw n}}function Yt(e){let{children:t}=e,r=Ut(),n="function"===typeof t?t(r):t;return a.createElement(a.Fragment,null,n)}function Xt(e,t){void 0===t&&(t=[]);let r=[];return a.Children.forEach(e,((e,n)=>{if(!a.isValidElement(e))return;let o=[...t,n];if(e.type===a.Fragment)return void r.push.apply(r,Xt(e.props.children,o));e.type!==Ht&&d(!1),e.props.index&&e.props.children&&d(!1);let i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Xt(e.props.children,o)),r.push(i)})),r}function Gt(e){return bt(e)}function Qt(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:a.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Zt(e,t){return pe({basename:null==t?void 0:t.basename,future:Ve({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:s({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:Qt}).initialize()}function er(){return er=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},er.apply(this,arguments)}function tr(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}const rr="get",nr="application/x-www-form-urlencoded";function ar(e){return null!=e&&"string"===typeof e.tagName}function or(e){return void 0===e&&(e=""),new URLSearchParams("string"===typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}let ir=null;const lr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sr(e){return null==e||lr.has(e)?e:null}function ur(e,t){let r,n,a,o,i;if(ar(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?F(i,t):null,r=e.getAttribute("method")||rr,a=sr(e.getAttribute("enctype"))||nr,o=new FormData(e)}else if(function(e){return ar(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ar(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?F(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||rr,a=sr(e.getAttribute("formenctype"))||sr(i.getAttribute("enctype"))||nr,o=new FormData(i,e),!function(){if(null===ir)try{new FormData(document.createElement("form"),0),ir=!1}catch(e){ir=!0}return ir}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else{if(ar(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=rr,n=null,a=nr,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const cr=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],dr=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],hr=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"];try{window.__reactRouterVersion="6"}catch(Zr){}function fr(e,t){return pe({basename:null==t?void 0:t.basename,future:er({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:u({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||mr(),routes:e,mapRouteProperties:Qt,window:null==t?void 0:t.window}).initialize()}function pr(e,t){return pe({basename:null==t?void 0:t.basename,future:er({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:c({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||mr(),routes:e,mapRouteProperties:Qt,window:null==t?void 0:t.window}).initialize()}function mr(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=er({},t,{errors:vr(t.errors)})),t}function vr(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&"RouteErrorResponse"===a.__type)r[n]=new ee(a.status,a.statusText,a.data,!0===a.internal);else if(a&&"Error"===a.__type){if(a.__subType){let e=window[a.__subType];if("function"===typeof e)try{let t=new e(a.message);t.stack="",r[n]=t}catch(Zr){}}if(null==r[n]){let e=new Error(a.message);e.stack="",r[n]=e}}else r[n]=a;return r}const yr=a.createContext({isTransitioning:!1});const gr=a.createContext(new Map);const br=a.startTransition,wr=o.flushSync,Er=a.useId;function Sr(e){wr?wr(e):e()}class Rr{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function xr(e){let{fallbackElement:t,router:r,future:n}=e,[o,i]=a.useState(r.state),[l,s]=a.useState(),[u,c]=a.useState({isTransitioning:!1}),[d,h]=a.useState(),[f,p]=a.useState(),[m,v]=a.useState(),y=a.useRef(new Map),{v7_startTransition:g}=n||{},b=a.useCallback((e=>{g?function(e){br?br(e):e()}(e):e()}),[g]),w=a.useCallback(((e,t)=>{let{deletedFetchers:n,unstable_flushSync:a,unstable_viewTransitionOpts:o}=t;n.forEach((e=>y.current.delete(e))),e.fetchers.forEach(((e,t)=>{void 0!==e.data&&y.current.set(t,e.data)}));let l=null==r.window||"function"!==typeof r.window.document.startViewTransition;if(o&&!l){if(a){Sr((()=>{f&&(d&&d.resolve(),f.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})}));let t=r.window.document.startViewTransition((()=>{Sr((()=>i(e)))}));return t.finished.finally((()=>{Sr((()=>{h(void 0),p(void 0),s(void 0),c({isTransitioning:!1})}))})),void Sr((()=>p(t)))}f?(d&&d.resolve(),f.skipTransition(),v({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(s(e),c({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?Sr((()=>i(e))):b((()=>i(e)))}),[r.window,f,d,y,b]);a.useLayoutEffect((()=>r.subscribe(w)),[r,w]),a.useEffect((()=>{u.isTransitioning&&!u.flushSync&&h(new Rr)}),[u]),a.useEffect((()=>{if(d&&l&&r.window){let e=l,t=d.promise,n=r.window.document.startViewTransition((async()=>{b((()=>i(e))),await t}));n.finished.finally((()=>{h(void 0),p(void 0),s(void 0),c({isTransitioning:!1})})),p(n)}}),[b,l,d,r.window]),a.useEffect((()=>{d&&l&&o.location.key===l.location.key&&d.resolve()}),[d,f,o.location,l]),a.useEffect((()=>{!u.isTransitioning&&m&&(s(m.state),c({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))}),[u.isTransitioning,m]),a.useEffect((()=>{}),[]);let E=a.useMemo((()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})})),[r]),S=r.basename||"/",R=a.useMemo((()=>({router:r,navigator:E,static:!1,basename:S})),[r,E,S]);return a.createElement(a.Fragment,null,a.createElement(Ye.Provider,{value:R},a.createElement(Xe.Provider,{value:o},a.createElement(gr.Provider,{value:y.current},a.createElement(yr.Provider,{value:u},a.createElement(Wt,{basename:S,location:o.location,navigationType:o.historyAction,navigator:E,future:{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},o.initialized||r.future.v7_partialHydration?a.createElement(Dr,{routes:r.routes,future:r.future,state:o}):t))))),null)}function Dr(e){let{routes:t,future:r,state:n}=e;return mt(t,void 0,n,r)}function Cr(e){let{basename:t,children:r,future:n,window:o}=e,i=a.useRef();null==i.current&&(i.current=u({window:o,v5Compat:!0}));let l=i.current,[s,c]=a.useState({action:l.action,location:l.location}),{v7_startTransition:d}=n||{},h=a.useCallback((e=>{d&&br?br((()=>c(e))):c(e)}),[c,d]);return a.useLayoutEffect((()=>l.listen(h)),[l,h]),a.createElement(Wt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l,future:n})}function Lr(e){let{basename:t,children:r,future:n,window:o}=e,i=a.useRef();null==i.current&&(i.current=c({window:o,v5Compat:!0}));let l=i.current,[s,u]=a.useState({action:l.action,location:l.location}),{v7_startTransition:d}=n||{},h=a.useCallback((e=>{d&&br?br((()=>u(e))):u(e)}),[u,d]);return a.useLayoutEffect((()=>l.listen(h)),[l,h]),a.createElement(Wt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l,future:n})}function Pr(e){let{basename:t,children:r,future:n,history:o}=e,[i,l]=a.useState({action:o.action,location:o.location}),{v7_startTransition:s}=n||{},u=a.useCallback((e=>{s&&br?br((()=>l(e))):l(e)}),[l,s]);return a.useLayoutEffect((()=>o.listen(u)),[o,u]),a.createElement(Wt,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o,future:n})}const kr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,_r=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tr=a.forwardRef((function(e,t){let r,{onClick:n,relative:o,reloadDocument:i,replace:l,state:s,target:u,to:c,preventScrollReset:d,unstable_viewTransition:h}=e,f=tr(e,cr),{basename:p}=a.useContext(Qe),m=!1;if("string"===typeof c&&_r.test(c)&&(r=c,kr))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=F(t.pathname,p);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:m=!0}catch(Zr){}let v=rt(c,{relative:o}),y=Br(c,{replace:l,state:s,target:u,preventScrollReset:d,relative:o,unstable_viewTransition:h});return a.createElement("a",er({},f,{href:r||v,onClick:m||i?n:function(e){n&&n(e),e.defaultPrevented||y(e)},ref:t,target:u}))}));const Ar=a.forwardRef((function(e,t){let{"aria-current":r="page",caseSensitive:n=!1,className:o="",end:i=!1,style:l,to:s,unstable_viewTransition:u,children:c}=e,d=tr(e,dr),h=ft(s,{relative:d.relative}),f=at(),p=a.useContext(Xe),{navigator:m,basename:v}=a.useContext(Qe),y=null!=p&&Qr(h)&&!0===u,g=m.encodeLocation?m.encodeLocation(h).pathname:h.pathname,b=f.pathname,w=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(b=b.toLowerCase(),w=w?w.toLowerCase():null,g=g.toLowerCase()),w&&v&&(w=F(w,v)||w);const E="/"!==g&&g.endsWith("/")?g.length-1:g.length;let S,R=b===g||!i&&b.startsWith(g)&&"/"===b.charAt(E),x=null!=w&&(w===g||!i&&w.startsWith(g)&&"/"===w.charAt(g.length)),D={isActive:R,isPending:x,isTransitioning:y},C=R?r:void 0;S="function"===typeof o?o(D):[o,R?"active":null,x?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let L="function"===typeof l?l(D):l;return a.createElement(Tr,er({},d,{"aria-current":C,className:S,ref:t,style:L,to:s,unstable_viewTransition:u}),"function"===typeof c?c(D):c)}));const Ur=a.forwardRef(((e,t)=>{let{fetcherKey:r,navigate:n,reloadDocument:o,replace:i,state:l,method:s=rr,action:u,onSubmit:c,relative:d,preventScrollReset:h,unstable_viewTransition:f}=e,p=tr(e,hr),m=Wr(),v=Kr(u,{relative:d}),y="get"===s.toLowerCase()?"get":"post";return a.createElement("form",er({ref:t,method:y,action:v,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||s;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:i,state:l,relative:d,preventScrollReset:h,unstable_viewTransition:f})}},p))}));function Mr(e){let{getKey:t,storageKey:r}=e;return Yr({getKey:t,storageKey:r}),null}var jr,Or;function Fr(e){let t=a.useContext(Ye);return t||d(!1),t}function Nr(e){let t=a.useContext(Xe);return t||d(!1),t}function Br(e,t){let{target:r,replace:n,state:o,preventScrollReset:i,relative:l,unstable_viewTransition:s}=void 0===t?{}:t,u=st(),c=at(),d=ft(e,{relative:l});return a.useCallback((t=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(t,r)){t.preventDefault();let r=void 0!==n?n:m(c)===m(d);u(e,{replace:r,state:o,preventScrollReset:i,relative:l,unstable_viewTransition:s})}}),[c,u,d,n,o,r,e,i,l,s])}function Ir(e){let t=a.useRef(or(e)),r=a.useRef(!1),n=at(),o=a.useMemo((()=>function(e,t){let r=or(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(n.search,r.current?null:t.current)),[n.search]),i=st(),l=a.useCallback(((e,t)=>{const n=or("function"===typeof e?e(o):e);r.current=!0,i("?"+n,t)}),[i,o]);return[o,l]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(jr||(jr={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Or||(Or={}));let zr=0,Hr=()=>"__"+String(++zr)+"__";function Wr(){let{router:e}=Fr(jr.UseSubmit),{basename:t}=a.useContext(Qe),r=Dt();return a.useCallback((function(n,a){void 0===a&&(a={}),function(){if("undefined"===typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();let{action:o,method:i,encType:l,formData:s,body:u}=ur(n,t);if(!1===a.navigate){let t=a.fetcherKey||Hr();e.fetch(t,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,unstable_flushSync:a.unstable_flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:s,body:u,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,unstable_flushSync:a.unstable_flushSync,unstable_viewTransition:a.unstable_viewTransition})}),[e,t,r])}function Kr(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=a.useContext(Qe),o=a.useContext(et);o||d(!1);let[i]=o.matches.slice(-1),l=er({},ft(e||".",{relative:r})),s=at();if(null==e){l.search=s.search;let e=new URLSearchParams(l.search);e.has("index")&&""===e.get("index")&&(e.delete("index"),l.search=e.toString()?"?"+e.toString():"")}return e&&"."!==e||!i.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(l.pathname="/"===l.pathname?n:W([n,l.pathname])),m(l)}function $r(e){var t;let{key:r}=void 0===e?{}:e,{router:n}=Fr(jr.UseFetcher),o=Nr(Or.UseFetcher),i=a.useContext(gr),l=a.useContext(et),s=null==(t=l.matches[l.matches.length-1])?void 0:t.route.id;i||d(!1),l||d(!1),null==s&&d(!1);let u=Er?Er():"",[c,h]=a.useState(r||u);r&&r!==c?h(r):c||h(Hr()),a.useEffect((()=>(n.getFetcher(c),()=>{n.deleteFetcher(c)})),[n,c]);let f=a.useCallback(((e,t)=>{s||d(!1),n.fetch(c,s,e,t)}),[c,s,n]),p=Wr(),m=a.useCallback(((e,t)=>{p(e,er({},t,{navigate:!1,fetcherKey:c}))}),[c,p]),v=a.useMemo((()=>a.forwardRef(((e,t)=>a.createElement(Ur,er({},e,{navigate:!1,fetcherKey:c,ref:t}))))),[c]),y=o.fetchers.get(c)||ue,g=i.get(c);return a.useMemo((()=>er({Form:v,submit:m,load:f},y,{data:g})),[v,m,f,y,g])}function Jr(){let e=Nr(Or.UseFetchers);return Array.from(e.fetchers.entries()).map((e=>{let[t,r]=e;return er({},r,{key:t})}))}const qr="react-router-scroll-positions";let Vr={};function Yr(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=Fr(jr.UseScrollRestoration),{restoreScrollPosition:o,preventScrollReset:i}=Nr(Or.UseScrollRestoration),{basename:l}=a.useContext(Qe),s=at(),u=Pt(),c=Ct();a.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:r}=t||{};a.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,r])}(a.useCallback((()=>{if("idle"===c.state){let e=(t?t(s,u):null)||s.key;Vr[e]=window.scrollY}try{sessionStorage.setItem(r||qr,JSON.stringify(Vr))}catch(e){}window.history.scrollRestoration="auto"}),[r,t,c.state,s,u])),"undefined"!==typeof document&&(a.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||qr);e&&(Vr=JSON.parse(e))}catch(Zr){}}),[r]),a.useLayoutEffect((()=>{let e=t&&"/"!==l?(e,r)=>t(er({},e,{pathname:F(e.pathname,l)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(Vr,(()=>window.scrollY),e);return()=>r&&r()}),[n,l,t]),a.useLayoutEffect((()=>{if(!1!==o)if("number"!==typeof o){if(s.hash){let e=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==i&&window.scrollTo(0,0)}else window.scrollTo(0,o)}),[s,o,i]))}function Xr(e,t){let{capture:r}=t||{};a.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}}),[e,r])}function Gr(e){let{when:t,message:r}=e,n=Ot(t);a.useEffect((()=>{if("blocked"===n.state){window.confirm(r)?setTimeout(n.proceed,0):n.reset()}}),[n,r]),a.useEffect((()=>{"blocked"!==n.state||t||n.reset()}),[n,t])}function Qr(e,t){void 0===t&&(t={});let r=a.useContext(yr);null==r&&d(!1);let{basename:n}=Fr(jr.useViewTransitionState),o=ft(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=F(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=F(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=j(o.pathname,l)||null!=j(o.pathname,i)}}}]);
3
+ //# sourceMappingURL=328.3ef513ff.chunk.js.map
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @remix-run/router v1.15.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
+ */
11
+
12
+ /**
13
+ * React Router DOM v6.22.0
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
+ */
22
+
23
+ /**
24
+ * React Router v6.22.0
25
+ *
26
+ * Copyright (c) Remix Software Inc.
27
+ *
28
+ * This source code is licensed under the MIT license found in the
29
+ * LICENSE.md file in the root directory of this source tree.
30
+ *
31
+ * @license MIT
32
+ */