@openmrs/esm-primary-navigation-app 4.0.3-pre.390 → 4.0.3-pre.397

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.
@@ -1,30 +1,31 @@
1
- @openmrs/esm-primary-navigation-app:build: cache hit, replaying output 97bc43a975825824
2
- @openmrs/esm-primary-navigation-app:build: assets by chunk 230 KiB (id hint: vendors)
3
- @openmrs/esm-primary-navigation-app:build:  asset 788.js 130 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
4
- @openmrs/esm-primary-navigation-app:build:  asset 483.js 37.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
5
- @openmrs/esm-primary-navigation-app:build:  asset 787.js 27.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
6
- @openmrs/esm-primary-navigation-app:build:  asset 146.js 19.1 KiB [emitted] [minimized] (id hint: vendors)
7
- @openmrs/esm-primary-navigation-app:build:  asset 723.js 14.1 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
8
- @openmrs/esm-primary-navigation-app:build:  asset 414.js 737 bytes [emitted] [minimized] (id hint: vendors)
9
- @openmrs/esm-primary-navigation-app:build: + 11 assets
10
- @openmrs/esm-primary-navigation-app:build: orphan modules 3.72 MiB (javascript) 42 bytes (consume-shared) [orphan] 575 modules
11
- @openmrs/esm-primary-navigation-app:build: runtime modules 38.7 KiB 28 modules
12
- @openmrs/esm-primary-navigation-app:build: built modules 2.6 MiB (javascript) 210 bytes (share-init) 210 bytes (consume-shared) [built]
13
- @openmrs/esm-primary-navigation-app:build:  cacheable modules 2.6 MiB
14
- @openmrs/esm-primary-navigation-app:build:  modules by path ../../ 2.42 MiB 43 modules
15
- @openmrs/esm-primary-navigation-app:build:  modules by path ./ 183 KiB 18 modules
16
- @openmrs/esm-primary-navigation-app:build:  provide-module modules 210 bytes
17
- @openmrs/esm-primary-navigation-app:build:  provide shared module (default) @openmrs/esm-framework/src/internal@4.0.3-pre.390 = ../../framework/esm-framework/src/internal.ts 42 bytes [built] [code generated]
18
- @openmrs/esm-primary-navigation-app:build:  + 4 modules
19
- @openmrs/esm-primary-navigation-app:build:  consume-shared-module modules 210 bytes
20
- @openmrs/esm-primary-navigation-app:build:  modules by path consume shared module (default) @openmrs/ 84 bytes 2 modules
21
- @openmrs/esm-primary-navigation-app:build:  + 3 modules
22
- @openmrs/esm-primary-navigation-app:build:  container entry 42 bytes [built] [code generated]
23
- @openmrs/esm-primary-navigation-app:build:  ./translations/ lazy nonrecursive .json$ 160 bytes [built] [code generated]
24
- @openmrs/esm-primary-navigation-app:build: 
25
- @openmrs/esm-primary-navigation-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
26
- @openmrs/esm-primary-navigation-app:build: This can impact web performance.
27
- @openmrs/esm-primary-navigation-app:build: Assets:
28
- @openmrs/esm-primary-navigation-app:build:  889.js (419 KiB)
29
- @openmrs/esm-primary-navigation-app:build: 
30
- @openmrs/esm-primary-navigation-app:build: webpack 5.74.0 compiled with 1 warning in 91643 ms
1
+ @openmrs/esm-primary-navigation-app:build: cache hit, replaying output e01701d51930b6c1
2
+ @openmrs/esm-primary-navigation-app:build: assets by chunk 249 KiB (id hint: vendors)
3
+ @openmrs/esm-primary-navigation-app:build:  asset 788.js 130 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
4
+ @openmrs/esm-primary-navigation-app:build:  asset 483.js 37.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
5
+ @openmrs/esm-primary-navigation-app:build:  asset 787.js 27.8 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
6
+ @openmrs/esm-primary-navigation-app:build:  asset 710.js 19.5 KiB [emitted] [minimized] (id hint: vendors)
7
+ @openmrs/esm-primary-navigation-app:build:  asset 146.js 19.1 KiB [emitted] [minimized] (id hint: vendors)
8
+ @openmrs/esm-primary-navigation-app:build:  asset 723.js 14.1 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
9
+ @openmrs/esm-primary-navigation-app:build:  asset 414.js 737 bytes [emitted] [minimized] (id hint: vendors)
10
+ @openmrs/esm-primary-navigation-app:build: + 11 assets
11
+ @openmrs/esm-primary-navigation-app:build: orphan modules 3.7 MiB (javascript) 42 bytes (consume-shared) [orphan] 574 modules
12
+ @openmrs/esm-primary-navigation-app:build: runtime modules 38.7 KiB 28 modules
13
+ @openmrs/esm-primary-navigation-app:build: built modules 2.61 MiB (javascript) 210 bytes (share-init) 210 bytes (consume-shared) [built]
14
+ @openmrs/esm-primary-navigation-app:build:  cacheable modules 2.6 MiB
15
+ @openmrs/esm-primary-navigation-app:build:  modules by path ../../ 2.44 MiB 44 modules
16
+ @openmrs/esm-primary-navigation-app:build:  modules by path ./ 164 KiB 18 modules
17
+ @openmrs/esm-primary-navigation-app:build:  provide-module modules 210 bytes
18
+ @openmrs/esm-primary-navigation-app:build:  provide shared module (default) @openmrs/esm-framework/src/internal@4.0.3-pre.397 = ../../framework/esm-framework/src/internal.ts 42 bytes [built] [code generated]
19
+ @openmrs/esm-primary-navigation-app:build:  + 4 modules
20
+ @openmrs/esm-primary-navigation-app:build:  consume-shared-module modules 210 bytes
21
+ @openmrs/esm-primary-navigation-app:build:  modules by path consume shared module (default) @openmrs/ 84 bytes 2 modules
22
+ @openmrs/esm-primary-navigation-app:build:  + 3 modules
23
+ @openmrs/esm-primary-navigation-app:build:  container entry 42 bytes [built] [code generated]
24
+ @openmrs/esm-primary-navigation-app:build:  ./translations/ lazy nonrecursive .json$ 160 bytes [built] [code generated]
25
+ @openmrs/esm-primary-navigation-app:build: 
26
+ @openmrs/esm-primary-navigation-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
27
+ @openmrs/esm-primary-navigation-app:build: This can impact web performance.
28
+ @openmrs/esm-primary-navigation-app:build: Assets:
29
+ @openmrs/esm-primary-navigation-app:build:  889.js (419 KiB)
30
+ @openmrs/esm-primary-navigation-app:build: 
31
+ @openmrs/esm-primary-navigation-app:build: webpack 5.74.0 compiled with 1 warning in 88595 ms
package/dist/34.js ADDED
@@ -0,0 +1 @@
1
+ (self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[34],{6639:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>s,genericLinkConfigSchema:()=>a});var r=t(5776),o=t.n(r),i=t(4610),a={title:{_default:"New Link",_type:i.Type.String},target:{_default:"#",_type:i.Type.String,_description:"The URL to link to.",_validators:[i.validators.isUrl]}};function s(){var e=(0,i.useConfig)();return o().createElement(i.ConfigurableLink,{to:e.target},e.title)}},1217:(e,n,t)=>{"use strict";t.d(n,{O:()=>r,e:()=>o});var r="user-property-change",o="@openmrs/esm-primary-navigation-app"},8034:(e,n,t)=>{"use strict";t.r(n),t.d(n,{backendDependencies:()=>x,importTranslation:()=>P,setupOpenMRS:()=>C,version:()=>O});var r=t(4610),o=t(8478),i=t(1217);function a(e,n,t,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void t(e)}s.done?n(l):Promise.resolve(l).then(r,o)}function s(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function s(e){a(i,r,o,s,l,"next",e)}function l(e){a(i,r,o,s,l,"throw",e)}s(void 0)}))}}var l=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function u(e,n,t){return c.apply(this,arguments)}function c(){return(c=s((function(e,n,t){var r,i;return l(this,(function(a){switch(a.label){case 0:return[4,(0,o.getSessionLocation)()];case 1:return r=a.sent(),i=null==r?void 0:r.uuid,[4,(0,o.openmrsFetch)("/ws/rest/v1/user/".concat(e),{method:"POST",body:{userProperties:n},headers:{"Content-Type":"application/json"},signal:t.signal})];case 2:return a.sent(),i?[4,(0,o.setSessionLocation)(i,t)]:[3,4];case 3:a.sent(),a.label=4;case 4:return[2]}}))}))).apply(this,arguments)}function p(e,n){return f.apply(this,arguments)}function f(){return(f=s((function(e,n){return l(this,(function(t){switch(t.label){case 0:return[4,(0,o.openmrsFetch)("/ws/rest/v1/session",{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:n.signal})];case 1:return t.sent(),[2]}}))}))).apply(this,arguments)}function y(e,n){return(0,o.queueSynchronizationItemFor)(e,i.O,n,{displayName:"User Language Change"})}var d={logo:{src:{_type:r.Type.String,_default:null,_description:"A path or URL to an image. Defaults to the OpenMRS SVG sprite."},alt:{_type:r.Type.String,_default:"Logo",_description:"Alt text, shown on hover"},name:{_type:r.Type.String,_default:null,_description:"The organization name displayed when image is absent"}},externalRefLinks:{_type:r.Type.Array,_elements:{title:{_type:r.Type.String,_description:"Title of the link"},redirect:{_type:r.Type.String,_description:"Link to redirect to (must be an external link)",_validators:[r.validators.isUrl]}},_default:[],_description:"The external links to be showcased in the app menu"}};function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function m(e,n,t,r,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void t(e)}s.done?n(l):Promise.resolve(l).then(r,o)}function v(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var i=e.apply(n,t);function a(e){m(i,r,o,a,s,"next",e)}function s(e){m(i,r,o,a,s,"throw",e)}a(void 0)}))}}function b(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],a=!0,s=!1;try{for(t=t.call(e);!(a=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==t.return||t.return()}finally{if(s)throw o}}return i}}(e,n)||w(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,n){if(e){if("string"==typeof e)return h(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}var S=function(e,n){var t,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(t)throw new TypeError("Generator is already executing.");for(;a;)try{if(t=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(e,a)}catch(e){i=[6,e],r=0}finally{t=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function _(e,n){return k.apply(this,arguments)}function k(){return k=v((function(e,n){var t,r,i,a;return S(this,(function(e){switch(e.label){case 0:return 0!==n.index?[3,3]:[4,(0,o.getLoggedInUser)()];case 1:return r=e.sent(),i=n.items.map((function(e){var n=b(e,2);return n[0],n[1]})),a=(t=Object).assign.apply(t,[{},r.userProperties].concat(g(i))),[4,u(r.uuid,a,n.abort)];case 2:e.sent(),(0,o.refetchCurrentUser)(),e.label=3;case 3:return[2]}}))})),k.apply(this,arguments)}var T=t(3710),L=t(6639),O="4.0.3-pre.397",P=t(3979),x={"webservices.rest":"^2.2.0"},A={featureName:"primary navigation",moduleName:i.e};function C(){return(0,r.defineConfigSchema)(i.e,d),(0,r.defineExtensionConfigSchema)("link",L.genericLinkConfigSchema),(0,r.setupOfflineSync)(i.O,[],_),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([t.e(483),t.e(414),t.e(723),t.e(680),t.e(656)]).then(t.bind(t,3656))}),A),route:function(e){return!e.pathname.startsWith(window.getOpenmrsSpaBase()+"login")},online:!0,offline:!0,order:0},{load:{bootstrap:function(){return Promise.resolve((0,T.UO)(window.getOpenmrsSpaBase()+"home"))},mount:function(){return Promise.resolve()},unmount:function(){return Promise.resolve()}},route:function(e){return e.pathname===window.getOpenmrsSpaBase()},order:0}],extensions:[{name:"default-user-panel",slot:"user-panel-slot",order:0,load:(0,r.getAsyncLifecycle)((function(){return Promise.all([t.e(483),t.e(414),t.e(473)]).then(t.bind(t,3473))}),A),online:!0,offline:!0},{name:"change-locale",slot:"user-panel-slot",order:1,load:(0,r.getAsyncLifecycle)((function(){return Promise.all([t.e(483),t.e(680),t.e(98)]).then(t.bind(t,5098))}),A),online:{postUserProperties:u,postSessionLocale:p},offline:{postUserProperties:y,postSessionLocale:function(){return Promise.resolve({})}}},{name:"link",load:(0,r.getAsyncLifecycle)((function(){return Promise.resolve().then(t.bind(t,6639))}),{featureName:"Link",moduleName:i.e})}]}}},3979:(e,n,t)=>{var r={"./en.json":[3574,574]};function o(e){if(!t.o(r,e))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=r[e],o=n[0];return t.e(n[1]).then((()=>t(o)))}o.keys=()=>Object.keys(r),o.id=3979,e.exports=o}}]);
package/dist/710.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[710],{3710:(t,n,e)=>{e.d(n,{UO:()=>ot});var r=Object.freeze({__proto__:null,get start(){return Gt},get ensureJQuerySupport(){return ht},get setBootstrapMaxTime(){return Q},get setMountMaxTime(){return V},get setUnmountMaxTime(){return q},get setUnloadMaxTime(){return z},get registerApplication(){return At},get unregisterApplication(){return Nt},get getMountedApps(){return Pt},get getAppStatus(){return Tt},get unloadApplication(){return St},get checkActivityFunctions(){return _t},get getAppNames(){return bt},get pathToActiveWhen(){return jt},get navigateToUrl(){return ot},get triggerAppChange(){return It},get addErrorHandler(){return f},get removeErrorHandler(){return l},get mountRootParcel(){return $},get NOT_LOADED(){return m},get LOADING_SOURCE_CODE(){return v},get NOT_BOOTSTRAPPED(){return d},get BOOTSTRAPPING(){return w},get NOT_MOUNTED(){return g},get MOUNTING(){return E},get UPDATING(){return O},get LOAD_ERROR(){return b},get MOUNTED(){return y},get UNMOUNTING(){return P},get SKIP_BECAUSE_BROKEN(){return T}});function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var u=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{}).CustomEvent,a=function(){try{var t=new u("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?u:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(t,!1,!1,void 0),e}:function(t,n){var e=document.createEventObject();return e.type=t,n?(e.bubbles=Boolean(n.bubbles),e.cancelable=Boolean(n.cancelable),e.detail=n.detail):(e.bubbles=!1,e.cancelable=!1,e.detail=void 0),e},c=[];function s(t,n,e){var r=h(t,n,e);c.length?c.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function f(t){if("function"!=typeof t)throw Error(p(28,!1));c.push(t)}function l(t){if("function"!=typeof t)throw Error(p(29,!1));var n=!1;return c=c.filter((function(e){var r=e===t;return n=n||r,!r})),n}function p(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(n?n+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function h(t,n,e){var r,o="".concat(U(n)," '").concat(N(n),"' died in status ").concat(n.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(p(30,!1,n.status,N(n)));try{r=Error(o+JSON.stringify(t))}catch(n){r=t}}return r.appOrParcelName=N(n),n.status=e,r}var m="NOT_LOADED",v="LOADING_SOURCE_CODE",d="NOT_BOOTSTRAPPED",w="BOOTSTRAPPING",g="NOT_MOUNTED",E="MOUNTING",y="MOUNTED",O="UPDATING",P="UNMOUNTING",b="LOAD_ERROR",T="SKIP_BECAUSE_BROKEN";function A(t){return t.status===y}function _(t){try{return t.activeWhen(window.location)}catch(n){return s(n,t,T),!1}}function N(t){return t.name}function S(t){return Boolean(t.unmountThisParcel)}function U(t){return S(t)?"parcel":"application"}function D(){for(var t=arguments.length-1;t>0;t--)for(var n in arguments[t])"__proto__"!==n&&(arguments[t-1][n]=arguments[t][n]);return arguments[0]}function j(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e];return null}function M(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!j(n,(function(t){return"function"!=typeof t}))));var n}function L(t,n){var e=t[n]||[];0===(e=Array.isArray(e)?e:[e]).length&&(e=[function(){return Promise.resolve()}]);var r=U(t),o=N(t);return function(t){return e.reduce((function(e,i,u){return e.then((function(){var e=i(t);return R(e)?e:Promise.reject(p(15,!1,r,o,n,u))}))}),Promise.resolve())}}function R(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function I(t,n){return Promise.resolve().then((function(){return t.status!==d?t:(t.status=w,t.bootstrap?X(t,"bootstrap").then(e).catch((function(e){if(n)throw h(e,t,T);return s(e,t,T),t})):Promise.resolve().then(e))}));function e(){return t.status=g,t}}function x(t,n){return Promise.resolve().then((function(){if(t.status!==y)return t;t.status=P;var e=Object.keys(t.parcels).map((function(n){return t.parcels[n].unmountThisParcel()}));return Promise.all(e).then(r,(function(e){return r().then((function(){var r=Error(e.message);if(n)throw h(r,t,T);s(r,t,T)}))})).then((function(){return t}));function r(){return X(t,"unmount").then((function(){t.status=g})).catch((function(e){if(n)throw h(e,t,T);s(e,t,T)}))}}))}var C=!1,B=!1;function G(t,n){return Promise.resolve().then((function(){return t.status!==g?t:(C||(window.dispatchEvent(new a("single-spa:before-first-mount")),C=!0),X(t,"mount").then((function(){return t.status=y,B||(window.dispatchEvent(new a("single-spa:first-mount")),B=!0),t})).catch((function(e){return t.status=y,x(t,!0).then(r,r);function r(){if(n)throw h(e,t,T);return s(e,t,T),t}})))}))}var W=0,k={parcels:{}};function $(){return K.apply(k,arguments)}function K(t,n){var e=this;if(!t||"object"!==o(t)&&"function"!=typeof t)throw Error(p(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(p(3,!1,o(t.name)));if("object"!==o(n))throw Error(p(4,!1,name,o(n)));if(!n.domElement)throw Error(p(5,!1,name));var r,i=W++,u="function"==typeof t,a=u?t:function(){return Promise.resolve(t)},c={id:i,parcels:{},status:u?v:d,customProps:n,parentName:N(e),unmountThisParcel:function(){return w.then((function(){if(c.status!==y)throw Error(p(6,!1,name,c.status));return x(c,!0)})).then((function(t){return c.parentName&&delete e.parcels[c.id],t})).then((function(t){return f(t),t})).catch((function(t){throw c.status=T,l(t),t}))}};e.parcels[i]=c;var s=a();if(!s||"function"!=typeof s.then)throw Error(p(7,!1));var f,l,m=(s=s.then((function(t){if(!t)throw Error(p(8,!1));var n=t.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!M(t.bootstrap))throw Error(p(9,!1,n));if(!M(t.mount))throw Error(p(10,!1,n));if(!M(t.unmount))throw Error(p(11,!1,n));if(t.update&&!M(t.update))throw Error(p(12,!1,n));var e=L(t,"bootstrap"),o=L(t,"mount"),u=L(t,"unmount");c.status=d,c.name=n,c.bootstrap=e,c.mount=o,c.unmount=u,c.timeouts=Y(t.timeouts),t.update&&(c.update=L(t,"update"),r.update=function(t){return c.customProps=t,F(function(t){return Promise.resolve().then((function(){if(t.status!==y)throw Error(p(32,!1,N(t)));return t.status=O,X(t,"update").then((function(){return t.status=y,t})).catch((function(n){throw h(n,t,T)}))}))}(c))})}))).then((function(){return I(c,!0)})),w=m.then((function(){return G(c,!0)})),E=new Promise((function(t,n){f=t,l=n}));return r={mount:function(){return F(Promise.resolve().then((function(){if(c.status!==g)throw Error(p(13,!1,name,c.status));return e.parcels[i]=c,G(c)})))},unmount:function(){return F(c.unmountThisParcel())},getStatus:function(){return c.status},loadPromise:F(s),bootstrapPromise:F(m),mountPromise:F(w),unmountPromise:F(E)}}function F(t){return t.then((function(){return null}))}function J(t){var n=N(t),e="function"==typeof t.customProps?t.customProps(n,window.location):t.customProps;("object"!==o(e)||null===e||Array.isArray(e))&&(e={},console.warn(p(40,!1),n,e));var i=D({},e,{name:n,mountParcel:K.bind(t),singleSpa:r});return S(t)&&(i.unmountSelf=t.unmountThisParcel),i}var H={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function Q(t,n,e){if("number"!=typeof t||t<=0)throw Error(p(16,!1));H.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function V(t,n,e){if("number"!=typeof t||t<=0)throw Error(p(17,!1));H.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function q(t,n,e){if("number"!=typeof t||t<=0)throw Error(p(18,!1));H.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function z(t,n,e){if("number"!=typeof t||t<=0)throw Error(p(19,!1));H.unload={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function X(t,n){var e=t.timeouts[n],r=e.warningMillis,o=U(t);return new Promise((function(i,u){var a=!1,c=!1;t[n](J(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),e.millis);var s=p(31,!1,n,o,N(t),e.millis);function f(t){if(!a)if(!0===t)c=!0,e.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var n=t,o=n*r;console.warn(s),o+r<e.millis&&setTimeout((function(){return f(n+1)}),r)}}}))}function Y(t){var n={};for(var e in H)n[e]=D({},H[e],t&&t[e]||{});return n}function Z(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==m&&t.status!==b?t:(t.status=v,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(J(t));if(!R(r))throw e=!0,Error(p(33,!1,N(t)));return r.then((function(e){var r;t.loadErrorTime=null,"object"!==o(n=e)&&(r=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!M(n.bootstrap)&&(r=35),M(n.mount)||(r=36),M(n.unmount)||(r=37);var i=U(n);if(r){var u;try{u=JSON.stringify(n)}catch(t){}return console.error(p(r,!1,i,N(t),u),n),s(void 0,t,T),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=D({},t.devtools.overlays,n.devtools.overlays)),t.status=d,t.bootstrap=L(n,"bootstrap"),t.mount=L(n,"mount"),t.unmount=L(n,"unmount"),t.unload=L(n,"unload"),t.timeouts=Y(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var r;return delete t.loadPromise,e?r=T:(r=b,t.loadErrorTime=(new Date).getTime()),s(n,t,r),t})));var n,e}))}var tt,nt="undefined"!=typeof window,et={hashchange:[],popstate:[]},rt=["hashchange","popstate"];function ot(t){var n;if("string"==typeof t)n=t;else if(this&&this.href)n=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(p(14,!1));n=t.currentTarget.href,t.preventDefault()}var e=lt(window.location.href),r=lt(n);0===n.indexOf("#")?window.location.hash=r.hash:e.host!==r.host&&r.host?window.location.href=n:r.pathname===e.pathname&&r.search===e.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function it(t){var n=this;if(t){var e=t[0].type;rt.indexOf(e)>=0&&et[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function ut(){xt([],arguments)}function at(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return tt&&e===o||(Wt()?window.dispatchEvent(ct(window.history.state,n)):xt([])),r}}function ct(t,n){var e;try{e=new PopStateEvent("popstate",{state:t})}catch(n){(e=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return e.singleSpa=!0,e.singleSpaTrigger=n,e}if(nt){window.addEventListener("hashchange",ut),window.addEventListener("popstate",ut);var st=window.addEventListener,ft=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&rt.indexOf(t)>=0)||j(et[t],(function(t){return t===n})))return st.apply(this,arguments);et[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&rt.indexOf(t)>=0))return ft.apply(this,arguments);et[t]=et[t].filter((function(t){return t!==n}))},window.history.pushState=at(window.history.pushState,"pushState"),window.history.replaceState=at(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=ot}function lt(t){var n=document.createElement("a");return n.href=t,n}var pt=!1;function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!pt){var n=t.fn.on,e=t.fn.off;t.fn.on=function(t,e){return mt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return mt.call(this,e,window.removeEventListener,t,n,arguments)},pt=!0}}function mt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){rt.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var vt={};function dt(t){return Promise.resolve().then((function(){var n=vt[N(t)];if(!n)return t;if(t.status===m)return wt(t,n),t;if("UNLOADING"===t.status)return n.promise.then((function(){return t}));if(t.status!==g&&t.status!==b)return t;var e=t.status===b?Promise.resolve():X(t,"unload");return t.status="UNLOADING",e.then((function(){return wt(t,n),t})).catch((function(e){return function(t,n,e){delete vt[N(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,s(e,t,T),n.reject(e)}(t,n,e),t}))}))}function wt(t,n){delete vt[N(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=m,n.resolve()}function gt(t,n,e,r){vt[N(t)]={app:t,resolve:e,reject:r},Object.defineProperty(vt[N(t)],"promise",{get:n})}function Et(t){return vt[t]}var yt=[];function Ot(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return yt.forEach((function(i){var u=i.status!==T&&_(i);switch(i.status){case b:u&&o-i.loadErrorTime>=200&&e.push(i);break;case m:case v:u&&e.push(i);break;case d:case g:!u&&Et(N(i))?t.push(i):u&&r.push(i);break;case y:u||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function Pt(){return yt.filter(A).map(N)}function bt(){return yt.map(N)}function Tt(t){var n=j(yt,(function(n){return N(n)===t}));return n?n.status:null}function At(t,n,e,r){var i=function(t,n,e,r){var i,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===o(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(p(39,!1));var n=["name","app","activeWhen","customProps"],e=Object.keys(t).reduce((function(t,e){return n.indexOf(e)>=0?t:t.concat(e)}),[]);if(0!==e.length)throw Error(p(38,!1,n.join(", "),e.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(p(20,!1));if("object"!==o(t.app)&&"function"!=typeof t.app)throw Error(p(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(p(24,!1));if(!Dt(t.customProps))throw Error(p(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,n,e,r){if("string"!=typeof t||0===t.length)throw Error(p(20,!1));if(!n)throw Error(p(23,!1));if("function"!=typeof e)throw Error(p(24,!1));if(!Dt(r))throw Error(p(22,!1))}(t,n,e,r),u.name=t,u.loadApp=n,u.activeWhen=e,u.customProps=r),u.loadApp="function"!=typeof(i=u.loadApp)?function(){return Promise.resolve(i)}:i,u.customProps=function(t){return t||{}}(u.customProps),u.activeWhen=function(t){var n=Array.isArray(t)?t:[t];return n=n.map((function(t){return"function"==typeof t?t:jt(t)})),function(t){return n.some((function(n){return n(t)}))}}(u.activeWhen),u}(t,n,e,r);if(-1!==bt().indexOf(i.name))throw Error(p(21,!1,i.name));yt.push(D({loadErrorTime:null,status:m,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),nt&&(ht(),xt())}function _t(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return yt.filter((function(n){return n.activeWhen(t)})).map(N)}function Nt(t){if(0===yt.filter((function(n){return N(n)===t})).length)throw Error(p(25,!1,t));return St(t).then((function(){var n=yt.map(N).indexOf(t);yt.splice(n,1)}))}function St(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(p(26,!1));var e=j(yt,(function(n){return N(n)===t}));if(!e)throw Error(p(27,!1,t));var r,o=Et(N(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){gt(e,(function(){return i}),t,n)}));return i}return o?(r=o.promise,Ut(e,o.resolve,o.reject)):r=new Promise((function(t,n){gt(e,(function(){return r}),t,n),Ut(e,t,n)})),r}function Ut(t,n,e){x(t).then(dt).then((function(){n(),setTimeout((function(){xt()}))})).catch(e)}function Dt(t){return!t||"function"==typeof t||"object"===o(t)&&null!==t&&!Array.isArray(t)}function jt(t,n){var e=function(t,n){var e=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)n&&(o+="$");else{var a=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,e=i}}(t,n);return function(t){var n=t.origin;n||(n="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(n,"").replace(t.search,"").split("?")[0];return e.test(r)}}var Mt=!1,Lt=[],Rt=nt&&window.location.href;function It(){return xt()}function xt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(Mt)return new Promise((function(t,e){Lt.push({resolve:t,reject:e,eventArguments:n})}));var e,r=Ot(),o=r.appsToUnload,u=r.appsToUnmount,c=r.appsToLoad,s=r.appsToMount,f=!1,l=Rt,p=Rt=window.location.href;return Wt()?(Mt=!0,e=o.concat(c,u,s),d()):(e=c,v());function h(){f=!0}function v(){return Promise.resolve().then((function(){var t=c.map(Z);return Promise.all(t).then(E).then((function(){return[]})).catch((function(t){throw E(),t}))}))}function d(){return Promise.resolve().then((function(){if(window.dispatchEvent(new a(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",O(!0))),window.dispatchEvent(new a("single-spa:before-routing-event",O(!0,{cancelNavigation:h}))),f)return window.dispatchEvent(new a("single-spa:before-mount-routing-event",O(!0))),w(),void ot(l);var n=o.map(dt),r=u.map(x).map((function(t){return t.then(dt)})).concat(n),i=Promise.all(r);i.then((function(){window.dispatchEvent(new a("single-spa:before-mount-routing-event",O(!0)))}));var p=c.map((function(t){return Z(t).then((function(t){return Ct(t,i)}))})),m=s.filter((function(t){return c.indexOf(t)<0})).map((function(t){return Ct(t,i)}));return i.catch((function(t){throw E(),t})).then((function(){return E(),Promise.all(p.concat(m)).catch((function(n){throw t.forEach((function(t){return t.reject(n)})),n})).then(w)}))}))}function w(){var n=Pt();t.forEach((function(t){return t.resolve(n)}));try{var r=0===e.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new a(r,O())),window.dispatchEvent(new a("single-spa:routing-event",O()))}catch(t){setTimeout((function(){throw t}))}if(Mt=!1,Lt.length>0){var o=Lt;Lt=[],xt(o)}return n}function E(){t.forEach((function(t){it(t.eventArguments)})),it(n)}function O(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1?arguments[1]:void 0,h={},v=(i(t={},y,[]),i(t,g,[]),i(t,m,[]),i(t,T,[]),t);r?(c.concat(s).forEach((function(t,n){w(t,y)})),o.forEach((function(t){w(t,m)})),u.forEach((function(t){w(t,g)}))):e.forEach((function(t){w(t)}));var d={detail:{newAppStatuses:h,appsByNewStatus:v,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:l,newUrl:p,navigationIsCanceled:f}};return a&&D(d.detail,a),d;function w(t,n){var e=N(t);n=n||Tt(e),h[e]=n,(v[n]=v[n]||[]).push(e)}}}function Ct(t,n){return _(t)?I(t).then((function(t){return n.then((function(){return _(t)?G(t):t}))})):n.then((function(){return t}))}var Bt=!1;function Gt(t){var n;Bt=!0,t&&t.urlRerouteOnly&&(n=t.urlRerouteOnly,tt=n),nt&&xt()}function Wt(){return Bt}nt&&setTimeout((function(){Bt||console.warn(p(1,!1))}),5e3);var kt={getRawAppData:function(){return[].concat(yt)},reroute:xt,NOT_LOADED:m,toLoadPromise:Z,toBootstrapPromise:I,unregisterApplication:Nt};nt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=kt)}}]);
package/dist/98.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[98],{1580:(e,n,r)=>{r.d(n,{Z:()=>i});var t=r(361),a=r.n(t)()((function(e){return e[1]}));a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-primary-navigation__change-locale__productiveHeading01___rVgzW,.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul button{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-primary-navigation__change-locale__productiveHeading02___7hPTk{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-primary-navigation__change-locale__bodyLong01___ufII4,.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-primary-navigation__change-locale__headerPanel___C5vQq{height:max-content}.-esm-primary-navigation__change-locale__primaryNavContainer___zClGn{height:var(--omrs-topnav-height)}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX{display:flex;flex-direction:column;padding:.5rem}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX label{color:#c6c6c6}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul button{width:100%;background-color:var(--brand-02)}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div button{color:#78a9ff;margin-left:.5rem;width:5rem}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div button:hover{background-color:#005d5d;background-color:var(--brand-01);color:#78a9ff}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX hr{background-color:#fff;width:18rem;margin:.5rem 0rem}",""]),a.locals={productiveHeading01:"-esm-primary-navigation__change-locale__productiveHeading01___rVgzW",switcherContainer:"-esm-primary-navigation__change-locale__switcherContainer___gmOBX",productiveHeading02:"-esm-primary-navigation__change-locale__productiveHeading02___7hPTk",bodyLong01:"-esm-primary-navigation__change-locale__bodyLong01___ufII4",headerPanel:"-esm-primary-navigation__change-locale__headerPanel___C5vQq",primaryNavContainer:"-esm-primary-navigation__change-locale__primaryNavContainer___zClGn"};const i=a},5098:(e,n,r)=>{r.r(n),r.d(n,{default:()=>j});var t=r(5776),a=r.n(t),i=r(487),o=r.n(i),c=r(631),l=r.n(c),_=r(2052),s=r.n(_),g=r(4010),m=r.n(g),u=r(1469),d=r.n(u),p=r(9329),h=r.n(p),v=r(1580),f={};f.styleTagTransform=h(),f.setAttributes=m(),f.insert=s().bind(null,"head"),f.domAPI=l(),f.insertStyleElement=d(),o()(v.Z,f);const y=v.Z&&v.Z.locals?v.Z.locals:void 0;var b=r(5045),w=r(4610),O=r(2680);function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function P(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const j=function(e){var n,r,i=e.allowedLocales,o=e.user,c=e.postUserProperties,l=(0,O.useTranslation)().t,_=(n=(0,t.useState)(o.userProperties),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,a,i=[],o=!0,c=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(i.push(t.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(c)throw a}}return i}}(n,r)||function(e,n){if(e){if("string"==typeof e)return C(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=_[0],g=_[1],m=null==i?void 0:i.map((function(e){return a().createElement(b.QlF,{text:e,value:e,key:e})}));return(0,t.useEffect)((function(){if(o.userProperties.defaultLocale!==s.defaultLocale){var e=new AbortController;return c(o.uuid,s,e),function(){return e.abort()}}}),[s]),a().createElement("div",{className:"omrs-margin-12 ".concat(y.switcherContainer)},a().createElement(b.PhF,{name:"selectLocale",id:"selectLocale",invalidText:"A valid locale value is required",labelText:l("selectLocale","Select locale"),onChange:function(e){return g((n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){P(e,n,r[n])}))}return e}({},s),r=null!=(r={defaultLocale:e.target.value})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r},onClick:function(e){return e.stopPropagation()},value:s.defaultLocale},m),a().createElement(w.ExtensionSlot,{name:"user-panel-actions-slot"}))}}}]);
1
+ "use strict";(self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[98],{1580:(e,n,r)=>{r.d(n,{Z:()=>i});var t=r(361),a=r.n(t)()((function(e){return e[1]}));a.push([e.id,":root{--brand-01: #005d5d;--brand-02: #004144;--brand-03: #007d79}.-esm-primary-navigation__change-locale__productiveHeading01___rVgzW,.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul button{font-size:var(--cds-heading-compact-01-font-size, 0.875rem);font-weight:var(--cds-heading-compact-01-font-weight, 600);line-height:var(--cds-heading-compact-01-line-height, 1.28572);letter-spacing:var(--cds-heading-compact-01-letter-spacing, 0.16px)}.-esm-primary-navigation__change-locale__productiveHeading02___7hPTk{font-size:var(--cds-heading-compact-02-font-size, 1rem);font-weight:var(--cds-heading-compact-02-font-weight, 600);line-height:var(--cds-heading-compact-02-line-height, 1.375);letter-spacing:var(--cds-heading-compact-02-letter-spacing, 0)}.-esm-primary-navigation__change-locale__bodyLong01___ufII4,.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div{font-size:var(--cds-body-01-font-size, 0.875rem);font-weight:var(--cds-body-01-font-weight, 400);line-height:var(--cds-body-01-line-height, 1.42857);letter-spacing:var(--cds-body-01-letter-spacing, 0.16px)}.-esm-primary-navigation__change-locale__headerPanel___C5vQq{height:max-content}.-esm-primary-navigation__change-locale__primaryNavContainer___zClGn{height:var(--omrs-topnav-height)}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX{display:flex;flex-direction:column;padding:.5rem}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX label{color:#c6c6c6}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul button{width:100%;background-color:var(--brand-02)}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div{display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div button{color:#78a9ff;margin-left:.5rem;width:5rem}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX ul div button:hover{background-color:#005d5d;background-color:var(--brand-01);color:#78a9ff}.-esm-primary-navigation__change-locale__switcherContainer___gmOBX hr{background-color:#fff;width:18rem;margin:.5rem 0rem}",""]),a.locals={productiveHeading01:"-esm-primary-navigation__change-locale__productiveHeading01___rVgzW",switcherContainer:"-esm-primary-navigation__change-locale__switcherContainer___gmOBX",productiveHeading02:"-esm-primary-navigation__change-locale__productiveHeading02___7hPTk",bodyLong01:"-esm-primary-navigation__change-locale__bodyLong01___ufII4",headerPanel:"-esm-primary-navigation__change-locale__headerPanel___C5vQq",primaryNavContainer:"-esm-primary-navigation__change-locale__primaryNavContainer___zClGn"};const i=a},5098:(e,n,r)=>{r.r(n),r.d(n,{default:()=>j});var t=r(5776),a=r.n(t),i=r(487),o=r.n(i),c=r(631),l=r.n(c),_=r(2052),s=r.n(_),g=r(4010),m=r.n(g),u=r(1469),d=r.n(u),p=r(9329),h=r.n(p),f=r(1580),v={};v.styleTagTransform=h(),v.setAttributes=m(),v.insert=s().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=d(),o()(f.Z,v);const y=f.Z&&f.Z.locals?f.Z.locals:void 0;var b=r(5045),w=r(4610),O=r(2680);function C(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,t=new Array(n);r<n;r++)t[r]=e[r];return t}function P(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}const j=function(e){var n,r,i=e.allowedLocales,o=e.user,c=e.postUserProperties,l=e.postSessionLocale,_=(0,O.useTranslation)().t,s=(n=(0,t.useState)(o.userProperties),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var t,a,i=[],o=!0,c=!1;try{for(r=r.call(e);!(o=(t=r.next()).done)&&(i.push(t.value),!n||i.length!==n);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==r.return||r.return()}finally{if(c)throw a}}return i}}(n,r)||function(e,n){if(e){if("string"==typeof e)return C(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,n):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=s[0],m=s[1],u=null==i?void 0:i.map((function(e){return a().createElement(b.QlF,{text:e,value:e,key:e})}));return(0,t.useEffect)((function(){if(o.userProperties.defaultLocale!==g.defaultLocale){var e=new AbortController;return c(o.uuid,g,e),l(g.defaultLocale,e),function(){return e.abort()}}}),[g,c,l]),a().createElement("div",{className:"omrs-margin-12 ".concat(y.switcherContainer)},a().createElement(b.PhF,{name:"selectLocale",id:"selectLocale",invalidText:"A valid locale value is required",labelText:_("selectLocale","Select locale"),onChange:function(e){return m((n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),t.forEach((function(n){P(e,n,r[n])}))}return e}({},g),r=null!=(r={defaultLocale:e.target.value})?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):function(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r.push.apply(r,t)}return r}(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))})),n));var n,r},onClick:function(e){return e.stopPropagation()},value:g.defaultLocale},u),a().createElement(w.ExtensionSlot,{name:"user-panel-actions-slot"}))}}}]);
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- (()=>{var t,e,n={6639:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a,genericLinkConfigSchema:()=>u});var r=n(5776),o=n.n(r),i=n(4610),u={title:{_default:"New Link",_type:i.Type.String},target:{_default:"#",_type:i.Type.String,_description:"The URL to link to.",_validators:[i.validators.isUrl]}};function a(){var t=(0,i.useConfig)();return o().createElement(i.ConfigurableLink,{to:t.target},t.title)}},1217:(t,e,n)=>{"use strict";n.d(e,{O:()=>r,e:()=>o});var r="user-property-change",o="@openmrs/esm-primary-navigation-app"},789:(t,e,n)=>{"use strict";var r=n(4610);n(8478),r.Type.String,r.Type.String,r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.validators.isUrl;var o=n(1217),i=Object.freeze({__proto__:null,get start(){return Gt},get ensureJQuerySupport(){return mt},get setBootstrapMaxTime(){return V},get setMountMaxTime(){return z},get setUnmountMaxTime(){return X},get setUnloadMaxTime(){return Y},get registerApplication(){return _t},get unregisterApplication(){return jt},get getMountedApps(){return Ot},get getAppStatus(){return At},get unloadApplication(){return Ut},get checkActivityFunctions(){return Nt},get getAppNames(){return St},get pathToActiveWhen(){return Mt},get navigateToUrl(){return ut},get triggerAppChange(){return Rt},get addErrorHandler(){return p},get removeErrorHandler(){return h},get mountRootParcel(){return K},get NOT_LOADED(){return v},get LOADING_SOURCE_CODE(){return w},get NOT_BOOTSTRAPPED(){return g},get BOOTSTRAPPING(){return y},get NOT_MOUNTED(){return E},get MOUNTING(){return b},get UPDATING(){return P},get LOAD_ERROR(){return S},get MOUNTED(){return T},get UNMOUNTING(){return O},get SKIP_BECAUSE_BROKEN(){return A}});function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,c=function(){try{var t=new s("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?s:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},f=[];function l(t,e,n){var r=m(t,e,n);f.length?f.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function p(t){if("function"!=typeof t)throw Error(d(28,!1));f.push(t)}function h(t){if("function"!=typeof t)throw Error(d(29,!1));var e=!1;return f=f.filter((function(n){var r=n===t;return e=e||r,!r})),e}function d(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function m(t,e,n){var r,o="".concat(D(e)," '").concat(j(e),"' died in status ").concat(e.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(d(30,!1,e.status,j(e)));try{r=Error(o+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=j(e),e.status=n,r}var v="NOT_LOADED",w="LOADING_SOURCE_CODE",g="NOT_BOOTSTRAPPED",y="BOOTSTRAPPING",E="NOT_MOUNTED",b="MOUNTING",T="MOUNTED",P="UPDATING",O="UNMOUNTING",S="LOAD_ERROR",A="SKIP_BECAUSE_BROKEN";function _(t){return t.status===T}function N(t){try{return t.activeWhen(window.location)}catch(e){return l(e,t,A),!1}}function j(t){return t.name}function U(t){return Boolean(t.unmountThisParcel)}function D(t){return U(t)?"parcel":"application"}function L(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]}function M(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null}function k(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!M(e,(function(t){return"function"!=typeof t}))));var e}function x(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=D(t),o=j(t);return function(t){return n.reduce((function(n,i,u){return n.then((function(){var n=i(t);return C(n)?n:Promise.reject(d(15,!1,r,o,e,u))}))}),Promise.resolve())}}function C(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function R(t,e){return Promise.resolve().then((function(){return t.status!==g?t:(t.status=y,t.bootstrap?Z(t,"bootstrap").then(n).catch((function(n){if(e)throw m(n,t,A);return l(n,t,A),t})):Promise.resolve().then(n))}));function n(){return t.status=E,t}}function I(t,e){return Promise.resolve().then((function(){if(t.status!==T)return t;t.status=O;var n=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(e)throw m(r,t,A);l(r,t,A)}))})).then((function(){return t}));function r(){return Z(t,"unmount").then((function(){t.status=E})).catch((function(n){if(e)throw m(n,t,A);l(n,t,A)}))}}))}var B=!1,$=!1;function G(t,e){return Promise.resolve().then((function(){return t.status!==E?t:(B||(window.dispatchEvent(new c("single-spa:before-first-mount")),B=!0),Z(t,"mount").then((function(){return t.status=T,$||(window.dispatchEvent(new c("single-spa:first-mount")),$=!0),t})).catch((function(n){return t.status=T,I(t,!0).then(r,r);function r(){if(e)throw m(n,t,A);return l(n,t,A),t}})))}))}var W=0,F={parcels:{}};function K(){return q.apply(F,arguments)}function q(t,e){var n=this;if(!t||"object"!==u(t)&&"function"!=typeof t)throw Error(d(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(d(3,!1,u(t.name)));if("object"!==u(e))throw Error(d(4,!1,name,u(e)));if(!e.domElement)throw Error(d(5,!1,name));var r,o=W++,i="function"==typeof t,a=i?t:function(){return Promise.resolve(t)},s={id:o,parcels:{},status:i?w:g,customProps:e,parentName:j(n),unmountThisParcel:function(){return h.then((function(){if(s.status!==T)throw Error(d(6,!1,name,s.status));return I(s,!0)})).then((function(t){return s.parentName&&delete n.parcels[s.id],t})).then((function(t){return f(t),t})).catch((function(t){throw s.status=A,l(t),t}))}};n.parcels[o]=s;var c=a();if(!c||"function"!=typeof c.then)throw Error(d(7,!1));var f,l,p=(c=c.then((function(t){if(!t)throw Error(d(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!k(t.bootstrap))throw Error(d(9,!1,e));if(!k(t.mount))throw Error(d(10,!1,e));if(!k(t.unmount))throw Error(d(11,!1,e));if(t.update&&!k(t.update))throw Error(d(12,!1,e));var n=x(t,"bootstrap"),i=x(t,"mount"),u=x(t,"unmount");s.status=g,s.name=e,s.bootstrap=n,s.mount=i,s.unmount=u,s.timeouts=tt(t.timeouts),t.update&&(s.update=x(t,"update"),r.update=function(t){return s.customProps=t,J(function(t){return Promise.resolve().then((function(){if(t.status!==T)throw Error(d(32,!1,j(t)));return t.status=P,Z(t,"update").then((function(){return t.status=T,t})).catch((function(e){throw m(e,t,A)}))}))}(s))})}))).then((function(){return R(s,!0)})),h=p.then((function(){return G(s,!0)})),v=new Promise((function(t,e){f=t,l=e}));return r={mount:function(){return J(Promise.resolve().then((function(){if(s.status!==E)throw Error(d(13,!1,name,s.status));return n.parcels[o]=s,G(s)})))},unmount:function(){return J(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:J(c),bootstrapPromise:J(p),mountPromise:J(h),unmountPromise:J(v)}}function J(t){return t.then((function(){return null}))}function H(t){var e=j(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==u(n)||null===n||Array.isArray(n))&&(n={},console.warn(d(40,!1),e,n));var r=L({},n,{name:e,mountParcel:q.bind(t),singleSpa:i});return U(t)&&(r.unmountSelf=t.unmountThisParcel),r}var Q={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function V(t,e,n){if("number"!=typeof t||t<=0)throw Error(d(16,!1));Q.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function z(t,e,n){if("number"!=typeof t||t<=0)throw Error(d(17,!1));Q.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function X(t,e,n){if("number"!=typeof t||t<=0)throw Error(d(18,!1));Q.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function Y(t,e,n){if("number"!=typeof t||t<=0)throw Error(d(19,!1));Q.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function Z(t,e){var n=t.timeouts[e],r=n.warningMillis,o=D(t);return new Promise((function(i,u){var a=!1,s=!1;t[e](H(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),n.millis);var c=d(31,!1,e,o,j(t),n.millis);function f(t){if(!a)if(!0===t)s=!0,n.dieOnTimeout?u(Error(c)):console.error(c);else if(!s){var e=t,o=e*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return f(e+1)}),r)}}}))}function tt(t){var e={};for(var n in Q)e[n]=L({},Q[n],t&&t[n]||{});return e}function et(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==v&&t.status!==S?t:(t.status=w,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(H(t));if(!C(r))throw n=!0,Error(d(33,!1,j(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==u(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!k(e.bootstrap)&&(r=35),k(e.mount)||(r=36),k(e.unmount)||(r=37);var o=D(e);if(r){var i;try{i=JSON.stringify(e)}catch(t){}return console.error(d(r,!1,o,j(t),i),e),l(void 0,t,A),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=L({},t.devtools.overlays,e.devtools.overlays)),t.status=g,t.bootstrap=x(e,"bootstrap"),t.mount=x(e,"mount"),t.unmount=x(e,"unmount"),t.unload=x(e,"unload"),t.timeouts=tt(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=A:(r=S,t.loadErrorTime=(new Date).getTime()),l(e,t,r),t})));var e,n}))}var nt,rt="undefined"!=typeof window,ot={hashchange:[],popstate:[]},it=["hashchange","popstate"];function ut(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(d(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=ht(window.location.href),r=ht(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)}function at(t){var e=this;if(t){var n=t[0].type;it.indexOf(n)>=0&&ot[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}}function st(){It([],arguments)}function ct(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return nt&&n===o||(Wt()?window.dispatchEvent(ft(window.history.state,e)):It([])),r}}function ft(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n}if(rt){window.addEventListener("hashchange",st),window.addEventListener("popstate",st);var lt=window.addEventListener,pt=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&it.indexOf(t)>=0)||M(ot[t],(function(t){return t===e})))return lt.apply(this,arguments);ot[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&it.indexOf(t)>=0))return pt.apply(this,arguments);ot[t]=ot[t].filter((function(t){return t!==e}))},window.history.pushState=ct(window.history.pushState,"pushState"),window.history.replaceState=ct(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(d(41,!1)):window.singleSpaNavigate=ut}function ht(t){var e=document.createElement("a");return e.href=t,e}var dt=!1;function mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!dt){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return vt.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return vt.call(this,n,window.removeEventListener,t,e,arguments)},dt=!0}}function vt(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach((function(t){it.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,o))}var wt={};function gt(t){return Promise.resolve().then((function(){var e=wt[j(t)];if(!e)return t;if(t.status===v)return yt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==E&&t.status!==S)return t;var n=t.status===S?Promise.resolve():Z(t,"unload");return t.status="UNLOADING",n.then((function(){return yt(t,e),t})).catch((function(n){return function(t,e,n){delete wt[j(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,l(n,t,A),e.reject(n)}(t,e,n),t}))}))}function yt(t,e){delete wt[j(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=v,e.resolve()}function Et(t,e,n,r){wt[j(t)]={app:t,resolve:n,reject:r},Object.defineProperty(wt[j(t)],"promise",{get:e})}function bt(t){return wt[t]}var Tt=[];function Pt(){var t=[],e=[],n=[],r=[],o=(new Date).getTime();return Tt.forEach((function(i){var u=i.status!==A&&N(i);switch(i.status){case S:u&&o-i.loadErrorTime>=200&&n.push(i);break;case v:case w:u&&n.push(i);break;case g:case E:!u&&bt(j(i))?t.push(i):u&&r.push(i);break;case T:u||e.push(i)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}}function Ot(){return Tt.filter(_).map(j)}function St(){return Tt.map(j)}function At(t){var e=M(Tt,(function(e){return j(e)===t}));return e?e.status:null}function _t(t,e,n,r){var o=function(t,e,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===u(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(d(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(d(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(d(20,!1));if("object"!==u(t.app)&&"function"!=typeof t.app)throw Error(d(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(d(24,!1));if(!Lt(t.customProps))throw Error(d(22,!1))}(t),i.name=t.name,i.loadApp=t.app,i.activeWhen=t.activeWhen,i.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(d(20,!1));if(!e)throw Error(d(23,!1));if("function"!=typeof n)throw Error(d(24,!1));if(!Lt(r))throw Error(d(22,!1))}(t,e,n,r),i.name=t,i.loadApp=e,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(t){return t||{}}(i.customProps),i.activeWhen=function(t){var e=Array.isArray(t)?t:[t];return e=e.map((function(t){return"function"==typeof t?t:Mt(t)})),function(t){return e.some((function(e){return e(t)}))}}(i.activeWhen),i}(t,e,n,r);if(-1!==St().indexOf(o.name))throw Error(d(21,!1,o.name));Tt.push(L({loadErrorTime:null,status:v,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),rt&&(mt(),It())}function Nt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Tt.filter((function(e){return e.activeWhen(t)})).map(j)}function jt(t){if(0===Tt.filter((function(e){return j(e)===t})).length)throw Error(d(25,!1,t));return Ut(t).then((function(){var e=Tt.map(j).indexOf(t);Tt.splice(e,1)}))}function Ut(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(d(26,!1));var n=M(Tt,(function(e){return j(e)===t}));if(!n)throw Error(d(27,!1,t));var r,o=bt(j(n));if(e&&e.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,e){Et(n,(function(){return i}),t,e)}));return i}return o?(r=o.promise,Dt(n,o.resolve,o.reject)):r=new Promise((function(t,e){Et(n,(function(){return r}),t,e),Dt(n,t,e)})),r}function Dt(t,e,n){I(t).then(gt).then((function(){e(),setTimeout((function(){It()}))})).catch(n)}function Lt(t){return!t||"function"==typeof t||"object"===u(t)&&null!==t&&!Array.isArray(t)}function Mt(t,e){var n=function(t,e){var n=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)e&&(o+="$");else{var a=e?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,n=i}}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}}var kt=!1,xt=[],Ct=rt&&window.location.href;function Rt(){return It()}function It(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(kt)return new Promise((function(t,n){xt.push({resolve:t,reject:n,eventArguments:e})}));var n,r=Pt(),o=r.appsToUnload,i=r.appsToUnmount,u=r.appsToLoad,s=r.appsToMount,f=!1,l=Ct,p=Ct=window.location.href;return Wt()?(kt=!0,n=o.concat(u,i,s),m()):(n=u,d());function h(){f=!0}function d(){return Promise.resolve().then((function(){var t=u.map(et);return Promise.all(t).then(g).then((function(){return[]})).catch((function(t){throw g(),t}))}))}function m(){return Promise.resolve().then((function(){if(window.dispatchEvent(new c(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",y(!0))),window.dispatchEvent(new c("single-spa:before-routing-event",y(!0,{cancelNavigation:h}))),f)return window.dispatchEvent(new c("single-spa:before-mount-routing-event",y(!0))),w(),void ut(l);var e=o.map(gt),r=i.map(I).map((function(t){return t.then(gt)})).concat(e),a=Promise.all(r);a.then((function(){window.dispatchEvent(new c("single-spa:before-mount-routing-event",y(!0)))}));var p=u.map((function(t){return et(t).then((function(t){return Bt(t,a)}))})),d=s.filter((function(t){return u.indexOf(t)<0})).map((function(t){return Bt(t,a)}));return a.catch((function(t){throw g(),t})).then((function(){return g(),Promise.all(p.concat(d)).catch((function(e){throw t.forEach((function(t){return t.reject(e)})),e})).then(w)}))}))}function w(){var e=Ot();t.forEach((function(t){return t.resolve(e)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new c(r,y())),window.dispatchEvent(new c("single-spa:routing-event",y()))}catch(t){setTimeout((function(){throw t}))}if(kt=!1,xt.length>0){var o=xt;xt=[],It(o)}return e}function g(){t.forEach((function(t){at(t.eventArguments)})),at(e)}function y(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],c=arguments.length>1?arguments[1]:void 0,h={},d=(a(t={},T,[]),a(t,E,[]),a(t,v,[]),a(t,A,[]),t);r?(u.concat(s).forEach((function(t,e){w(t,T)})),o.forEach((function(t){w(t,v)})),i.forEach((function(t){w(t,E)}))):n.forEach((function(t){w(t)}));var m={detail:{newAppStatuses:h,appsByNewStatus:d,totalAppChanges:n.length,originalEvent:null==e?void 0:e[0],oldUrl:l,newUrl:p,navigationIsCanceled:f}};return c&&L(m.detail,c),m;function w(t,e){var n=j(t);e=e||At(n),h[n]=e,(d[e]=d[e]||[]).push(n)}}}function Bt(t,e){return N(t)?R(t).then((function(t){return e.then((function(){return N(t)?G(t):t}))})):e.then((function(){return t}))}var $t=!1;function Gt(t){var e;$t=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,nt=e),rt&&It()}function Wt(){return $t}rt&&setTimeout((function(){$t||console.warn(d(1,!1))}),5e3);var Ft={getRawAppData:function(){return[].concat(Tt)},reroute:It,NOT_LOADED:v,toLoadPromise:et,toBootstrapPromise:R,unregisterApplication:jt};rt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Ft),n(6639),n(3979),o.e},3979:(t,e,n)=>{var r={"./en.json":[3574,574]};function o(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],o=e[0];return n.e(e[1]).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=3979,t.exports=o}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t](i,i.exports,o),i.loaded=!0,i.exports}o.m=n,o.c=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@openmrs/esm-primary-navigation-app:",o.l=(n,r,i,u)=>{if(t[n])t[n].push(r);else{var a,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),f=0;f<c.length;f++){var l=c[f];if(l.getAttribute("src")==n||l.getAttribute("data-webpack")==e+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",e+i),a.src=n),t[n]=[r];var p=(e,r)=>{a.onerror=a.onload=null,clearTimeout(h);var o=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((t=>t(r))),e)return e(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),s&&document.head.appendChild(a)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{o.S={};var t={},e={};o.I=(n,r)=>{r||(r=[]);var i=e[n];if(i||(i=e[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),t[n])return t[n];o.o(o.S,n)||(o.S[n]={});var u=o.S[n],a="@openmrs/esm-primary-navigation-app",s=(t,e,n,r)=>{var o=u[t]=u[t]||{},i=o[e];(!i||!i.loaded&&(!r!=!i.eager?r:a>i.from))&&(o[e]={get:n,from:a,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework/src/internal","4.0.3-pre.390",(()=>Promise.all([o.e(776),o.e(889)]).then((()=>()=>o(4889))))),s("react-dom","18.2.0",(()=>Promise.all([o.e(788),o.e(776)]).then((()=>()=>o(2788))))),s("react-i18next","11.18.6",(()=>Promise.all([o.e(146),o.e(776)]).then((()=>()=>o(7146))))),s("react-router-dom","5.3.4",(()=>Promise.all([o.e(787),o.e(776),o.e(216)]).then((()=>()=>o(9787))))),s("react","18.2.0",(()=>o.e(735).then((()=>()=>o(2735)))))),t[n]=c.length?Promise.all(c).then((()=>t[n]=1)):1}}})(),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t=t=>{var e=t=>t.split(".").map((t=>+t==t?+t:t)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(t),r=n[1]?e(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,e(n[2]))),n[3]&&(r.push([]),r.push.apply(r,e(n[3]))),r},e=t=>{var n=t[0],r="";if(1===t.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<t.length;i++)o--,r+="u"==(typeof(a=t[i]))[0]?"-":(o>0?".":"")+(o=2,a);return r}var u=[];for(i=1;i<t.length;i++){var a=t[i];u.push(0===a?"not("+s()+")":1===a?"("+s()+" || "+s()+")":2===a?u.pop()+" "+u.pop():e(a))}return s();function s(){return u.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],i=o<0;i&&(o=-o-1);for(var u=0,a=1,s=!0;;a++,u++){var c,f,l=a<e.length?(typeof e[a])[0]:"";if(u>=r.length||"o"==(f=(typeof(c=r[u]))[0]))return!s||("u"==l?a>o&&!i:""==l!=i);if("u"==f){if(!s||"u"!=l)return!1}else if(s)if(l==f)if(a<=o){if(c!=e[a])return!1}else{if(i?c>e[a]:c<e[a])return!1;c!=e[a]&&(s=!1)}else if("s"!=l&&"n"!=l){if(i||a<=o)return!1;s=!1,a--}else{if(a<=o||f<l!=i)return!1;s=!1}else"s"!=l&&"n"!=l&&(s=!1,a--)}}var p=[],h=p.pop.bind(p);for(u=1;u<e.length;u++){var d=e[u];p.push(1==d?h()|h():2==d?h()&h():d?n(d,r):!h())}return!!h()},r=(e,n)=>{var r=e[n];return Object.keys(r).reduce(((e,n)=>!e||!r[e].loaded&&((e,n)=>{e=t(e),n=t(n);for(var r=0;;){if(r>=e.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=e[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var u=n[r],a=(typeof u)[0];if(i!=a)return"o"==i&&"n"==a||"s"==a||"u"==i;if("o"!=i&&"u"!=i&&o!=u)return o<u;r++}})(e,n)?n:e),0)},i=(t,o,i,a)=>{var s=r(t,i);return n(a,s)||"undefined"!=typeof console&&console.warn&&console.warn(((t,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&t[n][r].from)+" of shared singleton module "+n+" (required "+e(o)+")")(t,i,s,a)),u(t[i][s])},u=t=>(t.loaded=1,t.get()),a=t=>function(e,n,r,i){var u=o.I(e);return u&&u.then?u.then(t.bind(t,e,o.S[e],n,r,i)):t(e,o.S[e],n,r,i)},s=a(((t,e,n,i)=>e&&o.o(e,n)?((t,e,n,o)=>{var i=r(t,n);return u(t[n][i])})(e,0,n):i())),c=a(((t,e,n,r,u)=>e&&o.o(e,n)?i(e,0,n,r):u())),f={},l={2680:()=>c("default","react-i18next",[1,11],(()=>o.e(146).then((()=>()=>o(7146))))),7743:()=>c("default","react-router-dom",[1,6],(()=>o.e(787).then((()=>()=>o(9787))))),5776:()=>c("default","react",[1,18],(()=>o.e(735).then((()=>()=>o(2735))))),4610:()=>c("default","@openmrs/esm-framework",[0],(()=>o.e(889).then((()=>()=>o(4889))))),8478:()=>s("default","@openmrs/esm-framework/src/internal",(()=>o.e(889).then((()=>()=>o(4889)))))};[4610,8478,5776].forEach((t=>{o.m[t]=e=>{f[t]=0,delete o.c[t];var n=l[t]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+t);e.exports=n()}}));var p={656:[7743],680:[2680],776:[5776]};o.f.consumes=(t,e)=>{o.o(p,t)&&p[t].forEach((t=>{if(o.o(f,t))return e.push(f[t]);var n=e=>{f[t]=0,o.m[t]=n=>{delete o.c[t],n.exports=e()}},r=e=>{delete f[t],o.m[t]=n=>{throw delete o.c[t],e}};try{var i=l[t]();i.then?e.push(f[t]=i.then(n).catch(r)):n(i)}catch(t){r(t)}}))}})(),(()=>{var t={179:0,776:0,789:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(680|776)$/.test(e))t[e]=0;else{var i=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=i);var u=o.p+o.u(e),a=new Error;o.l(u,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),u=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+u+")",a.name="ChunkLoadError",a.type=i,a.request=u,r[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[u,a,s]=n,c=0;if(u.some((e=>0!==t[e]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);s&&s(o)}for(e&&e(n);c<u.length;c++)i=u[c],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),o.nc=void 0,o(789)})();
1
+ (()=>{var t,e,n={3710:(t,e,n)=>{"use strict";var r=Object.freeze({__proto__:null,get start(){return Bt},get ensureJQuerySupport(){return ht},get setBootstrapMaxTime(){return H},get setMountMaxTime(){return Q},get setUnmountMaxTime(){return V},get setUnloadMaxTime(){return z},get registerApplication(){return St},get unregisterApplication(){return _t},get getMountedApps(){return Tt},get getAppStatus(){return Ot},get unloadApplication(){return Nt},get checkActivityFunctions(){return At},get getAppNames(){return Pt},get pathToActiveWhen(){return Dt},get navigateToUrl(){return ot},get triggerAppChange(){return xt},get addErrorHandler(){return f},get removeErrorHandler(){return l},get mountRootParcel(){return W},get NOT_LOADED(){return d},get LOADING_SOURCE_CODE(){return m},get NOT_BOOTSTRAPPED(){return v},get BOOTSTRAPPING(){return w},get NOT_MOUNTED(){return g},get MOUNTING(){return y},get UPDATING(){return b},get LOAD_ERROR(){return P},get MOUNTED(){return E},get UNMOUNTING(){return T},get SKIP_BECAUSE_BROKEN(){return O}});function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,a=function(){try{var t=new u("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?u:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},s=[];function c(t,e,n){var r=h(t,e,n);s.length?s.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function f(t){if("function"!=typeof t)throw Error(p(28,!1));s.push(t)}function l(t){if("function"!=typeof t)throw Error(p(29,!1));var e=!1;return s=s.filter((function(n){var r=n===t;return e=e||r,!r})),e}function p(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function h(t,e,n){var r,o="".concat(j(e)," '").concat(_(e),"' died in status ").concat(e.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(p(30,!1,e.status,_(e)));try{r=Error(o+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=_(e),e.status=n,r}var d="NOT_LOADED",m="LOADING_SOURCE_CODE",v="NOT_BOOTSTRAPPED",w="BOOTSTRAPPING",g="NOT_MOUNTED",y="MOUNTING",E="MOUNTED",b="UPDATING",T="UNMOUNTING",P="LOAD_ERROR",O="SKIP_BECAUSE_BROKEN";function S(t){return t.status===E}function A(t){try{return t.activeWhen(window.location)}catch(e){return c(e,t,O),!1}}function _(t){return t.name}function N(t){return Boolean(t.unmountThisParcel)}function j(t){return N(t)?"parcel":"application"}function U(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]}function D(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null}function L(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!D(e,(function(t){return"function"!=typeof t}))));var e}function M(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=j(t),o=_(t);return function(t){return n.reduce((function(n,i,u){return n.then((function(){var n=i(t);return k(n)?n:Promise.reject(p(15,!1,r,o,e,u))}))}),Promise.resolve())}}function k(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function x(t,e){return Promise.resolve().then((function(){return t.status!==v?t:(t.status=w,t.bootstrap?X(t,"bootstrap").then(n).catch((function(n){if(e)throw h(n,t,O);return c(n,t,O),t})):Promise.resolve().then(n))}));function n(){return t.status=g,t}}function C(t,e){return Promise.resolve().then((function(){if(t.status!==E)return t;t.status=T;var n=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(e)throw h(r,t,O);c(r,t,O)}))})).then((function(){return t}));function r(){return X(t,"unmount").then((function(){t.status=g})).catch((function(n){if(e)throw h(n,t,O);c(n,t,O)}))}}))}var R=!1,I=!1;function B(t,e){return Promise.resolve().then((function(){return t.status!==g?t:(R||(window.dispatchEvent(new a("single-spa:before-first-mount")),R=!0),X(t,"mount").then((function(){return t.status=E,I||(window.dispatchEvent(new a("single-spa:first-mount")),I=!0),t})).catch((function(n){return t.status=E,C(t,!0).then(r,r);function r(){if(e)throw h(n,t,O);return c(n,t,O),t}})))}))}var $=0,G={parcels:{}};function W(){return F.apply(G,arguments)}function F(t,e){var n=this;if(!t||"object"!==o(t)&&"function"!=typeof t)throw Error(p(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(p(3,!1,o(t.name)));if("object"!==o(e))throw Error(p(4,!1,name,o(e)));if(!e.domElement)throw Error(p(5,!1,name));var r,i=$++,u="function"==typeof t,a=u?t:function(){return Promise.resolve(t)},s={id:i,parcels:{},status:u?m:v,customProps:e,parentName:_(n),unmountThisParcel:function(){return w.then((function(){if(s.status!==E)throw Error(p(6,!1,name,s.status));return C(s,!0)})).then((function(t){return s.parentName&&delete n.parcels[s.id],t})).then((function(t){return f(t),t})).catch((function(t){throw s.status=O,l(t),t}))}};n.parcels[i]=s;var c=a();if(!c||"function"!=typeof c.then)throw Error(p(7,!1));var f,l,d=(c=c.then((function(t){if(!t)throw Error(p(8,!1));var e=t.name||"parcel-".concat(i);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!L(t.bootstrap))throw Error(p(9,!1,e));if(!L(t.mount))throw Error(p(10,!1,e));if(!L(t.unmount))throw Error(p(11,!1,e));if(t.update&&!L(t.update))throw Error(p(12,!1,e));var n=M(t,"bootstrap"),o=M(t,"mount"),u=M(t,"unmount");s.status=v,s.name=e,s.bootstrap=n,s.mount=o,s.unmount=u,s.timeouts=Y(t.timeouts),t.update&&(s.update=M(t,"update"),r.update=function(t){return s.customProps=t,K(function(t){return Promise.resolve().then((function(){if(t.status!==E)throw Error(p(32,!1,_(t)));return t.status=b,X(t,"update").then((function(){return t.status=E,t})).catch((function(e){throw h(e,t,O)}))}))}(s))})}))).then((function(){return x(s,!0)})),w=d.then((function(){return B(s,!0)})),y=new Promise((function(t,e){f=t,l=e}));return r={mount:function(){return K(Promise.resolve().then((function(){if(s.status!==g)throw Error(p(13,!1,name,s.status));return n.parcels[i]=s,B(s)})))},unmount:function(){return K(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:K(c),bootstrapPromise:K(d),mountPromise:K(w),unmountPromise:K(y)}}function K(t){return t.then((function(){return null}))}function q(t){var e=_(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==o(n)||null===n||Array.isArray(n))&&(n={},console.warn(p(40,!1),e,n));var i=U({},n,{name:e,mountParcel:F.bind(t),singleSpa:r});return N(t)&&(i.unmountSelf=t.unmountThisParcel),i}var J={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function H(t,e,n){if("number"!=typeof t||t<=0)throw Error(p(16,!1));J.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function Q(t,e,n){if("number"!=typeof t||t<=0)throw Error(p(17,!1));J.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function V(t,e,n){if("number"!=typeof t||t<=0)throw Error(p(18,!1));J.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function z(t,e,n){if("number"!=typeof t||t<=0)throw Error(p(19,!1));J.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}}function X(t,e){var n=t.timeouts[e],r=n.warningMillis,o=j(t);return new Promise((function(i,u){var a=!1,s=!1;t[e](q(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),n.millis);var c=p(31,!1,e,o,_(t),n.millis);function f(t){if(!a)if(!0===t)s=!0,n.dieOnTimeout?u(Error(c)):console.error(c);else if(!s){var e=t,o=e*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return f(e+1)}),r)}}}))}function Y(t){var e={};for(var n in J)e[n]=U({},J[n],t&&t[n]||{});return e}function Z(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==d&&t.status!==P?t:(t.status=m,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(q(t));if(!k(r))throw n=!0,Error(p(33,!1,_(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==o(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!L(e.bootstrap)&&(r=35),L(e.mount)||(r=36),L(e.unmount)||(r=37);var i=j(e);if(r){var u;try{u=JSON.stringify(e)}catch(t){}return console.error(p(r,!1,i,_(t),u),e),c(void 0,t,O),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=U({},t.devtools.overlays,e.devtools.overlays)),t.status=v,t.bootstrap=M(e,"bootstrap"),t.mount=M(e,"mount"),t.unmount=M(e,"unmount"),t.unload=M(e,"unload"),t.timeouts=Y(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=O:(r=P,t.loadErrorTime=(new Date).getTime()),c(e,t,r),t})));var e,n}))}var tt,et="undefined"!=typeof window,nt={hashchange:[],popstate:[]},rt=["hashchange","popstate"];function ot(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(p(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=lt(window.location.href),r=lt(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)}function it(t){var e=this;if(t){var n=t[0].type;rt.indexOf(n)>=0&&nt[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}}function ut(){Ct([],arguments)}function at(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return tt&&n===o||($t()?window.dispatchEvent(st(window.history.state,e)):Ct([])),r}}function st(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n}if(et){window.addEventListener("hashchange",ut),window.addEventListener("popstate",ut);var ct=window.addEventListener,ft=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&rt.indexOf(t)>=0)||D(nt[t],(function(t){return t===e})))return ct.apply(this,arguments);nt[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&rt.indexOf(t)>=0))return ft.apply(this,arguments);nt[t]=nt[t].filter((function(t){return t!==e}))},window.history.pushState=at(window.history.pushState,"pushState"),window.history.replaceState=at(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(p(41,!1)):window.singleSpaNavigate=ot}function lt(t){var e=document.createElement("a");return e.href=t,e}var pt=!1;function ht(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!pt){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return dt.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return dt.call(this,n,window.removeEventListener,t,e,arguments)},pt=!0}}function dt(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach((function(t){rt.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,o))}var mt={};function vt(t){return Promise.resolve().then((function(){var e=mt[_(t)];if(!e)return t;if(t.status===d)return wt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==g&&t.status!==P)return t;var n=t.status===P?Promise.resolve():X(t,"unload");return t.status="UNLOADING",n.then((function(){return wt(t,e),t})).catch((function(n){return function(t,e,n){delete mt[_(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,c(n,t,O),e.reject(n)}(t,e,n),t}))}))}function wt(t,e){delete mt[_(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=d,e.resolve()}function gt(t,e,n,r){mt[_(t)]={app:t,resolve:n,reject:r},Object.defineProperty(mt[_(t)],"promise",{get:e})}function yt(t){return mt[t]}var Et=[];function bt(){var t=[],e=[],n=[],r=[],o=(new Date).getTime();return Et.forEach((function(i){var u=i.status!==O&&A(i);switch(i.status){case P:u&&o-i.loadErrorTime>=200&&n.push(i);break;case d:case m:u&&n.push(i);break;case v:case g:!u&&yt(_(i))?t.push(i):u&&r.push(i);break;case E:u||e.push(i)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}}function Tt(){return Et.filter(S).map(_)}function Pt(){return Et.map(_)}function Ot(t){var e=D(Et,(function(e){return _(e)===t}));return e?e.status:null}function St(t,e,n,r){var i=function(t,e,n,r){var i,u={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===o(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(p(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(p(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(p(20,!1));if("object"!==o(t.app)&&"function"!=typeof t.app)throw Error(p(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(p(24,!1));if(!Ut(t.customProps))throw Error(p(22,!1))}(t),u.name=t.name,u.loadApp=t.app,u.activeWhen=t.activeWhen,u.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(p(20,!1));if(!e)throw Error(p(23,!1));if("function"!=typeof n)throw Error(p(24,!1));if(!Ut(r))throw Error(p(22,!1))}(t,e,n,r),u.name=t,u.loadApp=e,u.activeWhen=n,u.customProps=r),u.loadApp="function"!=typeof(i=u.loadApp)?function(){return Promise.resolve(i)}:i,u.customProps=function(t){return t||{}}(u.customProps),u.activeWhen=function(t){var e=Array.isArray(t)?t:[t];return e=e.map((function(t){return"function"==typeof t?t:Dt(t)})),function(t){return e.some((function(e){return e(t)}))}}(u.activeWhen),u}(t,e,n,r);if(-1!==Pt().indexOf(i.name))throw Error(p(21,!1,i.name));Et.push(U({loadErrorTime:null,status:d,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},i)),et&&(ht(),Ct())}function At(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Et.filter((function(e){return e.activeWhen(t)})).map(_)}function _t(t){if(0===Et.filter((function(e){return _(e)===t})).length)throw Error(p(25,!1,t));return Nt(t).then((function(){var e=Et.map(_).indexOf(t);Et.splice(e,1)}))}function Nt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(p(26,!1));var n=D(Et,(function(e){return _(e)===t}));if(!n)throw Error(p(27,!1,t));var r,o=yt(_(n));if(e&&e.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,e){gt(n,(function(){return i}),t,e)}));return i}return o?(r=o.promise,jt(n,o.resolve,o.reject)):r=new Promise((function(t,e){gt(n,(function(){return r}),t,e),jt(n,t,e)})),r}function jt(t,e,n){C(t).then(vt).then((function(){e(),setTimeout((function(){Ct()}))})).catch(n)}function Ut(t){return!t||"function"==typeof t||"object"===o(t)&&null!==t&&!Array.isArray(t)}function Dt(t,e){var n=function(t,e){var n=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)e&&(o+="$");else{var a=e?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,n=i}}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}}var Lt=!1,Mt=[],kt=et&&window.location.href;function xt(){return Ct()}function Ct(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(Lt)return new Promise((function(t,n){Mt.push({resolve:t,reject:n,eventArguments:e})}));var n,r=bt(),o=r.appsToUnload,u=r.appsToUnmount,s=r.appsToLoad,c=r.appsToMount,f=!1,l=kt,p=kt=window.location.href;return $t()?(Lt=!0,n=o.concat(s,u,c),v()):(n=s,m());function h(){f=!0}function m(){return Promise.resolve().then((function(){var t=s.map(Z);return Promise.all(t).then(y).then((function(){return[]})).catch((function(t){throw y(),t}))}))}function v(){return Promise.resolve().then((function(){if(window.dispatchEvent(new a(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",b(!0))),window.dispatchEvent(new a("single-spa:before-routing-event",b(!0,{cancelNavigation:h}))),f)return window.dispatchEvent(new a("single-spa:before-mount-routing-event",b(!0))),w(),void ot(l);var e=o.map(vt),r=u.map(C).map((function(t){return t.then(vt)})).concat(e),i=Promise.all(r);i.then((function(){window.dispatchEvent(new a("single-spa:before-mount-routing-event",b(!0)))}));var p=s.map((function(t){return Z(t).then((function(t){return Rt(t,i)}))})),d=c.filter((function(t){return s.indexOf(t)<0})).map((function(t){return Rt(t,i)}));return i.catch((function(t){throw y(),t})).then((function(){return y(),Promise.all(p.concat(d)).catch((function(e){throw t.forEach((function(t){return t.reject(e)})),e})).then(w)}))}))}function w(){var e=Tt();t.forEach((function(t){return t.resolve(e)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new a(r,b())),window.dispatchEvent(new a("single-spa:routing-event",b()))}catch(t){setTimeout((function(){throw t}))}if(Lt=!1,Mt.length>0){var o=Mt;Mt=[],Ct(o)}return e}function y(){t.forEach((function(t){it(t.eventArguments)})),it(e)}function b(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1?arguments[1]:void 0,h={},m=(i(t={},E,[]),i(t,g,[]),i(t,d,[]),i(t,O,[]),t);r?(s.concat(c).forEach((function(t,e){w(t,E)})),o.forEach((function(t){w(t,d)})),u.forEach((function(t){w(t,g)}))):n.forEach((function(t){w(t)}));var v={detail:{newAppStatuses:h,appsByNewStatus:m,totalAppChanges:n.length,originalEvent:null==e?void 0:e[0],oldUrl:l,newUrl:p,navigationIsCanceled:f}};return a&&U(v.detail,a),v;function w(t,e){var n=_(t);e=e||Ot(n),h[n]=e,(m[e]=m[e]||[]).push(n)}}}function Rt(t,e){return A(t)?x(t).then((function(t){return e.then((function(){return A(t)?B(t):t}))})):e.then((function(){return t}))}var It=!1;function Bt(t){var e;It=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,tt=e),et&&Ct()}function $t(){return It}et&&setTimeout((function(){It||console.warn(p(1,!1))}),5e3);var Gt={getRawAppData:function(){return[].concat(Et)},reroute:Ct,NOT_LOADED:d,toLoadPromise:Z,toBootstrapPromise:x,unregisterApplication:_t};et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Gt)},6639:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a,genericLinkConfigSchema:()=>u});var r=n(5776),o=n.n(r),i=n(4610),u={title:{_default:"New Link",_type:i.Type.String},target:{_default:"#",_type:i.Type.String,_description:"The URL to link to.",_validators:[i.validators.isUrl]}};function a(){var t=(0,i.useConfig)();return o().createElement(i.ConfigurableLink,{to:t.target},t.title)}},1217:(t,e,n)=>{"use strict";n.d(e,{O:()=>r,e:()=>o});var r="user-property-change",o="@openmrs/esm-primary-navigation-app"},8034:(t,e,n)=>{"use strict";var r=n(4610);n(8478),r.Type.String,r.Type.String,r.Type.String,r.Type.Array,r.Type.String,r.Type.String,r.validators.isUrl;var o=n(1217);n(3710),n(6639),n(3979),o.e},3979:(t,e,n)=>{var r={"./en.json":[3574,574]};function o(t){if(!n.o(r,t))return Promise.resolve().then((()=>{var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}));var e=r[t],o=e[0];return n.e(e[1]).then((()=>n(o)))}o.keys=()=>Object.keys(r),o.id=3979,t.exports=o}},r={};function o(t){var e=r[t];if(void 0!==e)return e.exports;var i=r[t]={id:t,loaded:!1,exports:{}};return n[t](i,i.exports,o),i.loaded=!0,i.exports}o.m=n,o.c=r,o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((e,n)=>(o.f[n](t,e),e)),[])),o.u=t=>t+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="@openmrs/esm-primary-navigation-app:",o.l=(n,r,i,u)=>{if(t[n])t[n].push(r);else{var a,s;if(void 0!==i)for(var c=document.getElementsByTagName("script"),f=0;f<c.length;f++){var l=c[f];if(l.getAttribute("src")==n||l.getAttribute("data-webpack")==e+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.setAttribute("data-webpack",e+i),a.src=n),t[n]=[r];var p=(e,r)=>{a.onerror=a.onload=null,clearTimeout(h);var o=t[n];if(delete t[n],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((t=>t(r))),e)return e(r)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),s&&document.head.appendChild(a)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{o.S={};var t={},e={};o.I=(n,r)=>{r||(r=[]);var i=e[n];if(i||(i=e[n]={}),!(r.indexOf(i)>=0)){if(r.push(i),t[n])return t[n];o.o(o.S,n)||(o.S[n]={});var u=o.S[n],a="@openmrs/esm-primary-navigation-app",s=(t,e,n,r)=>{var o=u[t]=u[t]||{},i=o[e];(!i||!i.loaded&&(!r!=!i.eager?r:a>i.from))&&(o[e]={get:n,from:a,eager:!!r})},c=[];return"default"===n&&(s("@openmrs/esm-framework/src/internal","4.0.3-pre.397",(()=>Promise.all([o.e(776),o.e(889)]).then((()=>()=>o(4889))))),s("react-dom","18.2.0",(()=>Promise.all([o.e(788),o.e(776)]).then((()=>()=>o(2788))))),s("react-i18next","11.18.6",(()=>Promise.all([o.e(146),o.e(776)]).then((()=>()=>o(7146))))),s("react-router-dom","5.3.4",(()=>Promise.all([o.e(787),o.e(776),o.e(216)]).then((()=>()=>o(9787))))),s("react","18.2.0",(()=>o.e(735).then((()=>()=>o(2735)))))),t[n]=c.length?Promise.all(c).then((()=>t[n]=1)):1}}})(),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t=t=>{var e=t=>t.split(".").map((t=>+t==t?+t:t)),n=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(t),r=n[1]?e(n[1]):[];return n[2]&&(r.length++,r.push.apply(r,e(n[2]))),n[3]&&(r.push([]),r.push.apply(r,e(n[3]))),r},e=t=>{var n=t[0],r="";if(1===t.length)return"*";if(n+.5){r+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,i=1;i<t.length;i++)o--,r+="u"==(typeof(a=t[i]))[0]?"-":(o>0?".":"")+(o=2,a);return r}var u=[];for(i=1;i<t.length;i++){var a=t[i];u.push(0===a?"not("+s()+")":1===a?"("+s()+" || "+s()+")":2===a?u.pop()+" "+u.pop():e(a))}return s();function s(){return u.pop().replace(/^\((.+)\)$/,"$1")}},n=(e,r)=>{if(0 in e){r=t(r);var o=e[0],i=o<0;i&&(o=-o-1);for(var u=0,a=1,s=!0;;a++,u++){var c,f,l=a<e.length?(typeof e[a])[0]:"";if(u>=r.length||"o"==(f=(typeof(c=r[u]))[0]))return!s||("u"==l?a>o&&!i:""==l!=i);if("u"==f){if(!s||"u"!=l)return!1}else if(s)if(l==f)if(a<=o){if(c!=e[a])return!1}else{if(i?c>e[a]:c<e[a])return!1;c!=e[a]&&(s=!1)}else if("s"!=l&&"n"!=l){if(i||a<=o)return!1;s=!1,a--}else{if(a<=o||f<l!=i)return!1;s=!1}else"s"!=l&&"n"!=l&&(s=!1,a--)}}var p=[],h=p.pop.bind(p);for(u=1;u<e.length;u++){var d=e[u];p.push(1==d?h()|h():2==d?h()&h():d?n(d,r):!h())}return!!h()},r=(e,n)=>{var r=e[n];return Object.keys(r).reduce(((e,n)=>!e||!r[e].loaded&&((e,n)=>{e=t(e),n=t(n);for(var r=0;;){if(r>=e.length)return r<n.length&&"u"!=(typeof n[r])[0];var o=e[r],i=(typeof o)[0];if(r>=n.length)return"u"==i;var u=n[r],a=(typeof u)[0];if(i!=a)return"o"==i&&"n"==a||"s"==a||"u"==i;if("o"!=i&&"u"!=i&&o!=u)return o<u;r++}})(e,n)?n:e),0)},i=(t,o,i,a)=>{var s=r(t,i);return n(a,s)||"undefined"!=typeof console&&console.warn&&console.warn(((t,n,r,o)=>"Unsatisfied version "+r+" from "+(r&&t[n][r].from)+" of shared singleton module "+n+" (required "+e(o)+")")(t,i,s,a)),u(t[i][s])},u=t=>(t.loaded=1,t.get()),a=t=>function(e,n,r,i){var u=o.I(e);return u&&u.then?u.then(t.bind(t,e,o.S[e],n,r,i)):t(e,o.S[e],n,r,i)},s=a(((t,e,n,i)=>e&&o.o(e,n)?((t,e,n,o)=>{var i=r(t,n);return u(t[n][i])})(e,0,n):i())),c=a(((t,e,n,r,u)=>e&&o.o(e,n)?i(e,0,n,r):u())),f={},l={2680:()=>c("default","react-i18next",[1,11],(()=>o.e(146).then((()=>()=>o(7146))))),7743:()=>c("default","react-router-dom",[1,6],(()=>o.e(787).then((()=>()=>o(9787))))),5776:()=>c("default","react",[1,18],(()=>o.e(735).then((()=>()=>o(2735))))),4610:()=>c("default","@openmrs/esm-framework",[0],(()=>o.e(889).then((()=>()=>o(4889))))),8478:()=>s("default","@openmrs/esm-framework/src/internal",(()=>o.e(889).then((()=>()=>o(4889)))))};[4610,8478,5776].forEach((t=>{o.m[t]=e=>{f[t]=0,delete o.c[t];var n=l[t]();if("function"!=typeof n)throw new Error("Shared module is not available for eager consumption: "+t);e.exports=n()}}));var p={656:[7743],680:[2680],776:[5776]};o.f.consumes=(t,e)=>{o.o(p,t)&&p[t].forEach((t=>{if(o.o(f,t))return e.push(f[t]);var n=e=>{f[t]=0,o.m[t]=n=>{delete o.c[t],n.exports=e()}},r=e=>{delete f[t],o.m[t]=n=>{throw delete o.c[t],e}};try{var i=l[t]();i.then?e.push(f[t]=i.then(n).catch(r)):n(i)}catch(t){r(t)}}))}})(),(()=>{var t={179:0,776:0,34:0,710:0};o.f.j=(e,n)=>{var r=o.o(t,e)?t[e]:void 0;if(0!==r)if(r)n.push(r[2]);else if(/^(680|776)$/.test(e))t[e]=0;else{var i=new Promise(((n,o)=>r=t[e]=[n,o]));n.push(r[2]=i);var u=o.p+o.u(e),a=new Error;o.l(u,(n=>{if(o.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var i=n&&("load"===n.type?"missing":n.type),u=n&&n.target&&n.target.src;a.message="Loading chunk "+e+" failed.\n("+i+": "+u+")",a.name="ChunkLoadError",a.type=i,a.request=u,r[1](a)}}),"chunk-"+e,e)}};var e=(e,n)=>{var r,i,[u,a,s]=n,c=0;if(u.some((e=>0!==t[e]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);s&&s(o)}for(e&&e(n);c<u.length;c++)i=u[c],o.o(t,i)&&t[i]&&t[i][0](),t[i]=0},n=self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})(),o.nc=void 0,o(8034)})();
@@ -1 +1 @@
1
- var _openmrs_esm_primary_navigation_app;(()=>{function j(a){var b=g[a];if(void 0!==b)return b.exports;var c=g[a]={id:a,loaded:!1,exports:{}};return M[a](c,c.exports,j),c.loaded=!0,c.exports}var b,k,q,x,z,A,B,C,D,E,F,G,H,I,J,K,L,M={7130:(b,c,d)=>{var f={"./start":()=>Promise.all([d.e(776),d.e(789)]).then(()=>()=>d(789))},e=(a,b)=>(d.R=b,b=d.o(f,a)?f[a]():Promise.resolve().then(()=>{throw new Error("Module \""+a+"\" does not exist in container.")}),d.R=void 0,b),g=(a,b)=>{if(d.S){var c=d.S["default"];if(c&&c!==a)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return d.S["default"]=a,d.I("default",b)}};d.d(c,{get:()=>e,init:()=>g})}},g={};j.m=M,j.c=g,j.n=a=>{var b=a&&a.__esModule?()=>a.default:()=>a;return j.d(b,{a:b}),b},j.d=(a,b)=>{for(var c in b)j.o(b,c)&&!j.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:b[c]})},j.f={},j.e=a=>Promise.all(Object.keys(j.f).reduce((b,c)=>(j.f[c](a,b),b),[])),j.u=a=>a+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(a){if("object"==typeof window)return window}}(),j.o=(a,b)=>Object.prototype.hasOwnProperty.call(a,b),b={},k="@openmrs/esm-primary-navigation-app:",j.l=(a,c,e)=>{if(b[a])b[a].push(c);else{var g,h;if(void 0!==e)for(var m,n=document.getElementsByTagName("script"),o=0;o<n.length;o++)if(m=n[o],m.getAttribute("src")==a||m.getAttribute("data-webpack")==k+e){g=m;break}g||(h=!0,(g=document.createElement("script")).charset="utf-8",g.timeout=120,j.nc&&g.setAttribute("nonce",j.nc),g.setAttribute("data-webpack",k+e),g.src=a),b[a]=[c];var q=(c,d)=>{g.onerror=g.onload=null,clearTimeout(f);var e=b[a];if(delete b[a],g.parentNode&&g.parentNode.removeChild(g),e&&e.forEach(a=>a(d)),c)return c(d)},f=setTimeout(q.bind(null,void 0,{type:"timeout",target:g}),12e4);g.onerror=q.bind(null,g.onerror),g.onload=q.bind(null,g.onload),h&&document.head.appendChild(g)}},j.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},j.nmd=a=>(a.paths=[],a.children||(a.children=[]),a),(()=>{j.S={};var b={},c={};j.I=(d,e)=>{e||(e=[]);var f=c[d];if(f||(f=c[d]={}),!(0<=e.indexOf(f))){if(e.push(f),b[d])return b[d];j.o(j.S,d)||(j.S[d]={});var g=j.S[d],a=(a,b,c,d)=>{var e=g[a]=g[a]||{},f=e[b];f&&(f.loaded||(!d==!f.eager?!("@openmrs/esm-primary-navigation-app">f.from):!d))||(e[b]={get:c,from:"@openmrs/esm-primary-navigation-app",eager:!!d})},h=[];return"default"===d&&(a("@openmrs/esm-framework/src/internal","4.0.3-pre.390",()=>Promise.all([j.e(776),j.e(889)]).then(()=>()=>j(4889))),a("react-dom","18.2.0",()=>Promise.all([j.e(788),j.e(776)]).then(()=>()=>j(2788))),a("react-i18next","11.18.6",()=>Promise.all([j.e(146),j.e(776)]).then(()=>()=>j(7146))),a("react-router-dom","5.3.4",()=>Promise.all([j.e(787),j.e(776),j.e(216)]).then(()=>()=>j(9787))),a("react","18.2.0",()=>j.e(735).then(()=>()=>j(2735)))),b[d]=h.length?Promise.all(h).then(()=>b[d]=1):1}}})(),(()=>{var a;j.g.importScripts&&(a=j.g.location+"");var b=j.g.document;if(!a&&b&&(b.currentScript&&(a=b.currentScript.src),!a)){var c=b.getElementsByTagName("script");c.length&&(a=c[c.length-1].src)}if(!a)throw new Error("Automatic publicPath is not supported in this browser");a=a.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=a})(),q=a=>{var b=a=>a.split(".").map(a=>+a==a?+a:a),c=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(a),d=c[1]?b(c[1]):[];return c[2]&&(d.length++,d.push.apply(d,b(c[2]))),c[3]&&(d.push([]),d.push.apply(d,b(c[3]))),d},x=(b,c)=>{b=q(b),c=q(c);for(var d=0;;){if(d>=b.length)return d<c.length&&"u"!=(typeof c[d])[0];var f=b[d],g=(typeof f)[0];if(d>=c.length)return"u"==g;var h=c[d],j=(typeof h)[0];if(g!=j)return"o"==g&&"n"==j||"s"==j||"u"==g;if("o"!=g&&"u"!=g&&f!=h)return f<h;d++}},z=b=>{function c(){return h.pop().replace(/^\((.+)\)$/,"$1")}var d=b[0],e="";if(1===b.length)return"*";if(d+.5){e+=0==d?">=":-1==d?"<":1==d?"^":2==d?"~":0<d?"=":"!=";for(var f=1,g=1;g<b.length;g++)f--,e+="u"==(typeof(i=b[g]))[0]?"-":(0<f?".":"")+(f=2,i);return e}var h=[];for(g=1;g<b.length;g++){var i=b[g];h.push(0===i?"not("+c()+")":1===i?"("+c()+" || "+c()+")":2===i?h.pop()+" "+h.pop():z(i))}return c()},A=(a,b)=>{if(0 in a){b=q(b);var e=a[0],g=0>e;g&&(e=-e-1);for(var j=0,k=1,m=!0;;k++,j++){var o,t,v=k<a.length?(typeof a[k])[0]:"";if(j>=b.length||"o"==(t=(typeof(o=b[j]))[0]))return!m||("u"==v?k>e&&!g:""==v!=g);if("u"==t){if(!m||"u"!=v)return!1;}else if(!m)"s"!=v&&"n"!=v&&(m=!1,k--);else if(v==t){if(!(k<=e)){if(g?o>a[k]:o<a[k])return!1;o!=a[k]&&(m=!1)}else if(o!=a[k])return!1;}else if("s"!=v&&"n"!=v){if(g||k<=e)return!1;m=!1,k--}else{if(k<=e||t<v!=g)return!1;m=!1}}}var w=[],d=w.pop.bind(w);for(j=1;j<a.length;j++){var c=a[j];w.push(1==c?d()|d():2==c?d()&d():c?A(c,b):!d())}return!!d()},B=(a,b)=>{var c=a[b];return Object.keys(c).reduce((a,b)=>a&&(c[a].loaded||!x(a,b))?a:b,0)},C=(a,b,c,d)=>"Unsatisfied version "+c+" from "+(c&&a[b][c].from)+" of shared singleton module "+b+" (required "+z(d)+")",D=(a,b,c)=>{var d=B(a,c);return F(a[c][d])},E=(a,b,c,d)=>{var e=B(a,c);return A(d,e)||"undefined"!=typeof console&&console.warn&&console.warn(C(a,c,e,d)),F(a[c][e])},F=a=>(a.loaded=1,a.get()),H=(G=b=>function(c,d,e,f){var g=j.I(c);return g&&g.then?g.then(b.bind(b,c,j.S[c],d,e,f)):b(c,j.S[c],d,e,f)})((a,b,c,d)=>b&&j.o(b,c)?D(b,0,c):d()),I=G((a,b,c,d,e)=>b&&j.o(b,c)?E(b,0,c,d):e()),J={},K={5776:()=>I("default","react",[1,18],()=>j.e(735).then(()=>()=>j(2735))),4610:()=>I("default","@openmrs/esm-framework",[0],()=>j.e(889).then(()=>()=>j(4889))),8478:()=>H("default","@openmrs/esm-framework/src/internal",()=>j.e(889).then(()=>()=>j(4889))),2680:()=>I("default","react-i18next",[1,11],()=>j.e(146).then(()=>()=>j(7146))),7743:()=>I("default","react-router-dom",[1,6],()=>j.e(787).then(()=>()=>j(9787)))},L={656:[7743],680:[2680],776:[5776],789:[4610,8478]},j.f.consumes=(a,b)=>{j.o(L,a)&&L[a].forEach(a=>{if(j.o(J,a))return b.push(J[a]);var c=b=>{J[a]=0,j.m[a]=c=>{delete j.c[a],c.exports=b()}},d=b=>{delete J[a],j.m[a]=()=>{throw delete j.c[a],b}};try{var e=K[a]();e.then?b.push(J[a]=e.then(c).catch(d)):c(e)}catch(a){d(a)}})},(()=>{var b={115:0};j.f.j=(c,d)=>{var e=j.o(b,c)?b[c]:void 0;if(0!==e)if(e)d.push(e[2]);else if(/^(680|776)$/.test(c))b[c]=0;else{var f=new Promise((a,d)=>e=b[c]=[a,d]);d.push(e[2]=f);var g=j.p+j.u(c),h=new Error;j.l(g,d=>{if(j.o(b,c)&&(0!==(e=b[c])&&(b[c]=void 0),e)){var f=d&&("load"===d.type?"missing":d.type),g=d&&d.target&&d.target.src;h.message="Loading chunk "+c+" failed.\n("+f+": "+g+")",h.name="ChunkLoadError",h.type=f,h.request=g,e[1](h)}},"chunk-"+c,c)}};var a=(c,d)=>{var e,f,[g,a,h]=d,i=0;if(g.some(a=>0!==b[a])){for(e in a)j.o(a,e)&&(j.m[e]=a[e]);h&&h(j)}for(c&&c(d);i<g.length;i++)f=g[i],j.o(b,f)&&b[f]&&b[f][0](),b[f]=0},c=self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})(),j.nc=void 0;var y=j(7130);_openmrs_esm_primary_navigation_app=y})();
1
+ var _openmrs_esm_primary_navigation_app;(()=>{function j(a){var b=g[a];if(void 0!==b)return b.exports;var c=g[a]={id:a,loaded:!1,exports:{}};return M[a](c,c.exports,j),c.loaded=!0,c.exports}var b,k,q,x,z,A,B,C,D,E,F,G,H,I,J,K,L,M={7130:(b,c,d)=>{var f={"./start":()=>Promise.all([d.e(710),d.e(776),d.e(34)]).then(()=>()=>d(8034))},e=(a,b)=>(d.R=b,b=d.o(f,a)?f[a]():Promise.resolve().then(()=>{throw new Error("Module \""+a+"\" does not exist in container.")}),d.R=void 0,b),g=(a,b)=>{if(d.S){var c=d.S["default"];if(c&&c!==a)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return d.S["default"]=a,d.I("default",b)}};d.d(c,{get:()=>e,init:()=>g})}},g={};j.m=M,j.c=g,j.n=a=>{var b=a&&a.__esModule?()=>a.default:()=>a;return j.d(b,{a:b}),b},j.d=(a,b)=>{for(var c in b)j.o(b,c)&&!j.o(a,c)&&Object.defineProperty(a,c,{enumerable:!0,get:b[c]})},j.f={},j.e=a=>Promise.all(Object.keys(j.f).reduce((b,c)=>(j.f[c](a,b),b),[])),j.u=a=>a+".js",j.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(a){if("object"==typeof window)return window}}(),j.o=(a,b)=>Object.prototype.hasOwnProperty.call(a,b),b={},k="@openmrs/esm-primary-navigation-app:",j.l=(a,c,e)=>{if(b[a])b[a].push(c);else{var g,h;if(void 0!==e)for(var m,n=document.getElementsByTagName("script"),o=0;o<n.length;o++)if(m=n[o],m.getAttribute("src")==a||m.getAttribute("data-webpack")==k+e){g=m;break}g||(h=!0,(g=document.createElement("script")).charset="utf-8",g.timeout=120,j.nc&&g.setAttribute("nonce",j.nc),g.setAttribute("data-webpack",k+e),g.src=a),b[a]=[c];var q=(c,d)=>{g.onerror=g.onload=null,clearTimeout(f);var e=b[a];if(delete b[a],g.parentNode&&g.parentNode.removeChild(g),e&&e.forEach(a=>a(d)),c)return c(d)},f=setTimeout(q.bind(null,void 0,{type:"timeout",target:g}),12e4);g.onerror=q.bind(null,g.onerror),g.onload=q.bind(null,g.onload),h&&document.head.appendChild(g)}},j.r=a=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},j.nmd=a=>(a.paths=[],a.children||(a.children=[]),a),(()=>{j.S={};var b={},c={};j.I=(d,e)=>{e||(e=[]);var f=c[d];if(f||(f=c[d]={}),!(0<=e.indexOf(f))){if(e.push(f),b[d])return b[d];j.o(j.S,d)||(j.S[d]={});var g=j.S[d],a=(a,b,c,d)=>{var e=g[a]=g[a]||{},f=e[b];f&&(f.loaded||(!d==!f.eager?!("@openmrs/esm-primary-navigation-app">f.from):!d))||(e[b]={get:c,from:"@openmrs/esm-primary-navigation-app",eager:!!d})},h=[];return"default"===d&&(a("@openmrs/esm-framework/src/internal","4.0.3-pre.397",()=>Promise.all([j.e(776),j.e(889)]).then(()=>()=>j(4889))),a("react-dom","18.2.0",()=>Promise.all([j.e(788),j.e(776)]).then(()=>()=>j(2788))),a("react-i18next","11.18.6",()=>Promise.all([j.e(146),j.e(776)]).then(()=>()=>j(7146))),a("react-router-dom","5.3.4",()=>Promise.all([j.e(787),j.e(776),j.e(216)]).then(()=>()=>j(9787))),a("react","18.2.0",()=>j.e(735).then(()=>()=>j(2735)))),b[d]=h.length?Promise.all(h).then(()=>b[d]=1):1}}})(),(()=>{var a;j.g.importScripts&&(a=j.g.location+"");var b=j.g.document;if(!a&&b&&(b.currentScript&&(a=b.currentScript.src),!a)){var c=b.getElementsByTagName("script");c.length&&(a=c[c.length-1].src)}if(!a)throw new Error("Automatic publicPath is not supported in this browser");a=a.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),j.p=a})(),q=a=>{var b=a=>a.split(".").map(a=>+a==a?+a:a),c=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(a),d=c[1]?b(c[1]):[];return c[2]&&(d.length++,d.push.apply(d,b(c[2]))),c[3]&&(d.push([]),d.push.apply(d,b(c[3]))),d},x=(b,c)=>{b=q(b),c=q(c);for(var d=0;;){if(d>=b.length)return d<c.length&&"u"!=(typeof c[d])[0];var f=b[d],g=(typeof f)[0];if(d>=c.length)return"u"==g;var h=c[d],j=(typeof h)[0];if(g!=j)return"o"==g&&"n"==j||"s"==j||"u"==g;if("o"!=g&&"u"!=g&&f!=h)return f<h;d++}},z=b=>{function c(){return h.pop().replace(/^\((.+)\)$/,"$1")}var d=b[0],e="";if(1===b.length)return"*";if(d+.5){e+=0==d?">=":-1==d?"<":1==d?"^":2==d?"~":0<d?"=":"!=";for(var f=1,g=1;g<b.length;g++)f--,e+="u"==(typeof(i=b[g]))[0]?"-":(0<f?".":"")+(f=2,i);return e}var h=[];for(g=1;g<b.length;g++){var i=b[g];h.push(0===i?"not("+c()+")":1===i?"("+c()+" || "+c()+")":2===i?h.pop()+" "+h.pop():z(i))}return c()},A=(a,b)=>{if(0 in a){b=q(b);var e=a[0],g=0>e;g&&(e=-e-1);for(var j=0,k=1,m=!0;;k++,j++){var o,t,v=k<a.length?(typeof a[k])[0]:"";if(j>=b.length||"o"==(t=(typeof(o=b[j]))[0]))return!m||("u"==v?k>e&&!g:""==v!=g);if("u"==t){if(!m||"u"!=v)return!1;}else if(!m)"s"!=v&&"n"!=v&&(m=!1,k--);else if(v==t){if(!(k<=e)){if(g?o>a[k]:o<a[k])return!1;o!=a[k]&&(m=!1)}else if(o!=a[k])return!1;}else if("s"!=v&&"n"!=v){if(g||k<=e)return!1;m=!1,k--}else{if(k<=e||t<v!=g)return!1;m=!1}}}var w=[],d=w.pop.bind(w);for(j=1;j<a.length;j++){var c=a[j];w.push(1==c?d()|d():2==c?d()&d():c?A(c,b):!d())}return!!d()},B=(a,b)=>{var c=a[b];return Object.keys(c).reduce((a,b)=>a&&(c[a].loaded||!x(a,b))?a:b,0)},C=(a,b,c,d)=>"Unsatisfied version "+c+" from "+(c&&a[b][c].from)+" of shared singleton module "+b+" (required "+z(d)+")",D=(a,b,c)=>{var d=B(a,c);return F(a[c][d])},E=(a,b,c,d)=>{var e=B(a,c);return A(d,e)||"undefined"!=typeof console&&console.warn&&console.warn(C(a,c,e,d)),F(a[c][e])},F=a=>(a.loaded=1,a.get()),H=(G=b=>function(c,d,e,f){var g=j.I(c);return g&&g.then?g.then(b.bind(b,c,j.S[c],d,e,f)):b(c,j.S[c],d,e,f)})((a,b,c,d)=>b&&j.o(b,c)?D(b,0,c):d()),I=G((a,b,c,d,e)=>b&&j.o(b,c)?E(b,0,c,d):e()),J={},K={5776:()=>I("default","react",[1,18],()=>j.e(735).then(()=>()=>j(2735))),4610:()=>I("default","@openmrs/esm-framework",[0],()=>j.e(889).then(()=>()=>j(4889))),8478:()=>H("default","@openmrs/esm-framework/src/internal",()=>j.e(889).then(()=>()=>j(4889))),2680:()=>I("default","react-i18next",[1,11],()=>j.e(146).then(()=>()=>j(7146))),7743:()=>I("default","react-router-dom",[1,6],()=>j.e(787).then(()=>()=>j(9787)))},L={34:[4610,8478],656:[7743],680:[2680],776:[5776]},j.f.consumes=(a,b)=>{j.o(L,a)&&L[a].forEach(a=>{if(j.o(J,a))return b.push(J[a]);var c=b=>{J[a]=0,j.m[a]=c=>{delete j.c[a],c.exports=b()}},d=b=>{delete J[a],j.m[a]=()=>{throw delete j.c[a],b}};try{var e=K[a]();e.then?b.push(J[a]=e.then(c).catch(d)):c(e)}catch(a){d(a)}})},(()=>{var b={115:0};j.f.j=(c,d)=>{var e=j.o(b,c)?b[c]:void 0;if(0!==e)if(e)d.push(e[2]);else if(/^(680|776)$/.test(c))b[c]=0;else{var f=new Promise((a,d)=>e=b[c]=[a,d]);d.push(e[2]=f);var g=j.p+j.u(c),h=new Error;j.l(g,d=>{if(j.o(b,c)&&(0!==(e=b[c])&&(b[c]=void 0),e)){var f=d&&("load"===d.type?"missing":d.type),g=d&&d.target&&d.target.src;h.message="Loading chunk "+c+" failed.\n("+f+": "+g+")",h.name="ChunkLoadError",h.type=f,h.request=g,e[1](h)}},"chunk-"+c,c)}};var a=(c,d)=>{var e,f,[g,a,h]=d,i=0;if(g.some(a=>0!==b[a])){for(e in a)j.o(a,e)&&(j.m[e]=a[e]);h&&h(j)}for(c&&c(d);i<g.length;i++)f=g[i],j.o(b,f)&&b[f]&&b[f][0](),b[f]=0},c=self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[];c.forEach(a.bind(null,0)),c.push=a.bind(null,c.push.bind(c))})(),j.nc=void 0;var y=j(7130);_openmrs_esm_primary_navigation_app=y})();
@@ -5,9 +5,31 @@
5
5
  "initial": false,
6
6
  "entry": false,
7
7
  "recorded": false,
8
- "size": 10052,
8
+ "size": 20971,
9
9
  "sizes": {
10
- "javascript": 10052
10
+ "javascript": 20887,
11
+ "consume-shared": 84
12
+ },
13
+ "names": [],
14
+ "idHints": [],
15
+ "runtime": [
16
+ "@openmrs/esm-primary-navigation-app"
17
+ ],
18
+ "files": [
19
+ "34.js"
20
+ ],
21
+ "auxiliaryFiles": [],
22
+ "hash": "825f7e5ab4978ba3eaf5",
23
+ "childrenByOrder": {}
24
+ },
25
+ {
26
+ "rendered": true,
27
+ "initial": false,
28
+ "entry": false,
29
+ "recorded": false,
30
+ "size": 10212,
31
+ "sizes": {
32
+ "javascript": 10212
11
33
  },
12
34
  "names": [],
13
35
  "idHints": [],
@@ -19,7 +41,7 @@
19
41
  "98.js"
20
42
  ],
21
43
  "auxiliaryFiles": [],
22
- "hash": "5db54069dabdaf29fe24",
44
+ "hash": "9bc07254083ef514fb15",
23
45
  "childrenByOrder": {}
24
46
  },
25
47
  {
@@ -27,11 +49,11 @@
27
49
  "initial": true,
28
50
  "entry": true,
29
51
  "recorded": false,
30
- "size": 19895,
52
+ "size": 19894,
31
53
  "sizes": {
32
54
  "javascript": 42,
33
55
  "share-init": 210,
34
- "runtime": 19643
56
+ "runtime": 19642
35
57
  },
36
58
  "names": [
37
59
  "@openmrs/esm-primary-navigation-app"
@@ -44,7 +66,7 @@
44
66
  "openmrs-esm-primary-navigation-app.js"
45
67
  ],
46
68
  "auxiliaryFiles": [],
47
- "hash": "05912ad59ffc2f56e53d",
69
+ "hash": "35e2fb7707952a3f5ccd",
48
70
  "childrenByOrder": {}
49
71
  },
50
72
  {
@@ -77,12 +99,12 @@
77
99
  "initial": true,
78
100
  "entry": true,
79
101
  "recorded": false,
80
- "size": 60453,
102
+ "size": 61794,
81
103
  "sizes": {
82
104
  "consume-shared": 126,
83
- "javascript": 40096,
105
+ "javascript": 41429,
84
106
  "share-init": 210,
85
- "runtime": 20021
107
+ "runtime": 20029
86
108
  },
87
109
  "names": [
88
110
  "main"
@@ -95,7 +117,7 @@
95
117
  "main.js"
96
118
  ],
97
119
  "auxiliaryFiles": [],
98
- "hash": "6a727db738c755bb63cc",
120
+ "hash": "f233e1f2305518daa663",
99
121
  "childrenByOrder": {}
100
122
  },
101
123
  {
@@ -258,6 +280,30 @@
258
280
  "hash": "4986583bb3eea255a706",
259
281
  "childrenByOrder": {}
260
282
  },
283
+ {
284
+ "rendered": true,
285
+ "initial": false,
286
+ "entry": false,
287
+ "recorded": false,
288
+ "reason": "split chunk (cache group: defaultVendors)",
289
+ "size": 20542,
290
+ "sizes": {
291
+ "javascript": 20542
292
+ },
293
+ "names": [],
294
+ "idHints": [
295
+ "vendors"
296
+ ],
297
+ "runtime": [
298
+ "@openmrs/esm-primary-navigation-app"
299
+ ],
300
+ "files": [
301
+ "710.js"
302
+ ],
303
+ "auxiliaryFiles": [],
304
+ "hash": "6a91aa0fc450b7da8e54",
305
+ "childrenByOrder": {}
306
+ },
261
307
  {
262
308
  "rendered": true,
263
309
  "initial": false,
@@ -376,28 +422,6 @@
376
422
  "hash": "78d45630991c445556fd",
377
423
  "childrenByOrder": {}
378
424
  },
379
- {
380
- "rendered": true,
381
- "initial": false,
382
- "entry": false,
383
- "recorded": false,
384
- "size": 40180,
385
- "sizes": {
386
- "consume-shared": 84,
387
- "javascript": 40096
388
- },
389
- "names": [],
390
- "idHints": [],
391
- "runtime": [
392
- "@openmrs/esm-primary-navigation-app"
393
- ],
394
- "files": [
395
- "789.js"
396
- ],
397
- "auxiliaryFiles": [],
398
- "hash": "778b50a53c620d8affc4",
399
- "childrenByOrder": {}
400
- },
401
425
  {
402
426
  "rendered": true,
403
427
  "initial": false,
@@ -1 +1 @@
1
- var _openmrs_esm_primary_navigation_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,c,h,m,v,g={7130:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(776),t.e(789)]).then((()=>()=>t(789)))},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})}},y={};function b(e){var r=y[e];if(void 0!==r)return r.exports;var t=y[e]={id:e,loaded:!1,exports:{}};return g[e](t,t.exports,b),t.loaded=!0,t.exports}b.m=g,b.c=y,b.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return b.d(r,{a:r}),r},b.d=(e,r)=>{for(var t in r)b.o(r,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((r,t)=>(b.f[t](e,r),r)),[])),b.u=e=>e+".js",b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-primary-navigation-app:",b.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,b.nc&&i.setAttribute("nonce",b.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{b.S={};var e={},r={};b.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];b.o(b.S,t)||(b.S[t]={});var a=b.S[t],i="@openmrs/esm-primary-navigation-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/src/internal","4.0.3-pre.390",(()=>Promise.all([b.e(776),b.e(889)]).then((()=>()=>b(4889))))),l("react-dom","18.2.0",(()=>Promise.all([b.e(788),b.e(776)]).then((()=>()=>b(2788))))),l("react-i18next","11.18.6",(()=>Promise.all([b.e(146),b.e(776)]).then((()=>()=>b(7146))))),l("react-router-dom","5.3.4",(()=>Promise.all([b.e(787),b.e(776),b.e(216)]).then((()=>()=>b(9787))))),l("react","18.2.0",(()=>b.e(735).then((()=>()=>b(2735)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;b.g.importScripts&&(e=b.g.location+"");var r=b.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),b.p=e})(),t=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},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[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++}},o=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,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}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():o(l))}return s();function s(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,s=!0;;l++,i++){var u,p,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!s||("u"==f?l>n&&!o:""==f!=o);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(l<=n){if(u!=e[l])return!1}else{if(o?u>e[l]:u<e[l])return!1;u!=e[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||l<=n)return!1;s=!1,l--}else{if(l<=n||p<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var d=[],c=d.pop.bind(d);for(i=1;i<e.length;i++){var h=e[i];d.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",s=(e,r,t,n)=>{var o=i(e,t);return p(e[t][o])},u=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||"undefined"!=typeof console&&console.warn&&console.warn(l(e,t,o,n)),p(e[t][o])},p=e=>(e.loaded=1,e.get()),d=(f=e=>function(r,t,n,o){var a=b.I(r);return a&&a.then?a.then(e.bind(e,r,b.S[r],t,n,o)):e(r,b.S[r],t,n,o)})(((e,r,t,n)=>r&&b.o(r,t)?s(r,0,t):n())),c=f(((e,r,t,n,o)=>r&&b.o(r,t)?u(r,0,t,n):o())),h={},m={5776:()=>c("default","react",[1,18],(()=>b.e(735).then((()=>()=>b(2735))))),4610:()=>c("default","@openmrs/esm-framework",[0],(()=>b.e(889).then((()=>()=>b(4889))))),8478:()=>d("default","@openmrs/esm-framework/src/internal",(()=>b.e(889).then((()=>()=>b(4889))))),2680:()=>c("default","react-i18next",[1,11],(()=>b.e(146).then((()=>()=>b(7146))))),7743:()=>c("default","react-router-dom",[1,6],(()=>b.e(787).then((()=>()=>b(9787)))))},v={656:[7743],680:[2680],776:[5776],789:[4610,8478]},b.f.consumes=(e,r)=>{b.o(v,e)&&v[e].forEach((e=>{if(b.o(h,e))return r.push(h[e]);var t=r=>{h[e]=0,b.m[e]=t=>{delete b.c[e],t.exports=r()}},n=r=>{delete h[e],b.m[e]=t=>{throw delete b.c[e],r}};try{var o=m[e]();o.then?r.push(h[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={115:0};b.f.j=(r,t)=>{var n=b.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(680|776)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=b.p+b.u(r),i=new Error;b.l(a,(t=>{if(b.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)b.o(i,n)&&(b.m[n]=i[n]);l&&l(b)}for(r&&r(t);s<a.length;s++)o=a[s],b.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),b.nc=void 0;var w=b(7130);_openmrs_esm_primary_navigation_app=w})();
1
+ var _openmrs_esm_primary_navigation_app;(()=>{"use strict";var e,r,t,n,o,a,i,l,s,u,p,f,d,c,h,m,v,g={7130:(e,r,t)=>{var n={"./start":()=>Promise.all([t.e(710),t.e(776),t.e(34)]).then((()=>()=>t(8034)))},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})}},y={};function b(e){var r=y[e];if(void 0!==r)return r.exports;var t=y[e]={id:e,loaded:!1,exports:{}};return g[e](t,t.exports,b),t.loaded=!0,t.exports}b.m=g,b.c=y,b.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return b.d(r,{a:r}),r},b.d=(e,r)=>{for(var t in r)b.o(r,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce(((r,t)=>(b.f[t](e,r),r)),[])),b.u=e=>e+".js",b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@openmrs/esm-primary-navigation-app:",b.l=(t,n,o,a)=>{if(e[t])e[t].push(n);else{var i,l;if(void 0!==o)for(var s=document.getElementsByTagName("script"),u=0;u<s.length;u++){var p=s[u];if(p.getAttribute("src")==t||p.getAttribute("data-webpack")==r+o){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,b.nc&&i.setAttribute("nonce",b.nc),i.setAttribute("data-webpack",r+o),i.src=t),e[t]=[n];var f=(r,n)=>{i.onerror=i.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach((e=>e(n))),r)return r(n)},d=setTimeout(f.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=f.bind(null,i.onerror),i.onload=f.bind(null,i.onload),l&&document.head.appendChild(i)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{b.S={};var e={},r={};b.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];b.o(b.S,t)||(b.S[t]={});var a=b.S[t],i="@openmrs/esm-primary-navigation-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/src/internal","4.0.3-pre.397",(()=>Promise.all([b.e(776),b.e(889)]).then((()=>()=>b(4889))))),l("react-dom","18.2.0",(()=>Promise.all([b.e(788),b.e(776)]).then((()=>()=>b(2788))))),l("react-i18next","11.18.6",(()=>Promise.all([b.e(146),b.e(776)]).then((()=>()=>b(7146))))),l("react-router-dom","5.3.4",(()=>Promise.all([b.e(787),b.e(776),b.e(216)]).then((()=>()=>b(9787))))),l("react","18.2.0",(()=>b.e(735).then((()=>()=>b(2735)))))),e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;b.g.importScripts&&(e=b.g.location+"");var r=b.g.document;if(!e&&r&&(r.currentScript&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),b.p=e})(),t=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},n=(e,r)=>{e=t(e),r=t(r);for(var n=0;;){if(n>=e.length)return n<r.length&&"u"!=(typeof r[n])[0];var o=e[n],a=(typeof o)[0];if(n>=r.length)return"u"==a;var i=r[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++}},o=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,a=1;a<e.length;a++)n--,t+="u"==(typeof(l=e[a]))[0]?"-":(n>0?".":"")+(n=2,l);return t}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():o(l))}return s();function s(){return i.pop().replace(/^\((.+)\)$/,"$1")}},a=(e,r)=>{if(0 in e){r=t(r);var n=e[0],o=n<0;o&&(n=-n-1);for(var i=0,l=1,s=!0;;l++,i++){var u,p,f=l<e.length?(typeof e[l])[0]:"";if(i>=r.length||"o"==(p=(typeof(u=r[i]))[0]))return!s||("u"==f?l>n&&!o:""==f!=o);if("u"==p){if(!s||"u"!=f)return!1}else if(s)if(f==p)if(l<=n){if(u!=e[l])return!1}else{if(o?u>e[l]:u<e[l])return!1;u!=e[l]&&(s=!1)}else if("s"!=f&&"n"!=f){if(o||l<=n)return!1;s=!1,l--}else{if(l<=n||p<f!=o)return!1;s=!1}else"s"!=f&&"n"!=f&&(s=!1,l--)}}var d=[],c=d.pop.bind(d);for(i=1;i<e.length;i++){var h=e[i];d.push(1==h?c()|c():2==h?c()&c():h?a(h,r):!c())}return!!c()},i=(e,r)=>{var t=e[r];return Object.keys(t).reduce(((e,r)=>!e||!t[e].loaded&&n(e,r)?r:e),0)},l=(e,r,t,n)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+o(n)+")",s=(e,r,t,n)=>{var o=i(e,t);return p(e[t][o])},u=(e,r,t,n)=>{var o=i(e,t);return a(n,o)||"undefined"!=typeof console&&console.warn&&console.warn(l(e,t,o,n)),p(e[t][o])},p=e=>(e.loaded=1,e.get()),d=(f=e=>function(r,t,n,o){var a=b.I(r);return a&&a.then?a.then(e.bind(e,r,b.S[r],t,n,o)):e(r,b.S[r],t,n,o)})(((e,r,t,n)=>r&&b.o(r,t)?s(r,0,t):n())),c=f(((e,r,t,n,o)=>r&&b.o(r,t)?u(r,0,t,n):o())),h={},m={5776:()=>c("default","react",[1,18],(()=>b.e(735).then((()=>()=>b(2735))))),4610:()=>c("default","@openmrs/esm-framework",[0],(()=>b.e(889).then((()=>()=>b(4889))))),8478:()=>d("default","@openmrs/esm-framework/src/internal",(()=>b.e(889).then((()=>()=>b(4889))))),2680:()=>c("default","react-i18next",[1,11],(()=>b.e(146).then((()=>()=>b(7146))))),7743:()=>c("default","react-router-dom",[1,6],(()=>b.e(787).then((()=>()=>b(9787)))))},v={34:[4610,8478],656:[7743],680:[2680],776:[5776]},b.f.consumes=(e,r)=>{b.o(v,e)&&v[e].forEach((e=>{if(b.o(h,e))return r.push(h[e]);var t=r=>{h[e]=0,b.m[e]=t=>{delete b.c[e],t.exports=r()}},n=r=>{delete h[e],b.m[e]=t=>{throw delete b.c[e],r}};try{var o=m[e]();o.then?r.push(h[e]=o.then(t).catch(n)):t(o)}catch(e){n(e)}}))},(()=>{var e={115:0};b.f.j=(r,t)=>{var n=b.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else if(/^(680|776)$/.test(r))e[r]=0;else{var o=new Promise(((t,o)=>n=e[r]=[t,o]));t.push(n[2]=o);var a=b.p+b.u(r),i=new Error;b.l(a,(t=>{if(b.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)b.o(i,n)&&(b.m[n]=i[n]);l&&l(b)}for(r&&r(t);s<a.length;s++)o=a[s],b.o(e,o)&&e[o]&&e[o][0](),e[o]=0},t=self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),b.nc=void 0;var w=b(7130);_openmrs_esm_primary_navigation_app=w})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-primary-navigation-app",
3
- "version": "4.0.3-pre.390",
3
+ "version": "4.0.3-pre.397",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Main navbar microfrontend for the OpenMRS SPA",
6
6
  "browser": "dist/openmrs-esm-primary-navigation-app.js",
@@ -49,8 +49,8 @@
49
49
  "rxjs": "6.x"
50
50
  },
51
51
  "devDependencies": {
52
- "@openmrs/esm-framework": "^4.0.3-pre.390",
53
- "@openmrs/webpack-config": "^4.0.3-pre.390",
52
+ "@openmrs/esm-framework": "^4.0.3-pre.397",
53
+ "@openmrs/webpack-config": "^4.0.3-pre.397",
54
54
  "jest": "^28.1.0",
55
55
  "react": "^18.1.0",
56
56
  "react-dom": "^18.1.0",
@@ -58,5 +58,5 @@
58
58
  "react-router-dom": "^5.3.1",
59
59
  "rxjs": "^6.5.3"
60
60
  },
61
- "gitHead": "87d4cf4922365ddd427965fb2002b2457c2a38b1"
61
+ "gitHead": "746893133105955b4a5a26478944e23052cb7cf7"
62
62
  }
@@ -2,19 +2,24 @@ import React, { useEffect, useState } from "react";
2
2
  import styles from "./change-locale.scss";
3
3
  import { Select, SelectItem } from "@carbon/react";
4
4
  import { ExtensionSlot, LoggedInUser } from "@openmrs/esm-framework";
5
- import { PostUserProperties } from "./change-locale.resource";
5
+ import {
6
+ PostSessionLocale,
7
+ PostUserProperties,
8
+ } from "./change-locale.resource";
6
9
  import { useTranslation } from "react-i18next";
7
10
 
8
11
  export interface ChangeLocaleProps {
9
12
  allowedLocales: Array<string>;
10
13
  user: LoggedInUser;
11
14
  postUserProperties: PostUserProperties;
15
+ postSessionLocale: PostSessionLocale;
12
16
  }
13
17
 
14
18
  const ChangeLocale: React.FC<ChangeLocaleProps> = ({
15
19
  allowedLocales,
16
20
  user,
17
21
  postUserProperties,
22
+ postSessionLocale,
18
23
  }) => {
19
24
  const { t } = useTranslation();
20
25
  const [userProps, setUserProps] = useState(user.userProperties);
@@ -26,10 +31,11 @@ const ChangeLocale: React.FC<ChangeLocaleProps> = ({
26
31
  if (user.userProperties.defaultLocale !== userProps.defaultLocale) {
27
32
  const ac = new AbortController();
28
33
  postUserProperties(user.uuid, userProps, ac);
34
+ postSessionLocale(userProps.defaultLocale, ac);
29
35
  return () => ac.abort();
30
36
  }
31
37
  // eslint-disable-next-line react-hooks/exhaustive-deps
32
- }, [userProps]);
38
+ }, [userProps, postUserProperties, postSessionLocale]);
33
39
 
34
40
  return (
35
41
  <div className={`omrs-margin-12 ${styles.switcherContainer}`}>
@@ -32,6 +32,23 @@ export async function postUserPropertiesOnline(
32
32
  }
33
33
  }
34
34
 
35
+ export type PostSessionLocale = (
36
+ locale: string,
37
+ abortController: AbortController
38
+ ) => Promise<any>;
39
+
40
+ export async function postSessionLocaleOnline(
41
+ locale: string,
42
+ abortController: AbortController
43
+ ): Promise<any> {
44
+ await openmrsFetch(`/ws/rest/v1/session`, {
45
+ method: "POST",
46
+ body: { locale },
47
+ headers: { "Content-Type": "application/json" },
48
+ signal: abortController.signal,
49
+ });
50
+ }
51
+
35
52
  export function postUserPropertiesOffline(
36
53
  userUuid: string,
37
54
  userProperties: any
@@ -12,14 +12,18 @@ const user: any = {
12
12
 
13
13
  describe(`<ChangeLocale />`, () => {
14
14
  let postUserPropertiesMock = jest.fn(() => Promise.resolve({}));
15
+ let postSessionLocaleMock = jest.fn(() => Promise.resolve({}));
15
16
 
16
17
  beforeEach(() => {
17
18
  postUserPropertiesMock = jest.fn(() => Promise.resolve({}));
19
+ postSessionLocaleMock = jest.fn(() => Promise.resolve({}));
20
+
18
21
  render(
19
22
  <ChangeLocale
20
23
  allowedLocales={allowedLocales}
21
24
  user={user}
22
25
  postUserProperties={postUserPropertiesMock}
26
+ postSessionLocale={postSessionLocaleMock}
23
27
  />
24
28
  );
25
29
  });
@@ -32,12 +36,16 @@ describe(`<ChangeLocale />`, () => {
32
36
  fireEvent.change(screen.getByLabelText(/Select locale/i), {
33
37
  target: { value: "en" },
34
38
  });
35
- await waitFor(() =>
39
+ await waitFor(() => {
36
40
  expect(postUserPropertiesMock).toHaveBeenCalledWith(
37
41
  user.uuid,
38
42
  { defaultLocale: "en" },
39
43
  expect.anything()
40
- )
41
- );
44
+ );
45
+ expect(postSessionLocaleMock).toHaveBeenCalledWith(
46
+ "en",
47
+ expect.anything()
48
+ );
49
+ });
42
50
  });
43
51
  });
package/src/index.ts CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  import {
8
8
  postUserPropertiesOnline,
9
9
  postUserPropertiesOffline,
10
+ postSessionLocaleOnline,
10
11
  } from "./components/choose-locale/change-locale.resource";
11
12
  import { configSchema } from "./config-schema";
12
13
  import { moduleName, userPropertyChange } from "./constants";
@@ -87,9 +88,11 @@ function setupOpenMRS() {
87
88
  ),
88
89
  online: {
89
90
  postUserProperties: postUserPropertiesOnline,
91
+ postSessionLocale: postSessionLocaleOnline,
90
92
  },
91
93
  offline: {
92
94
  postUserProperties: postUserPropertiesOffline,
95
+ postSessionLocale: () => Promise.resolve({}),
93
96
  },
94
97
  },
95
98
  {
package/dist/789.js DELETED
@@ -1 +0,0 @@
1
- (self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[789],{6639:(t,n,e)=>{"use strict";e.r(n),e.d(n,{default:()=>a,genericLinkConfigSchema:()=>u});var r=e(5776),o=e.n(r),i=e(4610),u={title:{_default:"New Link",_type:i.Type.String},target:{_default:"#",_type:i.Type.String,_description:"The URL to link to.",_validators:[i.validators.isUrl]}};function a(){var t=(0,i.useConfig)();return o().createElement(i.ConfigurableLink,{to:t.target},t.title)}},1217:(t,n,e)=>{"use strict";e.d(n,{O:()=>r,e:()=>o});var r="user-property-change",o="@openmrs/esm-primary-navigation-app"},789:(t,n,e)=>{"use strict";e.r(n),e.d(n,{backendDependencies:()=>fn,importTranslation:()=>ln,setupOpenMRS:()=>hn,version:()=>cn});var r=e(4610),o=e(8478),i=e(1217);function u(t,n,e,r,o,i,u){try{var a=t[i](u),s=a.value}catch(t){return void e(t)}a.done?n(s):Promise.resolve(s).then(r,o)}function a(t){return function(){var n=this,e=arguments;return new Promise((function(r,o){var i=t.apply(n,e);function a(t){u(i,r,o,a,s,"next",t)}function s(t){u(i,r,o,a,s,"throw",t)}a(void 0)}))}}var s=function(t,n){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(t,u)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};function c(t,n,e){return l.apply(this,arguments)}function l(){return(l=a((function(t,n,e){var r,i;return s(this,(function(u){switch(u.label){case 0:return[4,(0,o.getSessionLocation)()];case 1:return r=u.sent(),i=null==r?void 0:r.uuid,[4,(0,o.openmrsFetch)("/ws/rest/v1/user/".concat(t),{method:"POST",body:{userProperties:n},headers:{"Content-Type":"application/json"},signal:e.signal})];case 2:return u.sent(),i?[4,(0,o.setSessionLocation)(i,e)]:[3,4];case 3:u.sent(),u.label=4;case 4:return[2]}}))}))).apply(this,arguments)}function f(t,n){return(0,o.queueSynchronizationItemFor)(t,i.O,n,{displayName:"User Language Change"})}var p={logo:{src:{_type:r.Type.String,_default:null,_description:"A path or URL to an image. Defaults to the OpenMRS SVG sprite."},alt:{_type:r.Type.String,_default:"Logo",_description:"Alt text, shown on hover"},name:{_type:r.Type.String,_default:null,_description:"The organization name displayed when image is absent"}},externalRefLinks:{_type:r.Type.Array,_elements:{title:{_type:r.Type.String,_description:"Title of the link"},redirect:{_type:r.Type.String,_description:"Link to redirect to (must be an external link)",_validators:[r.validators.isUrl]}},_default:[],_description:"The external links to be showcased in the app menu"}};function h(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function m(t,n,e,r,o,i,u){try{var a=t[i](u),s=a.value}catch(t){return void e(t)}a.done?n(s):Promise.resolve(s).then(r,o)}function d(t){return function(){var n=this,e=arguments;return new Promise((function(r,o){var i=t.apply(n,e);function u(t){m(i,r,o,u,a,"next",t)}function a(t){m(i,r,o,u,a,"throw",t)}u(void 0)}))}}function v(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var r,o,i=[],u=!0,a=!1;try{for(e=e.call(t);!(u=(r=e.next()).done)&&(i.push(r.value),!n||i.length!==n);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==e.return||e.return()}finally{if(a)throw o}}return i}}(t,n)||y(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t){return function(t){if(Array.isArray(t))return h(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||y(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,n){if(t){if("string"==typeof t)return h(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(e):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?h(t,n):void 0}}var g=function(t,n){var e,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=n.call(t,u)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};function b(t,n){return E.apply(this,arguments)}function E(){return E=d((function(t,n){var e,r,i,u;return g(this,(function(t){switch(t.label){case 0:return 0!==n.index?[3,3]:[4,(0,o.getLoggedInUser)()];case 1:return r=t.sent(),i=n.items.map((function(t){var n=v(t,2);return n[0],n[1]})),u=(e=Object).assign.apply(e,[{},r.userProperties].concat(w(i))),[4,c(r.uuid,u,n.abort)];case 2:t.sent(),(0,o.refetchCurrentUser)(),t.label=3;case 3:return[2]}}))})),E.apply(this,arguments)}var P=Object.freeze({__proto__:null,get start(){return on},get ensureJQuerySupport(){return kt},get setBootstrapMaxTime(){return pt},get setMountMaxTime(){return ht},get setUnmountMaxTime(){return mt},get setUnloadMaxTime(){return dt},get registerApplication(){return Kt},get unregisterApplication(){return Jt},get getMountedApps(){return Wt},get getAppStatus(){return Ft},get unloadApplication(){return Vt},get checkActivityFunctions(){return zt},get getAppNames(){return $t},get pathToActiveWhen(){return Qt},get navigateToUrl(){return Tt},get triggerAppChange(){return tn},get addErrorHandler(){return L},get removeErrorHandler(){return U},get mountRootParcel(){return at},get NOT_LOADED(){return D},get LOADING_SOURCE_CODE(){return x},get NOT_BOOTSTRAPPED(){return M},get BOOTSTRAPPING(){return C},get NOT_MOUNTED(){return I},get MOUNTING(){return R},get UPDATING(){return G},get LOAD_ERROR(){return $},get MOUNTED(){return B},get UNMOUNTING(){return W},get SKIP_BECAUSE_BROKEN(){return F}});function T(t){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var S=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{}).CustomEvent,_=function(){try{var t=new S("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?S:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,n){var e=document.createEvent("CustomEvent");return n?e.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):e.initCustomEvent(t,!1,!1,void 0),e}:function(t,n){var e=document.createEventObject();return e.type=t,n?(e.bubbles=Boolean(n.bubbles),e.cancelable=Boolean(n.cancelable),e.detail=n.detail):(e.bubbles=!1,e.cancelable=!1,e.detail=void 0),e},A=[];function N(t,n,e){var r=k(t,n,e);A.length?A.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function L(t){if("function"!=typeof t)throw Error(j(28,!1));A.push(t)}function U(t){if("function"!=typeof t)throw Error(j(29,!1));var n=!1;return A=A.filter((function(e){var r=e===t;return n=n||r,!r})),n}function j(t,n){for(var e=arguments.length,r=new Array(e>2?e-2:0),o=2;o<e;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(n?n+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function k(t,n,e){var r,o="".concat(q(n)," '").concat(J(n),"' died in status ").concat(n.status,": ");if(t instanceof Error){try{t.message=o+t.message}catch(t){}r=t}else{console.warn(j(30,!1,n.status,J(n)));try{r=Error(o+JSON.stringify(t))}catch(n){r=t}}return r.appOrParcelName=J(n),n.status=e,r}var D="NOT_LOADED",x="LOADING_SOURCE_CODE",M="NOT_BOOTSTRAPPED",C="BOOTSTRAPPING",I="NOT_MOUNTED",R="MOUNTING",B="MOUNTED",G="UPDATING",W="UNMOUNTING",$="LOAD_ERROR",F="SKIP_BECAUSE_BROKEN";function K(t){return t.status===B}function z(t){try{return t.activeWhen(window.location)}catch(n){return N(n,t,F),!1}}function J(t){return t.name}function V(t){return Boolean(t.unmountThisParcel)}function q(t){return V(t)?"parcel":"application"}function H(){for(var t=arguments.length-1;t>0;t--)for(var n in arguments[t])"__proto__"!==n&&(arguments[t-1][n]=arguments[t][n]);return arguments[0]}function Q(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return t[e];return null}function X(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!Q(n,(function(t){return"function"!=typeof t}))));var n}function Y(t,n){var e=t[n]||[];0===(e=Array.isArray(e)?e:[e]).length&&(e=[function(){return Promise.resolve()}]);var r=q(t),o=J(t);return function(t){return e.reduce((function(e,i,u){return e.then((function(){var e=i(t);return Z(e)?e:Promise.reject(j(15,!1,r,o,n,u))}))}),Promise.resolve())}}function Z(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch}function tt(t,n){return Promise.resolve().then((function(){return t.status!==M?t:(t.status=C,t.bootstrap?vt(t,"bootstrap").then(e).catch((function(e){if(n)throw k(e,t,F);return N(e,t,F),t})):Promise.resolve().then(e))}));function e(){return t.status=I,t}}function nt(t,n){return Promise.resolve().then((function(){if(t.status!==B)return t;t.status=W;var e=Object.keys(t.parcels).map((function(n){return t.parcels[n].unmountThisParcel()}));return Promise.all(e).then(r,(function(e){return r().then((function(){var r=Error(e.message);if(n)throw k(r,t,F);N(r,t,F)}))})).then((function(){return t}));function r(){return vt(t,"unmount").then((function(){t.status=I})).catch((function(e){if(n)throw k(e,t,F);N(e,t,F)}))}}))}var et=!1,rt=!1;function ot(t,n){return Promise.resolve().then((function(){return t.status!==I?t:(et||(window.dispatchEvent(new _("single-spa:before-first-mount")),et=!0),vt(t,"mount").then((function(){return t.status=B,rt||(window.dispatchEvent(new _("single-spa:first-mount")),rt=!0),t})).catch((function(e){return t.status=B,nt(t,!0).then(r,r);function r(){if(n)throw k(e,t,F);return N(e,t,F),t}})))}))}var it=0,ut={parcels:{}};function at(){return st.apply(ut,arguments)}function st(t,n){var e=this;if(!t||"object"!==T(t)&&"function"!=typeof t)throw Error(j(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(j(3,!1,T(t.name)));if("object"!==T(n))throw Error(j(4,!1,name,T(n)));if(!n.domElement)throw Error(j(5,!1,name));var r,o=it++,i="function"==typeof t,u=i?t:function(){return Promise.resolve(t)},a={id:o,parcels:{},status:i?x:M,customProps:n,parentName:J(e),unmountThisParcel:function(){return p.then((function(){if(a.status!==B)throw Error(j(6,!1,name,a.status));return nt(a,!0)})).then((function(t){return a.parentName&&delete e.parcels[a.id],t})).then((function(t){return c(t),t})).catch((function(t){throw a.status=F,l(t),t}))}};e.parcels[o]=a;var s=u();if(!s||"function"!=typeof s.then)throw Error(j(7,!1));var c,l,f=(s=s.then((function(t){if(!t)throw Error(j(8,!1));var n=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!X(t.bootstrap))throw Error(j(9,!1,n));if(!X(t.mount))throw Error(j(10,!1,n));if(!X(t.unmount))throw Error(j(11,!1,n));if(t.update&&!X(t.update))throw Error(j(12,!1,n));var e=Y(t,"bootstrap"),i=Y(t,"mount"),u=Y(t,"unmount");a.status=M,a.name=n,a.bootstrap=e,a.mount=i,a.unmount=u,a.timeouts=wt(t.timeouts),t.update&&(a.update=Y(t,"update"),r.update=function(t){return a.customProps=t,ct(function(t){return Promise.resolve().then((function(){if(t.status!==B)throw Error(j(32,!1,J(t)));return t.status=G,vt(t,"update").then((function(){return t.status=B,t})).catch((function(n){throw k(n,t,F)}))}))}(a))})}))).then((function(){return tt(a,!0)})),p=f.then((function(){return ot(a,!0)})),h=new Promise((function(t,n){c=t,l=n}));return r={mount:function(){return ct(Promise.resolve().then((function(){if(a.status!==I)throw Error(j(13,!1,name,a.status));return e.parcels[o]=a,ot(a)})))},unmount:function(){return ct(a.unmountThisParcel())},getStatus:function(){return a.status},loadPromise:ct(s),bootstrapPromise:ct(f),mountPromise:ct(p),unmountPromise:ct(h)}}function ct(t){return t.then((function(){return null}))}function lt(t){var n=J(t),e="function"==typeof t.customProps?t.customProps(n,window.location):t.customProps;("object"!==T(e)||null===e||Array.isArray(e))&&(e={},console.warn(j(40,!1),n,e));var r=H({},e,{name:n,mountParcel:st.bind(t),singleSpa:P});return V(t)&&(r.unmountSelf=t.unmountThisParcel),r}var ft={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function pt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(16,!1));ft.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function ht(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(17,!1));ft.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function mt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(18,!1));ft.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function dt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(19,!1));ft.unload={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function vt(t,n){var e=t.timeouts[n],r=e.warningMillis,o=q(t);return new Promise((function(i,u){var a=!1,s=!1;t[n](lt(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),e.millis);var c=j(31,!1,n,o,J(t),e.millis);function l(t){if(!a)if(!0===t)s=!0,e.dieOnTimeout?u(Error(c)):console.error(c);else if(!s){var n=t,o=n*r;console.warn(c),o+r<e.millis&&setTimeout((function(){return l(n+1)}),r)}}}))}function wt(t){var n={};for(var e in ft)n[e]=H({},ft[e],t&&t[e]||{});return n}function yt(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==D&&t.status!==$?t:(t.status=x,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(lt(t));if(!Z(r))throw e=!0,Error(j(33,!1,J(t)));return r.then((function(e){var r;t.loadErrorTime=null,"object"!==T(n=e)&&(r=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!X(n.bootstrap)&&(r=35),X(n.mount)||(r=36),X(n.unmount)||(r=37);var o=q(n);if(r){var i;try{i=JSON.stringify(n)}catch(t){}return console.error(j(r,!1,o,J(t),i),n),N(void 0,t,F),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=H({},t.devtools.overlays,n.devtools.overlays)),t.status=M,t.bootstrap=Y(n,"bootstrap"),t.mount=Y(n,"mount"),t.unmount=Y(n,"unmount"),t.unload=Y(n,"unload"),t.timeouts=wt(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var r;return delete t.loadPromise,e?r=F:(r=$,t.loadErrorTime=(new Date).getTime()),N(n,t,r),t})));var n,e}))}var gt,bt="undefined"!=typeof window,Et={hashchange:[],popstate:[]},Pt=["hashchange","popstate"];function Tt(t){var n;if("string"==typeof t)n=t;else if(this&&this.href)n=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(j(14,!1));n=t.currentTarget.href,t.preventDefault()}var e=Ut(window.location.href),r=Ut(n);0===n.indexOf("#")?window.location.hash=r.hash:e.host!==r.host&&r.host?window.location.href=n:r.pathname===e.pathname&&r.search===e.search?window.location.hash=r.hash:window.history.pushState(null,null,n)}function Ot(t){var n=this;if(t){var e=t[0].type;Pt.indexOf(e)>=0&&Et[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function St(){nn([],arguments)}function _t(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return gt&&e===o||(un()?window.dispatchEvent(At(window.history.state,n)):nn([])),r}}function At(t,n){var e;try{e=new PopStateEvent("popstate",{state:t})}catch(n){(e=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return e.singleSpa=!0,e.singleSpaTrigger=n,e}if(bt){window.addEventListener("hashchange",St),window.addEventListener("popstate",St);var Nt=window.addEventListener,Lt=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&Pt.indexOf(t)>=0)||Q(Et[t],(function(t){return t===n})))return Nt.apply(this,arguments);Et[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&Pt.indexOf(t)>=0))return Lt.apply(this,arguments);Et[t]=Et[t].filter((function(t){return t!==n}))},window.history.pushState=_t(window.history.pushState,"pushState"),window.history.replaceState=_t(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(j(41,!1)):window.singleSpaNavigate=Tt}function Ut(t){var n=document.createElement("a");return n.href=t,n}var jt=!1;function kt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!jt){var n=t.fn.on,e=t.fn.off;t.fn.on=function(t,e){return Dt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return Dt.call(this,e,window.removeEventListener,t,n,arguments)},jt=!0}}function Dt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){Pt.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var xt={};function Mt(t){return Promise.resolve().then((function(){var n=xt[J(t)];if(!n)return t;if(t.status===D)return Ct(t,n),t;if("UNLOADING"===t.status)return n.promise.then((function(){return t}));if(t.status!==I&&t.status!==$)return t;var e=t.status===$?Promise.resolve():vt(t,"unload");return t.status="UNLOADING",e.then((function(){return Ct(t,n),t})).catch((function(e){return function(t,n,e){delete xt[J(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,N(e,t,F),n.reject(e)}(t,n,e),t}))}))}function Ct(t,n){delete xt[J(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=D,n.resolve()}function It(t,n,e,r){xt[J(t)]={app:t,resolve:e,reject:r},Object.defineProperty(xt[J(t)],"promise",{get:n})}function Rt(t){return xt[t]}var Bt=[];function Gt(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return Bt.forEach((function(i){var u=i.status!==F&&z(i);switch(i.status){case $:u&&o-i.loadErrorTime>=200&&e.push(i);break;case D:case x:u&&e.push(i);break;case M:case I:!u&&Rt(J(i))?t.push(i):u&&r.push(i);break;case B:u||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function Wt(){return Bt.filter(K).map(J)}function $t(){return Bt.map(J)}function Ft(t){var n=Q(Bt,(function(n){return J(n)===t}));return n?n.status:null}function Kt(t,n,e,r){var o=function(t,n,e,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===T(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(j(39,!1));var n=["name","app","activeWhen","customProps"],e=Object.keys(t).reduce((function(t,e){return n.indexOf(e)>=0?t:t.concat(e)}),[]);if(0!==e.length)throw Error(j(38,!1,n.join(", "),e.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(j(20,!1));if("object"!==T(t.app)&&"function"!=typeof t.app)throw Error(j(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(j(24,!1));if(!Ht(t.customProps))throw Error(j(22,!1))}(t),i.name=t.name,i.loadApp=t.app,i.activeWhen=t.activeWhen,i.customProps=t.customProps):(function(t,n,e,r){if("string"!=typeof t||0===t.length)throw Error(j(20,!1));if(!n)throw Error(j(23,!1));if("function"!=typeof e)throw Error(j(24,!1));if(!Ht(r))throw Error(j(22,!1))}(t,n,e,r),i.name=t,i.loadApp=n,i.activeWhen=e,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(t){return t||{}}(i.customProps),i.activeWhen=function(t){var n=Array.isArray(t)?t:[t];return n=n.map((function(t){return"function"==typeof t?t:Qt(t)})),function(t){return n.some((function(n){return n(t)}))}}(i.activeWhen),i}(t,n,e,r);if(-1!==$t().indexOf(o.name))throw Error(j(21,!1,o.name));Bt.push(H({loadErrorTime:null,status:D,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),bt&&(kt(),nn())}function zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Bt.filter((function(n){return n.activeWhen(t)})).map(J)}function Jt(t){if(0===Bt.filter((function(n){return J(n)===t})).length)throw Error(j(25,!1,t));return Vt(t).then((function(){var n=Bt.map(J).indexOf(t);Bt.splice(n,1)}))}function Vt(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(j(26,!1));var e=Q(Bt,(function(n){return J(n)===t}));if(!e)throw Error(j(27,!1,t));var r,o=Rt(J(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){It(e,(function(){return i}),t,n)}));return i}return o?(r=o.promise,qt(e,o.resolve,o.reject)):r=new Promise((function(t,n){It(e,(function(){return r}),t,n),qt(e,t,n)})),r}function qt(t,n,e){nt(t).then(Mt).then((function(){n(),setTimeout((function(){nn()}))})).catch(e)}function Ht(t){return!t||"function"==typeof t||"object"===T(t)&&null!==t&&!Array.isArray(t)}function Qt(t,n){var e=function(t,n){var e=0,r=!1,o="^";"/"!==t[0]&&(t="/"+t);for(var i=0;i<t.length;i++){var u=t[i];(!r&&":"===u||r&&"/"===u)&&a(i)}return a(t.length),new RegExp(o,"i");function a(i){var u=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":u,i===t.length)if(r)n&&(o+="$");else{var a=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(a,"$"):"".concat(o,"(/").concat(a,")?(#.*)?$")}r=!r,e=i}}(t,n);return function(t){var n=t.origin;n||(n="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(n,"").replace(t.search,"").split("?")[0];return e.test(r)}}var Xt=!1,Yt=[],Zt=bt&&window.location.href;function tn(){return nn()}function nn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(Xt)return new Promise((function(t,e){Yt.push({resolve:t,reject:e,eventArguments:n})}));var e,r=Gt(),o=r.appsToUnload,i=r.appsToUnmount,u=r.appsToLoad,a=r.appsToMount,s=!1,c=Zt,l=Zt=window.location.href;return un()?(Xt=!0,e=o.concat(u,i,a),h()):(e=u,p());function f(){s=!0}function p(){return Promise.resolve().then((function(){var t=u.map(yt);return Promise.all(t).then(d).then((function(){return[]})).catch((function(t){throw d(),t}))}))}function h(){return Promise.resolve().then((function(){if(window.dispatchEvent(new _(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",v(!0))),window.dispatchEvent(new _("single-spa:before-routing-event",v(!0,{cancelNavigation:f}))),s)return window.dispatchEvent(new _("single-spa:before-mount-routing-event",v(!0))),m(),void Tt(c);var n=o.map(Mt),r=i.map(nt).map((function(t){return t.then(Mt)})).concat(n),l=Promise.all(r);l.then((function(){window.dispatchEvent(new _("single-spa:before-mount-routing-event",v(!0)))}));var p=u.map((function(t){return yt(t).then((function(t){return en(t,l)}))})),h=a.filter((function(t){return u.indexOf(t)<0})).map((function(t){return en(t,l)}));return l.catch((function(t){throw d(),t})).then((function(){return d(),Promise.all(p.concat(h)).catch((function(n){throw t.forEach((function(t){return t.reject(n)})),n})).then(m)}))}))}function m(){var n=Wt();t.forEach((function(t){return t.resolve(n)}));try{var r=0===e.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new _(r,v())),window.dispatchEvent(new _("single-spa:routing-event",v()))}catch(t){setTimeout((function(){throw t}))}if(Xt=!1,Yt.length>0){var o=Yt;Yt=[],nn(o)}return n}function d(){t.forEach((function(t){Ot(t.eventArguments)})),Ot(n)}function v(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],f=arguments.length>1?arguments[1]:void 0,p={},h=(O(t={},B,[]),O(t,I,[]),O(t,D,[]),O(t,F,[]),t);r?(u.concat(a).forEach((function(t,n){d(t,B)})),o.forEach((function(t){d(t,D)})),i.forEach((function(t){d(t,I)}))):e.forEach((function(t){d(t)}));var m={detail:{newAppStatuses:p,appsByNewStatus:h,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:c,newUrl:l,navigationIsCanceled:s}};return f&&H(m.detail,f),m;function d(t,n){var e=J(t);n=n||Ft(e),p[e]=n,(h[n]=h[n]||[]).push(e)}}}function en(t,n){return z(t)?tt(t).then((function(t){return n.then((function(){return z(t)?ot(t):t}))})):n.then((function(){return t}))}var rn=!1;function on(t){var n;rn=!0,t&&t.urlRerouteOnly&&(n=t.urlRerouteOnly,gt=n),bt&&nn()}function un(){return rn}bt&&setTimeout((function(){rn||console.warn(j(1,!1))}),5e3);var an={getRawAppData:function(){return[].concat(Bt)},reroute:nn,NOT_LOADED:D,toLoadPromise:yt,toBootstrapPromise:tt,unregisterApplication:Jt};bt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=an);var sn=e(6639),cn="4.0.3-pre.390",ln=e(3979),fn={"webservices.rest":"^2.2.0"},pn={featureName:"primary navigation",moduleName:i.e};function hn(){return(0,r.defineConfigSchema)(i.e,p),(0,r.defineExtensionConfigSchema)("link",sn.genericLinkConfigSchema),(0,r.setupOfflineSync)(i.O,[],b),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([e.e(483),e.e(414),e.e(723),e.e(680),e.e(656)]).then(e.bind(e,3656))}),pn),route:function(t){return!t.pathname.startsWith(window.getOpenmrsSpaBase()+"login")},online:!0,offline:!0,order:0},{load:{bootstrap:function(){return Promise.resolve(Tt(window.getOpenmrsSpaBase()+"home"))},mount:function(){return Promise.resolve()},unmount:function(){return Promise.resolve()}},route:function(t){return t.pathname===window.getOpenmrsSpaBase()},order:0}],extensions:[{name:"default-user-panel",slot:"user-panel-slot",order:0,load:(0,r.getAsyncLifecycle)((function(){return Promise.all([e.e(483),e.e(414),e.e(473)]).then(e.bind(e,3473))}),pn),online:!0,offline:!0},{name:"change-locale",slot:"user-panel-slot",order:1,load:(0,r.getAsyncLifecycle)((function(){return Promise.all([e.e(483),e.e(680),e.e(98)]).then(e.bind(e,5098))}),pn),online:{postUserProperties:c},offline:{postUserProperties:f}},{name:"link",load:(0,r.getAsyncLifecycle)((function(){return Promise.resolve().then(e.bind(e,6639))}),{featureName:"Link",moduleName:i.e})}]}}},3979:(t,n,e)=>{var r={"./en.json":[3574,574]};function o(t){if(!e.o(r,t))return Promise.resolve().then((()=>{var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}));var n=r[t],o=n[0];return e.e(n[1]).then((()=>e(o)))}o.keys=()=>Object.keys(r),o.id=3979,t.exports=o}}]);