UNPKG

@icap-ethiopia/esm-ethiohri-app

Version:
2 lines 1.62 MB
/*! For license information please see 151.js.LICENSE.txt */ (globalThis.webpackChunk_icap_ethiopia_esm_ethiohri_app=globalThis.webpackChunk_icap_ethiopia_esm_ethiohri_app||[]).push([[151],{209:()=>{System.register(["@openmrs/esm-utils"],(function(e,t){var n={};return{setters:[function(e){n.shallowEqual=e.shallowEqual}],execute:function(){e(function(){"use strict";var e={618:function(e){e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return function(){var e=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},t=function(e,t){var n=l[e];if(n)return n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value.setState(t,!0),n.active=!0,n.value;var r=c()((function(){return t}));return l[e]={value:r,active:!0},r},n=function(e,t){var n=l[e];return n?(n.active?console.error("Attempted to override the existing store ".concat(e,". Make sure that stores are only created once.")):n.value=t,n.active=!0,n.value):(l[e]={value:t,active:!0},t)},i=function(e,t){var n=l[e];if(!n){var r=c()((function(){return null!=t?t:{}}));return l[e]={value:r,active:!1},r}return n.value},a=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o,i=function(e){if(Array.isArray(e))return e}(o=n)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,o=[],i=!0,a=!1;try{for(t=t.call(e);!(i=(n=t.next()).done)&&(o.push(n.value),3!==o.length);i=!0);}catch(e){a=!0,r=e}finally{try{i||null==t.return||t.return()}finally{if(a)throw r}}return o}}(o)||function(t){if(t){if("string"==typeof t)return e(t,3);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,3):void 0}}(o)||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.")}(),a=i[0],s=i[1],c=i[2],l=void 0===c?s:c,f=void 0===c?function(e){return e}:s;return l(f(a.getState())),a.subscribe((function(e,t){var n=f(e);(0,u.shallowEqual)(t,n)||l(n)}))};r.r(o),r.d(o,{createGlobalStore:function(){return t},getGlobalStore:function(){return i},registerGlobalStore:function(){return n},subscribeTo:function(){return a}});var u=r(618),s=function(e){var t,n=new Set,r=function(e,r){var o="function"==typeof e?e(t):e;if(!Object.is(o,t)){var i=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,getInitialState:function(){return a},subscribe:function(e){return n.add(e),function(){return n.delete(e)}},destroy:function(){console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},c=function(e){return e?s(e):s},l={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=l)}),1e3)}(),o}())}}}))},1386:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>ht,yw:()=>ct,Wp:()=>d,Uz:()=>mt,nX:()=>gt,ll:()=>r,FZ:()=>st,p9:()=>pt,gM:()=>yt,Y1:()=>ot});var r="openmrs-routes:",o=n(6007),i=n(1834),a={bootstrap:function(){return Promise.resolve()},mount:function(){return Promise.resolve()},unmount:function(){return Promise.resolve()}};function u(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)}function s(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){u(i,r,o,a,s,"next",e)}function s(e){u(i,r,o,a,s,"throw",e)}a(void 0)}))}}function c(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}var l=new Map;function f(e,t){return s((function(){var n,r,i,u,s;return c(this,(function(c){switch(c.label){case 0:return n=t.indexOf("#"),i=(r=n>=0)?t.substring(0,n):e,u=r?t.substring(n+1):t,[4,(0,o.importDynamic)(i)];case 1:return(s=c.sent())&&Object.hasOwn(s,u)&&"function"==typeof s[u]?[2,d(i,s).then((function(){return s[u]()}))]:(s?s&&Object.hasOwn(s,u)?console.warn("The export ".concat(t,", defined in ").concat(e,"'s routes.json, is not a function")):console.warn("".concat(i,' does not define a component called "').concat(u,'", referenced in ').concat(e,"'s routes.json. This cannot be loaded.")):console.warn("Unknown app ".concat(i," for ").concat(t," defined in ").concat(e,"'s routes.json")),[2,a])}}))}))}function d(e,t){return h.apply(this,arguments)}function h(){return(h=s((function(e,t){var n,r;return c(this,(function(a){switch(a.label){case 0:return e in l?[3,5]:null==t?[3,1]:(r=t,[3,3]);case 1:return[4,(0,o.importDynamic)(e)];case 2:r=a.sent(),a.label=3;case 3:return n=r,[4,l[e]=new Promise((function(t,r){if(Object.hasOwn(n,"startupApp")){var o=n.startupApp;if("function"==typeof o)return Promise.resolve(o()).then((function(){(0,i.registerModuleLoad)(e),t(null)})).catch(r)}(0,i.registerModuleLoad)(e),t(null)}))];case 4:return a.sent(),[3,7];case 5:return[4,l[e]];case 6:a.sent(),a.label=7;case 7:return[2]}}))}))).apply(this,arguments)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}var m=Object.freeze({__proto__:null,get start(){return Xe},get ensureJQuerySupport(){return ke},get setBootstrapMaxTime(){return ue},get setMountMaxTime(){return se},get setUnmountMaxTime(){return ce},get setUnloadMaxTime(){return le},get registerApplication(){return Be},get unregisterApplication(){return ze},get getMountedApps(){return Ne},get getAppStatus(){return Le},get unloadApplication(){return Ge},get checkActivityFunctions(){return Ue},get getAppNames(){return Re},get pathToActiveWhen(){return Ke},get navigateToUrl(){return ge},get patchHistoryApi(){return Oe},get triggerAppChange(){return $e},get addErrorHandler(){return S},get removeErrorHandler(){return E},get mountRootParcel(){return ne},get NOT_LOADED(){return A},get LOADING_SOURCE_CODE(){return k},get NOT_BOOTSTRAPPED(){return T},get BOOTSTRAPPING(){return j},get NOT_MOUNTED(){return P},get MOUNTING(){return D},get UPDATING(){return I},get LOAD_ERROR(){return R},get MOUNTED(){return C},get UNLOADING(){return N},get UNMOUNTING(){return M},get SKIP_BECAUSE_BROKEN(){return L}}),g=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}).CustomEvent,b=function(){try{var e=new g("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?g:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},w=[];function _(e,t,n){var r=x(e,t,n);w.length?w.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function S(e){if("function"!=typeof e)throw Error(O(28,!1));w.push(e)}function E(e){if("function"!=typeof e)throw Error(O(29,!1));var t=!1;return w=w.filter((function(n){var r=n===e;return t=t||r,!r})),t}function O(e,t){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(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function x(e,t,n){var r,o,i,a="".concat(G(t)," '").concat(U(t),"' died in status ").concat(t.status,": ");if(o=e,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(O(30,!1,t.status,U(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=U(t),t.status=n,r}var A="NOT_LOADED",k="LOADING_SOURCE_CODE",T="NOT_BOOTSTRAPPED",j="BOOTSTRAPPING",P="NOT_MOUNTED",D="MOUNTING",C="MOUNTED",I="UPDATING",M="UNMOUNTING",N="UNLOADING",R="LOAD_ERROR",L="SKIP_BECAUSE_BROKEN";function F(e){return e.status===C}function B(e){try{return e.activeWhen(window.location)}catch(t){return _(t,e,L),!1}}function U(e){return e.name}function z(e){return Boolean(e.unmountThisParcel)}function G(e){return z(e)?"parcel":"application"}function H(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function V(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function K(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!V(t,(function(e){return"function"!=typeof e}))));var t}function q(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=G(e),o=U(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return W(n)?n:Promise.reject(O(15,!1,r,o,t,a))}))}),Promise.resolve())}}function W(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}var Y=[];function $(e,t){return Promise.resolve().then((function(){return e.status!==T?e:(e.status=j,e.bootstrap?fe(e,"bootstrap").then(n).catch((function(n){if(t)throw x(n,e,L);return _(n,e,L),e})):Promise.resolve().then(n))}));function n(){return e.status=P,e}}function J(e,t){return Promise.resolve().then((function(){var n=function(){return fe(e,"unmount").then((function(){e.status=P}),(function(n){if(t)throw x(n,e,L);_(n,e,L)}))};if(e.status!==C)return e;e.status=M;var r=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(t)throw x(n,e,L);_(n,e,L)}))})).then((function(){return e}))}))}var Z=!1,Q=!1;function X(e,t){return Promise.resolve().then((function(){return e.status!==P?e:(Z||(window.dispatchEvent(new b("single-spa:before-first-mount")),Z=!0),e.status=D,fe(e,"mount").then((function(){return e.status=C,Q||(window.dispatchEvent(new b("single-spa:first-mount")),Q=!0),e})).catch((function(n){var r=function(){if(t)throw x(n,e,L);return _(n,e,L),e};return e.status=C,J(e,!0).then(r,r)})))}))}var ee=0,te={parcels:{}};function ne(){return re.apply(te,arguments)}function re(e,t){var n=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(O(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(O(3,!1,v(e.name)));var r=ee++,o=e.name||"parcel-".concat(r);if("object"!=typeof t)throw Error(O(4,!1,o,void 0===t?"undefined":v(t)));if(!t.domElement)throw Error(O(5,!1,o));var i,a="function"==typeof e,u=a?e:function(){return Promise.resolve(e)},s={id:r,parcels:{},status:a?k:T,customProps:t,parentName:U(n),unmountThisParcel:function(){return h.then((function(){if(s.status!==C)throw Error(O(6,!1,o,s.status));return J(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=L,f(e),e}))}};n.parcels[r]=s;var c=u();if(!c||"function"!=typeof c.then)throw Error(O(7,!1));c=c.then((function(e){if(!e)throw Error(O(8,!1));if(o=e.name||"parcel-".concat(r),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!K(e.bootstrap))throw Error(O(9,!1,o));if(!K(e.mount))throw Error(O(10,!1,o));if(!K(e.unmount))throw Error(O(11,!1,o));if(e.update&&!K(e.update))throw Error(O(12,!1,o));var t=q(e,"bootstrap"),n=q(e,"mount"),a=q(e,"unmount");s.status=T,s.name=o,s.bootstrap=t,s.mount=n,s.unmount=a,s.timeouts=de(e.timeouts),e.update&&(s.update=q(e,"update"),i.update=function(e){return s.customProps=e,oe((t=s,Promise.resolve().then((function(){if(t.status!==C)throw Error(O(32,!1,U(t)));return t.status=I,fe(t,"update").then((function(){return t.status=C,t})).catch((function(e){throw x(e,t,L)}))}))));var t})}));var l,f,d=c.then((function(){return $(s,!0)})),h=d.then((function(){return X(s,!0)})),p=new Promise((function(e,t){l=e,f=t}));return i={mount:function(){return oe(Promise.resolve().then((function(){if(s.status!==P)throw Error(O(13,!1,o,s.status));return n.parcels[r]=s,X(s)})))},unmount:function(){return oe(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:oe(c),bootstrapPromise:oe(d),mountPromise:oe(h),unmountPromise:oe(p)}}function oe(e){return e.then((function(){return null}))}function ie(e){var t=U(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(O(40,!1),t,n));var r=H({},n,{name:t,mountParcel:re.bind(e),singleSpa:m});return z(e)&&(r.unmountSelf=e.unmountThisParcel),r}var ae={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 ue(e,t,n){if("number"!=typeof e||e<=0)throw Error(O(16,!1));ae.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function se(e,t,n){if("number"!=typeof e||e<=0)throw Error(O(17,!1));ae.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ce(e,t,n){if("number"!=typeof e||e<=0)throw Error(O(18,!1));ae.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function le(e,t,n){if("number"!=typeof e||e<=0)throw Error(O(19,!1));ae.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function fe(e,t){var n=e.timeouts[t],r=n.warningMillis,o=G(e);return new Promise((function(i,a){var u=!1,s=!1;e[t](ie(e)).then((function(e){u=!0,i(e)})).catch((function(e){u=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=O(31,!1,t,o,U(e),n.millis);function l(e){if(!u)if(!0===e)s=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!s){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function de(e){var t={};for(var n in ae)t[n]=H({},ae[n],e&&e[n]||{});return t}function he(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==A&&e.status!==R?e:(e.status=k,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(ie(e));if(!W(r))throw n=!0,Error(O(33,!1,U(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!K(t.bootstrap)&&(r=35),K(t.mount)||(r=36),K(t.unmount)||(r=37);var o=G(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(O(r,!1,o,U(e),i),t),_(void 0,e,L),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=H({},e.devtools.overlays,t.devtools.overlays)),e.status=T,e.bootstrap=q(t,"bootstrap"),e.mount=q(t,"mount"),e.unmount=q(t,"unmount"),e.unload=q(t,"unload"),e.timeouts=de(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=L:(r=R,e.loadErrorTime=(new Date).getTime()),_(t,e,r),e})));var t,n}))}var pe,ye="undefined"!=typeof window,ve={hashchange:[],popstate:[]},me=["hashchange","popstate"];function ge(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(O(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=xe(window.location.href),r=xe(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function be(e){var t=this;if(e){var n=e[0].type;me.indexOf(n)>=0&&ve[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function we(){Je([],arguments)}function _e(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return pe&&n===o||window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}var Se=null,Ee=!1;function Oe(e){if(Ee)throw Error(O(43,!1));pe=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,Ee=!0,Se=window.history.replaceState,window.addEventListener("hashchange",we),window.addEventListener("popstate",we);var t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&me.indexOf(e)>=0)||V(ve[e],(function(e){return e===n})))return t.apply(this,arguments);ve[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&me.indexOf(e)>=0&&(ve[e]=ve[e].filter((function(e){return e!==t}))),n.apply(this,arguments)},window.history.pushState=_e(window.history.pushState,"pushState"),window.history.replaceState=_e(Se,"replaceState")}function xe(e){var t=document.createElement("a");return t.href=e,t}ye&&(window.singleSpaNavigate?console.warn(O(41,!1)):window.singleSpaNavigate=ge);var Ae=!1;function ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Ae){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return Te.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return Te.call(this,n,window.removeEventListener,e,t,arguments)},Ae=!0}}function Te(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){me.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var je={};function Pe(e){return Promise.resolve().then((function(){var t=je[U(e)];if(!t)return e;if(e.status===A)return De(e,t),e;if(e.status===N)return t.promise.then((function(){return e}));if(e.status!==P&&e.status!==R)return e;var n=e.status===R?Promise.resolve():fe(e,"unload");return e.status=N,n.then((function(){return De(e,t),e})).catch((function(n){return function(e,t,n){delete je[U(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,_(n,e,L),t.reject(n)}(e,t,n),e}))}))}function De(e,t){delete je[U(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=A,t.resolve()}function Ce(e,t,n,r){je[U(e)]={app:e,resolve:n,reject:r},Object.defineProperty(je[U(e)],"promise",{get:t})}function Ie(e){return je[e]}var Me=[];function Ne(){return Me.filter(F).map(U)}function Re(){return Me.map(U)}function Le(e){var t=V(Me,(function(t){return U(t)===e}));return t?t.status:null}var Fe=!1;function Be(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(O(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(O(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(O(20,!1));if("object"!=typeof e.app&&"function"!=typeof e.app)throw Error(O(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(O(24,!1));if(!Ve(e.customProps))throw Error(O(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(O(20,!1));if(!t)throw Error(O(23,!1));if("function"!=typeof n)throw Error(O(24,!1));if(!Ve(r))throw Error(O(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Ke(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(et()||Fe||(Fe=!0,setTimeout((function(){et()||console.warn(O(1,!1))}),5e3)),-1!==Re().indexOf(o.name))throw Error(O(21,!1,o.name));Me.push(H({loadErrorTime:null,status:A,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ye&&(ke(),Je())}function Ue(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Me.filter((function(t){return t.activeWhen(e)})).map(U)}function ze(e){if(0===Me.filter((function(t){return U(t)===e})).length)throw Error(O(25,!1,e));return(ye?Ge(e,{waitForUnmount:!1}):Promise.resolve()).then((function(){var t=Me.map(U).indexOf(e);Me.splice(t,1)}))}function Ge(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(O(26,!1));var n=V(Me,(function(t){return U(t)===e}));if(!n)throw Error(O(27,!1,e));var r,o=Ie(U(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Ce(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,He(n,o.resolve,o.reject)):r=new Promise((function(e,t){Ce(n,(function(){return r}),e,t),He(n,e,t)})),r}function He(e,t,n){Promise.resolve().then((function(){if(V(Ue(),(function(t){return t===U(e)})))return $e()})).then((function(){return J(e).then(Pe).then((function(){t(),setTimeout((function(){Je()}))}))})).catch(n)}function Ve(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ke(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&u(i)}return u(e.length),new RegExp(o,"i");function u(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var u=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(u,"$"):"".concat(o,"(/").concat(u,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var qe=!1,We=[],Ye=ye&&window.location.href;function $e(){return Je()}function Je(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(qe)return new Promise((function(e,n){We.push({resolve:e,reject:n,eventArguments:t})}));var r,o=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Me.forEach((function(i){var a=i.status!==L&&B(i);switch(i.status){case R:a&&o-i.loadErrorTime>=200&&n.push(i);break;case A:case k:a&&n.push(i);break;case T:case P:!a&&Ie(U(i))?e.push(i):a&&r.push(i);break;case C:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),i=o.appsToUnload,a=o.appsToUnmount,u=o.appsToLoad,s=o.appsToMount,c=[],l=Ye,f=Ye=window.location.href;return et()?(qe=!0,r=i.concat(u,a,s),Promise.resolve().then((function(){return m(0===r.length?"before-no-app-change":"before-app-change",v(!0)),m("before-routing-event",v(!0,{cancelNavigation:d})),Promise.all(c).then((function(n){if(n.some((function(e){return e})))return Se.call(window.history,history.state,"",l.substring(location.origin.length)),Ye=location.href,qe=!1,Je(e,t,!0);var r=i.map(Pe),o=a.map(J).map((function(e){return e.then(Pe)})).concat(r),c=Promise.all(o);c.then((function(){m("before-mount-routing-event",v(!0))}),(function(e){throw e}));var f=u.map((function(e){return he(e).then((function(e){return Ze(e,c)}))})),d=s.filter((function(e){return u.indexOf(e)<0})).map((function(e){return Ze(e,c)}));return c.catch((function(e){throw p(),e})).then((function(){return p(),Promise.all(f.concat(d)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(h).then((function(){}),(function(e){throw e}))}))}))}))):(r=u,Promise.resolve().then((function(){var e=u.map(he);return Promise.all(e).then(p).then((function(){return[]})).catch((function(e){throw p(),e})).finally((function(){}))})));function d(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);c.push(t.catch((function(e){return console.warn(Error(O(42,!1))),console.warn(e),!1})))}function h(){var t=Ne();e.forEach((function(e){return e.resolve(t)}));try{m(0===r.length?"no-app-change":"app-change",v()),m("routing-event",v())}catch(e){setTimeout((function(){throw e}))}if(qe=!1,We.length>0){var n=We;We=[],Je(n)}return t}function p(){n||(e.forEach((function(e){be(e.eventArguments)})),be(t))}function v(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1?arguments[1]:void 0,c={},d=(y(e={},C,[]),y(e,P,[]),y(e,A,[]),y(e,L,[]),e);n?(u.concat(s).forEach((function(e,t){p(e,C)})),i.forEach((function(e){p(e,A)})),a.forEach((function(e){p(e,P)}))):r.forEach((function(e){p(e)}));var h={detail:{newAppStatuses:c,appsByNewStatus:d,totalAppChanges:r.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:f}};return o&&H(h.detail,o),h;function p(e,t){var n=U(e);t=t||Le(n),c[n]=t,(d[t]=d[t]||[]).push(n)}}function m(e,t){n||window.dispatchEvent(new b("single-spa:".concat(e),t))}}function Ze(e,t){return B(e)?$(e).then((function(e){return t.then((function(){return B(e)?X(e):e}))})):t.then((function(){return e}))}var Qe=!1;function Xe(e){Qe=!0,ye&&(Oe(e),Je())}function et(){return Qe}var tt={getRawAppData:function(){return function(e){if(Array.isArray(e))return p(e)}(e=Me)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(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.")}();var e},reroute:Je,NOT_LOADED:A,toLoadPromise:he,toBootstrapPromise:$,unregisterApplication:ze,getProfilerData:function(){return Y}};ye&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=tt);var nt=n(9375),rt=n(7093);function ot(e,t){var n=t.name;if(n){t.slots&&t.slot&&console.warn("The extension ".concat(n," from ").concat(e," declares both a 'slots' property and\na 'slot' property. Only the 'slots' property will be honored."));var r=t.slots?t.slots:t.slot?[t.slot]:[];if(t.component||t.load){var o,i,a=void 0;if(t.component)a=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The extension ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the extension will not be loaded."));a=t.load}a&&(0,rt.registerExtension)({name:n,load:a,meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,online:null===(o=t.online)||void 0===o||o,offline:null!==(i=t.offline)&&void 0!==i&&i,featureFlag:t.featureFlag});var u=!0,s=!1,c=void 0;try{for(var l,d=r[Symbol.iterator]();!(u=(l=d.next()).done);u=!0){var h=l.value;(0,rt.attach)(h,n)}}catch(e){s=!0,c=e}finally{try{u||null==d.return||d.return()}finally{if(s)throw c}}}else console.error("The extension ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the extension definition."),t)}else console.error("An extension definition in ".concat(e,' is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nextension definition.'),t)}function it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var at=[];function ut(e){if(Array.isArray(e)){var t=e.map(ut);return function(e){return t.some((function(t){return t(e)}))}}return"string"==typeof e?Ke(window.getOpenmrsSpaBase()+e):(n=e,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)?function(t){return function(e,t){return e.test(t.pathname.replace(window.getOpenmrsSpaBase(),""))}(e,t)}:function(){return e});var n,r}function st(e,t){if(e&&t&&"object"==typeof t){var n,r;(0,i.registerModuleWithConfigSystem)(e);var o,a,u,s,c=null!==(r=t.extensions)&&void 0!==r?r:[],l=null!==(o=t.modals)&&void 0!==o?o:[],d=null!==(a=t.workspaces)&&void 0!==a?a:[],h=null!==(u=t.workspaceGroups)&&void 0!==u?u:[],p=null!==(s=t.featureFlags)&&void 0!==s?s:[];null===(n=t.pages)||void 0===n||n.forEach((function(t){var n,r,o;t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?at.push((r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){it(e,t,n[t])}))}return e}({},t),o=null!=(o={order:null!==(n=t.order)&&void 0!==n?n:Number.MAX_SAFE_INTEGER,appName:e})?o:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t}(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))})),r)):console.warn("A page for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),c.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?ot(e,t):console.warn("An extension for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),l.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){var n=t.name;if(n)if(t.component||t.load){var r=void 0;if(t.component)r=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The modal ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the modal will not be loaded."));r=t.load}r&&(0,rt.registerModal)({name:n,load:r,moduleName:e})}else console.error("The modal ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the modal definition."),t);else console.error("A modal definition in ".concat(e,' is missing an name and thus cannot be\nregistered. To fix this, ensure that you define the "name" field inside the\nmodal definition.'),t)}(e,t):console.warn("A modal for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),d.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){var n=t.name;if(n){var r=t.title;if(r)if(t.component||t.load){var o=void 0;if(t.component)o=f(e,t.component);else if(t.load){if("function"!=typeof t.load)return void console.error("The workspace ".concat(n," from ").concat(e," declares a 'load' property that is not a function. This is not\nsupported, so the workspace will not be loaded."));o=t.load}o&&(0,rt.registerWorkspace)({name:n,title:r,load:o,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups});var i=!0,a=!1,u=void 0;try{for(var s,c=(t.groups||[])[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;(0,rt.registerWorkspaceGroup)({name:l,members:[n]})}}catch(e){a=!0,u=e}finally{try{i||null==c.return||c.return()}finally{if(a)throw u}}}else console.error("The workspace ".concat(n," from ").concat(e," is missing a 'component' entry and thus cannot be registered.\nTo fix this, ensure that you define a 'component' field inside the workspace definition."),t);else console.error("A workspace definition in ".concat(e,' is missing a title and thus cannot be registered.\nTo fix this, ensure that you define the "title" field inside the workspace definition.'),t)}else console.error("A workspace definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.'),t)}(e,t):console.warn("A workspace for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),h.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"name")?function(e,t){var n,r=t.name;r?(0,rt.registerWorkspaceGroup)({name:r,members:null!==(n=t.members)&&void 0!==n?n:[]}):console.error("A workspace group definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the workspace definition.'),t)}(e,t):console.warn("A workspace group for ".concat(e," could not be registered as it does not appear to have the required properties"),t)})),p.forEach((function(t){t&&"object"==typeof t&&Object.hasOwn(t,"flagName")?function(e,t){t.flagName?t.label?t.description?(0,nt.registerFeatureFlag)(t.flagName,t.label,t.description):console.error("A feature flag definition in ".concat(e,' is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "description" field inside the feature flag definition.'),t):console.error("A feature flag definition in ".concat(e,' is missing a description and thus cannot be registered.\nTo fix this, ensure that you define the "label" field inside the feature flag definition.'),t):console.error("A feature flag definition in ".concat(e,' is missing a name and thus cannot be registered.\nTo fix this, ensure that you define the "name" field inside the feature flag definition.'),t)}(e,t):console.warn("A feature flag for ".concat(e," could not be registered as it does not appear to have the required properties"),t)}))}}function ct(){at.sort((function(e,t){var n=e.order-t.order;return 0!=n?n:e.appName.localeCompare(t.appName,"en")}));var e=new Map,t=!0,n=!1,r=void 0;try{for(var o,i=at[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e.has(a.appName)?e.set(a.appName,e.get(a.appName)+1):e.set(a.appName,0);var u=e.get(a.appName),s="".concat(a.appName,"-page-").concat(u),c=document.createElement("div");c.id="single-spa-application:".concat(s),document.body.appendChild(c),lt(s,a)}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}function lt(e,t){var n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);if(!1!==n)if(t.component){var r=function(e,t){var n=t.online,r=t.offline,o=t.featureFlag;return window.offlineEnabled?function(t){return!!(navigator.onLine&&(null==n||n)||!navigator.onLine&&null!=r&&r)&&!(o&&!(0,nt.getFeatureFlag)(o))&&e(t)}:e}(ut(n),t);Be(e,f(t.appName,t.component),r)}else console.warn('A registered page definition is missing a component and thus cannot be registered.\nTo fix this, ensure that you define the "component" field inside the page definition.',e);else console.warn('A registered page definition is missing a route and thus cannot be registered.\nTo fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.',e)}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dt=(0,n(3441).canAccessStorage)();function ht(e,t){if(dt){if("string"==typeof t){if(t.startsWith("http"))return vt(e,t);try{var n=JSON.parse(t);if(mt(n))return vt(e,n);console.error("The supplied routes for ".concat(e," is not a valid OpenmrsAppRoutes object"),t)}catch(t){console.error("Could not add routes override for ".concat(e,": "),t)}}else{if(r=t,null!=(o=URL)&&"undefined"!=typeof Symbol&&o[Symbol.hasInstance]?o[Symbol.hasInstance](r):r instanceof o)return vt(e,t.toString());if(mt(t))return vt(e,t)}var r,o;console.error("Override for ".concat(e," is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL"),t)}}function pt(e){if(dt){var t=r+e;localStorage.removeItem(t)}}function yt(){if(dt)for(var e=window.localStorage,t=0;t<e.length;t++){var n=e.key(t);(null==n?void 0:n.startsWith(r))&&e.removeItem(n)}}function vt(e,t){var n=r+e;localStorage.setItem(n,JSON.stringify(t))}function mt(e){if(e&&"object"==typeof e){var t=Object.prototype.hasOwnProperty,n=e;return!!((!t.call(e,"pages")||Boolean(n.pages)&&Array.isArray(n.pages))&&(!t.call(e,"extensions")||Boolean(n.extensions)&&Array.isArray(n.extensions))&&(!t.call(e,"workspaces")||Boolean(n.workspaces)&&Array.isArray(n.workspaces))&&(!t.call(e,"modals")||Boolean(n.modals)&&Array.isArray(n.modals)))}return!1}function gt(e){if(e&&"object"==typeof e){var t=e;return Object.entries(t).every((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ft(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ft(e,t):void 0}}(e,t)||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.")}()}(e,2),n=t[0],r=t[1];return"string"==typeof n&&mt(r)}))}return!1}},1757:()=>{function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||i(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 i(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}System.register([],(function(e,n){return{execute:function(){e(function(){"use strict";var e=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},a=function(e,t,n,r,o,i,a){try{var u=e[i](a),s=u.value}catch(e){return void n(e)}u.done?t(s):Promise.resolve(s).then(r,o)},u=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function u(e){a(i,r,o,u,s,"next",e)}function s(e){a(i,r,o,u,s,"throw",e)}u(void 0)}))}},s=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},c=function(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):(n=e,null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](n):n instanceof r);var n,r},l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){s(e,t,n[t])}))}return e},f=function(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);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)?n(e,t):void 0}}(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.")}()},d=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=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=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},h=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},S)},p=function(e){return Z.apply(this,arguments)},y=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E)},v=function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},E)},m=function(e){return b(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},g=function(e){return w(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},O)},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");null==t&&(t={});var r=function(e){return x(e,W)}(t),o=X("string"==typeof e?F(e):e,r);if(n(o))return o;throw{type:"Invalid result",message:"string"==typeof e?"The expression ".concat(e," did not produce a valid result"):"The expression did not produce a valid result"}},w=function(e){return Q.apply(this,arguments)},_=function(e){return F(e)},S=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||c(e,Date)},E=function(e){return"boolean"==typeof e},O=function(e){return"number"==typeof e},x=function(e,t){var n={thisObj:void 0,variables:l({},e),globals:l({},t),addVariables:function(e){return this.variables=l({},this.variables,e),this}};return n.addVariables.bind(n),n},A=function(e){return function(t){return null===t?null:X(t,e)}},k=function(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:"Cannot access the ".concat(e," property of objects")}},T=function(e){return e?"MemberExpression"===e.type?null===(t=e.property)||void 0===t?void 0:t.name:e.name:null;var t},j=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},P=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},D=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){P(e,t,n[t])}))}return e},C=function(e){if(!("string"==typeof e||"object"==typeof e&&e&&"type"in e))throw"Unknown expression type ".concat(e,". Expressions must either be a string or pre-compiled string.");var t,n={globals:D({},Y),isLocalExpression:!1,variables:new Set};return ne("string"==typeof e?F(e):e,n),function(e){if(Array.isArray(e))return j(e)}(t=n.variables)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(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.")}()},I=function(e){return function(t){return null===t?null:ne(t,e)}},M={d:function(e,t){for(var n in t)M.o(t,n)&&!M.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},N={};M.r(N),M.d(N,{compile:function(){return _},evaluate:function(){return h},evaluateAsBoolean:function(){return y},evaluateAsBooleanAsync:function(){return v},evaluateAsNumber:function(){return m},evaluateAsNumberAsync:function(){return g},evaluateAsType:function(){return b},evaluateAsTypeAsync:function(){return w},evaluateAsync:function(){return p},extractVariableNames:function(){return C},jsep:function(){return F}});var R=function(){function e(n){t(this,e),this.expr=n,this.index=0}return r(e,[{key:"char",get:function(){return this.expr.charAt(this.index)}},{key:"code",get:function(){return this.expr.charCodeAt(this.index)}},{key:"throwError",value:function(e){var t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}},{key:"runHook",value:function(t,n){if(e.hooks[t]){var r={context:this,node:n};return e.hooks.run(t,r),r.node}return n}},{key:"searchHook",value:function(t){if(e.hooks[t]){var n={context:this};return e.hooks[t].find((function(e){return e.call(n.context,n),n.node})),n.node}}},{key:"gobbleSpaces",value:function(){for(var t=this.code;t===e.SPACE_CODE||t===e.TAB_CODE||t===e.LF_CODE||t===e.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}},{key:"parse",value:function(){this.runHook("before-all");var t=this.gobbleExpressions(),n=1===t.length?t[0]:{type:e.COMPOUND,body:t};return this.runHook("after-all",n)}},{key:"gobbleExpressions",value:function(t){for(var n,r,o=[];this.index<this.expr.length;)if((n=this.code)===e.SEMCOL_CODE||n===e.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())o.push(r);else if(this.index<this.expr.length){if(n===t)break;this.throwError('Unexpected "'+this.char+'"')}return o}},{key:"gobbleExpression",value:function(){var e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}},{key:"gobbleBinaryOp",value:function(){this.gobbleSpaces();for(var t=this.expr.substr(this.index,e.max_binop_len),n=t.length;n>0;){if(e.binary_ops.hasOwnProperty(t)&&(!e.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!e.isIdentifierPart(this.expr.charCodeAt(this.index+t.length))))return this.index+=n,t;t=t.substr(0,--n)}return!1}},{key:"gobbleBinaryExpression",value:function(){var t,n,r,o,i,a,u,s,c;if(!(a=this.gobbleToken()))return a;if(!(n=this.gobbleBinaryOp()))return a;for(i={value:n,prec:e.binaryPrecedence(n),right_a:e.right_associative.has(n)},(u=this.gobbleToken())||this.throwError("Expected expression after "+n),o=