@clinicemr/esm-post-registration-redirect-app 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/173.js +1 -0
- package/dist/300.js +1 -0
- package/dist/336.js +1 -0
- package/dist/41.js +2 -0
- package/dist/41.js.LICENSE.txt +9 -0
- package/dist/457.js +2 -0
- package/dist/457.js.LICENSE.txt +14 -0
- package/dist/464.js +1 -0
- package/dist/686.js +2 -0
- package/dist/686.js.LICENSE.txt +9 -0
- package/dist/777.js +1 -0
- package/dist/802.js +1 -0
- package/dist/803.js +2 -0
- package/dist/803.js.LICENSE.txt +50 -0
- package/dist/913.js +2 -0
- package/dist/913.js.LICENSE.txt +32 -0
- package/dist/918.js +1 -0
- package/dist/main.js +1 -0
- package/dist/openmrs-esm-post-registration-redirect-app.js +1 -0
- package/dist/openmrs-esm-post-registration-redirect-app.js.buildmanifest.json +399 -0
- package/dist/routes.json +1 -0
- package/package.json +46 -0
- package/src/config-schema.ts +33 -0
- package/src/declarations.d.ts +3 -0
- package/src/index.ts +25 -0
- package/src/my-registered-patients.component.tsx +180 -0
- package/src/my-registered-patients.scss +15 -0
- package/src/post-registration-redirect.component.tsx +62 -0
- package/src/routes.json +17 -0
- package/translations/en.json +12 -0
- package/tsconfig.json +14 -0
- package/webpack.config.js +16 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*!
|
|
8
|
+
* tabbable 6.2.0
|
|
9
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @license React
|
|
14
|
+
* react-dom.production.min.js
|
|
15
|
+
*
|
|
16
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
+
*
|
|
18
|
+
* This source code is licensed under the MIT license found in the
|
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @license React
|
|
24
|
+
* react-is.production.min.js
|
|
25
|
+
*
|
|
26
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the MIT license found in the
|
|
29
|
+
* LICENSE file in the root directory of this source tree.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @license React
|
|
34
|
+
* react-jsx-runtime.production.min.js
|
|
35
|
+
*
|
|
36
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
37
|
+
*
|
|
38
|
+
* This source code is licensed under the MIT license found in the
|
|
39
|
+
* LICENSE file in the root directory of this source tree.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @license React
|
|
44
|
+
* scheduler.production.min.js
|
|
45
|
+
*
|
|
46
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the MIT license found in the
|
|
49
|
+
* LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/
|
package/dist/913.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 913.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app=globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app||[]).push([[913],{2913(e,t,r){r.r(t),r.d(t,{AbortedDeferredError:()=>W,Await:()=>Ot,BrowserRouter:()=>ur,Form:()=>vr,HashRouter:()=>cr,Link:()=>pr,MemoryRouter:()=>At,NavLink:()=>mr,Navigate:()=>Ut,NavigationType:()=>n,Outlet:()=>Mt,Route:()=>jt,Router:()=>Tt,RouterProvider:()=>kt,Routes:()=>_t,ScrollRestoration:()=>gr,UNSAFE_DataRouterContext:()=>Ne,UNSAFE_DataRouterStateContext:()=>Fe,UNSAFE_LocationContext:()=>We,UNSAFE_NavigationContext:()=>ze,UNSAFE_RouteContext:()=>He,UNSAFE_useRouteId:()=>mt,UNSAFE_useScrollRestoration:()=>Tr,createBrowserRouter:()=>or,createHashRouter:()=>ar,createMemoryRouter:()=>$t,createPath:()=>m,createRoutesFromChildren:()=>zt,createRoutesFromElements:()=>zt,createSearchParams:()=>Xt,defer:()=>K,generatePath:()=>L,isRouteErrorResponse:()=>V,json:()=>z,matchPath:()=>A,matchRoutes:()=>E,parsePath:()=>v,redirect:()=>q,redirectDocument:()=>J,renderMatches:()=>Wt,resolvePath:()=>j,unstable_HistoryRouter:()=>dr,unstable_useBlocker:()=>Ct,unstable_usePrompt:()=>Or,useActionData:()=>Et,useAsyncError:()=>St,useAsyncValue:()=>xt,useBeforeUnload:()=>_r,useFetcher:()=>Ar,useFetchers:()=>Ur,useFormAction:()=>kr,useHref:()=>Ke,useInRouterContext:()=>qe,useLinkClickHandler:()=>xr,useLoaderData:()=>bt,useLocation:()=>Je,useMatch:()=>Ve,useMatches:()=>gt,useNavigate:()=>Ge,useNavigation:()=>vt,useNavigationType:()=>Ye,useOutlet:()=>et,useOutletContext:()=>Ze,useParams:()=>tt,useResolvedPath:()=>rt,useRevalidator:()=>yt,useRouteError:()=>Rt,useRouteLoaderData:()=>wt,useRoutes:()=>nt,useSearchParams:()=>Sr,useSubmit:()=>Cr});var n,o=r(1343),a=r.t(o,2);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:o,v5Compat:a=!1}=e;t=r.map(((e,t)=>d(e,"string"==typeof e?null:e.state,0===t?"default":void 0)));let i=u(null==o?t.length-1:o),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 o=p(t?c().pathname:"/",e,r,n);return h("/"===o.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),o}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 o=d(e,r);i+=1,t.splice(i,t.length,o),a&&s&&s({action:l,location:o,delta:1})},replace(e,r){l=n.Replace;let o=d(e,r);t[i]=o,a&&s&&s({action:l,location:o,delta:0})},go(e){l=n.Pop;let r=u(i+e),o=t[r];i=r,s&&s({action:l,location:o,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:o}=e.location;return p("",{pathname:r,search:n,hash:o},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:o=""}=v(e.location.hash.substr(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),p("",{pathname:r,search:n,hash:o},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)throw new Error(t)}function h(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}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,o){void 0===o&&(o={});let{window:a=document.defaultView,v5Compat:s=!1}=o,u=a.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"!==a.location.origin?a.location.origin:a.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(a,u)},listen(e){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(l,g),h=e,()=>{a.removeEventListener(l,g),h=null}},createHref:e=>t(a,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 o=p(w.location,e,t);r&&r(o,e),v=y()+1;let i=f(o,v),l=w.createHref(o);try{u.pushState(i,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;a.location.assign(l)}s&&h&&h({action:c,location:w.location,delta:1})},replace:function(e,t){c=n.Replace;let o=p(w.location,e,t);r&&r(o,e),v=y();let a=f(o,v),i=w.createHref(o);u.replaceState(a,"",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,o)=>{let a=[...r,o],l="string"==typeof e.id?e.id:a.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,a,n)),r}}))}function E(e,t,r){void 0===r&&(r="/");let n=M(("string"==typeof t?v(t):t).pathname||"/",r);if(null==n)return null;let o=x(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]))?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let a=null;for(let e=0;null==a&&e<o.length;++e)a=k(o[e],U(n));return a}function R(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],handle:r.handle}}function x(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,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=B([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+'".'),x(e.children,t,s,l)),(null!=e.path||e.index)&&t.push({path:l,score:P(l,e.index),routesMeta:s})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of S(e.path))o(e,t,r);else o(e,t)})),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let i=S(n.join("/")),l=[];return l.push(...i.map((e=>""===e?a:[a,e].join("/")))),o&&l.push(...i),l.map((t=>e.startsWith("/")&&""===t?"/":t))}const D=/^:\w+$/,C=e=>"*"===e;function P(e,t){let r=e.split("/"),n=r.length;return r.some(C)&&(n+=-2),t&&(n+=2),r.filter((e=>!C(e))).reduce(((e,t)=>e+(D.test(t)?3:""===t?1:10)),n)}function k(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let e=0;e<r.length;++e){let i=r[e],l=e===r.length-1,s="/"===o?t:t.slice(o.length)||"/",u=A({path:i.relativePath,caseSensitive:i.caseSensitive,end:l},s);if(!u)return null;Object.assign(n,u.params);let c=i.route;a.push({params:n,pathname:B([o,u.pathname]),pathnameBase:N(B([o,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(o=B([o,u.pathnameBase]))}return a}function L(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("/")?"/":"",o=e=>null==e?"":"string"==typeof e?e:String(e);return n+r.split(/\/+/).map(((e,r,n)=>{if(r===n.length-1&&"*"===e)return o(t["*"]);const a=e.match(/^:(\w+)(\??)$/);if(a){const[,e,r]=a;let n=t[e];return d("?"===r||null!=n,'Missing ":'+e+'" param'),o(n)}return e.replace(/\?$/g,"")})).filter((e=>!!e)).join("/")}function A(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,((e,t)=>(n.push(t),"/([^\\/]+)")));return e.endsWith("*")?(n.push("*"),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:n.reduce(((e,t,r)=>{if("*"===t){let e=l[r]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=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}}(l[r]||"",t),e}),{}),pathname:a,pathnameBase:i,pattern:e}}function U(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 M(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 j(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:o=""}="string"==typeof e?v(e):e,a=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:a,search:F(n),hash:I(o)}}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 _(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function O(e,t,r,n){let o;void 0===n&&(n=!1),"string"==typeof e?o=v(e):(o=i({},e),d(!o.pathname||!o.pathname.includes("?"),T("?","pathname","search",o)),d(!o.pathname||!o.pathname.includes("#"),T("#","pathname","hash",o)),d(!o.search||!o.search.includes("#"),T("#","search","hash",o)));let a,l=""===e||""===o.pathname,s=l?"/":o.pathname;if(n||null==s)a=r;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let u=j(o,a),c=s&&"/"!==s&&s.endsWith("/"),h=(l||"."===s)&&r.endsWith("/");return u.pathname.endsWith("/")||!c&&!h||(u.pathname+="/"),u}const B=e=>e.join("/").replace(/\/\/+/g,"/"),N=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),F=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",I=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",z=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 W extends Error{}class H{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 W("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 W)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]:$(n)})}),{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}function $(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}const K=function(e,t){return void 0===t&&(t={}),new H(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}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,i({},r,{headers:n}))},J=(e,t)=>{let r=q(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r};class Y{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 V(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}const X=["post","put","patch","delete"],G=new Set(X),Q=["get",...X],Z=new Set(Q),ee=new Set([301,302,303,307,308]),te=new Set([307,308]),re={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ne={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},oe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ae=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ie=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)});function le(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement,o=!r;let a;if(d(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let t=e.detectErrorBoundary;a=e=>({hasErrorBoundary:t(e)})}else a=ie;let l,s={},u=w(e.routes,a,void 0,s),c=e.basename||"/",f=i({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),m=null,v=new Set,y=null,b=null,x=null,S=null!=e.hydrationData,D=E(u,e.history.location,c),C=null;if(null==D){let t=Re(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=Ee(u);D=r,C={[n.id]:t}}let P,k,L=!(D.some((e=>e.route.lazy))||D.some((e=>e.route.loader))&&null==e.hydrationData),A={historyAction:e.history.action,location:e.history.location,matches:D,initialized:L,navigation:re,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||C,fetchers:new Map,blockers:new Map},U=n.Pop,j=!1,T=!1,_=!1,O=[],B=[],N=new Map,F=0,I=-1,z=new Map,W=new Set,H=new Map,$=new Map,K=new Map,q=!1;function J(e){A=i({},A,e),v.forEach((e=>e(A)))}function Y(t,r){var o,a;let s,c=null!=A.actionData&&null!=A.navigation.formMethod&&ke(A.navigation.formMethod)&&"loading"===A.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);s=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:c?A.actionData:null;let d=r.loaderData?be(A.loaderData,r.loaderData,r.matches||[],r.errors):A.loaderData,h=A.blockers;h.size>0&&(h=new Map(h),h.forEach(((e,t)=>h.set(t,oe))));let f=!0===j||null!=A.navigation.formMethod&&ke(A.navigation.formMethod)&&!0!==(null==(a=t.state)?void 0:a._isRedirect);l&&(u=l,l=void 0),T||U===n.Pop||(U===n.Push?e.history.push(t,t.state):U===n.Replace&&e.history.replace(t,t.state)),J(i({},r,{actionData:s,loaderData:d,historyAction:U,location:t,initialized:!0,navigation:re,revalidation:"idle",restoreScrollPosition:Fe(t,r.matches||A.matches),preventScrollReset:f,blockers:h})),U=n.Pop,j=!1,T=!1,_=!1,O=[],B=[]}async function V(t,r,o){k&&k.abort(),k=null,U=t,T=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(y&&x){let r=Ne(e,t);y[r]=x()}}(A.location,A.matches),j=!0===(o&&o.preventScrollReset);let d=l||u,h=o&&o.overrideNavigation,f=E(d,r,c);if(!f){let e=Re(404,{pathname:r.pathname}),{matches:t,route:n}=Ee(d);return Be(),void Y(r,{matches:t,loaderData:{},errors:{[n.id]:e}})}if(A.initialized&&!_&&(p=A.location,m=r,p.pathname===m.pathname&&p.search===m.search&&(""===p.hash?""!==m.hash:p.hash===m.hash||""!==m.hash))&&!(o&&o.submission&&ke(o.submission.formMethod)))return void Y(r,{matches:f});var p,m;k=new AbortController;let v,b,w=me(e.history,r,k.signal,o&&o.submission);if(o&&o.pendingError)b={[we(f).route.id]:o.pendingError};else if(o&&o.submission&&ke(o.submission.formMethod)){let e=await async function(e,t,r,o,i){void 0===i&&(i={}),Z();let l,u=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,r);J({navigation:u});let d=Me(o,t);if(d.route.action||d.route.lazy){if(l=await pe("action",e,d,o,s,a,c),e.signal.aborted)return{shortCircuited:!0}}else l={type:g.error,error:Re(405,{method:e.method,pathname:t.pathname,routeId:d.route.id})};if(Pe(l)){let e;return e=i&&null!=i.replace?i.replace:l.location===A.location.pathname+A.location.search,await G(A,l,{submission:r,replace:e}),{shortCircuited:!0}}if(Ce(l)){let e=we(o,d.route.id);return!0!==(i&&i.replace)&&(U=n.Push),{pendingActionData:{},pendingActionError:{[e.route.id]:l.error}}}if(De(l))throw Re(400,{type:"defer-action"});return{pendingActionData:{[d.route.id]:l.data}}}(w,r,o.submission,f,{replace:o.replace});if(e.shortCircuited)return;v=e.pendingActionData,b=e.pendingActionError,h=Te(r,o.submission),w=new Request(w.url,{signal:w.signal})}let{shortCircuited:R,loaderData:S,errors:D}=await async function(t,r,n,o,a,s,d,h,f){let p=o||Te(r,a),m=a||s||je(p),v=l||u,[y,g]=ce(e.history,A,n,m,r,_,O,B,H,W,v,c,h,f);if(Be((e=>!(n&&n.some((t=>t.route.id===e)))||y&&y.some((t=>t.route.id===e)))),I=++F,0===y.length&&0===g.length){let e=fe();return Y(r,i({matches:n,loaderData:{},errors:f||null},h?{actionData:h}:{},e?{fetchers:new Map(A.fetchers)}:{})),{shortCircuited:!0}}if(!T){g.forEach((e=>{let t=A.fetchers.get(e.key),r=_e(void 0,t?t.data:void 0);A.fetchers.set(e.key,r)}));let e=h||A.actionData;J(i({navigation:p},e?0===Object.keys(e).length?{actionData:null}:{actionData:e}:{},g.length>0?{fetchers:new Map(A.fetchers)}:{}))}g.forEach((e=>{N.has(e.key)&&de(e.key),e.controller&&N.set(e.key,e.controller)}));let b=()=>g.forEach((e=>de(e.key)));k&&k.signal.addEventListener("abort",b);let{results:w,loaderResults:E,fetcherResults:R}=await Q(A.matches,n,y,g,t);if(t.signal.aborted)return{shortCircuited:!0};k&&k.signal.removeEventListener("abort",b),g.forEach((e=>N.delete(e.key)));let x=xe(w);if(x){if(x.idx>=y.length){let e=g[x.idx-y.length].key;W.add(e)}return await G(A,x.result,{replace:d}),{shortCircuited:!0}}let{loaderData:S,errors:D}=ge(A,n,y,E,f,g,R,$);$.forEach(((e,t)=>{e.subscribe((r=>{(r||e.done)&&$.delete(t)}))}));let C=fe(),P=ve(I);return i({loaderData:S,errors:D},C||P||g.length>0?{fetchers:new Map(A.fetchers)}:{})}(w,r,f,h,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,v,b);R||(k=null,Y(r,i({matches:f},v?{actionData:v}:{},{loaderData:S,errors:D})))}function X(e){return A.fetchers.get(e)||ne}async function G(o,a,l){let{submission:s,fetcherSubmission:u,replace:h}=void 0===l?{}:l;a.revalidate&&(_=!0);let f=p(o.location,a.location,{_isRedirect:!0});if(d(f,"Expected a location on the redirect navigation"),r){let r=!1;if(a.reloadDocument)r=!0;else if(ae.test(a.location)){const n=e.history.createURL(a.location);r=n.origin!==t.location.origin||null==M(n.pathname,c)}if(r)return void(h?t.location.replace(a.location):t.location.assign(a.location))}k=null;let m=!0===h?n.Replace:n.Push,{formMethod:v,formAction:y,formEncType:g}=o.navigation;!s&&!u&&v&&y&&g&&(s=je(o.navigation));let b=s||u;if(te.has(a.status)&&b&&ke(b.formMethod))await V(m,f,{submission:i({},b,{formAction:a.location}),preventScrollReset:j});else{let e=Te(f,s);await V(m,f,{overrideNavigation:e,fetcherSubmission:u,preventScrollReset:j})}}async function Q(t,r,n,o,i){let l=await Promise.all([...n.map((e=>pe("loader",i,e,r,s,a,c))),...o.map((t=>t.matches&&t.match&&t.controller?pe("loader",me(e.history,t.path,t.controller.signal),t.match,t.matches,s,a,c):{type:g.error,error:Re(404,{pathname:t.path})}))]),u=l.slice(0,n.length),d=l.slice(n.length);return await Promise.all([Le(t,n,u,u.map((()=>i.signal)),!1,A.loaderData),Le(t,o.map((e=>e.match)),d,o.map((e=>e.controller?e.controller.signal:null)),!0)]),{results:l,loaderResults:u,fetcherResults:d}}function Z(){_=!0,O.push(...Be()),H.forEach(((e,t)=>{N.has(t)&&(B.push(t),de(t))}))}function ee(e,t,r){let n=we(A.matches,t);le(e),J({errors:{[n.route.id]:r},fetchers:new Map(A.fetchers)})}function le(e){let t=A.fetchers.get(e);!N.has(e)||t&&"loading"===t.state&&z.has(e)||de(e),H.delete(e),z.delete(e),W.delete(e),A.fetchers.delete(e)}function de(e){let t=N.get(e);d(t,"Expected fetch controller: "+e),t.abort(),N.delete(e)}function he(e){for(let t of e){let e=Oe(X(t).data);A.fetchers.set(t,e)}}function fe(){let e=[],t=!1;for(let r of W){let n=A.fetchers.get(r);d(n,"Expected fetcher: "+r),"loading"===n.state&&(W.delete(r),e.push(r),t=!0)}return he(e),t}function ve(e){let t=[];for(let[r,n]of z)if(n<e){let e=A.fetchers.get(r);d(e,"Expected fetcher: "+r),"loading"===e.state&&(de(r),z.delete(r),t.push(r))}return he(t),t.length>0}function ye(e){A.blockers.delete(e),K.delete(e)}function Se(e,t){let r=A.blockers.get(e)||oe;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),J({blockers:n})}function Ue(e){let{currentLocation:t,nextLocation:r,historyAction:n}=e;if(0===K.size)return;K.size>1&&h(!1,"A router only supports one blocker at a time");let o=Array.from(K.entries()),[a,i]=o[o.length-1],l=A.blockers.get(a);return l&&"proceeding"===l.state?void 0:i({currentLocation:t,nextLocation:r,historyAction:n})?a:void 0}function Be(e){let t=[];return $.forEach(((r,n)=>{e&&!e(n)||(r.cancel(),t.push(n),$.delete(n))})),t}function Ne(e,t){return b&&b(e,t.map((e=>R(e,A.loaderData))))||e.key}function Fe(e,t){if(y){let r=Ne(e,t),n=y[r];if("number"==typeof n)return n}return null}return P={get basename(){return c},get state(){return A},get routes(){return u},initialize:function(){return m=e.history.listen((t=>{let{action:r,location:n,delta:o}=t;if(q)return void(q=!1);h(0===K.size||null!=o,"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 a=Ue({currentLocation:A.location,nextLocation:n,historyAction:r});return a&&null!=o?(q=!0,e.history.go(-1*o),void Se(a,{state:"blocked",location:n,proceed(){Se(a,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),e.history.go(o)},reset(){let e=new Map(A.blockers);e.set(a,oe),J({blockers:e})}})):V(r,n)})),A.initialized||V(n.Pop,A.location),P},subscribe:function(e){return v.add(e),()=>v.delete(e)},enableScrollRestoration:function(e,t,r){if(y=e,x=t,b=r||null,!S&&A.navigation===re){S=!0;let e=Fe(A.location,A.matches);null!=e&&J({restoreScrollPosition:e})}return()=>{y=null,x=null,b=null}},navigate:async function t(r,o){if("number"==typeof r)return void e.history.go(r);let a=se(A.location,A.matches,c,f.v7_prependBasename,r,null==o?void 0:o.fromRouteId,null==o?void 0:o.relative),{path:l,submission:s,error:u}=ue(f.v7_normalizeFormMethod,!1,a,o),d=A.location,h=p(A.location,l,o&&o.state);h=i({},h,e.history.encodeLocation(h));let m=o&&null!=o.replace?o.replace:void 0,v=n.Push;!0===m?v=n.Replace:!1===m||null!=s&&ke(s.formMethod)&&s.formAction===A.location.pathname+A.location.search&&(v=n.Replace);let y=o&&"preventScrollReset"in o?!0===o.preventScrollReset:void 0,g=Ue({currentLocation:d,nextLocation:h,historyAction:v});if(!g)return await V(v,h,{submission:s,pendingError:u,preventScrollReset:y,replace:o&&o.replace});Se(g,{state:"blocked",location:h,proceed(){Se(g,{state:"proceeding",proceed:void 0,reset:void 0,location:h}),t(r,o)},reset(){let e=new Map(A.blockers);e.set(g,oe),J({blockers:e})}})},fetch:function(t,r,n,h){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");N.has(t)&&de(t);let p=l||u,m=se(A.location,A.matches,c,f.v7_prependBasename,n,r,null==h?void 0:h.relative),v=E(p,m,c);if(!v)return void ee(t,r,Re(404,{pathname:m}));let{path:y,submission:g,error:b}=ue(f.v7_normalizeFormMethod,!0,m,h);if(b)return void ee(t,r,b);let w=Me(v,y);j=!0===(h&&h.preventScrollReset),g&&ke(g.formMethod)?async function(t,r,n,o,h,f){if(Z(),H.delete(t),!o.route.action&&!o.route.lazy){let e=Re(405,{method:f.formMethod,pathname:n,routeId:r});return void ee(t,r,e)}let p=function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(f,A.fetchers.get(t));A.fetchers.set(t,p),J({fetchers:new Map(A.fetchers)});let m=new AbortController,v=me(e.history,n,m.signal,f);N.set(t,m);let y=F,g=await pe("action",v,o,h,s,a,c);if(v.signal.aborted)return void(N.get(t)===m&&N.delete(t));if(Pe(g)){if(N.delete(t),I>y){let e=Oe(void 0);return A.fetchers.set(t,e),void J({fetchers:new Map(A.fetchers)})}{W.add(t);let e=_e(f);return A.fetchers.set(t,e),J({fetchers:new Map(A.fetchers)}),G(A,g,{fetcherSubmission:f})}}if(Ce(g))return void ee(t,r,g.error);if(De(g))throw Re(400,{type:"defer-action"});let b=A.navigation.location||A.location,w=me(e.history,b,m.signal),R=l||u,x="idle"!==A.navigation.state?E(R,A.navigation.location,c):A.matches;d(x,"Didn't find any matches after fetcher action");let S=++F;z.set(t,S);let D=_e(f,g.data);A.fetchers.set(t,D);let[C,P]=ce(e.history,A,x,f,b,_,O,B,H,W,R,c,{[o.route.id]:g.data},void 0);P.filter((e=>e.key!==t)).forEach((e=>{let t=e.key,r=A.fetchers.get(t),n=_e(void 0,r?r.data:void 0);A.fetchers.set(t,n),N.has(t)&&de(t),e.controller&&N.set(t,e.controller)})),J({fetchers:new Map(A.fetchers)});let L=()=>P.forEach((e=>de(e.key)));m.signal.addEventListener("abort",L);let{results:M,loaderResults:j,fetcherResults:T}=await Q(A.matches,x,C,P,w);if(m.signal.aborted)return;m.signal.removeEventListener("abort",L),z.delete(t),N.delete(t),P.forEach((e=>N.delete(e.key)));let K=xe(M);if(K){if(K.idx>=C.length){let e=P[K.idx-C.length].key;W.add(e)}return G(A,K.result)}let{loaderData:q,errors:V}=ge(A,A.matches,C,j,void 0,P,T,$);if(A.fetchers.has(t)){let e=Oe(g.data);A.fetchers.set(t,e)}let X=ve(S);"loading"===A.navigation.state&&S>I?(d(U,"Expected pending action"),k&&k.abort(),Y(A.navigation.location,{matches:x,loaderData:q,errors:V,fetchers:new Map(A.fetchers)})):(J(i({errors:V,loaderData:be(A.loaderData,q,x,V)},X||P.length>0?{fetchers:new Map(A.fetchers)}:{})),_=!1)}(t,r,y,w,v,g):(H.set(t,{routeId:r,path:y}),async function(t,r,n,o,i,l){let u=A.fetchers.get(t),h=_e(l,u?u.data:void 0);A.fetchers.set(t,h),J({fetchers:new Map(A.fetchers)});let f=new AbortController,p=me(e.history,n,f.signal);N.set(t,f);let m=F,v=await pe("loader",p,o,i,s,a,c);if(De(v)&&(v=await Ae(v,p.signal,!0)||v),N.get(t)===f&&N.delete(t),p.signal.aborted)return;if(Pe(v)){if(I>m){let e=Oe(void 0);return A.fetchers.set(t,e),void J({fetchers:new Map(A.fetchers)})}return W.add(t),void await G(A,v)}if(Ce(v)){let e=we(A.matches,r);return A.fetchers.delete(t),void J({fetchers:new Map(A.fetchers),errors:{[e.route.id]:v.error}})}d(!De(v),"Unhandled fetcher deferred data");let y=Oe(v.data);A.fetchers.set(t,y),J({fetchers:new Map(A.fetchers)})}(t,r,y,w,v,g))},revalidate:function(){Z(),J({revalidation:"loading"}),"submitting"!==A.navigation.state&&("idle"!==A.navigation.state?V(U||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation}):V(A.historyAction,A.location,{startUninterruptedRevalidation:!0}))},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:X,deleteFetcher:le,dispose:function(){m&&m(),v.clear(),k&&k.abort(),A.fetchers.forEach(((e,t)=>le(t))),A.blockers.forEach(((e,t)=>ye(t)))},getBlocker:function(e,t){let r=A.blockers.get(e)||oe;return K.get(e)!==t&&K.set(e,t),r},deleteBlocker:ye,_internalFetchControllers:N,_internalActiveDeferreds:$,_internalSetRoutes:function(e){s={},l=w(e,a,void 0,s)}},P}function se(e,t,r,n,o,a,i){let l,s;if(null!=a&&"path"!==i){l=[];for(let e of t)if(l.push(e),e.route.id===a){s=e;break}}else l=t,s=t[t.length-1];let u=O(o||".",_(l).map((e=>e.pathnameBase)),M(e.pathname,r)||e.pathname,"path"===i);return null==o&&(u.search=e.search,u.hash=e.hash),null!=o&&""!==o&&"."!==o||!s||!s.route.index||Ue(u.search)||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&"/"!==r&&(u.pathname="/"===u.pathname?r:B([r,u.pathname])),m(u)}function ue(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&&(o=n.formMethod,!Z.has(o.toLowerCase())))return{path:r,error:Re(405,{method:n.formMethod})};var o;let a,i,l=()=>({path:r,error:Re(400,{type:"invalid-body"})}),s=n.formMethod||"get",u=e?s.toUpperCase():s.toLowerCase(),c=Se(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!ke(u))return l();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:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===n.formEncType){if(!ke(u))return l();try{let e="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:u,formAction:c,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return l()}}}if(d("function"==typeof FormData,"FormData is not available in this environment"),n.formData)a=ve(n.formData),i=n.formData;else if(n.body instanceof FormData)a=ve(n.body),i=n.body;else if(n.body instanceof URLSearchParams)a=n.body,i=ye(a);else if(null==n.body)a=new URLSearchParams,i=new FormData;else try{a=new URLSearchParams(n.body),i=ye(a)}catch(e){return l()}let h={formMethod:u,formAction:c,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(ke(h.formMethod))return{path:r,submission:h};let f=v(r);return t&&f.search&&Ue(f.search)&&a.append("index",""),f.search="?"+a,{path:m(f),submission:h}}function ce(e,t,r,n,o,a,l,s,u,c,d,h,f,p){let m=p?Object.values(p)[0]:f?Object.values(f)[0]:void 0,v=e.createURL(t.location),y=e.createURL(o),g=p?Object.keys(p)[0]:void 0,b=function(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}(r,g).filter(((e,r)=>{if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,r){let n=!t||r.route.id!==t.route.id,o=void 0===e[r.route.id];return n||o}(t.loaderData,t.matches[r],e)||l.some((t=>t===e.route.id)))return!0;let o=t.matches[r],s=e;return he(e,i({currentUrl:v,currentParams:o.params,nextUrl:y,nextParams:s.params},n,{actionResult:m,defaultShouldRevalidate:a||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||de(o,s)}))})),w=[];return u.forEach(((e,o)=>{if(!r.some((t=>t.route.id===e.routeId)))return;let l=E(d,e.path,h);if(!l)return void w.push({key:o,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null});let u=t.fetchers.get(o),f=Me(l,e.path),p=!1;p=!c.has(o)&&(!!s.includes(o)||(u&&"idle"!==u.state&&void 0===u.data?a:he(f,i({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:m,defaultShouldRevalidate:a})))),p&&w.push({key:o,routeId:e.routeId,path:e.path,matches:l,match:f,controller:new AbortController})})),[b,w]}function de(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function he(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}async function fe(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let o=r[e.id];d(o,"No route found in manifest");let a={};for(let e in n){let t=void 0!==o[e]&&"hasErrorBoundary"!==e;h(!t,'Route "'+o.id+'" has a static property "'+e+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+e+'" will be ignored.'),t||b.has(e)||(a[e]=n[e])}Object.assign(o,a),Object.assign(o,i({},t(o),{lazy:void 0}))}async function pe(e,t,r,n,o,a,i,l){let s,u,c;void 0===l&&(l={});let h=e=>{let n,o=new Promise(((e,t)=>n=t));return c=()=>n(),t.signal.addEventListener("abort",c),Promise.race([e({request:t,params:r.params,context:l.requestContext}),o])};try{let n=r.route[e];if(r.route.lazy)if(n){let e,t=await Promise.all([h(n).catch((t=>{e=t})),fe(r.route,a,o)]);if(e)throw e;u=t[0]}else{if(await fe(r.route,a,o),n=r.route[e],!n){if("action"===e){let e=new URL(t.url),n=e.pathname+e.search;throw Re(405,{method:t.method,pathname:n,routeId:r.route.id})}return{type:g.data,data:void 0}}u=await h(n)}else{if(!n){let e=new URL(t.url);throw Re(404,{pathname:e.pathname+e.search})}u=await h(n)}d(void 0!==u,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`.")}catch(e){s=g.error,u=e}finally{c&&t.signal.removeEventListener("abort",c)}if(null!=(f=u)&&"number"==typeof f.status&&"string"==typeof f.statusText&&"object"==typeof f.headers&&void 0!==f.body){let e,o=u.status;if(ee.has(o)){let e=u.headers.get("Location");if(d(e,"Redirects returned/thrown from loaders/actions must have a Location header"),ae.test(e)){if(!l.isStaticRequest){let r=new URL(t.url),n=e.startsWith("//")?new URL(r.protocol+e):new URL(e),o=null!=M(n.pathname,i);n.origin===r.origin&&o&&(e=n.pathname+n.search+n.hash)}}else e=se(new URL(t.url),n.slice(0,n.indexOf(r)+1),i,!0,e);if(l.isStaticRequest)throw u.headers.set("Location",e),u;return{type:g.redirect,status:o,location:e,revalidate:null!==u.headers.get("X-Remix-Revalidate"),reloadDocument:null!==u.headers.get("X-Remix-Reload-Document")}}if(l.isRouteRequest)throw{type:s===g.error?g.error:g.data,response:u};let a=u.headers.get("Content-Type");return e=a&&/\bapplication\/json\b/.test(a)?await u.json():await u.text(),s===g.error?{type:s,error:new Y(o,u.statusText,e),headers:u.headers}:{type:g.data,data:e,statusCode:u.status,headers:u.headers}}var f,p,m;return s===g.error?{type:s,error:u}: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}(u)?{type:g.deferred,deferredData:u,statusCode:null==(p=u.init)?void 0:p.status,headers:(null==(m=u.init)?void 0:m.headers)&&new Headers(u.init.headers)}:{type:g.data,data:u}}function me(e,t,r,n){let o=e.createURL(Se(t)).toString(),a={signal:r};if(n&&ke(n.formMethod)){let{formMethod:e,formEncType:t}=n;a.method=e.toUpperCase(),"application/json"===t?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(n.json)):"text/plain"===t?a.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?a.body=ve(n.formData):a.body=n.formData}return new Request(o,a)}function ve(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function ye(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function ge(e,t,r,n,o,a,l,s){let{loaderData:u,errors:c}=function(e,t,r,n,o){let a,i={},l=null,s=!1,u={};return r.forEach(((r,c)=>{let h=t[c].route.id;if(d(!Pe(r),"Cannot handle redirect results in processLoaderData"),Ce(r)){let t=we(e,h),o=r.error;n&&(o=Object.values(n)[0],n=void 0),l=l||{},null==l[t.route.id]&&(l[t.route.id]=o),i[h]=void 0,s||(s=!0,a=V(r.error)?r.error.status:500),r.headers&&(u[h]=r.headers)}else De(r)?(o.set(h,r.deferredData),i[h]=r.deferredData.data):i[h]=r.data,null==r.statusCode||200===r.statusCode||s||(a=r.statusCode),r.headers&&(u[h]=r.headers)})),n&&(l=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:l,statusCode:a||200,loaderHeaders:u}}(t,r,n,o,s);for(let t=0;t<a.length;t++){let{key:r,match:n,controller:o}=a[t];d(void 0!==l&&void 0!==l[t],"Did not find corresponding fetcher result");let s=l[t];if(!o||!o.signal.aborted)if(Ce(s)){let t=we(e.matches,null==n?void 0:n.route.id);c&&c[t.route.id]||(c=i({},c,{[t.route.id]:s.error})),e.fetchers.delete(r)}else if(Pe(s))d(!1,"Unhandled fetcher revalidation redirect");else if(De(s))d(!1,"Unhandled fetcher deferred data");else{let t=Oe(s.data);e.fetchers.set(r,t)}}return{loaderData:u,errors:c}}function be(e,t,r,n){let o=i({},t);for(let a of r){let r=a.route.id;if(t.hasOwnProperty(r)?void 0!==t[r]&&(o[r]=t[r]):void 0!==e[r]&&a.route.loader&&(o[r]=e[r]),n&&n.hasOwnProperty(r))break}return o}function we(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 Ee(e){let t=e.find((e=>e.index||!e.path||"/"===e.path))||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Re(e,t){let{pathname:r,routeId:n,method:o,type:a}=void 0===t?{}:t,i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",o&&r&&n?l="You made a "+o+' request to "'+r+'" but did not provide a `loader` for route "'+n+'", so there is no way to handle the request.':"defer-action"===a?l="defer() is not supported in actions":"invalid-body"===a&&(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",o&&r&&n?l="You made a "+o.toUpperCase()+' request to "'+r+'" but did not provide an `action` for route "'+n+'", so there is no way to handle the request.':o&&(l='Invalid request method "'+o.toUpperCase()+'"')),new Y(e||500,i,new Error(l),!0)}function xe(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Pe(r))return{result:r,idx:t}}}function Se(e){return m(i({},"string"==typeof e?v(e):e,{hash:""}))}function De(e){return e.type===g.deferred}function Ce(e){return e.type===g.error}function Pe(e){return(e&&e.type)===g.redirect}function ke(e){return G.has(e.toLowerCase())}async function Le(e,t,r,n,o,a){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&&!de(u,s)&&void 0!==(a&&a[s.route.id]);if(De(l)&&(o||c)){let e=n[i];d(e,"Expected an AbortSignal for revalidating fetcher deferred result"),await Ae(l,e,o).then((e=>{e&&(r[i]=e||r[i])}))}}}async function Ae(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(e){return{type:g.error,error:e}}return{type:g.data,data:e.deferredData.data}}}function Ue(e){return new URLSearchParams(e).getAll("index").some((e=>""===e))}function Me(e,t){let r="string"==typeof t?v(t).search:t.search;if(e[e.length-1].route.index&&Ue(r||""))return e[e.length-1];let n=_(e);return n[n.length-1]}function je(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:i}=e;if(t&&r&&n)return null!=o?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o}:null!=a?{formMethod:t,formAction:r,formEncType:n,formData:a,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 Te(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 _e(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 Oe(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 Be(){return Be=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},Be.apply(this,arguments)}Symbol("deferred");const Ne=o.createContext(null),Fe=o.createContext(null),Ie=o.createContext(null),ze=o.createContext(null),We=o.createContext(null),He=o.createContext({outlet:null,matches:[],isDataRoute:!1}),$e=o.createContext(null);function Ke(e,t){let{relative:r}=void 0===t?{}:t;qe()||d(!1);let{basename:n,navigator:a}=o.useContext(ze),{hash:i,pathname:l,search:s}=rt(e,{relative:r}),u=l;return"/"!==n&&(u="/"===l?n:B([n,l])),a.createHref({pathname:u,search:s,hash:i})}function qe(){return null!=o.useContext(We)}function Je(){return qe()||d(!1),o.useContext(We).location}function Ye(){return o.useContext(We).navigationType}function Ve(e){qe()||d(!1);let{pathname:t}=Je();return o.useMemo((()=>A(e,t)),[t,e])}function Xe(e){o.useContext(ze).static||o.useLayoutEffect(e)}function Ge(){let{isDataRoute:e}=o.useContext(He);return e?function(){let{router:e}=ht(ct.UseNavigateStable),t=pt(dt.UseNavigateStable),r=o.useRef(!1);return Xe((()=>{r.current=!0})),o.useCallback((function(n,o){void 0===o&&(o={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Be({fromRouteId:t},o)))}),[e,t])}():function(){qe()||d(!1);let e=o.useContext(Ne),{basename:t,navigator:r}=o.useContext(ze),{matches:n}=o.useContext(He),{pathname:a}=Je(),i=JSON.stringify(_(n).map((e=>e.pathnameBase))),l=o.useRef(!1);return Xe((()=>{l.current=!0})),o.useCallback((function(n,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof n)return void r.go(n);let s=O(n,JSON.parse(i),a,"path"===o.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:B([t,s.pathname])),(o.replace?r.replace:r.push)(s,o.state,o)}),[t,r,i,a,e])}()}const Qe=o.createContext(null);function Ze(){return o.useContext(Qe)}function et(e){let t=o.useContext(He).outlet;return t?o.createElement(Qe.Provider,{value:e},t):t}function tt(){let{matches:e}=o.useContext(He),t=e[e.length-1];return t?t.params:{}}function rt(e,t){let{relative:r}=void 0===t?{}:t,{matches:n}=o.useContext(He),{pathname:a}=Je(),i=JSON.stringify(_(n).map((e=>e.pathnameBase)));return o.useMemo((()=>O(e,JSON.parse(i),a,"path"===r)),[e,i,a,r])}function nt(e,t){return ot(e,t)}function ot(e,t,r){qe()||d(!1);let{navigator:a}=o.useContext(ze),{matches:i}=o.useContext(He),l=i[i.length-1],s=l?l.params:{},u=(l&&l.pathname,l?l.pathnameBase:"/");l&&l.route;let c,h=Je();if(t){var f;let e="string"==typeof t?v(t):t;"/"===u||(null==(f=e.pathname)?void 0:f.startsWith(u))||d(!1),c=e}else c=h;let p=c.pathname||"/",m=E(e,{pathname:"/"===u?p:p.slice(u.length)||"/"}),y=ut(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:B([u,a.encodeLocation?a.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:B([u,a.encodeLocation?a.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),i,r);return t&&y?o.createElement(We.Provider,{value:{location:Be({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:n.Pop}},y):y}function at(){let e=Rt(),t=V(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),r?o.createElement("pre",{style:n},r):null,null)}const it=o.createElement(at,null);class lt extends o.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:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?o.createElement(He.Provider,{value:this.props.routeContext},o.createElement($e.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function st(e){let{routeContext:t,match:r,children:n}=e,a=o.useContext(Ne);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),o.createElement(He.Provider,{value:t},n)}function ut(e,t,r){var n;if(void 0===t&&(t=[]),void 0===r&&(r=null),null==e){var a;if(null==(a=r)||!a.errors)return null;e=r.matches}let i=e,l=null==(n=r)?void 0:n.errors;if(null!=l){let e=i.findIndex((e=>e.route.id&&(null==l?void 0:l[e.route.id])));e>=0||d(!1),i=i.slice(0,Math.min(i.length,e+1))}return i.reduceRight(((e,n,a)=>{let s=n.route.id?null==l?void 0:l[n.route.id]:null,u=null;r&&(u=n.route.errorElement||it);let c=t.concat(i.slice(0,a+1)),d=()=>{let t;return t=s?u:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(st,{match:n,routeContext:{outlet:e,matches:c,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===a)?o.createElement(lt,{location:r.location,revalidation:r.revalidation,component:u,error:s,children:d(),routeContext:{outlet:null,matches:c,isDataRoute:!0}}):d()}),null)}var ct=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ct||{}),dt=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}(dt||{});function ht(e){let t=o.useContext(Ne);return t||d(!1),t}function ft(e){let t=o.useContext(Fe);return t||d(!1),t}function pt(e){let t=function(){let e=o.useContext(He);return e||d(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||d(!1),r.route.id}function mt(){return pt(dt.UseRouteId)}function vt(){return ft(dt.UseNavigation).navigation}function yt(){let e=ht(ct.UseRevalidator),t=ft(dt.UseRevalidator);return o.useMemo((()=>({revalidate:e.router.revalidate,state:t.revalidation})),[e.router.revalidate,t.revalidation])}function gt(){let{matches:e,loaderData:t}=ft(dt.UseMatches);return o.useMemo((()=>e.map((e=>R(e,t)))),[e,t])}function bt(){let e=ft(dt.UseLoaderData),t=pt(dt.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function wt(e){return ft(dt.UseRouteLoaderData).loaderData[e]}function Et(){let e=ft(dt.UseActionData);return o.useContext(He)||d(!1),Object.values((null==e?void 0:e.actionData)||{})[0]}function Rt(){var e;let t=o.useContext($e),r=ft(dt.UseRouteError),n=pt(dt.UseRouteError);return t||(null==(e=r.errors)?void 0:e[n])}function xt(){let e=o.useContext(Ie);return null==e?void 0:e._data}function St(){let e=o.useContext(Ie);return null==e?void 0:e._error}let Dt=0;function Ct(e){let{router:t,basename:r}=ht(ct.UseBlocker),n=ft(dt.UseBlocker),[a,i]=o.useState(""),l=o.useCallback((t=>{if("function"!=typeof e)return!!e;if("/"===r)return e(t);let{currentLocation:n,nextLocation:o,historyAction:a}=t;return e({currentLocation:Be({},n,{pathname:M(n.pathname,r)||n.pathname}),nextLocation:Be({},o,{pathname:M(o.pathname,r)||o.pathname}),historyAction:a})}),[r,e]);return o.useEffect((()=>{let e=String(++Dt);return i(e),()=>t.deleteBlocker(e)}),[t]),o.useEffect((()=>{""!==a&&t.getBlocker(a,l)}),[t,a,l]),a&&n.blockers.has(a)?n.blockers.get(a):oe}const Pt=a.startTransition;function kt(e){let{fallbackElement:t,router:r,future:n}=e,[a,i]=o.useState(r.state),{v7_startTransition:l}=n||{},s=o.useCallback((e=>{l&&Pt?Pt((()=>i(e))):i(e)}),[i,l]);o.useLayoutEffect((()=>r.subscribe(s)),[r,s]);let u=o.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]),c=r.basename||"/",d=o.useMemo((()=>({router:r,navigator:u,static:!1,basename:c})),[r,u,c]);return o.createElement(o.Fragment,null,o.createElement(Ne.Provider,{value:d},o.createElement(Fe.Provider,{value:a},o.createElement(Tt,{basename:c,location:a.location,navigationType:a.historyAction,navigator:u},a.initialized?o.createElement(Lt,{routes:r.routes,state:a}):t))),null)}function Lt(e){let{routes:t,state:r}=e;return ot(t,void 0,r)}function At(e){let{basename:t,children:r,initialEntries:n,initialIndex:a,future:i}=e,l=o.useRef();null==l.current&&(l.current=s({initialEntries:n,initialIndex:a,v5Compat:!0}));let u=l.current,[c,d]=o.useState({action:u.action,location:u.location}),{v7_startTransition:h}=i||{},f=o.useCallback((e=>{h&&Pt?Pt((()=>d(e))):d(e)}),[d,h]);return o.useLayoutEffect((()=>u.listen(f)),[u,f]),o.createElement(Tt,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u})}function Ut(e){let{to:t,replace:r,state:n,relative:a}=e;qe()||d(!1);let{matches:i}=o.useContext(He),{pathname:l}=Je(),s=Ge(),u=O(t,_(i).map((e=>e.pathnameBase)),l,"path"===a),c=JSON.stringify(u);return o.useEffect((()=>s(JSON.parse(c),{replace:r,state:n,relative:a})),[s,c,a,r,n]),null}function Mt(e){return et(e.context)}function jt(e){d(!1)}function Tt(e){let{basename:t="/",children:r=null,location:a,navigationType:i=n.Pop,navigator:l,static:s=!1}=e;qe()&&d(!1);let u=t.replace(/^\/*/,"/"),c=o.useMemo((()=>({basename:u,navigator:l,static:s})),[u,l,s]);"string"==typeof a&&(a=v(a));let{pathname:h="/",search:f="",hash:p="",state:m=null,key:y="default"}=a,g=o.useMemo((()=>{let e=M(h,u);return null==e?null:{location:{pathname:e,search:f,hash:p,state:m,key:y},navigationType:i}}),[u,h,f,p,m,y,i]);return null==g?null:o.createElement(ze.Provider,{value:c},o.createElement(We.Provider,{children:r,value:g}))}function _t(e){let{children:t,location:r}=e;return nt(zt(t),r)}function Ot(e){let{children:t,errorElement:r,resolve:n}=e;return o.createElement(Ft,{resolve:n,errorElement:r},o.createElement(It,null,t))}var Bt=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Bt||{});const Nt=new Promise((()=>{}));class Ft extends o.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,a=Bt.pending;if(r instanceof Promise)if(this.state.error){a=Bt.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,a=void 0!==n._error?Bt.error:void 0!==n._data?Bt.success:Bt.pending):(a=Bt.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 a=Bt.success,n=Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===Bt.error&&n._error instanceof W)throw Nt;if(a===Bt.error&&!t)throw n._error;if(a===Bt.error)return o.createElement(Ie.Provider,{value:n,children:t});if(a===Bt.success)return o.createElement(Ie.Provider,{value:n,children:e});throw n}}function It(e){let{children:t}=e,r=xt(),n="function"==typeof t?t(r):t;return o.createElement(o.Fragment,null,n)}function zt(e,t){void 0===t&&(t=[]);let r=[];return o.Children.forEach(e,((e,n)=>{if(!o.isValidElement(e))return;let a=[...t,n];if(e.type===o.Fragment)return void r.push.apply(r,zt(e.props.children,a));e.type!==jt&&d(!1),e.props.index&&e.props.children&&d(!1);let i={id:e.props.id||a.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=zt(e.props.children,a)),r.push(i)})),r}function Wt(e){return ut(e)}function Ht(e){let t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:o.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function $t(e,t){return le({basename:null==t?void 0:t.basename,future:Be({},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:Ht}).initialize()}function Kt(){return Kt=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},Kt.apply(this,arguments)}function qt(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}const Jt="get",Yt="application/x-www-form-urlencoded";function Vt(e){return null!=e&&"string"==typeof e.tagName}function Xt(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 Gt=null;const Qt=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zt(e){return null==e||Qt.has(e)?e:null}function er(e,t){let r,n,o,a,i;if(Vt(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?M(i,t):null,r=e.getAttribute("method")||Jt,o=Zt(e.getAttribute("enctype"))||Yt,a=new FormData(e)}else if(function(e){return Vt(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Vt(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?M(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||Jt,o=Zt(e.getAttribute("formenctype"))||Zt(i.getAttribute("enctype"))||Yt,a=new FormData(i,e),!function(){if(null===Gt)try{new FormData(document.createElement("form"),0),Gt=!1}catch(e){Gt=!0}return Gt}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";a.append(e+"x","0"),a.append(e+"y","0")}else t&&a.append(t,n)}}else{if(Vt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Jt,n=null,o=Yt,i=e}var l;return a&&"text/plain"===o&&(i=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:i}}const tr=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],rr=["aria-current","caseSensitive","className","end","style","to","children"],nr=["reloadDocument","replace","state","method","action","onSubmit","submit","relative","preventScrollReset"];function or(e,t){return le({basename:null==t?void 0:t.basename,future:Kt({},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)||ir(),routes:e,mapRouteProperties:Ht}).initialize()}function ar(e,t){return le({basename:null==t?void 0:t.basename,future:Kt({},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)||ir(),routes:e,mapRouteProperties:Ht}).initialize()}function ir(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Kt({},t,{errors:lr(t.errors)})),t}function lr(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new Y(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let o=new t(n.message);o.stack="",r[e]=o}catch(e){}}if(null==r[e]){let t=new Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}const sr=a.startTransition;function ur(e){let{basename:t,children:r,future:n,window:a}=e,i=o.useRef();null==i.current&&(i.current=u({window:a,v5Compat:!0}));let l=i.current,[s,c]=o.useState({action:l.action,location:l.location}),{v7_startTransition:d}=n||{},h=o.useCallback((e=>{d&&sr?sr((()=>c(e))):c(e)}),[c,d]);return o.useLayoutEffect((()=>l.listen(h)),[l,h]),o.createElement(Tt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l})}function cr(e){let{basename:t,children:r,future:n,window:a}=e,i=o.useRef();null==i.current&&(i.current=c({window:a,v5Compat:!0}));let l=i.current,[s,u]=o.useState({action:l.action,location:l.location}),{v7_startTransition:d}=n||{},h=o.useCallback((e=>{d&&sr?sr((()=>u(e))):u(e)}),[u,d]);return o.useLayoutEffect((()=>l.listen(h)),[l,h]),o.createElement(Tt,{basename:t,children:r,location:s.location,navigationType:s.action,navigator:l})}function dr(e){let{basename:t,children:r,future:n,history:a}=e,[i,l]=o.useState({action:a.action,location:a.location}),{v7_startTransition:s}=n||{},u=o.useCallback((e=>{s&&sr?sr((()=>l(e))):l(e)}),[l,s]);return o.useLayoutEffect((()=>a.listen(u)),[a,u]),o.createElement(Tt,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:a})}const hr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,fr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pr=o.forwardRef((function(e,t){let r,{onClick:n,relative:a,reloadDocument:i,replace:l,state:s,target:u,to:c,preventScrollReset:d}=e,h=qt(e,tr),{basename:f}=o.useContext(ze),p=!1;if("string"==typeof c&&fr.test(c)&&(r=c,hr))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=M(t.pathname,f);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:p=!0}catch(e){}let m=Ke(c,{relative:a}),v=xr(c,{replace:l,state:s,target:u,preventScrollReset:d,relative:a});return o.createElement("a",Kt({},h,{href:r||m,onClick:p||i?n:function(e){n&&n(e),e.defaultPrevented||v(e)},ref:t,target:u}))})),mr=o.forwardRef((function(e,t){let{"aria-current":r="page",caseSensitive:n=!1,className:a="",end:i=!1,style:l,to:s,children:u}=e,c=qt(e,rr),d=rt(s,{relative:c.relative}),h=Je(),f=o.useContext(Fe),{navigator:p}=o.useContext(ze),m=p.encodeLocation?p.encodeLocation(d).pathname:d.pathname,v=h.pathname,y=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(v=v.toLowerCase(),y=y?y.toLowerCase():null,m=m.toLowerCase());let g,b=v===m||!i&&v.startsWith(m)&&"/"===v.charAt(m.length),w=null!=y&&(y===m||!i&&y.startsWith(m)&&"/"===y.charAt(m.length)),E=b?r:void 0;g="function"==typeof a?a({isActive:b,isPending:w}):[a,b?"active":null,w?"pending":null].filter(Boolean).join(" ");let R="function"==typeof l?l({isActive:b,isPending:w}):l;return o.createElement(pr,Kt({},c,{"aria-current":E,className:g,ref:t,style:R,to:s}),"function"==typeof u?u({isActive:b,isPending:w}):u)})),vr=o.forwardRef(((e,t)=>{let r=Cr();return o.createElement(yr,Kt({},e,{submit:r,ref:t}))})),yr=o.forwardRef(((e,t)=>{let{reloadDocument:r,replace:n,state:a,method:i=Jt,action:l,onSubmit:s,submit:u,relative:c,preventScrollReset:d}=e,h=qt(e,nr),f="get"===i.toLowerCase()?"get":"post",p=kr(l,{relative:c});return o.createElement("form",Kt({ref:t,method:f,action:p,onSubmit:r?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||i;u(t||e.currentTarget,{method:r,replace:n,state:a,relative:c,preventScrollReset:d})}},h))}));function gr(e){let{getKey:t,storageKey:r}=e;return Tr({getKey:t,storageKey:r}),null}var br,wr;function Er(e){let t=o.useContext(Ne);return t||d(!1),t}function Rr(e){let t=o.useContext(Fe);return t||d(!1),t}function xr(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:l}=void 0===t?{}:t,s=Ge(),u=Je(),c=rt(e,{relative:l});return o.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(u)===m(c);s(e,{replace:r,state:a,preventScrollReset:i,relative:l})}}),[u,s,c,n,a,r,e,i,l])}function Sr(e){let t=o.useRef(Xt(e)),r=o.useRef(!1),n=Je(),a=o.useMemo((()=>function(e,t){let r=Xt(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=Ge(),l=o.useCallback(((e,t)=>{const n=Xt("function"==typeof e?e(a):e);r.current=!0,i("?"+n,t)}),[i,a]);return[a,l]}function Dr(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function Cr(){let{router:e}=Er(br.UseSubmit),{basename:t}=o.useContext(ze),r=mt();return o.useCallback((function(n,o){void 0===o&&(o={}),Dr();let{action:a,method:i,encType:l,formData:s,body:u}=er(n,t);e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:u,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:r})}),[e,t,r])}function Pr(e,t){let{router:r}=Er(br.UseSubmitFetcher),{basename:n}=o.useContext(ze);return o.useCallback((function(o,a){void 0===a&&(a={}),Dr();let{action:i,method:l,encType:s,formData:u,body:c}=er(o,n);null==t&&d(!1),r.fetch(e,t,a.action||i,{preventScrollReset:a.preventScrollReset,formData:u,body:c,formMethod:a.method||l,formEncType:a.encType||s})}),[r,n,e,t])}function kr(e,t){let{relative:r}=void 0===t?{}:t,{basename:n}=o.useContext(ze),a=o.useContext(He);a||d(!1);let[i]=a.matches.slice(-1),l=Kt({},rt(e||".",{relative:r})),s=Je();if(null==e&&(l.search=s.search,i.route.index)){let e=new URLSearchParams(l.search);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:B([n,l.pathname])),m(l)}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(br||(br={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(wr||(wr={}));let Lr=0;function Ar(){var e;let{router:t}=Er(br.UseFetcher),r=o.useContext(He);r||d(!1);let n=null==(e=r.matches[r.matches.length-1])?void 0:e.route.id;null==n&&d(!1);let[a]=o.useState((()=>String(++Lr))),[i]=o.useState((()=>(n||d(!1),function(e,t){return o.forwardRef(((r,n)=>{let a=Pr(e,t);return o.createElement(yr,Kt({},r,{ref:n,submit:a}))}))}(a,n)))),[l]=o.useState((()=>e=>{t||d(!1),n||d(!1),t.fetch(a,n,e)})),s=Pr(a,n),u=t.getFetcher(a),c=o.useMemo((()=>Kt({Form:i,submit:s,load:l},u)),[u,i,s,l]);return o.useEffect((()=>()=>{t?t.deleteFetcher(a):console.warn("No router available to clean up from useFetcher()")}),[t,a]),c}function Ur(){return[...Rr(wr.UseFetchers).fetchers.values()]}const Mr="react-router-scroll-positions";let jr={};function Tr(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:n}=Er(br.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=Rr(wr.UseScrollRestoration),{basename:l}=o.useContext(ze),s=Je(),u=gt(),c=vt();o.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e){let{capture:t}={};o.useEffect((()=>{let r=null!=t?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}}),[e,t])}(o.useCallback((()=>{if("idle"===c.state){let e=(t?t(s,u):null)||s.key;jr[e]=window.scrollY}sessionStorage.setItem(r||Mr,JSON.stringify(jr)),window.history.scrollRestoration="auto"}),[r,t,c.state,s,u])),"undefined"!=typeof document&&(o.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||Mr);e&&(jr=JSON.parse(e))}catch(e){}}),[r]),o.useLayoutEffect((()=>{let e=t&&"/"!==l?(e,r)=>t(Kt({},e,{pathname:M(e.pathname,l)||e.pathname}),r):t,r=null==n?void 0:n.enableScrollRestoration(jr,(()=>window.scrollY),e);return()=>r&&r()}),[n,l,t]),o.useLayoutEffect((()=>{if(!1!==a)if("number"!=typeof a){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,a)}),[s,a,i]))}function _r(e,t){let{capture:r}=t||{};o.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}}),[e,r])}function Or(e){let{when:t,message:r}=e,n=Ct(t);o.useEffect((()=>{"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())}),[n,r]),o.useEffect((()=>{"blocked"!==n.state||t||n.reset()}),[n,t])}}}]);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @remix-run/router v1.9.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.16.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.16.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
|
+
*/
|
package/dist/918.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app=globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app||[]).push([[918],{2918(e,t,i){i.r(t),i.d(t,{default:()=>s});var n=i(1343),r=i(2339),a=i(5803),o=i(5940);const s=function(){var e=(0,r.useTranslation)().t,t=(0,o.useSession)(),i=(0,o.useConfig)();return(0,n.useEffect)((function(){var e;if(null==t?void 0:t.user){var n,r,a,s=-1===(a=(r=window.location.pathname.replace(/\/$/,"").split("/")).findIndex((function(e){return"post-registration"===e})))||a+1>=r.length?"":null!==(n=r[a+1])&&void 0!==n?n:"";(null!==(e=t.user.roles)&&void 0!==e?e:[]).map((function(e){var t,i;return String(null!==(t=null!==(i=e.display)&&void 0!==i?i:e.name)&&void 0!==t?t:"")})).some((function(e){return e.trim().toLowerCase()===i.registrationClerkRoleName.trim().toLowerCase()}))?(0,o.navigate)({to:"${openmrsSpaBase}/".concat(i.registeredPatientsListPath)}):s?(0,o.navigate)({to:"${openmrsSpaBase}/patient/".concat(s,"/chart")}):(0,o.navigate)({to:"${openmrsSpaBase}/home"})}}),[t,i.registrationClerkRoleName,i.registeredPatientsListPath]),n.createElement("div",{style:{padding:"2rem"}},n.createElement(a.OuH,{description:e("redirecting","Redirecting…")}))}}}]);
|
package/dist/main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e,r,t,n,o={6173(e,r,t){"use strict";var n=t(5940),o={featureName:"post-registration-redirect",moduleName:(n.Type.String,n.Type.String,n.Type.String,n.Type.Number,"@clinicemr/esm-post-registration-redirect-app")};t(4767),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(803),t.e(343),t.e(339),t.e(918)]).then(t.bind(t,2918))}),o),(0,n.getAsyncLifecycle)((function(){return Promise.all([t.e(803),t.e(686),t.e(343),t.e(339),t.e(802)]).then(t.bind(t,5802))}),o)},4767(e,r,t){var n={"./en.json":[4300,[300]]};function o(e){try{if(!t.o(n,e))return Promise.resolve().then((()=>{var r=new Error("Cannot find module '"+e+"'");throw r.code="MODULE_NOT_FOUND",r}))}catch(e){return Promise.reject(e)}var r=n[e],o=r[0];return t.e(r[1][0]).then((()=>t(o)))}o.keys=()=>Object.keys(n),o.id=4767,e.exports=o}},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,exports:{}};return o[e].call(t.exports,t,t.exports,i),t.exports}i.m=o,i.c=a,i.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return i.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);i.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var l=2&n&&t;("object"==typeof l||"function"==typeof l)&&!~e.indexOf(l);l=r(l))Object.getOwnPropertyNames(l).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,i.d(o,a),o},i.d=(e,r)=>{for(var t in r)i.o(r,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((r,t)=>(i.f[t](e,r),r)),[])),i.u=e=>e+".js",i.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@clinicemr/esm-post-registration-redirect-app:",i.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var l,s;if(void 0!==o)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var f=u[c];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+o){l=f;break}}l||(s=!0,(l=document.createElement("script")).charset="utf-8",i.nc&&l.setAttribute("nonce",i.nc),l.setAttribute("data-webpack",n+o),l.src=e),t[e]=[r];var p=(r,n)=>{l.onerror=l.onload=null,clearTimeout(d);var o=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),s&&document.head.appendChild(l)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{i.S={};var e={},r={};i.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];i.o(i.S,t)||(i.S[t]={});var a=i.S[t],l="@clinicemr/esm-post-registration-redirect-app",s=(e,r,t,n)=>{var o=a[e]=a[e]||{},i=o[r];(!i||!i.loaded&&(!n!=!i.eager?n:l>i.from))&&(o[r]={get:t,from:l,eager:!!n})},u=[];return"default"===t&&(s("@openmrs/esm-framework","9.0.3-pre.4643",(()=>Promise.all([i.e(803),i.e(686),i.e(777),i.e(343),i.e(339),i.e(277)]).then((()=>()=>i(1777))))),s("dayjs","1.11.13",(()=>i.e(464).then((()=>()=>i(3464))))),s("react-i18next","16.0.0",(()=>Promise.all([i.e(336),i.e(343)]).then((()=>()=>i(6336))))),s("react-router-dom","6.16.0",(()=>Promise.all([i.e(913),i.e(343)]).then((()=>()=>i(2913))))),s("react","18.3.1",(()=>i.e(41).then((()=>()=>i(4041))))),s("rxjs","6.6.7",(()=>i.e(457).then((()=>()=>i(2457)))))),e[t]=u.length?Promise.all(u).then((()=>e[t]=1)):1}}})(),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},r=e=>{var t=e[0],n="";if(1===e.length)return"*";if(t+.5){n+=0==t?">=":-1==t?"<":1==t?"^":2==t?"~":t>0?"=":"!=";for(var o=1,a=1;a<e.length;a++)o--,n+="u"==(typeof(l=e[a]))[0]?"-":(o>0?".":"")+(o=2,l);return n}var i=[];for(a=1;a<e.length;a++){var l=e[a];i.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?i.pop()+" "+i.pop():r(l))}return s();function s(){return i.pop().replace(/^\((.+)\)$/,"$1")}},t=(r,n)=>{if(0 in r){n=e(n);var o=r[0],a=o<0;a&&(o=-o-1);for(var i=0,l=1,s=!0;;l++,i++){var u,c,f=l<r.length?(typeof r[l])[0]:"";if(i>=n.length||"o"==(c=(typeof(u=n[i]))[0]))return!s||("u"==f?l>o&&!a:""==f!=a);if("u"==c){if(!s||"u"!=f)return!1}else if(s)if(f==c)if(l<=o){if(u!=r[l])return!1}else{if(a?u>r[l]:u<r[l])return!1;u!=r[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(a||l<=o)return!1;s=!1,l--}else{if(l<=o||c<f!=a)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var p=[],d=p.pop.bind(p);for(i=1;i<r.length;i++){var h=r[i];p.push(1==h?d()|d():2==h?d()&d():h?t(h,n):!d())}return!!d()},n=(r,t,n)=>{var o=n?(e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}))(r[t]):r[t];return Object.keys(o).reduce(((r,t)=>!r||!o[r].loaded&&((r,t)=>{r=e(r),t=e(t);for(var n=0;;){if(n>=r.length)return n<t.length&&"u"!=(typeof t[n])[0];var o=r[n],a=(typeof o)[0];if(n>=t.length)return"u"==a;var i=t[n],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&o!=i)return o<i;n++}})(r,t)?t:r),0)},o=(e,r,t)=>t?t():((e,r)=>(e=>{throw new Error(e)})("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),a=(e=>function(r,t,n,o,a){var l=i.I(r);return l&&l.then&&!n?l.then(e.bind(e,r,i.S[r],t,!1,o,a)):e(r,i.S[r],t,n,o,a)})(((e,a,l,s,u,c)=>{if(!((e,r)=>e&&i.o(e,r))(a,l))return o(e,l,c);var f,p,d=n(a,l,s);return t(u,d)||(p=((e,t,n,o)=>"Unsatisfied version "+n+" from "+(n&&e[t][n].from)+" of shared singleton module "+t+" (required "+r(o)+")")(a,l,d,u),"undefined"!=typeof console&&console.warn&&console.warn(p)),(f=a[l][d]).loaded=1,f.get()})),l={},s={5940:()=>a("default","@openmrs/esm-framework",!1,[0],(()=>Promise.all([i.e(803),i.e(686),i.e(777),i.e(343),i.e(339),i.e(277)]).then((()=>()=>i(1777))))),1343:()=>a("default","react",!1,[1,18],(()=>i.e(41).then((()=>()=>i(4041))))),2339:()=>a("default","react-i18next",!1,[1,16],(()=>i.e(336).then((()=>()=>i(6336))))),4818:()=>a("default","rxjs",!1,[1,6],(()=>i.e(457).then((()=>()=>i(2457))))),6372:()=>a("default","dayjs",!1,[1,1],(()=>i.e(464).then((()=>()=>i(3464))))),8877:()=>a("default","react-router-dom",!1,[1,6],(()=>i.e(913).then((()=>()=>i(2913)))))};[5940].forEach((e=>{i.m[e]=r=>{l[e]=0,delete i.c[e];var t=s[e]();if("function"!=typeof t)throw new Error("Shared module is not available for eager consumption: "+e);r.exports=t()}}));var u={277:[4818,6372,8877],339:[2339],343:[1343],792:[5940]},c={};i.f.consumes=(e,r)=>{i.o(u,e)&&u[e].forEach((e=>{if(i.o(l,e))return r.push(l[e]);if(!c[e]){var t=r=>{l[e]=0,i.m[e]=t=>{delete i.c[e],t.exports=r()}};c[e]=!0;var n=r=>{delete l[e],i.m[e]=t=>{throw delete i.c[e],r}};try{var o=s[e]();o.then?r.push(l[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))}})(),(()=>{var e={173:0,792:0};i.f.j=(r,t)=>{var n=i.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(277|339|343)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=i.p+i.u(r),l=new Error;i.l(a,(t=>{if(i.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;l.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",l.name="ChunkLoadError",l.type=o,l.request=a,n[1](l)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,l,s]=t,u=0;if(a.some((r=>0!==e[r]))){for(n in l)i.o(l,n)&&(i.m[n]=l[n]);s&&s(i)}for(r&&r(t);u<a.length;u++)o=a[u],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app=globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),i.nc=void 0,i(6173)})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _clinicemr_esm_post_registration_redirect_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,f,p,c,d,h,m,v,g,b,y,_,w={7132(e,r,t){var n={"./start":()=>t.e(173).then((()=>()=>t(6173)))},o=(e,r)=>(t.R=r,r=t.o(n,e)?n[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),a=(e,r)=>{if(t.S){var n="default",o=t.S[n];if(o&&o!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[n]=e,t.I(n,r)}};t.d(r,{get:()=>o,init:()=>a})}},S={};function j(e){var r=S[e];if(void 0!==r)return r.exports;var t=S[e]={id:e,exports:{}};return w[e].call(t.exports,t,t.exports,j),t.exports}j.m=w,j.c=S,j.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return j.d(r,{a:r}),r},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,j.t=function(t,n){if(1&n&&(t=this(t)),8&n)return t;if("object"==typeof t&&t){if(4&n&&t.__esModule)return t;if(16&n&&"function"==typeof t.then)return t}var o=Object.create(null);j.r(o);var a={};e=e||[null,r({}),r([]),r(r)];for(var i=2&n&&t;("object"==typeof i||"function"==typeof i)&&!~e.indexOf(i);i=r(i))Object.getOwnPropertyNames(i).forEach((e=>a[e]=()=>t[e]));return a.default=()=>t,j.d(o,a),o},j.d=(e,r)=>{for(var t in r)j.o(r,t)&&!j.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},j.f={},j.e=e=>Promise.all(Object.keys(j.f).reduce(((r,t)=>(j.f[t](e,r),r)),[])),j.u=e=>e+".js",j.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t={},n="@clinicemr/esm-post-registration-redirect-app:",j.l=(e,r,o,a)=>{if(t[e])t[e].push(r);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var f=s[u];if(f.getAttribute("src")==e||f.getAttribute("data-webpack")==n+o){i=f;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",j.nc&&i.setAttribute("nonce",j.nc),i.setAttribute("data-webpack",n+o),i.src=e),t[e]=[r];var p=(r,n)=>{i.onerror=i.onload=null,clearTimeout(c);var o=t[e];if(delete t[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},c=setTimeout(p.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=p.bind(null,i.onerror),i.onload=p.bind(null,i.onload),l&&document.head.appendChild(i)}},j.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{j.S={};var e={},r={};j.I=(t,n)=>{n||(n=[]);var o=r[t];if(o||(o=r[t]={}),!(n.indexOf(o)>=0)){if(n.push(o),e[t])return e[t];j.o(j.S,t)||(j.S[t]={});var a=j.S[t],i="@clinicemr/esm-post-registration-redirect-app",l=(e,r,t,n)=>{var o=a[e]=a[e]||{},l=o[r];(!l||!l.loaded&&(!n!=!l.eager?n:i>l.from))&&(o[r]={get:t,from:i,eager:!!n})},s=[];return"default"===t&&(l("@openmrs/esm-framework","9.0.3-pre.4643",(()=>Promise.all([j.e(803),j.e(686),j.e(777),j.e(343),j.e(339),j.e(277)]).then((()=>()=>j(1777))))),l("dayjs","1.11.13",(()=>j.e(464).then((()=>()=>j(3464))))),l("react-i18next","16.0.0",(()=>Promise.all([j.e(336),j.e(343)]).then((()=>()=>j(6336))))),l("react-router-dom","6.16.0",(()=>Promise.all([j.e(913),j.e(343)]).then((()=>()=>j(2913))))),l("react","18.3.1",(()=>j.e(41).then((()=>()=>j(4041))))),l("rxjs","6.6.7",(()=>j.e(457).then((()=>()=>j(2457)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var n=t.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=t[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=e})(),o=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),n=t[1]?r(t[1]):[];return t[2]&&(n.length++,n.push.apply(n,r(t[2]))),t[3]&&(n.push([]),n.push.apply(n,r(t[3]))),n},a=(e,r)=>{e=o(e),r=o(r);for(var t=0;;){if(t>=e.length)return t<r.length&&"u"!=(typeof r[t])[0];var n=e[t],a=(typeof n)[0];if(t>=r.length)return"u"==a;var i=r[t],l=(typeof i)[0];if(a!=l)return"o"==a&&"n"==l||"s"==l||"u"==a;if("o"!=a&&"u"!=a&&n!=i)return n<i;t++}},i=e=>{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var n=1,o=1;o<e.length;o++)n--,t+="u"==(typeof(l=e[o]))[0]?"-":(n>0?".":"")+(n=2,l);return t}var a=[];for(o=1;o<e.length;o++){var l=e[o];a.push(0===l?"not("+s()+")":1===l?"("+s()+" || "+s()+")":2===l?a.pop()+" "+a.pop():i(l))}return s();function s(){return a.pop().replace(/^\((.+)\)$/,"$1")}},l=(e,r)=>{if(0 in e){r=o(r);var t=e[0],n=t<0;n&&(t=-t-1);for(var a=0,i=1,s=!0;;i++,a++){var u,f,p=i<e.length?(typeof e[i])[0]:"";if(a>=r.length||"o"==(f=(typeof(u=r[a]))[0]))return!s||("u"==p?i>t&&!n:""==p!=n);if("u"==f){if(!s||"u"!=p)return!1}else if(s)if(p==f)if(i<=t){if(u!=e[i])return!1}else{if(n?u>e[i]:u<e[i])return!1;u!=e[i]&&(s=!1)}else if("s"!=p&&"n"!=p){if(n||i<=t)return!1;s=!1,i--}else{if(i<=t||f<p!=n)return!1;s=!1}else"s"!=p&&"n"!=p&&(s=!1,i--)}}var c=[],d=c.pop.bind(c);for(a=1;a<e.length;a++){var h=e[a];c.push(1==h?d()|d():2==h?d()&d():h?l(h,r):!d())}return!!d()},s=(e,r)=>e&&j.o(e,r),u=e=>(e.loaded=1,e.get()),f=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),p=(e,r,t)=>{var n=t?f(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},c=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+i(n)+")",d=e=>{throw new Error(e)},h=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},m=(e,r,t)=>t?t():((e,r)=>d("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),v=(e=>function(r,t,n,o,a){var i=j.I(r);return i&&i.then&&!n?i.then(e.bind(e,r,j.S[r],t,!1,o,a)):e(r,j.S[r],t,n,o,a)})(((e,r,t,n,o,a)=>{if(!s(r,t))return m(e,t,a);var i=p(r,t,n);return l(o,i)||h(c(r,t,i,o)),u(r[t][i])})),g={},b={1343:()=>v("default","react",!1,[1,18],(()=>j.e(41).then((()=>()=>j(4041))))),2339:()=>v("default","react-i18next",!1,[1,16],(()=>j.e(336).then((()=>()=>j(6336))))),4818:()=>v("default","rxjs",!1,[1,6],(()=>j.e(457).then((()=>()=>j(2457))))),6372:()=>v("default","dayjs",!1,[1,1],(()=>j.e(464).then((()=>()=>j(3464))))),8877:()=>v("default","react-router-dom",!1,[1,6],(()=>j.e(913).then((()=>()=>j(2913))))),5940:()=>v("default","@openmrs/esm-framework",!1,[0],(()=>Promise.all([j.e(803),j.e(686),j.e(777),j.e(343),j.e(339),j.e(277)]).then((()=>()=>j(1777)))))},y={173:[5940],277:[4818,6372,8877],339:[2339],343:[1343]},_={},j.f.consumes=(e,r)=>{j.o(y,e)&&y[e].forEach((e=>{if(j.o(g,e))return r.push(g[e]);if(!_[e]){var t=r=>{g[e]=0,j.m[e]=t=>{delete j.c[e],t.exports=r()}};_[e]=!0;var n=r=>{delete g[e],j.m[e]=t=>{throw delete j.c[e],r}};try{var o=b[e]();o.then?r.push(g[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}}))},(()=>{var e={571:0};j.f.j=(r,t)=>{var n=j.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(277|339|343)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=j.p+j.u(r),i=new Error;j.l(a,(t=>{if(j.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var o=t&&("load"===t.type?"missing":t.type),a=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+a+")",i.name="ChunkLoadError",i.type=o,i.request=a,n[1](i)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,o,[a,i,l]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in i)j.o(i,n)&&(j.m[n]=i[n]);l&&l(j)}for(r&&r(t);s<a.length;s++)o=a[s],j.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app=globalThis.webpackChunk_clinicemr_esm_post_registration_redirect_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),j.nc=void 0;var O=j(7132);_clinicemr_esm_post_registration_redirect_app=O})();
|