@openmrs/esm-primary-navigation-app 4.0.3-pre.348 → 4.0.3-pre.353

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,4 +1,4 @@
1
- @openmrs/esm-primary-navigation-app:build: cache hit, replaying output 3d034a435aaae23a
1
+ @openmrs/esm-primary-navigation-app:build: cache hit, replaying output 56be8b6e7e795895
2
2
  @openmrs/esm-primary-navigation-app:build: assets by chunk 229 KiB (id hint: vendors)
3
3
  @openmrs/esm-primary-navigation-app:build:  asset 788.js 130 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
4
4
  @openmrs/esm-primary-navigation-app:build:  asset 857.js 38.3 KiB [emitted] [minimized] (id hint: vendors) 1 related asset
@@ -13,7 +13,7 @@
13
13
  @openmrs/esm-primary-navigation-app:build:  modules by path ../../ 2.33 MiB 44 modules
14
14
  @openmrs/esm-primary-navigation-app:build:  modules by path ./ 174 KiB 18 modules
15
15
  @openmrs/esm-primary-navigation-app:build:  provide-module modules 210 bytes
16
- @openmrs/esm-primary-navigation-app:build:  provide shared module (default) @openmrs/esm-framework/src/internal@4.0.3-pre.348 = ../../framework/esm-framework/src/internal.ts 42 bytes [built] [code generated]
16
+ @openmrs/esm-primary-navigation-app:build:  provide shared module (default) @openmrs/esm-framework/src/internal@4.0.3-pre.353 = ../../framework/esm-framework/src/internal.ts 42 bytes [built] [code generated]
17
17
  @openmrs/esm-primary-navigation-app:build:  + 4 modules
18
18
  @openmrs/esm-primary-navigation-app:build:  consume-shared-module modules 210 bytes
19
19
  @openmrs/esm-primary-navigation-app:build:  modules by path consume shared module (default) @openmrs/ 84 bytes 2 modules
@@ -24,6 +24,6 @@
24
24
  @openmrs/esm-primary-navigation-app:build: WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
25
25
  @openmrs/esm-primary-navigation-app:build: This can impact web performance.
26
26
  @openmrs/esm-primary-navigation-app:build: Assets:
27
- @openmrs/esm-primary-navigation-app:build:  889.js (430 KiB)
27
+ @openmrs/esm-primary-navigation-app:build:  889.js (431 KiB)
28
28
  @openmrs/esm-primary-navigation-app:build: 
29
- @openmrs/esm-primary-navigation-app:build: webpack 5.74.0 compiled with 1 warning in 100288 ms
29
+ @openmrs/esm-primary-navigation-app:build: webpack 5.74.0 compiled with 1 warning in 82994 ms
package/dist/789.js CHANGED
@@ -1 +1 @@
1
- (self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[789],{1602:t=>{var n=function(t){"use strict";var n,e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function s(t,n,e,r){var o=n&&n.prototype instanceof v?n:v,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(t,n,e){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===m){if("throw"===o)throw i;return N()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=_(a,e);if(u){if(u===d)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===l)throw r=m,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var c=f(t,n,e);if("normal"===c.type){if(r=e.done?m:p,c.arg===d)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=m,e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function f(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",h="executing",m="completed",d={};function v(){}function y(){}function g(){}var w={};c(w,i,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(x([])));b&&b!==e&&r.call(b,i)&&(w=b);var O=g.prototype=v.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function T(t,n){function e(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?n.resolve(l.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):n.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new n((function(n,o){e(t,r,n,o)}))}return o=o?o.then(i,i):i()}}function _(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,_(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function A(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:n,done:!0}}return y.prototype=g,c(O,"constructor",g),c(g,"constructor",y),y.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},P(T.prototype),c(T.prototype,a,(function(){return this})),t.AsyncIterator=T,t.async=function(n,e,r,o,i){void 0===i&&(i=Promise);var a=new T(s(n,e,r,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(O),c(O,u,"Generator"),c(O,i,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=n,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),d},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),d}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;A(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),d}},t}(t.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},6639:(t,n,e)=>{"use strict";e.r(n),e.d(n,{default:()=>u,genericLinkConfigSchema:()=>a});var r=e(5776),o=e.n(r),i=e(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 u(){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:()=>ln,importTranslation:()=>fn,setupOpenMRS:()=>hn,version:()=>sn});var r=e(4610),o=e(1602),i=e.n(o),a=e(8478),u=e(1217);function c(t,n,e,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(r,o)}function s(t){return function(){var n=this,e=arguments;return new Promise((function(r,o){var i=t.apply(n,e);function a(t){c(i,r,o,a,u,"next",t)}function u(t){c(i,r,o,a,u,"throw",t)}a(void 0)}))}}function f(t,n,e){return l.apply(this,arguments)}function l(){return(l=s(i().mark((function t(n,e,r){var o,u;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,a.getSessionLocation)();case 2:return o=t.sent,u=null==o?void 0:o.uuid,t.next=6,(0,a.openmrsFetch)("/ws/rest/v1/user/".concat(n),{method:"POST",body:{userProperties:e},headers:{"Content-Type":"application/json"},signal:r.signal});case 6:if(!u){t.next=9;break}return t.next=9,(0,a.setSessionLocation)(u,r);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t,n){return(0,a.queueSynchronizationItemFor)(t,u.O,n,{displayName:"User Language Change"})}var h={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 m(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 d(t,n,e,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(r,o)}function v(t){return function(){var n=this,e=arguments;return new Promise((function(r,o){var i=t.apply(n,e);function a(t){d(i,r,o,a,u,"next",t)}function u(t){d(i,r,o,a,u,"throw",t)}a(void 0)}))}}function y(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=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(r=e.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}}(t,n)||w(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 g(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||w(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 w(t,n){if(t){if("string"==typeof t)return m(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)?m(t,n):void 0}}function E(t,n){return b.apply(this,arguments)}function b(){return b=v(i().mark((function t(n,e){var r,o,u,c;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e.index){t.next=10;break}return t.next=4,(0,a.getLoggedInUser)();case 4:return o=t.sent,u=e.items.map((function(t){var n=y(t,2);return n[0],n[1]})),c=(r=Object).assign.apply(r,[{},o.userProperties].concat(g(u))),t.next=9,f(o.uuid,c,e.abort);case 9:(0,a.refetchCurrentUser)();case 10:case"end":return t.stop()}}),t)}))),b.apply(this,arguments)}var O=Object.freeze({__proto__:null,get start(){return on},get ensureJQuerySupport(){return Ut},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 $t},get unloadApplication(){return Vt},get checkActivityFunctions(){return zt},get getAppNames(){return Ft},get pathToActiveWhen(){return Qt},get navigateToUrl(){return Pt},get triggerAppChange(){return tn},get addErrorHandler(){return x},get removeErrorHandler(){return N},get mountRootParcel(){return ut},get NOT_LOADED(){return k},get LOADING_SOURCE_CODE(){return D},get NOT_BOOTSTRAPPED(){return M},get BOOTSTRAPPING(){return I},get NOT_MOUNTED(){return R},get MOUNTING(){return C},get UPDATING(){return B},get LOAD_ERROR(){return F},get MOUNTED(){return G},get UNMOUNTING(){return W},get SKIP_BECAUSE_BROKEN(){return $}});function P(t){return(P="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 T(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var _=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{}).CustomEvent,S=function(){try{var t=new _("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?_:"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 L(t,n,e){var r=U(t,n,e);A.length?A.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function x(t){if("function"!=typeof t)throw Error(j(28,!1));A.push(t)}function N(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 U(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 k="NOT_LOADED",D="LOADING_SOURCE_CODE",M="NOT_BOOTSTRAPPED",I="BOOTSTRAPPING",R="NOT_MOUNTED",C="MOUNTING",G="MOUNTED",B="UPDATING",W="UNMOUNTING",F="LOAD_ERROR",$="SKIP_BECAUSE_BROKEN";function K(t){return t.status===G}function z(t){try{return t.activeWhen(window.location)}catch(n){return L(n,t,$),!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 Y(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!Q(n,(function(t){return"function"!=typeof t}))));var n}function X(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,a){return e.then((function(){var e=i(t);return Z(e)?e:Promise.reject(j(15,!1,r,o,n,a))}))}),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=I,t.bootstrap?vt(t,"bootstrap").then(e).catch((function(e){if(n)throw U(e,t,$);return L(e,t,$),t})):Promise.resolve().then(e))}));function e(){return t.status=R,t}}function nt(t,n){return Promise.resolve().then((function(){if(t.status!==G)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 U(r,t,$);L(r,t,$)}))})).then((function(){return t}));function r(){return vt(t,"unmount").then((function(){t.status=R})).catch((function(e){if(n)throw U(e,t,$);L(e,t,$)}))}}))}var et=!1,rt=!1;function ot(t,n){return Promise.resolve().then((function(){return t.status!==R?t:(et||(window.dispatchEvent(new S("single-spa:before-first-mount")),et=!0),vt(t,"mount").then((function(){return t.status=G,rt||(window.dispatchEvent(new S("single-spa:first-mount")),rt=!0),t})).catch((function(e){return t.status=G,nt(t,!0).then(r,r);function r(){if(n)throw U(e,t,$);return L(e,t,$),t}})))}))}var it=0,at={parcels:{}};function ut(){return ct.apply(at,arguments)}function ct(t,n){var e=this;if(!t||"object"!==P(t)&&"function"!=typeof t)throw Error(j(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(j(3,!1,P(t.name)));if("object"!==P(n))throw Error(j(4,!1,name,P(n)));if(!n.domElement)throw Error(j(5,!1,name));var r,o=it++,i="function"==typeof t,a=i?t:function(){return Promise.resolve(t)},u={id:o,parcels:{},status:i?D:M,customProps:n,parentName:J(e),unmountThisParcel:function(){return p.then((function(){if(u.status!==G)throw Error(j(6,!1,name,u.status));return nt(u,!0)})).then((function(t){return u.parentName&&delete e.parcels[u.id],t})).then((function(t){return s(t),t})).catch((function(t){throw u.status=$,f(t),t}))}};e.parcels[o]=u;var c=a();if(!c||"function"!=typeof c.then)throw Error(j(7,!1));var s,f,l=(c=c.then((function(t){if(!t)throw Error(j(8,!1));var n=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!Y(t.bootstrap))throw Error(j(9,!1,n));if(!Y(t.mount))throw Error(j(10,!1,n));if(!Y(t.unmount))throw Error(j(11,!1,n));if(t.update&&!Y(t.update))throw Error(j(12,!1,n));var e=X(t,"bootstrap"),i=X(t,"mount"),a=X(t,"unmount");u.status=M,u.name=n,u.bootstrap=e,u.mount=i,u.unmount=a,u.timeouts=yt(t.timeouts),t.update&&(u.update=X(t,"update"),r.update=function(t){return u.customProps=t,st(function(t){return Promise.resolve().then((function(){if(t.status!==G)throw Error(j(32,!1,J(t)));return t.status=B,vt(t,"update").then((function(){return t.status=G,t})).catch((function(n){throw U(n,t,$)}))}))}(u))})}))).then((function(){return tt(u,!0)})),p=l.then((function(){return ot(u,!0)})),h=new Promise((function(t,n){s=t,f=n}));return r={mount:function(){return st(Promise.resolve().then((function(){if(u.status!==R)throw Error(j(13,!1,name,u.status));return e.parcels[o]=u,ot(u)})))},unmount:function(){return st(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:st(c),bootstrapPromise:st(l),mountPromise:st(p),unmountPromise:st(h)}}function st(t){return t.then((function(){return null}))}function ft(t){var n=J(t),e="function"==typeof t.customProps?t.customProps(n,window.location):t.customProps;("object"!==P(e)||null===e||Array.isArray(e))&&(e={},console.warn(j(40,!1),n,e));var r=H({},e,{name:n,mountParcel:ct.bind(t),singleSpa:O});return V(t)&&(r.unmountSelf=t.unmountThisParcel),r}var lt={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));lt.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function ht(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(17,!1));lt.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function mt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(18,!1));lt.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function dt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(19,!1));lt.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,a){var u=!1,c=!1;t[n](ft(t)).then((function(t){u=!0,i(t)})).catch((function(t){u=!0,a(t)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),e.millis);var s=j(31,!1,n,o,J(t),e.millis);function f(t){if(!u)if(!0===t)c=!0,e.dieOnTimeout?a(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 yt(t){var n={};for(var e in lt)n[e]=H({},lt[e],t&&t[e]||{});return n}function gt(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==k&&t.status!==F?t:(t.status=D,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(ft(t));if(!Z(r))throw e=!0,Error(j(33,!1,J(t)));return r.then((function(e){var r;t.loadErrorTime=null,"object"!==P(n=e)&&(r=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!Y(n.bootstrap)&&(r=35),Y(n.mount)||(r=36),Y(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),L(void 0,t,$),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=H({},t.devtools.overlays,n.devtools.overlays)),t.status=M,t.bootstrap=X(n,"bootstrap"),t.mount=X(n,"mount"),t.unmount=X(n,"unmount"),t.unload=X(n,"unload"),t.timeouts=yt(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var r;return delete t.loadPromise,e?r=$:(r=F,t.loadErrorTime=(new Date).getTime()),L(n,t,r),t})));var n,e}))}var wt,Et="undefined"!=typeof window,bt={hashchange:[],popstate:[]},Ot=["hashchange","popstate"];function Pt(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=Nt(window.location.href),r=Nt(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 Tt(t){var n=this;if(t){var e=t[0].type;Ot.indexOf(e)>=0&&bt[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function _t(){nn([],arguments)}function St(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return wt&&e===o||(an()?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(Et){window.addEventListener("hashchange",_t),window.addEventListener("popstate",_t);var Lt=window.addEventListener,xt=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&Ot.indexOf(t)>=0)||Q(bt[t],(function(t){return t===n})))return Lt.apply(this,arguments);bt[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&Ot.indexOf(t)>=0))return xt.apply(this,arguments);bt[t]=bt[t].filter((function(t){return t!==n}))},window.history.pushState=St(window.history.pushState,"pushState"),window.history.replaceState=St(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(j(41,!1)):window.singleSpaNavigate=Pt}function Nt(t){var n=document.createElement("a");return n.href=t,n}var jt=!1;function Ut(){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 kt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return kt.call(this,e,window.removeEventListener,t,n,arguments)},jt=!0}}function kt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){Ot.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var Dt={};function Mt(t){return Promise.resolve().then((function(){var n=Dt[J(t)];if(!n)return t;if(t.status===k)return It(t,n),t;if("UNLOADING"===t.status)return n.promise.then((function(){return t}));if(t.status!==R&&t.status!==F)return t;var e=t.status===F?Promise.resolve():vt(t,"unload");return t.status="UNLOADING",e.then((function(){return It(t,n),t})).catch((function(e){return function(t,n,e){delete Dt[J(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,L(e,t,$),n.reject(e)}(t,n,e),t}))}))}function It(t,n){delete Dt[J(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=k,n.resolve()}function Rt(t,n,e,r){Dt[J(t)]={app:t,resolve:e,reject:r},Object.defineProperty(Dt[J(t)],"promise",{get:n})}function Ct(t){return Dt[t]}var Gt=[];function Bt(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return Gt.forEach((function(i){var a=i.status!==$&&z(i);switch(i.status){case F:a&&o-i.loadErrorTime>=200&&e.push(i);break;case k:case D:a&&e.push(i);break;case M:case R:!a&&Ct(J(i))?t.push(i):a&&r.push(i);break;case G:a||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function Wt(){return Gt.filter(K).map(J)}function Ft(){return Gt.map(J)}function $t(t){var n=Q(Gt,(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"===P(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"!==P(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!==Ft().indexOf(o.name))throw Error(j(21,!1,o.name));Gt.push(H({loadErrorTime:null,status:k,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Et&&(Ut(),nn())}function zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Gt.filter((function(n){return n.activeWhen(t)})).map(J)}function Jt(t){if(0===Gt.filter((function(n){return J(n)===t})).length)throw Error(j(25,!1,t));return Vt(t).then((function(){var n=Gt.map(J).indexOf(t);Gt.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(Gt,(function(n){return J(n)===t}));if(!e)throw Error(j(27,!1,t));var r,o=Ct(J(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){Rt(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){Rt(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"===P(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 a=t[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(t.length),new RegExp(o,"i");function u(i){var a=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===t.length)if(r)n&&(o+="$");else{var u=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}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 Yt=!1,Xt=[],Zt=Et&&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(Yt)return new Promise((function(t,e){Xt.push({resolve:t,reject:e,eventArguments:n})}));var e,r=Bt(),o=r.appsToUnload,i=r.appsToUnmount,a=r.appsToLoad,u=r.appsToMount,c=!1,s=Zt,f=Zt=window.location.href;return an()?(Yt=!0,e=o.concat(a,i,u),h()):(e=a,p());function l(){c=!0}function p(){return Promise.resolve().then((function(){var t=a.map(gt);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 S(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",v(!0))),window.dispatchEvent(new S("single-spa:before-routing-event",v(!0,{cancelNavigation:l}))),c)return window.dispatchEvent(new S("single-spa:before-mount-routing-event",v(!0))),m(),void Pt(s);var n=o.map(Mt),r=i.map(nt).map((function(t){return t.then(Mt)})).concat(n),f=Promise.all(r);f.then((function(){window.dispatchEvent(new S("single-spa:before-mount-routing-event",v(!0)))}));var p=a.map((function(t){return gt(t).then((function(t){return en(t,f)}))})),h=u.filter((function(t){return a.indexOf(t)<0})).map((function(t){return en(t,f)}));return f.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 S(r,v())),window.dispatchEvent(new S("single-spa:routing-event",v()))}catch(t){setTimeout((function(){throw t}))}if(Yt=!1,Xt.length>0){var o=Xt;Xt=[],nn(o)}return n}function d(){t.forEach((function(t){Tt(t.eventArguments)})),Tt(n)}function v(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],l=arguments.length>1?arguments[1]:void 0,p={},h=(T(t={},G,[]),T(t,R,[]),T(t,k,[]),T(t,$,[]),t);r?(a.concat(u).forEach((function(t,n){d(t,G)})),o.forEach((function(t){d(t,k)})),i.forEach((function(t){d(t,R)}))):e.forEach((function(t){d(t)}));var m={detail:{newAppStatuses:p,appsByNewStatus:h,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:s,newUrl:f,navigationIsCanceled:c}};return l&&H(m.detail,l),m;function d(t,n){var e=J(t);n=n||$t(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,wt=n),Et&&nn()}function an(){return rn}Et&&setTimeout((function(){rn||console.warn(j(1,!1))}),5e3);var un={getRawAppData:function(){return[].concat(Gt)},reroute:nn,NOT_LOADED:k,toLoadPromise:gt,toBootstrapPromise:tt,unregisterApplication:Jt};Et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=un);var cn=e(6639),sn="4.0.3-pre.348",fn=e(3979),ln={"webservices.rest":"^2.2.0"},pn={featureName:"primary navigation",moduleName:u.e};function hn(){return(0,r.defineConfigSchema)(u.e,h),(0,r.defineExtensionConfigSchema)("link",cn.genericLinkConfigSchema),(0,r.setupOfflineSync)(u.O,[],E),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([e.e(857),e.e(218),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(Pt(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(857),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(857),e.e(680),e.e(98)]).then(e.bind(e,5098))}),pn),online:{postUserProperties:f},offline:{postUserProperties:p}},{name:"link",load:(0,r.getAsyncLifecycle)((function(){return Promise.resolve().then(e.bind(e,6639))}),{featureName:"Link",moduleName:u.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}}]);
1
+ (self.webpackChunk_openmrs_esm_primary_navigation_app=self.webpackChunk_openmrs_esm_primary_navigation_app||[]).push([[789],{1602:t=>{var n=function(t){"use strict";var n,e=Object.prototype,r=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,n,e){return Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[n]}try{c({},"")}catch(t){c=function(t,n,e){return t[n]=e}}function s(t,n,e,r){var o=n&&n.prototype instanceof v?n:v,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(t,n,e){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===m){if("throw"===o)throw i;return N()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=_(a,e);if(u){if(u===d)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(r===l)throw r=m,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);r=h;var c=f(t,n,e);if("normal"===c.type){if(r=e.done?m:p,c.arg===d)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(r=m,e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function f(t,n,e){try{return{type:"normal",arg:t.call(n,e)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",h="executing",m="completed",d={};function v(){}function y(){}function g(){}var w={};c(w,i,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(x([])));b&&b!==e&&r.call(b,i)&&(w=b);var O=g.prototype=v.prototype=Object.create(w);function P(t){["next","throw","return"].forEach((function(n){c(t,n,(function(t){return this._invoke(n,t)}))}))}function T(t,n){function e(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?n.resolve(l.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):n.resolve(l).then((function(t){s.value=t,a(s)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new n((function(n,o){e(t,r,n,o)}))}return o=o?o.then(i,i):i()}}function _(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,_(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n.finallyLoc=t[2],n.afterLoc=t[3]),this.tryEntries.push(n)}function A(t){var n=t.completion||{};n.type="normal",delete n.arg,t.completion=n}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function x(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=n,e.done=!0,e};return a.next=a}}return{next:N}}function N(){return{value:n,done:!0}}return y.prototype=g,c(O,"constructor",g),c(g,"constructor",y),y.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var n="function"==typeof t&&t.constructor;return!!n&&(n===y||"GeneratorFunction"===(n.displayName||n.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},t.awrap=function(t){return{__await:t}},P(T.prototype),c(T.prototype,a,(function(){return this})),t.AsyncIterator=T,t.async=function(n,e,r,o,i){void 0===i&&(i=Promise);var a=new T(s(n,e,r,o),i);return t.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(O),c(O,u,"Generator"),c(O,i,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var n=[];for(var e in t)n.push(e);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=x,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,n){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=n&&n<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=n,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,n){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&n&&(this.next=n),d},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),A(e),d}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var e=this.tryEntries[n];if(e.tryLoc===t){var r=e.completion;if("throw"===r.type){var o=r.arg;A(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:x(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),d}},t}(t.exports);try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},6639:(t,n,e)=>{"use strict";e.r(n),e.d(n,{default:()=>u,genericLinkConfigSchema:()=>a});var r=e(5776),o=e.n(r),i=e(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 u(){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:()=>ln,importTranslation:()=>fn,setupOpenMRS:()=>hn,version:()=>sn});var r=e(4610),o=e(1602),i=e.n(o),a=e(8478),u=e(1217);function c(t,n,e,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(r,o)}function s(t){return function(){var n=this,e=arguments;return new Promise((function(r,o){var i=t.apply(n,e);function a(t){c(i,r,o,a,u,"next",t)}function u(t){c(i,r,o,a,u,"throw",t)}a(void 0)}))}}function f(t,n,e){return l.apply(this,arguments)}function l(){return(l=s(i().mark((function t(n,e,r){var o,u;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,a.getSessionLocation)();case 2:return o=t.sent,u=null==o?void 0:o.uuid,t.next=6,(0,a.openmrsFetch)("/ws/rest/v1/user/".concat(n),{method:"POST",body:{userProperties:e},headers:{"Content-Type":"application/json"},signal:r.signal});case 6:if(!u){t.next=9;break}return t.next=9,(0,a.setSessionLocation)(u,r);case 9:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t,n){return(0,a.queueSynchronizationItemFor)(t,u.O,n,{displayName:"User Language Change"})}var h={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 m(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 d(t,n,e,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?n(c):Promise.resolve(c).then(r,o)}function v(t){return function(){var n=this,e=arguments;return new Promise((function(r,o){var i=t.apply(n,e);function a(t){d(i,r,o,a,u,"next",t)}function u(t){d(i,r,o,a,u,"throw",t)}a(void 0)}))}}function y(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=[],a=!0,u=!1;try{for(e=e.call(t);!(a=(r=e.next()).done)&&(i.push(r.value),!n||i.length!==n);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}}(t,n)||w(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 g(t){return function(t){if(Array.isArray(t))return m(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||w(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 w(t,n){if(t){if("string"==typeof t)return m(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)?m(t,n):void 0}}function E(t,n){return b.apply(this,arguments)}function b(){return b=v(i().mark((function t(n,e){var r,o,u,c;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==e.index){t.next=10;break}return t.next=4,(0,a.getLoggedInUser)();case 4:return o=t.sent,u=e.items.map((function(t){var n=y(t,2);return n[0],n[1]})),c=(r=Object).assign.apply(r,[{},o.userProperties].concat(g(u))),t.next=9,f(o.uuid,c,e.abort);case 9:(0,a.refetchCurrentUser)();case 10:case"end":return t.stop()}}),t)}))),b.apply(this,arguments)}var O=Object.freeze({__proto__:null,get start(){return on},get ensureJQuerySupport(){return Ut},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 $t},get unloadApplication(){return Vt},get checkActivityFunctions(){return zt},get getAppNames(){return Ft},get pathToActiveWhen(){return Qt},get navigateToUrl(){return Pt},get triggerAppChange(){return tn},get addErrorHandler(){return x},get removeErrorHandler(){return N},get mountRootParcel(){return ut},get NOT_LOADED(){return k},get LOADING_SOURCE_CODE(){return D},get NOT_BOOTSTRAPPED(){return M},get BOOTSTRAPPING(){return I},get NOT_MOUNTED(){return R},get MOUNTING(){return C},get UPDATING(){return B},get LOAD_ERROR(){return F},get MOUNTED(){return G},get UNMOUNTING(){return W},get SKIP_BECAUSE_BROKEN(){return $}});function P(t){return(P="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 T(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var _=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{}).CustomEvent,S=function(){try{var t=new _("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?_:"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 L(t,n,e){var r=U(t,n,e);A.length?A.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))}function x(t){if("function"!=typeof t)throw Error(j(28,!1));A.push(t)}function N(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 U(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 k="NOT_LOADED",D="LOADING_SOURCE_CODE",M="NOT_BOOTSTRAPPED",I="BOOTSTRAPPING",R="NOT_MOUNTED",C="MOUNTING",G="MOUNTED",B="UPDATING",W="UNMOUNTING",F="LOAD_ERROR",$="SKIP_BECAUSE_BROKEN";function K(t){return t.status===G}function z(t){try{return t.activeWhen(window.location)}catch(n){return L(n,t,$),!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 Y(t){return t&&("function"==typeof t||(n=t,Array.isArray(n)&&!Q(n,(function(t){return"function"!=typeof t}))));var n}function X(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,a){return e.then((function(){var e=i(t);return Z(e)?e:Promise.reject(j(15,!1,r,o,n,a))}))}),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=I,t.bootstrap?vt(t,"bootstrap").then(e).catch((function(e){if(n)throw U(e,t,$);return L(e,t,$),t})):Promise.resolve().then(e))}));function e(){return t.status=R,t}}function nt(t,n){return Promise.resolve().then((function(){if(t.status!==G)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 U(r,t,$);L(r,t,$)}))})).then((function(){return t}));function r(){return vt(t,"unmount").then((function(){t.status=R})).catch((function(e){if(n)throw U(e,t,$);L(e,t,$)}))}}))}var et=!1,rt=!1;function ot(t,n){return Promise.resolve().then((function(){return t.status!==R?t:(et||(window.dispatchEvent(new S("single-spa:before-first-mount")),et=!0),vt(t,"mount").then((function(){return t.status=G,rt||(window.dispatchEvent(new S("single-spa:first-mount")),rt=!0),t})).catch((function(e){return t.status=G,nt(t,!0).then(r,r);function r(){if(n)throw U(e,t,$);return L(e,t,$),t}})))}))}var it=0,at={parcels:{}};function ut(){return ct.apply(at,arguments)}function ct(t,n){var e=this;if(!t||"object"!==P(t)&&"function"!=typeof t)throw Error(j(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(j(3,!1,P(t.name)));if("object"!==P(n))throw Error(j(4,!1,name,P(n)));if(!n.domElement)throw Error(j(5,!1,name));var r,o=it++,i="function"==typeof t,a=i?t:function(){return Promise.resolve(t)},u={id:o,parcels:{},status:i?D:M,customProps:n,parentName:J(e),unmountThisParcel:function(){return p.then((function(){if(u.status!==G)throw Error(j(6,!1,name,u.status));return nt(u,!0)})).then((function(t){return u.parentName&&delete e.parcels[u.id],t})).then((function(t){return s(t),t})).catch((function(t){throw u.status=$,f(t),t}))}};e.parcels[o]=u;var c=a();if(!c||"function"!=typeof c.then)throw Error(j(7,!1));var s,f,l=(c=c.then((function(t){if(!t)throw Error(j(8,!1));var n=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!Y(t.bootstrap))throw Error(j(9,!1,n));if(!Y(t.mount))throw Error(j(10,!1,n));if(!Y(t.unmount))throw Error(j(11,!1,n));if(t.update&&!Y(t.update))throw Error(j(12,!1,n));var e=X(t,"bootstrap"),i=X(t,"mount"),a=X(t,"unmount");u.status=M,u.name=n,u.bootstrap=e,u.mount=i,u.unmount=a,u.timeouts=yt(t.timeouts),t.update&&(u.update=X(t,"update"),r.update=function(t){return u.customProps=t,st(function(t){return Promise.resolve().then((function(){if(t.status!==G)throw Error(j(32,!1,J(t)));return t.status=B,vt(t,"update").then((function(){return t.status=G,t})).catch((function(n){throw U(n,t,$)}))}))}(u))})}))).then((function(){return tt(u,!0)})),p=l.then((function(){return ot(u,!0)})),h=new Promise((function(t,n){s=t,f=n}));return r={mount:function(){return st(Promise.resolve().then((function(){if(u.status!==R)throw Error(j(13,!1,name,u.status));return e.parcels[o]=u,ot(u)})))},unmount:function(){return st(u.unmountThisParcel())},getStatus:function(){return u.status},loadPromise:st(c),bootstrapPromise:st(l),mountPromise:st(p),unmountPromise:st(h)}}function st(t){return t.then((function(){return null}))}function ft(t){var n=J(t),e="function"==typeof t.customProps?t.customProps(n,window.location):t.customProps;("object"!==P(e)||null===e||Array.isArray(e))&&(e={},console.warn(j(40,!1),n,e));var r=H({},e,{name:n,mountParcel:ct.bind(t),singleSpa:O});return V(t)&&(r.unmountSelf=t.unmountThisParcel),r}var lt={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));lt.bootstrap={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function ht(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(17,!1));lt.mount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function mt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(18,!1));lt.unmount={millis:t,dieOnTimeout:n,warningMillis:e||1e3}}function dt(t,n,e){if("number"!=typeof t||t<=0)throw Error(j(19,!1));lt.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,a){var u=!1,c=!1;t[n](ft(t)).then((function(t){u=!0,i(t)})).catch((function(t){u=!0,a(t)})),setTimeout((function(){return f(1)}),r),setTimeout((function(){return f(!0)}),e.millis);var s=j(31,!1,n,o,J(t),e.millis);function f(t){if(!u)if(!0===t)c=!0,e.dieOnTimeout?a(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 yt(t){var n={};for(var e in lt)n[e]=H({},lt[e],t&&t[e]||{});return n}function gt(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==k&&t.status!==F?t:(t.status=D,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(ft(t));if(!Z(r))throw e=!0,Error(j(33,!1,J(t)));return r.then((function(e){var r;t.loadErrorTime=null,"object"!==P(n=e)&&(r=34),Object.prototype.hasOwnProperty.call(n,"bootstrap")&&!Y(n.bootstrap)&&(r=35),Y(n.mount)||(r=36),Y(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),L(void 0,t,$),t}return n.devtools&&n.devtools.overlays&&(t.devtools.overlays=H({},t.devtools.overlays,n.devtools.overlays)),t.status=M,t.bootstrap=X(n,"bootstrap"),t.mount=X(n,"mount"),t.unmount=X(n,"unmount"),t.unload=X(n,"unload"),t.timeouts=yt(n.timeouts),delete t.loadPromise,t}))})).catch((function(n){var r;return delete t.loadPromise,e?r=$:(r=F,t.loadErrorTime=(new Date).getTime()),L(n,t,r),t})));var n,e}))}var wt,Et="undefined"!=typeof window,bt={hashchange:[],popstate:[]},Ot=["hashchange","popstate"];function Pt(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=Nt(window.location.href),r=Nt(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 Tt(t){var n=this;if(t){var e=t[0].type;Ot.indexOf(e)>=0&&bt[e].forEach((function(e){try{e.apply(n,t)}catch(t){setTimeout((function(){throw t}))}}))}}function _t(){nn([],arguments)}function St(t,n){return function(){var e=window.location.href,r=t.apply(this,arguments),o=window.location.href;return wt&&e===o||(an()?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(Et){window.addEventListener("hashchange",_t),window.addEventListener("popstate",_t);var Lt=window.addEventListener,xt=window.removeEventListener;window.addEventListener=function(t,n){if(!("function"==typeof n&&Ot.indexOf(t)>=0)||Q(bt[t],(function(t){return t===n})))return Lt.apply(this,arguments);bt[t].push(n)},window.removeEventListener=function(t,n){if(!("function"==typeof n&&Ot.indexOf(t)>=0))return xt.apply(this,arguments);bt[t]=bt[t].filter((function(t){return t!==n}))},window.history.pushState=St(window.history.pushState,"pushState"),window.history.replaceState=St(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(j(41,!1)):window.singleSpaNavigate=Pt}function Nt(t){var n=document.createElement("a");return n.href=t,n}var jt=!1;function Ut(){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 kt.call(this,n,window.addEventListener,t,e,arguments)},t.fn.off=function(t,n){return kt.call(this,e,window.removeEventListener,t,n,arguments)},jt=!0}}function kt(t,n,e,r,o){return"string"!=typeof e?t.apply(this,o):(e.split(/\s+/).forEach((function(t){Ot.indexOf(t)>=0&&(n(t,r),e=e.replace(t,""))})),""===e.trim()?this:t.apply(this,o))}var Dt={};function Mt(t){return Promise.resolve().then((function(){var n=Dt[J(t)];if(!n)return t;if(t.status===k)return It(t,n),t;if("UNLOADING"===t.status)return n.promise.then((function(){return t}));if(t.status!==R&&t.status!==F)return t;var e=t.status===F?Promise.resolve():vt(t,"unload");return t.status="UNLOADING",e.then((function(){return It(t,n),t})).catch((function(e){return function(t,n,e){delete Dt[J(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,L(e,t,$),n.reject(e)}(t,n,e),t}))}))}function It(t,n){delete Dt[J(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=k,n.resolve()}function Rt(t,n,e,r){Dt[J(t)]={app:t,resolve:e,reject:r},Object.defineProperty(Dt[J(t)],"promise",{get:n})}function Ct(t){return Dt[t]}var Gt=[];function Bt(){var t=[],n=[],e=[],r=[],o=(new Date).getTime();return Gt.forEach((function(i){var a=i.status!==$&&z(i);switch(i.status){case F:a&&o-i.loadErrorTime>=200&&e.push(i);break;case k:case D:a&&e.push(i);break;case M:case R:!a&&Ct(J(i))?t.push(i):a&&r.push(i);break;case G:a||n.push(i)}})),{appsToUnload:t,appsToUnmount:n,appsToLoad:e,appsToMount:r}}function Wt(){return Gt.filter(K).map(J)}function Ft(){return Gt.map(J)}function $t(t){var n=Q(Gt,(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"===P(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"!==P(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!==Ft().indexOf(o.name))throw Error(j(21,!1,o.name));Gt.push(H({loadErrorTime:null,status:k,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Et&&(Ut(),nn())}function zt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Gt.filter((function(n){return n.activeWhen(t)})).map(J)}function Jt(t){if(0===Gt.filter((function(n){return J(n)===t})).length)throw Error(j(25,!1,t));return Vt(t).then((function(){var n=Gt.map(J).indexOf(t);Gt.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(Gt,(function(n){return J(n)===t}));if(!e)throw Error(j(27,!1,t));var r,o=Ct(J(e));if(n&&n.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,n){Rt(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){Rt(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"===P(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 a=t[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(t.length),new RegExp(o,"i");function u(i){var a=t.slice(e,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===t.length)if(r)n&&(o+="$");else{var u=n?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}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 Yt=!1,Xt=[],Zt=Et&&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(Yt)return new Promise((function(t,e){Xt.push({resolve:t,reject:e,eventArguments:n})}));var e,r=Bt(),o=r.appsToUnload,i=r.appsToUnmount,a=r.appsToLoad,u=r.appsToMount,c=!1,s=Zt,f=Zt=window.location.href;return an()?(Yt=!0,e=o.concat(a,i,u),h()):(e=a,p());function l(){c=!0}function p(){return Promise.resolve().then((function(){var t=a.map(gt);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 S(0===e.length?"single-spa:before-no-app-change":"single-spa:before-app-change",v(!0))),window.dispatchEvent(new S("single-spa:before-routing-event",v(!0,{cancelNavigation:l}))),c)return window.dispatchEvent(new S("single-spa:before-mount-routing-event",v(!0))),m(),void Pt(s);var n=o.map(Mt),r=i.map(nt).map((function(t){return t.then(Mt)})).concat(n),f=Promise.all(r);f.then((function(){window.dispatchEvent(new S("single-spa:before-mount-routing-event",v(!0)))}));var p=a.map((function(t){return gt(t).then((function(t){return en(t,f)}))})),h=u.filter((function(t){return a.indexOf(t)<0})).map((function(t){return en(t,f)}));return f.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 S(r,v())),window.dispatchEvent(new S("single-spa:routing-event",v()))}catch(t){setTimeout((function(){throw t}))}if(Yt=!1,Xt.length>0){var o=Xt;Xt=[],nn(o)}return n}function d(){t.forEach((function(t){Tt(t.eventArguments)})),Tt(n)}function v(){var t,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],l=arguments.length>1?arguments[1]:void 0,p={},h=(T(t={},G,[]),T(t,R,[]),T(t,k,[]),T(t,$,[]),t);r?(a.concat(u).forEach((function(t,n){d(t,G)})),o.forEach((function(t){d(t,k)})),i.forEach((function(t){d(t,R)}))):e.forEach((function(t){d(t)}));var m={detail:{newAppStatuses:p,appsByNewStatus:h,totalAppChanges:e.length,originalEvent:null==n?void 0:n[0],oldUrl:s,newUrl:f,navigationIsCanceled:c}};return l&&H(m.detail,l),m;function d(t,n){var e=J(t);n=n||$t(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,wt=n),Et&&nn()}function an(){return rn}Et&&setTimeout((function(){rn||console.warn(j(1,!1))}),5e3);var un={getRawAppData:function(){return[].concat(Gt)},reroute:nn,NOT_LOADED:k,toLoadPromise:gt,toBootstrapPromise:tt,unregisterApplication:Jt};Et&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=un);var cn=e(6639),sn="4.0.3-pre.353",fn=e(3979),ln={"webservices.rest":"^2.2.0"},pn={featureName:"primary navigation",moduleName:u.e};function hn(){return(0,r.defineConfigSchema)(u.e,h),(0,r.defineExtensionConfigSchema)("link",cn.genericLinkConfigSchema),(0,r.setupOfflineSync)(u.O,[],E),{pages:[{load:(0,r.getAsyncLifecycle)((function(){return Promise.all([e.e(857),e.e(218),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(Pt(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(857),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(857),e.e(680),e.e(98)]).then(e.bind(e,5098))}),pn),online:{postUserProperties:f},offline:{postUserProperties:p}},{name:"link",load:(0,r.getAsyncLifecycle)((function(){return Promise.resolve().then(e.bind(e,6639))}),{featureName:"Link",moduleName:u.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}}]);