@openmrs/esm-styleguide 5.1.1-pre.997 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +15 -15
- package/dist/openmrs-esm-styleguide.css +1 -3
- package/dist/openmrs-esm-styleguide.css.map +1 -1
- package/dist/openmrs-esm-styleguide.js +1 -1
- package/dist/openmrs-esm-styleguide.js.map +1 -1
- package/package.json +13 -12
- package/src/_overrides.scss +17 -4
- package/src/declarations.d.ts +2 -0
- package/webpack.config.js +9 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see openmrs-esm-styleguide.js.LICENSE.txt */
|
|
2
|
-
System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(e,t){var n={},r={},o={},i={},a={},s={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(a,"__esModule",{value:!0}),{setters:[function(e){n.getExtensionInternalStore=e.getExtensionInternalStore,n.getExtensionStore=e.getExtensionStore},function(){},function(e){o.createGlobalStore=e.createGlobalStore,o.getGlobalStore=e.getGlobalStore},function(e){Object.keys(e).forEach((function(t){i[t]=e[t]}))},function(e){Object.keys(e).forEach((function(t){a[t]=e[t]}))},function(e){s.BehaviorSubject=e.BehaviorSubject,s.Subject=e.Subject}],execute:function(){e((()=>{var e={23:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},m={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:d,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=v;var _=function(e){return t(e,x)},S=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},O=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new x(n)},C=m;C.l=S,C.i=_,C.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var x=function(){var v=function(e){this.$L=S(e.locale,null,!0),this.parse(e)},g=v.prototype;return g.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(C.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(p);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=O(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return O(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<O(e)},g.$g=function(e,t,n){return C.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!C.u(t)||t,l=C.p(e),h=function(e,t){var o=C.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},p=function(e,t){return C.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?h(1,0):h(31,11);case c:return r?h(1,v):h(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return h(r?g-w:g+(6-w),v);case s:case d:return p(m+"Hours",0);case a:return p(m+"Minutes",1);case i:return p(m+"Seconds",2);case o:return p(m+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,u=C.p(e),l="set"+(this.$u?"UTC":""),h=(n={},n[s]=l+"Date",n[d]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],p=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(d,1);y.$d[h](p),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[C.p(e)]()},g.add=function(t,r){var l,d=this;t=Number(t);var h=C.p(r),p=function(e){var n=O(d);return C.w(n.date(n.date()+Math.round(e*t)),d)};if(h===c)return this.set(c,this.$M+t);if(h===f)return this.set(f,this.$y+t);if(h===s)return p(1);if(h===u)return p(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[h]||1,v=this.$d.getTime()+t*y;return C.w(v,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=C.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return C.s(i%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:C.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:C.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,a,!0),A:d(i,a,!1),m:String(a),mm:C.s(a,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||p[e]||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(t,r,d){var h,p=C.p(r),y=O(t),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=C.m(this,y);return m=(h={},h[f]=m/12,h[c]=m,h[l]=m/3,h[u]=(g-v)/6048e5,h[s]=(g-v)/864e5,h[a]=g/n,h[i]=g/e,h[o]=g/1e3,h)[p]||g,d?m:C.a(m)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return C.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),E=x.prototype;return O.prototype=E,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",d]].forEach((function(e){E[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),O.extend=function(e,t){return e.$i||(e(t,x,O),e.$i=!0),O},O.locale=S,O.isDayjs=_,O.unix=function(e){return O(1e3*e)},O.en=w[b],O.Ls=w,O.p={},O}()},701:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},279:(e,t,n)=>{"use strict";var r=n(493);r.createRoot,r.hydrateRoot},978:(e,t,n)=>{"use strict";var r=n(954),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,u=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&l({inst:o})}),[e,n,t]),a((function(){return c(o)&&l({inst:o}),e((function(){c(o)&&l({inst:o})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},921:(e,t,n)=>{"use strict";e.exports=n(978)},641:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-config","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var i={},a={},s={};return{setters:[function(e){i.Type=e.Type,i.defineConfigSchema=e.defineConfigSchema,i.getConfig=e.getConfig,i.navigate=e.navigate,i.validators=e.validators},function(e){a.reportError=e.reportError},function(e){s.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e,t){var n=s[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=a()((function(){return t}));return s[e]={value:r,active:!0},r},t=function(e,t){var n=s[e];if(!n){var r=a()((function(){return null!=t?t:{}}));return s[e]={value:r,active:!1},r}return n.value},n=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))},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]})},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})}},o={};r.r(o),r.d(o,{createGlobalStore:function(){return e},getGlobalStore:function(){return t},subscribeTo:function(){return n}});var i=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)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,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()}};return t=e(r,o,i),i},a=function(e){return e?i(e):i},s={};return setTimeout((function(){"development"===window.spaEnv&&(window.stores=s)}),1e3),o}())}}}))},824:function(e){"use strict";e.exports=i},254:function(e){"use strict";e.exports=a},738:function(e){"use strict";e.exports=s}},t={};function u(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,u),o.exports}u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){"use strict";var e=function(e,t){function n(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},i=function(e){setTimeout((function(){throw e}),0)},a=function(e){return e.reduce((function(e,t){return e.concat(r(t,X)?t.errors:t)}),[])},s=function(e){return e},l=function(e){if(e||(e=Y.Promise||Promise),!e)throw new Error("no Promise impl found");return e},f=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},d=function(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)},h=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},y=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=y(e);if(t.headers||(t.headers={}),_e(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(je)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Pe)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r;return 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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(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,s])}}}(this,(function(o){switch(o.label){case 0:return(t=e).ok?204===t.status?(t.data=null,[2,t]):[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))]:[3,1];case 1:return[4,(0,Se.getConfig)("@openmrs/esm-api")];case 2:return r=o.sent().redirectAuthFailure,n===y(Ae)&&403===t.status||r.enabled&&r.errors.includes(t.status)?((0,Se.navigate)({to:r.url}),[2,r.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new ke(n,t,r,a)}),(function(e){throw new ke(n,t,null,a)}))];case 3:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){d(i,n,r,a,s,"next",e)}function s(e){d(i,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new ie((function(r){var o=!1;return v(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},m=function(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Le<Date.now()-6e4||!De.getState().loaded)&&_(),new ie((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(De.getState()),De.subscribe(n)}))},w=function(){return(Le<Date.now()-6e4||!De.getState().loaded)&&_(),De},_=function(){return new Promise((function(e,t){Le=Date.now(),v(Ae).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,s,u;s=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale,u=document.documentElement.getAttribute("lang"),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(s)&&s!==u&&document.documentElement.setAttribute("lang",s),e(n.data),De.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,Te.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},S=function(){De.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},O=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Ie(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Ie(t.privileges.find((function(t){return e===t.display})))})):(Ie(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Ie(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},C=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(De.getState()),e||(t=De.subscribe(o))}))},x=function(){return new Promise((function(e,t){b().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},E=function(e,t){return Ne.apply(this,arguments)},j=function(){(0,Se.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Se.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Se.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Se.validators.isUrl]},errors:{_type:Se.Type.Array,_default:[401],_elements:{_type:Se.Type.Number,_validators:[Se.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Se.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),_()},P=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 s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)},k=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){A(i,r,o,a,s,"next",e)}function s(e){A(i,r,o,a,s,"throw",e)}a(void 0)}))}},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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||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,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.")}()},M=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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(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,s])}}},I=function(e,t){return Be.apply(this,arguments)},D=function(e){return He.apply(this,arguments)},L=function(e){return function(t){return 0===e?We:t.lift(new Ge(e))}},N=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Ye(e,t))}},R=function(){return(0,Me.getGlobalStore)("visit",Xe)},B=function(e,t){R().setState({patientUuid:e,manuallySetVisitUuid:t})},H=function(e,t,n){var r=null!=n?n:Qe;return g("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(L(1)).pipe(N((function(e){return e})))},V=function(e,t){return g("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},U=function(e,t,n){return g("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},$=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},K=function(){return g("/ws/rest/v1/visittype").pipe(N((function(e){return e.data.results.map($)}))).pipe(L(1))},F=function(e){return{uuid:e.uuid,display:e.display}},Z=function(){return g("/ws/rest/v1/location").pipe(N((function(e){return e.data.results.map(F)}))).pipe(L(1))};u.r(c),u.d(c,{OpenmrsFetchError:function(){return ke},VisitMode:function(){return et},VisitStatus:function(){return tt},backendDependencies:function(){return rt},clearCurrentUser:function(){return S},defaultVisitCustomRepresentation:function(){return Qe},fetchCurrentPatient:function(){return I},fhirBaseUrl:function(){return Pe},getCurrentUser:function(){return b},getLocations:function(){return Z},getLoggedInUser:function(){return C},getSessionLocation:function(){return x},getSessionStore:function(){return w},getStartedVisit:function(){return nt},getVisitStore:function(){return R},getVisitTypes:function(){return K},getVisitsForPatient:function(){return H},makeUrl:function(){return y},openmrsFetch:function(){return v},openmrsObservableFetch:function(){return g},refetchCurrentUser:function(){return _},restBaseUrl:function(){return je},saveVisit:function(){return V},sessionEndpoint:function(){return Ae},setCurrentVisit:function(){return B},setSessionLocation:function(){return E},setupApiModule:function(){return j},toLocationObject:function(){return F},toVisitTypeObject:function(){return $},updateVisit:function(){return U},userHasAccess:function(){return O}});var q,W,G=function(e,t){return G=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},G(e,t)},z=!1,Y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,z=e},get useDeprecatedSynchronousErrorHandling(){return z}},J={closed:!0,next:function(e){},error:function(e){if(Y.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},Q=Array.isArray||function(e){return e&&"number"==typeof e.length},X=function(){var e=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this};return e.prototype=Object.create(Error.prototype),e}(),ee=function(){var e=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return e.prototype.unsubscribe=function(){var n;if(!this.closed){var o,i=this,s=i._parentOrParents,u=i._ctorUnsubscribe,c=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(s,e))s.remove(this);else if(null!==s)for(var f=0;f<s.length;++f)s[f].remove(this);if(t(c)){u&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){n=r(e,X)?a(e.errors):[e]}}if(Q(l)){f=-1;for(var d=l.length;++f<d;){var h=l[f];if(null!==(o=h)&&"object"==typeof o)try{h.unsubscribe()}catch(e){n=n||[],r(e,X)?n=n.concat(a(e.errors)):n.push(e)}}}if(n)throw new X(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!r(n,e)){var i=n;(n=new e)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var a=n._parentOrParents;if(null===a)n._parentOrParents=this;else if(r(a,e)){if(a===this)return n;n._parentOrParents=[a,this]}else{if(-1!==a.indexOf(this))return n;a.push(this)}var s=this._subscriptions;return null===s?this._subscriptions=[n]:s.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}(),te="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),ne=function(t){function n(e,o,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=J;break;case 1:if(!e){a.destination=J;break}if("object"==typeof e){r(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new re(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new re(a,e,o,i)}return a}return e(n,t),n.prototype[te]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(ee),re=function(n){var r=function(e,r,o,i){var a,s=n.call(this)||this;s._parentSubscriber=e;var u=s;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==J&&(t((u=Object.create(r)).unsubscribe)&&s.add(u.unsubscribe.bind(u)),u.unsubscribe=s.unsubscribe.bind(s))),s._context=u,s._next=a,s._error=o,s._complete=i,s};return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;Y.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=Y.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):i(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;i(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};Y.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),Y.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!Y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return Y.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(ne),oe="function"==typeof Symbol&&Symbol.observable||"@@observable",ie=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o=this.operator,i=function(e,t,n){if(e){if(r(e,ne))return e;if(e[te])return e[te]()}return e||t||n?new ne(e,t,n):new ne(J)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Y.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Y.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Y.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&r(o,ne)?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=l(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[oe]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?s:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),ae="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,se="object"==typeof self&&self&&self.Object===Object&&self,ue=(ae||se||Function("return this")()).Symbol,ce=Object.prototype,le=ce.hasOwnProperty,fe=ce.toString,de=ue?ue.toStringTag:void 0,he=Object.prototype.toString,pe=ue?ue.toStringTag:void 0,ye=(q=Object.getPrototypeOf,W=Object,function(e){return q(W(e))}),ve=Function.prototype,ge=Object.prototype,me=ve.toString,be=ge.hasOwnProperty,we=me.call(Object),_e=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":pe&&pe in Object(e)?function(e){var t=le.call(e,de),n=e[de];try{e[de]=void 0;var r=!0}catch(e){}var o=fe.call(e);return r&&(t?e[de]=n:delete e[de]),o}(e):function(e){return he.call(e)}(e)}(e))return!1;var t=ye(e);if(null===t)return!0;var n=be.call(t,"constructor")&&t.constructor;return"function"==typeof n&&r(n,n)&&me.call(n)==we},Se=u(824);function Oe(e,t,n){return Oe=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&xe(o,n.prototype),o},Oe.apply(null,arguments)}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function xe(e,t){return xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xe(e,t)}function Ee(e){var t="function"==typeof Map?new Map:void 0;return Ee=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Oe(e,arguments,Ce(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),xe(r,e)},Ee(e)}var je="/ws/rest/v1/",Pe="/ws/fhir2/R4",Ae="".concat(je,"session"),ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xe(e,t)}(a,e);var t,n,i=(t=a,n=p(),function(){var e,r=Ce(t);if(n){var i=Ce(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":o(n))&&"function"!=typeof t?f(e):t;var n}(this,e)});function a(e,t,n,o){var s;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,a),h(f(s=i.call(this)),"response",void 0),h(f(s),"responseBody",void 0),s.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),o.message=s.message,s.responseBody=n,s.response=t,s.stack="Stacktrace for outgoing request:\n".concat(o.stack,"\nStacktrace for incoming response:\n").concat(s.stack),s}return a}(Ee(Error)),Te=u(254),Me=u(385),Ie=function(e){return void 0===e},De=(0,Me.createGlobalStore)("session",{loaded:!1,session:null}),Le=0;function Ne(){var e;return e=function(e,t){return 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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(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,s])}}}(this,(function(n){switch(n.label){case 0:return[4,v(Ae,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal})];case 1:return n.sent(),[4,_()];case 2:return n.sent(),[2]}}))},Ne=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){m(i,r,o,a,s,"next",e)}function s(e){m(i,r,o,a,s,"throw",e)}a(void 0)}))},Ne.apply(this,arguments)}var Re=u(738);function Be(){return Be=k((function(e,t){var n,r,o,i,a,s=arguments;return M(this,(function(u){switch(u.label){case 0:return n=!(s.length>2&&void 0!==s[2])||s[2],e?(r=null,[4,Promise.all([v("".concat(Pe,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?D(e):Promise.resolve(null)])]):[3,2];case 1:if(o=T.apply(void 0,[u.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;u.label=2;case 2:return[2,null]}}))})),Be.apply(this,arguments)}function He(){return(He=k((function(e){var t,n,r;return M(this,(function(o){switch(o.label){case 0:return[4,(0,Re.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Ve=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Ue=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(ee),$e=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(ne),Ke=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[te]=function(){return new $e(this)},n.prototype.lift=function(e){var t=new Fe(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Ve;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Ve;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ve;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Ve;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Ve;return this.hasError?(e.error(this.thrownError),ee.EMPTY):this.isStopped?(e.complete(),ee.EMPTY):(this.observers.push(e),new Ue(this,e))},n.prototype.asObservable=function(){var e=new ie;return e.source=this,e},n.create=function(e,t){return new Fe(e,t)},n}(ie),Fe=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):ee.EMPTY},n}(Ke),Ze=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ve;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Ke),qe=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),We=new ie((function(e){return e.complete()})),Ge=function(){var e=function(e){if(this.total=e,this.total<0)throw new qe};return e.prototype.call=function(e,t){return t.subscribe(new ze(e,this.total))},e}(),ze=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(ne),Ye=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new Je(e,this.project,this.thisArg))},e}(),Je=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(ne),Qe="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display),startDatetime,stopDatetime)",Xe=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};R().subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var et,tt,nt=new Ze(null);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(et||(et={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(tt||(tt={}));var rt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),c}())}}}))},66:()=>{function e(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var t=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(e){return e&&e.sensitive?"":"i"},r=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){return function(e){if(Array.isArray(e))return r(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 r(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)?r(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.")}()},s=function(t){return n=t.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):e(n,r))?t.matcher:"string"==typeof t.matcher?p(t.matcher):p(t.path);var n,r},u=function(e){return c([e])},c=function(e){var t=l(),n=e.map((function(e){return{matcher:s(e),settings:e}})),r=a(t).concat(a(n));y.setState(r,!0)},l=function(){return y.getState()},f=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},d=function(e,t){if(e.length>0){var n=v(e,t);if(n){for(var r=[n],o=v(e,n.settings.parent);void 0!==o;)r.push(o),o=v(e,o.settings.parent);return r.reverse()}}return[]},h=function(e){return d(l(),e)};function p(r,o,i){return e(r,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(r,o):Array.isArray(r)?function(e,t,r){var o=e.map((function(e){return p(e,t,r).source}));return new RegExp("(?:"+o.join("|")+")",n(r))}(r,o,i):function(e,r,o){return function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,c=o.end,l=void 0===c||c,f=o.encode,d=void 0===f?function(e){return e}:f,h="["+t(o.endsWith||"")+"]|$",p="["+t(o.delimiter||"/#?")+"]",y=u?"^":"",v=0,g=e;v<g.length;v++){var m=g[v];if("string"==typeof m)y+=t(d(m));else{var b=t(d(m.prefix)),w=t(d(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";y+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else y+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else y+="("+m.pattern+")"+m.modifier;else y+="(?:"+b+w+")"+m.modifier}}if(l)a||(y+=p+"?"),y+=o.endsWith?"(?="+h+")":"$";else{var S=e[e.length-1],O="string"==typeof S?p.indexOf(S[S.length-1])>-1:void 0===S;a||(y+="(?:"+p+"(?="+h+"))?"),O||(y+="(?="+p+"|"+h+")")}return new RegExp(y,n(o))}(function(e,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",s=[],u=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var p=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var g=p||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(s.push(l),l=""),s.push({name:y||u++,prefix:g,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var m=p||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(s.push(l),l=""),f("OPEN")){g=h();var b=f("NAME")||"",w=f("PATTERN")||"",_=h();d("CLOSE"),s.push({name:b||(w?u++:""),pattern:b&&!w?a:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else d("END")}}return s}(e,o),r,o)}(r,o,i)}o.r(i),o.d(i,{filterBreadcrumbs:function(){return d},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return h},registerBreadcrumb:function(){return u},registerBreadcrumbs:function(){return c}});var y=(0,o(685).createGlobalStore)("breadcrumbs",[]);function v(e,t){if(t)return function(e,t){return(n=e.filter((function(e){return e.matcher.test(t)})),function(e){if(Array.isArray(e))return e}(n)||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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return f(e,1);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)?f(e,1):void 0}}(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.")}())[0];var n}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=v(e,n.join("/"));if(r)return r}}(e,t)}}(),i}())}}}))},714:()=>{function e(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},s=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},u=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return le(e,t,n.slice(),r.slice())}return!s((function(e,t){return!s(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,s){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(s)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,s)})):t(i)&&t(s)?r((function(t,n){return e(t,a,n)})):t(a)&&t(s)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,s)})):t(a)?n((function(t){return e(i,t,s)})):t(s)?n((function(t){return e(i,a,t)})):e(i,a,s)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},h=function(e,t,n,r){return e["@@transducer/result"](n[r](Oe(e["@@transducer/step"],e),t))},p=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(e){return(0,Me.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},v=function(){return(0,Me.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return m(v().getState(),e)},m=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Me.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){var n=Object.assign({},_(b().getState(),e,t));return n.config=ye(["Display conditions","Translation overrides"],n.config),n},_=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=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},O=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){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){O(e,t,n[t])}))}return e},x=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},E=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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||P(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.")}()},j=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(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.")}()},P=function(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}},A=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=$(s,e,t);y(s).setState({loaded:!0,config:u})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},k=function(e,t){var n,r,o=(n=F(U(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=E(o.value,2),s=a[0],u=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(u)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=E(d.value,2),y=p[0];V(p[1],s,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return C({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=E(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=v(),s=a.getState(),u={slots:C({},s.slots,i)};fe(s,u)||a.setState(u)},T=function(e,t){var n=function(e,t){var n=Re(me(e.schemas)),r=j(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=E(s.value,2);n=F([n,Be(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return n}(e,t);Ne.setState({config:n})},M=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=t.mountedExtensions[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=H(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=x(C({},r[c.slotName]),O({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}b().setState({configs:r})},I=function(e,t){He(e,t);var n=pe(t,Ke),r=Ie.getState();Ie.setState({schemas:x(C({},r.schemas),O({},e,n))})},D=function(e,t){He(e,t);var n=pe(t,Ke),r=Ie.getState();r.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:x(C({},r.schemas),O({},e,n))})},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:j(n.providedConfigs).concat([{source:t,config:e}])})},N=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=ye(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},R=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=e.config;t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},B=function(e,t,n){Z(e,t,n);var r=$e(e,t);return Ue(e,r,n),r},H=function(e,t,n,r,o,i){var a,s,u,c,l=function(e){return E(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=U(o,i),p=K(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==c?c:{},v=F([K(d,h),y]),g=null!=f?f:o.schemas[t];Z(g,v,d);var m=$e(g,v);return Ue(g,m,d),delete m.extensionSlots,m},V=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(z(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},U=function(e,t){return j(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},$=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=K(e,U(t,n));Z(r,o,e);var i=$e(r,o);return Ue(r,i,e),delete i.extensionSlots,i},K=function(e,t){return F(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},F=function(e){return xe(pe)({},e)},Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e.hasOwnProperty(u)?Ve(f,c,l):"extensionSlots"===u&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}},q=function(e,t,n){t&&W(e,[{Array:Ee,Boolean:je,ConceptUuid:Te,Number:Pe,Object:ke,String:Ae,UUID:Te,PersonAttributeTypeUuid:Te,PatientIdentifierTypeUuid:Te}[t]],n)},W=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(n);"string"==typeof u&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(u)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(u)))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},G=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},Y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},J=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Q(e,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){Y(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Q=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},X=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(t,n);o.startsWith(r)?(0,Fe.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return ge},configExtensionStore:function(){return Le},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return D},getConfig:function(){return N},getConfigInternal:function(){return R},getConfigStore:function(){return y},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return m},getExtensionSlotsConfigStore:function(){return v},getExtensionsConfigStore:function(){return b},implementerToolsConfigStore:function(){return Ne},inRange:function(){return Ze},interpolateString:function(){return Q},interpolateUrl:function(){return J},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return qe},navigate:function(){return X},oneOf:function(){return Ge},processConfig:function(){return B},provide:function(){return L},temporaryConfigStore:function(){return De},validator:function(){return p},validators:function(){return ze}});var ee="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},te=Object.prototype.toString,ne=function(){return"[object Arguments]"===te.call(arguments)?function(e){return"[object Arguments]"===te.call(e)}:function(e){return u("callee",e)}}(),re=ne,oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ae=function(){return arguments.propertyIsEnumerable("length")}(),se=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ae?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ae&&re(e);for(t in e)!u(t,e)||o&&"length"===t||(r[r.length]=t);if(oe)for(n=ie.length-1;n>=0;)u(t=ie[n],e)&&!se(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function le(t,n,r,o){if(ee(t,n))return!0;var i,a,s=ce(t);if(s!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ee(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ee(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(s){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var d=r.concat([t]),h=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!u(p,n)||!le(n[p],t[p],d,h))return!1;l-=1}return!0}var fe=r((function(e,t){return le(e,t,[],[])})),de=l((function(e,t,n){var r,o={};for(r in t)u(r,t)&&(o[r]=u(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o})),he=l((function e(t,n,r){return de((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),pe=r((function(e,t){return he((function(e,t,n){return n}),e,t)})),ye=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ve(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?ve(e[s],t,n,!0):e[s];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var ge,me=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ve(e,[],[],!0)})),be=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},we=n((function(e){return!!be(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),_e=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Se=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Oe=Se,Ce="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",xe=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new _e(e)}(e)),we(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return h(e,t,n,"fantasy-land/reduce");if(null!=n[Ce])return d(e,t,n[Ce]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return h(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(ge||(ge={}));var Ee=p((function(e){return Array.isArray(e)}),"must be an array"),je=p((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=p((function(e){return"number"==typeof e}),"must be a number"),Ae=p((function(e){return"string"==typeof e}),"must be a string"),ke=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Te=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Me=i(685),Ie=(0,Me.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),De=(0,Me.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Le=(0,Me.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ne=(0,Me.createGlobalStore)("config-implementer-tools",{config:{}});function Re(e){return e.hasOwnProperty("_default")?x(C({},e),{_value:e._default,_source:"default"}):z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Re(e[n]),t}),{}):{}}function Be(e,t){return z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Be(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var s,u=function(){var o=s.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!z(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||He(e,a,i);var u=a._elements;if(G(u)&&He(e,u,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(ge).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ge).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),u&&y&&![ge.Array,ge.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){q(n,e._type,t),z(t)?e._type===ge.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u];Z(e._elements,c,"".concat(n,".").concat(u))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||Z(e,t,n):e._type===ge.Array&&function(e,t,n){if(G(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;q("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ue(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&W(n,e._validators,t),z(t)){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e._type===ge.Object&&e._elements?Ue(e._elements,c,l):Ue(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ue(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}A(Ie.getState(),De.getState()),Ie.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Ie.getState(),e)})),T(Ie.getState(),De.getState()),Ie.subscribe((function(e){return T(e,De.getState())})),De.subscribe((function(e){return T(Ie.getState(),e)})),k(Ie.getState(),De.getState()),Ie.subscribe((function(e){return k(e,De.getState())})),De.subscribe((function(e){return k(Ie.getState(),e)})),M(Ie.getState(),Le.getState(),De.getState()),Ie.subscribe((function(e){M(e,Le.getState(),De.getState())})),Le.subscribe((function(e){M(Ie.getState(),e,De.getState())})),De.subscribe((function(e){M(Ie.getState(),Le.getState(),e)}));var $e=function(e,t){var n=me(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,s=function(){var t=a.value,r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&G(i))if(o._type===ge.Array&&Array.isArray(r)){var s=r.map((function(e){return $e(i,e)}));n[t]=s}else if(o._type===ge.Object){var u=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;r[h]=$e(i,r[h])}}catch(e){c=!0,l=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}}}else if(z(o)){var p=n.hasOwnProperty(t)?r:{};z(p)&&(n[t]=$e(o,p))}},u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)s()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n},Ke={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:ge.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:ge.Object,_default:{}}},Fe=i(645),Ze=function(e,t){return p((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},qe=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},We=qe([]),Ge=function(e){return p((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},ze={inRange:Ze,isUrl:We,isUrlWithTemplateParameters:qe,oneOf:Ge}}(),a}())}}}))},674:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){"use strict";var e={728: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){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};r.r(o),r.d(o,{createErrorHandler:function(){return t},reportError:function(){return e}});var i=r(728);window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.dispatchNotificationShown)({description:null!=e?e:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){var t;console.error("Unhandled rejection: ",e.reason),(0,i.dispatchNotificationShown)({description:null!==(t=e.reason)&&void 0!==t?t:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}}(),o}())}}}))},570:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685: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,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;d.setState((function(s){var u;return{flags:i(n({},s.flags),t({},e,{enabled:null!==(a=null===(u=s.flags[e])||void 0===u?void 0:u.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},s=function(e){return d.getState().flags[e].enabled},u=function(e,t){d.subscribe((function(n){t(n.flags[e].enabled)}))},c=function(e,r){d.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{featureFlagsStore:function(){return d},getFeatureFlag:function(){return s},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return c},subscribeToFeatureFlag:function(){return u}});var l=r(685),f={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var s=i.value;if(s.startsWith("openmrs:feature-flag:")){var u=s.replace("openmrs:feature-flag:",""),c=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(u))||"{}");e[u]=n({enabled:"true"===localStorage.getItem(s)},c)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},d=(0,l.getGlobalStore)("feature-flags",f);d.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,s=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=function(e){if(Array.isArray(e))return e}(n=a.value)||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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);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,2):void 0}}(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.")}(),c=u[0],l=u[1];localStorage.setItem("openmrs:feature-flag:".concat(c),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(c),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}))}(),o}())}}}))},103:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(d,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(d,t),function(){return window.removeEventListener(d,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(h,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},i=function(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},u=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},l={d:function(e,t){for(var n in t)l.o(t,n)&&!l.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})}},f={};l.r(f),l.d(f,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},subscribeActionableNotificationShown:function(){return u},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return s},subscribePrecacheStaticDependencies:function(){return o},subscribeToastShown:function(){return c}});var d="openmrs:connectivity-changed",h="openmrs:precache-static-dependencies",p="openmrs:notification-shown",y="openmrs:actionable-notification-shown",v="openmrs:toast-shown";return f}())}}}))},45:e=>{"use strict";e.exports=n},740:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o},954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=a},792:e=>{"use strict";e.exports=s}},t={};function u(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,u),o.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";const e='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n',t='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n',n='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n';var r=document.createElement("div"),o=function(){document.body.appendChild(r)};function i(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,r.appendChild(n))}r.id="omrs-svgs-container",r.style.display="none","complete"===document.readyState?o():window.addEventListener("load",o);var a=u(714),s=u(792);function c(e,t,n){return c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&f(o,n.prototype),o},c.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},d(e)}"".concat("/ws/rest/v1/","session"),d(Error),u(674);var h=u(685);(0,h.createGlobalStore)("session",{loaded:!1,session:null});try{self["workbox:window:6.5.3"]&&_()}catch(p){}function p(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function y(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 v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return y(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.3"]&&_()}catch(p){}var g=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function m(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var b=function(e,t){this.type=e,Object.assign(this,t)};function w(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function S(){}var O={type:"SKIP_WAITING"};function C(e,t){if(!t)return e&&e.then?e.then(S):Promise.resolve()}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new g,r.en=new g,r.on=new g,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!m(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new b(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new b("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new b("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return w(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new b("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return C(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),w(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&m(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new b("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?C(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return w(this.getSW(),(function(t){return p(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&p(this.fn.waiting,O)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&m(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return w(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(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)}}(r.prototype,o)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=v(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,E=Object.keys,j=Array.isArray;function P(e,t){return"object"!=typeof t||E(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||x.Promise||(x.Promise=Promise);const A=Object.getPrototypeOf,k={}.hasOwnProperty;function T(e,t){return k.call(e,t)}function M(e,t){"function"==typeof t&&(t=t(A(e))),("undefined"==typeof Reflect?E:Reflect.ownKeys)(t).forEach((n=>{D(e,n,t[n])}))}const I=Object.defineProperty;function D(e,t,n,r){I(e,t,P(n&&T(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function L(e){return{from:function(t){return e.prototype=Object.create(t.prototype),D(e.prototype,"constructor",e),{extend:M.bind(null,e.prototype)}}}}const N=Object.getOwnPropertyDescriptor;function R(e,t){let n;return N(e,t)||(n=A(e))&&R(n,t)}const B=[].slice;function H(e,t,n){return B.call(e,t,n)}function V(e,t){return t(e)}function U(e){if(!e)throw new Error("Assertion Failed")}function $(e){x.setImmediate?setImmediate(e):setTimeout(e,0)}function K(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function F(e,t){if(T(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=F(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:F(s,t.substr(a+1))}}function Z(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){U("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Z(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?j(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&T(e,a)||(u=e[a]={}),Z(u,s,n)}}else void 0===n?j(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function q(e){var t={};for(var n in e)T(e,n)&&(t[n]=e[n]);return t}const W=[].concat;function G(e){return W.apply([],e)}const z="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(G([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>x[e])),Y=z.map((e=>x[e]));K(z,(e=>[e,!0]));let J=null;function Q(e){J="undefined"!=typeof WeakMap&&new WeakMap;const t=X(e);return J=null,t}function X(e){if(!e||"object"!=typeof e)return e;let t=J&&J.get(e);if(t)return t;if(j(e)){t=[],J&&J.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(X(e[n]))}else if(Y.indexOf(e.constructor)>=0)t=e;else{const n=A(e);for(var o in t=n===Object.prototype?{}:Object.create(n),J&&J.set(e,t),e)T(e,o)&&(t[o]=X(e[o]))}return t}const{toString:ee}={};function te(e){return ee.call(e).slice(8,-1)}const ne="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",re="symbol"==typeof ne?function(e){var t;return null!=e&&(t=e[ne])&&t.apply(e)}:function(){return null},oe={};function ie(e){var t,n,r,o;if(1===arguments.length){if(j(e))return e.slice();if(this===oe&&"string"==typeof e)return[e];if(o=re(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const ae="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var se="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function ue(e,t){se=e,ce=t}var ce=()=>!0;const le=!new Error("").stack;function fe(){if(le)try{throw fe.arguments,new Error}catch(e){return e}return new Error}function de(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(ce).map((e=>"\n"+e)).join("")):""}var he=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],pe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(he),ye={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ve(e,t){this._e=fe(),this.name=e,this.message=t}function ge(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function me(e,t,n,r){this._e=fe(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=ge(e,t)}function be(e,t){this._e=fe(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=ge(e,t)}L(ve).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+de(this._e,2))}},toString:function(){return this.name+": "+this.message}}),L(me).from(ve),L(be).from(ve);var we=pe.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const _e=ve;var Se=pe.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=fe(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ye[t]||n,this.inner=null)}return L(r).from(_e),e[t]=r,e}),{});Se.Syntax=SyntaxError,Se.Type=TypeError,Se.Range=RangeError;var Oe=he.reduce(((e,t)=>(e[t+"Error"]=Se[t],e)),{}),Ce=pe.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Se[t]),e)),{});function xe(){}function Ee(e){return e}function je(e,t){return null==e||e===Ee?t:function(n){return t(e(n))}}function Pe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Ae(e,t){return e===xe?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Pe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Pe(o,this.onerror):o),void 0!==i?i:n}}function ke(e,t){return e===xe?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Pe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Pe(r,this.onerror):r)}}function Te(e,t){return e===xe?t:function(n){var r=e.apply(this,arguments);P(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Pe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Pe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:P(r,a)}}function Me(e,t){return e===xe?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Ie(e,t){return e===xe?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}Ce.ModifyError=me,Ce.DexieError=ve,Ce.BulkError=be;var De={};const[Le,Ne,Re]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,A(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,A(t),e]})(),Be=Ne&&Ne.then,He=Le&&Le.constructor,Ve=!!Re;var Ue=!1,$e=Re?()=>{Re.then(ft)}:x.setImmediate?setImmediate.bind(null,ft):x.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{ft(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(ft,0)},Ke=function(e,t){Qe.push([e,t]),Ze&&($e(),Ze=!1)},Fe=!0,Ze=!0,qe=[],We=[],Ge=null,ze=Ee,Ye={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Lt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Lt(e[0],e[1])}catch(e){}}))}},Je=Ye,Qe=[],Xe=0,et=[];function tt(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=xe,this._lib=!1;var t=this._PSD=Je;if(se&&(this._stackHolder=fe(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==De)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&it(this,this._value))}this._state=null,this._value=null,++t.ref,ot(this,e)}const nt={get:function(){var e=Je,t=_t;function n(n,r){var o=!e.global&&(e!==Je||t!==_t);const i=o&&!xt();var a=new tt(((t,a)=>{st(this,new rt(It(n,e,o,i),It(r,e,o,i),t,a,e))}));return se&<(a,this),a}return n.prototype=De,n},set:function(e){D(this,"then",e&&e.prototype===De?nt:{get:function(){return e},set:nt.set})}};function rt(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function ot(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&dt();t&&"function"==typeof t.then?ot(e,((e,n)=>{t instanceof tt?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,at(e)),n&&ht()}}),it.bind(null,e))}catch(t){it(e,t)}}function it(e,t){if(We.push(t),null===e._state){var n=e._lib&&dt();t=ze(t),e._state=!1,e._value=t,se&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=R(t,"stack");t._promise=e,D(t,"stack",{get:()=>Ue?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){qe.some((t=>t._value===e._value))||qe.push(e)}(e),at(e),n&&ht()}}function at(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)st(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Xe&&(++Xe,Ke((()=>{0==--Xe&&pt()}),[]))}function st(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Xe,Ke(ut,[n,e,t])}else e._listeners.push(t)}function ut(e,t,n){try{Ge=t;var r,o=t._value;t._state?r=e(o):(We.length&&(We=[]),r=e(o),-1===We.indexOf(o)&&function(e){for(var t=qe.length;t;)if(qe[--t]._value===e._value)return void qe.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ge=null,0==--Xe&&pt(),--n.psd.ref||n.psd.finalize()}}function ct(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=de(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return se&&((r=de(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&ct(e._prev,t,n)),t}function lt(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function ft(){dt()&&ht()}function dt(){var e=Fe;return Fe=!1,Ze=!1,e}function ht(){var e,t,n;do{for(;Qe.length>0;)for(e=Qe,Qe=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Qe.length>0);Fe=!0,Ze=!0}function pt(){var e=qe;qe=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=et.slice(0),n=t.length;n;)t[--n]()}function yt(e){return new tt(De,!1,e)}function vt(e,t){var n=Je;return function(){var r=dt(),o=Je;try{return At(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{At(o,!1),r&&ht()}}}M(tt.prototype,{then:nt,_then:function(e,t){st(this,new rt(null,null,e,t,Je))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):yt(e))):this.then(null,(e=>e&&e.name===t?n(e):yt(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),yt(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Ue=!0;var e=ct(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Ue=!1}}},timeout:function(e,t){return e<1/0?new tt(((n,r)=>{var o=setTimeout((()=>r(new Se.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&D(tt.prototype,Symbol.toStringTag,"Dexie.Promise"),Ye.env=kt(),M(tt,{all:function(){var e=ie.apply(null,arguments).map(Et);return new tt((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>tt.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof tt)return e;if(e&&"function"==typeof e.then)return new tt(((t,n)=>{e.then(t,n)}));var t=new tt(De,!0,e);return lt(t,Ge),t},reject:yt,race:function(){var e=ie.apply(null,arguments).map(Et);return new tt(((t,n)=>{e.map((e=>tt.resolve(e).then(t,n)))}))},PSD:{get:()=>Je,set:e=>Je=e},totalEchoes:{get:()=>_t},newPSD:Ot,usePSD:Tt,scheduler:{get:()=>Ke,set:e=>{Ke=e}},rejectionMapper:{get:()=>ze,set:e=>{ze=e}},follow:(e,t)=>new tt(((n,r)=>Ot(((t,n)=>{var r=Je;r.unhandleds=[],r.onunhandled=n,r.finalize=Pe((function(){!function(e){et.push((function t(){e(),et.splice(et.indexOf(t),1)})),++Xe,Ke((()=>{0==--Xe&&pt()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),He&&(He.allSettled&&D(tt,"allSettled",(function(){const e=ie.apply(null,arguments).map(Et);return new tt((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>tt.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),He.any&&"undefined"!=typeof AggregateError&&D(tt,"any",(function(){const e=ie.apply(null,arguments).map(Et);return new tt(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>tt.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const gt={awaits:0,echoes:0,id:0};var mt=0,bt=[],wt=0,_t=0,St=0;function Ot(e,t,n,r){var o=Je,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++St;var a=Ye.env;i.env=Ve?{Promise:tt,PromiseProp:{value:tt,configurable:!0,writable:!0},all:tt.all,race:tt.race,allSettled:tt.allSettled,any:tt.any,resolve:tt.resolve,reject:tt.reject,nthen:Dt(a.nthen,i),gthen:Dt(a.gthen,i)}:{},t&&P(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Tt(i,e,n,r);return 0===i.ref&&i.finalize(),s}function Ct(){return gt.id||(gt.id=++mt),++gt.awaits,gt.echoes+=100,gt.id}function xt(){return!!gt.awaits&&(0==--gt.awaits&&(gt.id=0),gt.echoes=100*gt.awaits,!0)}function Et(e){return gt.echoes&&e&&e.constructor===He?(Ct(),e.then((e=>(xt(),e)),(e=>(xt(),Nt(e))))):e}function jt(e){++_t,gt.echoes&&0!=--gt.echoes||(gt.echoes=gt.id=0),bt.push(Je),At(e,!0)}function Pt(){var e=bt[bt.length-1];bt.pop(),At(e,!1)}function At(e,t){var n=Je;if((t?!gt.echoes||wt++&&e===Je:!wt||--wt&&e===Je)||Mt(t?jt.bind(null,e):Pt),e!==Je&&(Je=e,n===Ye&&(Ye.env=kt()),Ve)){var r=Ye.env.Promise,o=e.env;Ne.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(x,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function kt(){var e=x.Promise;return Ve?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(x,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Ne.then,gthen:e.prototype.then}:{}}function Tt(e,t,n,r,o){var i=Je;try{return At(e,!0),t(n,r,o)}finally{At(i,!1)}}function Mt(e){Be.call(Le,e)}function It(e,t,n,r){return"function"!=typeof e?e:function(){var o=Je;n&&Ct(),At(t,!0);try{return e.apply(this,arguments)}finally{At(o,!1),r&&Mt(xt)}}}function Dt(e,t){return function(n,r){return e.call(this,It(n,t),It(r,t))}}function Lt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(x.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),P(r,o)):x.CustomEvent&&P(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&x.dispatchEvent&&(dispatchEvent(r),!x.PromiseRejectionEvent&&x.onunhandledrejection))try{x.onunhandledrejection(r)}catch(e){}se&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+Be).indexOf("[native code]")&&(Ct=xt=xe);var Nt=tt.reject;function Rt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Je.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===we.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Rt(e,t,n,r)))):Nt(o)}return o._promise(t,((e,t)=>Ot((()=>(Je.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return Nt(new Se.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Nt(new Se.DatabaseClosed);e.open().catch(xe)}return e._state.dbReadyPromise.then((()=>Rt(e,t,n,r)))}const Bt=String.fromCharCode(65535),Ht="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Vt=[],Ut="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),$t=Ut,Kt=Ut,Ft=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Zt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const qt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Wt(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Q(t))[e],t)}class Gt{_trans(e,t,n){const r=this._tx||Je.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Se.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=dt();try{return r&&r.db===this.db?r===Je.trans?r._promise(e,i,n):Ot((()=>r._promise(e,i,n)),{trans:r,transless:Je.transless||Je}):Rt(this.db,e,[this.name],i)}finally{a&&ht()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(j(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=E(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==Bt)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&se&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Zt(n,a&&a.multi?e=>{const t=F(e,o);return j(t)&&t.some((e=>i(s,e)))}:e=>i(s,F(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,j(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(T(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){P(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Wt(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?tt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Z(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||j(e))return this.where(":id").equals(e).modify(t);{const n=F(e,this.schema.primKey.keyPath);if(void 0===n)return Nt(new Se.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?E(t).forEach((n=>{Z(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Wt(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?tt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Z(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?tt.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:qt}))).then((e=>e.numFailures?tt.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Se.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Se.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Wt(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new be(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Se.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Se.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Wt(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new be(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new be(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function zt(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){E(e).forEach((function(t){var n=e[t];if(j(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Se.InvalidArgument("Invalid event config");var r=i(t,Ee,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){$((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=Me),o||(o=xe);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}}function Yt(e,t){return L(t).from({prototype:e}),t}function Jt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Qt(e,t){e.filter=Zt(e.filter,t)}function Xt(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Zt(r(),t()):t,e.justLimit=n&&!r}function en(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Se.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function tn(e,t,n){const r=en(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function nn(e,t,n,r){const o=e.replayFilter?Zt(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),T(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),rn(tn(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return rn(tn(e,r,n),Zt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function rn(e,t,n,r){var o=vt(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=xe}),(t=>{e.fail(t),n=xe}))||o(e.value,e,(e=>n=e)),n()}))}))}function on(e,t){try{const n=an(e),r=an(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(sn(e),sn(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=on(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function an(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=te(e);return"ArrayBuffer"===n?"binary":n}function sn(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class un{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,Nt.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,Nt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Zt(t.algorithm,e)}_iterate(e,t){return nn(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&P(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>nn(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Jt(t,!0))return n.count({trans:e,query:{index:en(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return nn(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Jt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=en(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return nn(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Jt(t)?Xt(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Xt(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Xt(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Qt(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Qt(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Zt(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Jt(t,!0)&&t.limit>0)return this._read((e=>{var n=en(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Qt(this._ctx,(function(e){var t=e.primaryKey.toString(),r=T(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=E(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];F(t,a)!==s&&(Z(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of E(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((d=>{const p=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=d[e],n={value:Q(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[l+e]):s||0===on(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(g.push(o[l+e]),p.push(n.value)))}const m=Jt(t)&&t.limit===1/0&&("function"!=typeof e||e===cn)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);h(p.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(y.length,e))))).then((()=>(g.length>0||m&&e===cn)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>h(g.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new me("Error modifying one or more objects",l,f,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Jt(e)&&(e.isPrimKey&&!Kt||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new me("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(cn)}}const cn=(e,t)=>t.value=null;function ln(e,t){return e<t?-1:e===t?0:1}function fn(e,t){return e>t?-1:e===t?0:1}function dn(e,t,n){var r=e instanceof mn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function hn(e){return new e.Collection(e,(()=>gn(""))).limit(0)}function pn(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function yn(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return dn(e,"String expected.");function d(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?ln:fn;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(()=>vn(s[0],u[f-1]+r)));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,u,p))return!0;for(var h=null,y=p;y<f;++y){var v=pn(o,d,s[y],u[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h}function vn(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function gn(e){return{type:1,lower:e,upper:e}}class mn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?hn(this):new this.Collection(this,(()=>vn(e,t,!n,!r)))}catch(e){return dn(this,Ht)}}equals(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>gn(e)))}above(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(e,void 0,!0)))}aboveOrEqual(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(e,void 0,!1)))}below(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(void 0,e)))}startsWith(e){return"string"!=typeof e?dn(this,"String expected."):this.between(e,e+Bt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):yn(this,((e,t)=>0===e.indexOf(t[0])),[e],Bt)}equalsIgnoreCase(e){return yn(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=ie.apply(oe,arguments);return 0===e.length?hn(this):yn(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=ie.apply(oe,arguments);return 0===e.length?hn(this):yn(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,Bt)}anyOf(){const e=ie.apply(oe,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return dn(this,Ht)}if(0===e.length)return hn(this);const n=new this.Collection(this,(()=>vn(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=ie.apply(oe,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return dn(this,Ht)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return hn(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return dn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Se.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return dn(this,Ht)}let d=0;const h=u?e=>r(e,c[d][1])>0:e=>r(e,c[d][1])>=0,p=s?e=>o(e,c[d][0])>0:e=>o(e,c[d][0])>=0;let y=h;const v=new this.Collection(this,(()=>vn(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=h,l=r):(y=p,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++d,d===c.length)return t(n),!1;return!!function(e){return!h(e)&&!p(e)}(o)||(0===this._cmp(o,c[d][1])||0===this._cmp(o,c[d][0])||t((()=>{l===r?e.continue(c[d][0]):e.continue(c[d][1])})),!1)})),v}startsWithAnyOf(){const e=ie.apply(oe,arguments);return e.every((e=>"string"==typeof e))?0===e.length?hn(this):this.inAnyRange(e.map((e=>[e,e+Bt]))):dn(this,"startsWithAnyOf() only works with strings")}}function bn(e){return vt((function(t){return wn(t),e(t.target.error),!1}))}function wn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const _n=zt(null,"storagemutated");class Sn{_lock(){return U(!Je.global),++this._reculock,1!==this._reculock||Je.global||(Je.lockOwnerFor=this),this}_unlock(){if(U(!Je.global),0==--this._reculock)for(Je.global||(Je.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Tt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Je.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(U(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Se.DatabaseClosed(n);case"MissingAPIError":throw new Se.MissingAPI(n.message,n);default:throw new Se.OpenFailed(n)}if(!this.active)throw new Se.TransactionInactive;return U(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=vt((t=>{wn(t),this._reject(e.error)})),e.onabort=vt((t=>{wn(t),this.active&&this._reject(new Se.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=vt((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&_n.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return Nt(new Se.ReadOnly("Transaction is readonly"));if(!this.active)return Nt(new Se.TransactionInactive);if(this._locked())return new tt(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Je])}));if(n)return Ot((()=>{var e=new tt(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new tt(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=tt.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new tt(((e,r)=>{n.then((n=>t._waitingQueue.push(vt(e.bind(null,n)))),(e=>t._waitingQueue.push(vt(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Se.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(T(t,e))return t[e];const n=this.schema[e];if(!n)throw new Se.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function On(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Cn(t)}}function Cn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function xn(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:K(n,(e=>[e.name,e]))}}let En=e=>{try{return e.only([[]]),En=()=>[[]],[[]]}catch(e){return En=()=>Bt,Bt}};function jn(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>F(t,e)}(e):t=>F(t,e)}function Pn(e){return[].slice.call(e)}let An=0;function kn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function Tn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Pn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=j(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:jn(t)},indexes:Pn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:j(o),keyPath:o,unique:n,multiEntry:r,extractKey:jn(o)};return i[kn(o)]=a,a})),getIndexByKeyPath:e=>i[kn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[kn(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=vt(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:d}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const p=[],y=[];let v=0;const g=e=>{++v,wn(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(h=c.clear()):p.push(h=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<d;++r)p.push(h=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),h.onerror=g;else for(let t=0;t<d;++t)p.push(h=c[n](e[t])),h.onerror=g}const m=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};h.onerror=e=>{g(e),m(e)},h.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=vt(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},d=bn(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=d,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=vt(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=bn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=vt(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:d}=c,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,l):p.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=bn(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=bn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=vt(s);const{index:c,range:l}=o,f=e.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=bn(u),p.onsuccess=vt((t=>{const n=p.result;if(!n)return void s(null);n.___id=++An,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=vt(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=vt(e),p.onerror=bn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=vt((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=vt((t=>e(t.target.result))),l.onerror=bn(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:En(t),schema:o}}(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Mn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=R(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?D(t,n,{get(){return this.table(n)},set(e){I(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function In({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Dn(e,t){return e._cfg.version-t._cfg.version}function Ln(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ut)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function Nn(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>Rn(o,e))),o}function Rn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Bn(e,t,n){const r={};return H(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=On(Cn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=On(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=xn(e,i,a)})),r}function Hn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+H(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&x.WorkerGlobalScope&&x instanceof x.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class Vn{_parseStoresSpec(e,t){E(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return On(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),j(r),0===t)})),o=r.shift();if(o.multi)throw new Se.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Se.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Se.Schema("Index must have a name and cannot be an empty string")})),t[n]=xn(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?P(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{P(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,In(t,[t._allTables,t,t.Transaction.prototype]),Mn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],E(o),o),t._storeNames=E(o),this}upgrade(e){return this._cfg.contentUpgrade=Ie(this._cfg.contentUpgrade||xe,e),this}}function Un(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ur("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function $n(e){return e&&"function"==typeof e.databases}function Kn(e){return Ot((function(){return Je.letThrough=!0,e()}))}function Fn(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Zn(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):j(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function qn(e,t,n){var r=arguments.length;if(r<2)throw new Se.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,G(o),n]}function Wn(e,t,n,r,o){return tt.resolve().then((()=>{const i=Je.transless||Je,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===we.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Wn(e,t,n,null,o)))):Nt(r)}const u=ae(o);let c;u&&Ct();const l=tt.follow((()=>{if(c=o.call(a,a),c)if(u){var e=xt.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Zn(c))}),s);return(c&&"function"==typeof c.then?tt.resolve(c).then((e=>a.active?e:Nt(new Se.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),Nt(e))))}))}function Gn(e,t,n){const r=j(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const zn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=kn(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:jn(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Gn(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Gn(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[kn(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Gn(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Gn(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function Yn(e,t,n,r){return n=n||{},r=r||"",E(e).forEach((o=>{if(T(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=te(i);e!==te(a)?n[r+o]=t[o]:"Object"===e?Yn(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),E(t).forEach((o=>{T(e,o)||(n[r+o]=t[o])})),n}const Jn={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=Je.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===xe)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===xe&&s.fire===xe)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===xe)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===xe)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Je.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||Z(e.values[o],r.keyPath,n))}else{const r=Yn(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{T(t,e)?t[e]=i[e]:Z(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Qn(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===on(t.keys[o],e[i])&&(r.push(n?Q(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Xn={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Qn(e.keys,e.trans._cache,"clone"===e.cache);return t?tt.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Q(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function er(e){return!("from"in e)}const tr=function(e,t){if(!this){const t=new tr;return e&&"d"in e&&P(t,e),t}P(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function nr(e,t,n){const r=on(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(er(e))return P(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(on(n,e.from)<0)return o?nr(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},ir(e);if(on(t,e.to)>0)return i?nr(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},ir(e);on(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),on(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&rr(e,o),i&&a&&rr(e,i)}function rr(e,t){er(t)||function e(t,{from:n,to:r,l:o,r:i}){nr(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function or(e){let t=er(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&on(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||on(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function ir(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=ar(n)}e.d=ar(e)}function ar({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}M(tr.prototype,{add(e){return rr(this,e),this},addKey(e){return nr(this,e,e),this},addKeys(e){return e.forEach((e=>nr(this,e,e))),this},[ne](){return or(this)}});const sr={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new tr(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new tr)},c=u(""),l=u(":dels"),{type:f}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return o.mutate(e).then((e=>{if(j(d)){"delete"!==f&&(d=e.results),c.addKeys(d);const t=Qn(d,p);t||"add"===f||l.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&j(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==on(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new tr(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new tr(e.key)],getMany:e=>[a,(new tr).addKeys(e.keys)],count:l,query:l,openCursor:l};return E(f).forEach((e=>{c[e]=function(i){const{subscr:a}=Je;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new tr)},l=c(""),d=c(":dels"),[h,p]=f[e](i);if(c(h.name||"").add(p),!h.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):d.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(d.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return d.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}d.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class ur{constructor(e,t){this._middlewares={},this.verno=0;const n=ur.dependencies;this._options=t={addons:ur.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:xe,dbReadyPromise:null,cancelOpen:xe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new tt((e=>{o.dbReadyResolve=e})),o.openCanceller=new tt(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=zt(this,"populate","blocked","versionchange","close",{ready:[Ie,xe]}),this.on.ready.subscribe=V(this.on.ready.subscribe,(e=>(t,n)=>{ur.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||tt.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Yt(un.prototype,(function(e,t){this.db=i;let n=qt,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==Ee?s:null}}))),this.Table=function(e){return Yt(Gt.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:zt(null,{creating:[Ae,xe],reading:[je,Ee],updating:[Te,xe],deleting:[ke,xe]})}))}(this),this.Transaction=function(e){return Yt(Sn.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=zt(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new tt(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),Nt(e)}))}))}(this),this.Version=function(e){return Yt(Vn.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Yt(mn.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Se.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=En(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Vt.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(zn),this.use(Jn),this.use(sr),this.use(Xn),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Se.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Se.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Dn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Je.letThrough||this._vip)?e():new tt(((e,t)=>{if(this._state.openComplete)return t(new Se.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Se.DatabaseClosed);this.open().catch(xe)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?Nt(t.dbOpenError):e));se&&(t.openCanceller._stackHolder=fe()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Se.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return tt.race([r,("undefined"==typeof navigator?tt.resolve():Fn()).then((()=>new tt(((r,i)=>{if(o(),!n)throw new Se.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Se.MissingAPI;c.onerror=bn(i),c.onblocked=vt(e._fireOnBlocked),c.onupgradeneeded=vt((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=wn,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=vt((()=>{i(new Se.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=bn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=Je.transless||Je;Ot((()=>{Je.trans=i,Je.transless=s,0===t?(E(o).forEach((e=>{Nn(n,e,o[e].primKey,o[e].indexes)})),Tn(e,n),tt.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=Bn(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;Hn(e,o,r),Hn(e,u,r),a=e._dbSchema=u;const c=Ln(o,u);c.add.forEach((e=>{Nn(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Se.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>Rn(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Rn(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){Tn(e,r),n._memoizedTables={},s=!0;let t=q(u);c.del.forEach((e=>{t[e]=o[e]})),In(e,[e.Transaction.prototype]),Mn(e,[e.Transaction.prototype],E(t),t),n.schema=t;const i=ae(l);let a;i&&Ct();const f=tt.follow((()=>{if(a=l(n),a&&i){var e=xt.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?tt.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&$t||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),In(e,[e.Transaction.prototype]),Mn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?tt.resolve(o.shift()(n.idbtrans)).then(e):tt.resolve()}().then((()=>{var e,t;t=r,E(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||Nn(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),c.onsuccess=vt((()=>{a=null;const n=e._novip.idbdb=c.result,o=H(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Bn(0,t,n);e._storeNames=H(t.objectStoreNames,0),Mn(e,[e._allTables],E(r),r)}(e,n,r):(Hn(e,e._dbSchema,r),function(e,t){const n=Ln(Bn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Tn(e,r)}catch(e){}var i;Vt.push(e),n.onversionchange=vt((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=vt((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!$n(e)&&"__dbnames"!==n&&Un(e,t).put({name:n}).catch(xe)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],tt.resolve(Kn((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Ie,xe);return t.onReadyBeingFired=[],tt.resolve(Kn((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),Nt(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=Vt.indexOf(this);if(t>=0&&Vt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new tt((t=>{e.dbReadyResolve=t})),e.openCanceller=new tt(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Se.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new tt(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=vt((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!$n(e)&&"__dbnames"!==n&&Un(e,t).delete(n).catch(xe)}(this._deps,this.name),n()})),e.onerror=bn(r),e.onblocked=this._fireOnBlocked};if(e)throw new Se.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return E(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=qn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Je.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Se.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Se.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Se.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):Nt(e)}const s=Wn.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):Je.trans?Tt(Je.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!T(this._allTables,e))throw new Se.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const cr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class lr{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[cr](){return this}}function fr(e,t){return E(t).forEach((n=>{rr(e[n]||(e[n]=new tr),t[n])})),e}let dr;try{dr={indexedDB:x.indexedDB||x.mozIndexedDB||x.webkitIndexedDB||x.msIndexedDB,IDBKeyRange:x.IDBKeyRange||x.webkitIDBKeyRange}}catch(v){dr={indexedDB:null,IDBKeyRange:null}}const hr=ur;function pr(e){let t=yr;try{yr=!0,_n.storagemutated.fire(e)}finally{yr=t}}M(hr,{...Ce,delete:e=>new hr(e,{addons:[]}).delete(),exists:e=>new hr(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return $n(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Un(e,t).toCollection().primaryKeys()}(hr.dependencies).then(e)}catch(e){return Nt(new Se.MissingAPI)}},defineClass:()=>function(e){P(this,e)},ignoreTransaction:e=>Je.trans?Tt(Je.transless,e):e(),vip:Kn,async:function(e){return function(){try{var t=Zn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:tt.resolve(t)}catch(e){return Nt(e)}}},spawn:function(e,t,n){try{var r=Zn(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:tt.resolve(r)}catch(e){return Nt(e)}},currentTransaction:{get:()=>Je.trans||null},waitFor:function(e,t){const n=tt.resolve("function"==typeof e?hr.ignoreTransaction(e):e).timeout(t||6e4);return Je.trans?Je.trans.waitFor(n):n},Promise:tt,debug:{get:()=>se,set:e=>{ue(e,"dexie"===e?()=>!0:Ft)}},derive:L,extend:P,props:M,override:V,Events:zt,on:_n,liveQuery:function(e){return new lr((t=>{const n=ae(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,_n.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return E(i).some((e=>o[e]&&function(e,t){const n=or(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=or(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(on(s.from,o.to)<=0&&on(s.to,o.from)>=0)return!0;on(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{fr(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const d={},h=function(t){n&&Ct();const r=()=>Ot(e,{subscr:t,trans:null}),o=Je.trans?Tt(Je.transless,r):r();return n&&o.then(xt,xt),o}(d);u||(_n("storagemutated",l),u=!0),s=!0,Promise.resolve(h).then((e=>{s=!1,r||(c()?f():(o={},i=d,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:fr,getByKeyPath:F,setByKeyPath:Z,delByKeyPath:function(e,t){"string"==typeof t?Z(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Z(e,t,void 0)}))},shallowClone:q,deepClone:Q,getObjectDiff:Yn,cmp:on,asap:$,minKey:-1/0,addons:[],connections:Vt,errnames:we,dependencies:dr,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),hr.maxKey=En(hr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(_n("storagemutated",(e=>{if(!yr){let t;Ut?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),yr=!0,dispatchEvent(t),yr=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{yr||pr(e)})));let yr=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),_n("storagemutated",(t=>{yr||e.postMessage(t)})),e.onmessage=e=>{e.data&&pr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){_n("storagemutated",(e=>{try{yr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&pr(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&pr(e.changedParts)}))}tt.rejectionMapper=function(e,t){if(!e||e instanceof ve||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Oe[e.name])return e;var n=new Oe[e.name](t||e.message,e);return"stack"in e&&D(n,"stack",{get:function(){return this.inner.stack}}),n},ue(se,Ft);var vr=u(641);function gr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function br(e){return br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},br(e)}function wr(e,t){return wr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wr(e,t)}function _r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=br(e);if(t){var o=br(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?gr(e):t;var n}(this,n)}}new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wr(e,t)}(n,e);var t=_r(n);function n(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),mr(gr(e=t.call(this,"EsmOffline")),"syncQueue",void 0),mr(gr(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(ur)),(0,h.createGlobalStore)("offline-synchronization",{}),(0,h.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});var Sr,Or,Cr,xr=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function Er(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(0,h.getGlobalStore)("visit",xr).subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))})),new s.BehaviorSubject(null),function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Sr||(Sr={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Or||(Or={})),u(66),function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(Cr||(Cr={}));var jr=Object.freeze({__proto__:null,get start(){return ui},get ensureJQuerySupport(){return Ro},get setBootstrapMaxTime(){return mo},get setMountMaxTime(){return bo},get setUnmountMaxTime(){return wo},get setUnloadMaxTime(){return _o},get registerApplication(){return Go},get unregisterApplication(){return Yo},get getMountedApps(){return Zo},get getAppStatus(){return Wo},get unloadApplication(){return Jo},get checkActivityFunctions(){return zo},get getAppNames(){return qo},get pathToActiveWhen(){return ei},get navigateToUrl(){return Ao},get triggerAppChange(){return oi},get addErrorHandler(){return Dr},get removeErrorHandler(){return Lr},get mountRootParcel(){return ho},get NOT_LOADED(){return Br},get LOADING_SOURCE_CODE(){return Hr},get NOT_BOOTSTRAPPED(){return Vr},get BOOTSTRAPPING(){return Ur},get NOT_MOUNTED(){return $r},get MOUNTING(){return Kr},get UPDATING(){return Zr},get LOAD_ERROR(){return Wr},get MOUNTED(){return Fr},get UNMOUNTING(){return qr},get SKIP_BECAUSE_BROKEN(){return Gr}});function Pr(e){return(Pr="function"==typeof Symbol&&"symbol"==Er(Symbol.iterator)?function(e){return void 0===e?"undefined":Er(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":Er(e)})(e)}function Ar(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kr=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==u.g?u.g:"undefined"!=typeof self?self:{}).CustomEvent,Tr=function(){try{var e=new kr("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?kr:"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},Mr=[];function Ir(e,t,n){var r=Rr(e,t,n);Mr.length?Mr.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function Dr(e){if("function"!=typeof e)throw Error(Nr(28,!1));Mr.push(e)}function Lr(e){if("function"!=typeof e)throw Error(Nr(29,!1));var t=!1;return Mr=Mr.filter((function(n){var r=n===e;return t=t||r,!r})),t}function Nr(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 Rr(e,t,n){var r,o,i,a="".concat(Xr(t)," '").concat(Jr(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(Nr(30,!1,t.status,Jr(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=Jr(t),t.status=n,r}var Br="NOT_LOADED",Hr="LOADING_SOURCE_CODE",Vr="NOT_BOOTSTRAPPED",Ur="BOOTSTRAPPING",$r="NOT_MOUNTED",Kr="MOUNTING",Fr="MOUNTED",Zr="UPDATING",qr="UNMOUNTING",Wr="LOAD_ERROR",Gr="SKIP_BECAUSE_BROKEN";function zr(e){return e.status===Fr}function Yr(e){try{return e.activeWhen(window.location)}catch(t){return Ir(t,e,Gr),!1}}function Jr(e){return e.name}function Qr(e){return Boolean(e.unmountThisParcel)}function Xr(e){return Qr(e)?"parcel":"application"}function eo(){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 to(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function no(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!to(t,(function(e){return"function"!=typeof e}))));var t}function ro(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=Xr(e),o=Jr(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return oo(n)?n:Promise.reject(Nr(15,!1,r,o,t,a))}))}),Promise.resolve())}}function oo(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function io(e,t){var n=function(){return e.status=$r,e};return Promise.resolve().then((function(){return e.status!==Vr?e:(e.status=Ur,e.bootstrap?So(e,"bootstrap").then(n).catch((function(n){if(t)throw Rr(n,e,Gr);return Ir(n,e,Gr),e})):Promise.resolve().then(n))}))}function ao(e,t){return Promise.resolve().then((function(){var n=function(){return So(e,"unmount").then((function(){e.status=$r})).catch((function(n){if(t)throw Rr(n,e,Gr);Ir(n,e,Gr)}))};if(e.status!==Fr)return e;e.status=qr;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 Rr(n,e,Gr);Ir(n,e,Gr)}))})).then((function(){return e}))}))}var so=!1,uo=!1;function co(e,t){return Promise.resolve().then((function(){return e.status!==$r?e:(so||(window.dispatchEvent(new Tr("single-spa:before-first-mount")),so=!0),So(e,"mount").then((function(){return e.status=Fr,uo||(window.dispatchEvent(new Tr("single-spa:first-mount")),uo=!0),e})).catch((function(n){var r=function(){if(t)throw Rr(n,e,Gr);return Ir(n,e,Gr),e};return e.status=Fr,ao(e,!0).then(r,r)})))}))}var lo=0,fo={parcels:{}};function ho(){return po.apply(fo,arguments)}function po(e,t){var n=this;if(!e||"object"!==Pr(e)&&"function"!=typeof e)throw Error(Nr(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(Nr(3,!1,Pr(e.name)));if("object"!==Pr(t))throw Error(Nr(4,!1,name,Pr(t)));if(!t.domElement)throw Error(Nr(5,!1,name));var r,o=lo++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?Hr:Vr,customProps:t,parentName:Jr(n),unmountThisParcel:function(){return d.then((function(){if(s.status!==Fr)throw Error(Nr(6,!1,name,s.status));return ao(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return c(e),e})).catch((function(e){throw s.status=Gr,l(e),e}))}};n.parcels[o]=s;var u=a();if(!u||"function"!=typeof u.then)throw Error(Nr(7,!1));var c,l,f=(u=u.then((function(e){if(!e)throw Error(Nr(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!no(e.bootstrap))throw Error(Nr(9,!1,t));if(!no(e.mount))throw Error(Nr(10,!1,t));if(!no(e.unmount))throw Error(Nr(11,!1,t));if(e.update&&!no(e.update))throw Error(Nr(12,!1,t));var n=ro(e,"bootstrap"),i=ro(e,"mount"),a=ro(e,"unmount");s.status=Vr,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=Oo(e.timeouts),e.update&&(s.update=ro(e,"update"),r.update=function(e){return s.customProps=e,yo(function(e){return Promise.resolve().then((function(){if(e.status!==Fr)throw Error(Nr(32,!1,Jr(e)));return e.status=Zr,So(e,"update").then((function(){return e.status=Fr,e})).catch((function(t){throw Rr(t,e,Gr)}))}))}(s))})}))).then((function(){return io(s,!0)})),d=f.then((function(){return co(s,!0)})),h=new Promise((function(e,t){c=e,l=t}));return r={mount:function(){return yo(Promise.resolve().then((function(){if(s.status!==$r)throw Error(Nr(13,!1,name,s.status));return n.parcels[o]=s,co(s)})))},unmount:function(){return yo(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:yo(u),bootstrapPromise:yo(f),mountPromise:yo(d),unmountPromise:yo(h)}}function yo(e){return e.then((function(){return null}))}function vo(e){var t=Jr(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==Pr(n)||null===n||Array.isArray(n))&&(n={},console.warn(Nr(40,!1),t,n));var r=eo({},n,{name:t,mountParcel:po.bind(e),singleSpa:jr});return Qr(e)&&(r.unmountSelf=e.unmountThisParcel),r}var go={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 mo(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(16,!1));go.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function bo(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(17,!1));go.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function wo(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(18,!1));go.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function _o(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(19,!1));go.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function So(e,t){var n=e.timeouts[t],r=n.warningMillis,o=Xr(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](vo(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=Nr(31,!1,t,o,Jr(e),n.millis);function l(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function Oo(e){var t={};for(var n in go)t[n]=eo({},go[n],e&&e[n]||{});return t}function Co(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Br&&e.status!==Wr?e:(e.status=Hr,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(vo(e));if(!oo(r))throw n=!0,Error(Nr(33,!1,Jr(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==Pr(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!no(t.bootstrap)&&(r=35),no(t.mount)||(r=36),no(t.unmount)||(r=37);var o=Xr(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(Nr(r,!1,o,Jr(e),i),t),Ir(void 0,e,Gr),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=eo({},e.devtools.overlays,t.devtools.overlays)),e.status=Vr,e.bootstrap=ro(t,"bootstrap"),e.mount=ro(t,"mount"),e.unmount=ro(t,"unmount"),e.unload=ro(t,"unload"),e.timeouts=Oo(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Gr:(r=Wr,e.loadErrorTime=(new Date).getTime()),Ir(t,e,r),e})));var t,n}))}var xo,Eo="undefined"!=typeof window,jo={hashchange:[],popstate:[]},Po=["hashchange","popstate"];function Ao(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(Nr(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Lo(window.location.href),r=Lo(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 ko(e){var t=this;if(e){var n=e[0].type;Po.indexOf(n)>=0&&jo[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function To(){ii([],arguments)}function Mo(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return xo&&n===o||(ci()?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)):ii([])),r}}if(Eo){window.addEventListener("hashchange",To),window.addEventListener("popstate",To);var Io=window.addEventListener,Do=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&Po.indexOf(e)>=0)||to(jo[e],(function(e){return e===t})))return Io.apply(this,arguments);jo[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Po.indexOf(e)>=0))return Do.apply(this,arguments);jo[e]=jo[e].filter((function(e){return e!==t}))},window.history.pushState=Mo(window.history.pushState,"pushState"),window.history.replaceState=Mo(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(Nr(41,!1)):window.singleSpaNavigate=Ao}function Lo(e){var t=document.createElement("a");return t.href=e,t}var No=!1;function Ro(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!No){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return Bo.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return Bo.call(this,n,window.removeEventListener,e,t,arguments)},No=!0}}function Bo(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Po.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var Ho={};function Vo(e){return Promise.resolve().then((function(){var t=Ho[Jr(e)];if(!t)return e;if(e.status===Br)return Uo(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==$r&&e.status!==Wr)return e;var n=e.status===Wr?Promise.resolve():So(e,"unload");return e.status="UNLOADING",n.then((function(){return Uo(e,t),e})).catch((function(n){return function(e,t,n){delete Ho[Jr(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,Ir(n,e,Gr),t.reject(n)}(e,t,n),e}))}))}function Uo(e,t){delete Ho[Jr(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Br,t.resolve()}function $o(e,t,n,r){Ho[Jr(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Ho[Jr(e)],"promise",{get:t})}function Ko(e){return Ho[e]}var Fo=[];function Zo(){return Fo.filter(zr).map(Jr)}function qo(){return Fo.map(Jr)}function Wo(e){var t=to(Fo,(function(t){return Jr(t)===e}));return t?t.status:null}function Go(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===Pr(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(Nr(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(Nr(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(Nr(20,!1));if("object"!==Pr(e.app)&&"function"!=typeof e.app)throw Error(Nr(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(Nr(24,!1));if(!Xo(e.customProps))throw Error(Nr(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(Nr(20,!1));if(!t)throw Error(Nr(23,!1));if("function"!=typeof n)throw Error(Nr(24,!1));if(!Xo(r))throw Error(Nr(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:ei(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(-1!==qo().indexOf(o.name))throw Error(Nr(21,!1,o.name));Fo.push(eo({loadErrorTime:null,status:Br,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Eo&&(Ro(),ii())}function zo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Fo.filter((function(t){return t.activeWhen(e)})).map(Jr)}function Yo(e){if(0===Fo.filter((function(t){return Jr(t)===e})).length)throw Error(Nr(25,!1,e));return Jo(e).then((function(){var t=Fo.map(Jr).indexOf(e);Fo.splice(t,1)}))}function Jo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(Nr(26,!1));var n=to(Fo,(function(t){return Jr(t)===e}));if(!n)throw Error(Nr(27,!1,e));var r,o=Ko(Jr(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){$o(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,Qo(n,o.resolve,o.reject)):r=new Promise((function(e,t){$o(n,(function(){return r}),e,t),Qo(n,e,t)})),r}function Qo(e,t,n){ao(e).then(Vo).then((function(){t(),setTimeout((function(){ii()}))})).catch(n)}function Xo(e){return!e||"function"==typeof e||"object"===Pr(e)&&null!==e&&!Array.isArray(e)}function ei(e,t){var n=function(e,t){var n=function(n){var a=e.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===e.length)if(o)t&&(i+="$");else{var s=t?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(s,"$"):"".concat(i,"(/").concat(s,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==e[0]&&(e="/"+e);for(var a=0;a<e.length;a++){var s=e[a];(!o&&":"===s||o&&"/"===s)&&n(a)}return n(e.length),new RegExp(i,"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 ti=!1,ni=[],ri=Eo&&window.location.href;function oi(){return ii()}function ii(){var e=function(){d=!0},t=function(){var e=Zo();o.forEach((function(t){return t.resolve(e)}));try{var t=0===a.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new Tr(t,r())),window.dispatchEvent(new Tr("single-spa:routing-event",r()))}catch(e){setTimeout((function(){throw e}))}if(ti=!1,ni.length>0){var n=ni;ni=[],ii(n)}return e},n=function(){o.forEach((function(e){ko(e.eventArguments)})),ko(i)},r=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r={},o=(Ar(e={},Fr,[]),Ar(e,$r,[]),Ar(e,Br,[]),Ar(e,Gr,[]),e);t?(l.concat(f).forEach((function(e,t){y(e,Fr)})),u.forEach((function(e){y(e,Br)})),c.forEach((function(e){y(e,$r)}))):a.forEach((function(e){y(e)}));var s={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:a.length,originalEvent:null==i?void 0:i[0],oldUrl:h,newUrl:p,navigationIsCanceled:d}};return n&&eo(s.detail,n),s;function y(e,t){var n=Jr(e);t=t||Wo(n),r[n]=t,(o[t]=o[t]||[]).push(n)}},o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;if(ti)return new Promise((function(e,t){ni.push({resolve:e,reject:t,eventArguments:i})}));var a,s=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Fo.forEach((function(i){var a=i.status!==Gr&&Yr(i);switch(i.status){case Wr:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Br:case Hr:a&&n.push(i);break;case Vr:case $r:!a&&Ko(Jr(i))?e.push(i):a&&r.push(i);break;case Fr:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),u=s.appsToUnload,c=s.appsToUnmount,l=s.appsToLoad,f=s.appsToMount,d=!1,h=ri,p=ri=window.location.href;return ci()?(ti=!0,a=u.concat(l,c,f),Promise.resolve().then((function(){if(window.dispatchEvent(new Tr(0===a.length?"single-spa:before-no-app-change":"single-spa:before-app-change",r(!0))),window.dispatchEvent(new Tr("single-spa:before-routing-event",r(!0,{cancelNavigation:e}))),d)return window.dispatchEvent(new Tr("single-spa:before-mount-routing-event",r(!0))),t(),void Ao(h);var i=u.map(Vo),s=c.map(ao).map((function(e){return e.then(Vo)})).concat(i),p=Promise.all(s);p.then((function(){window.dispatchEvent(new Tr("single-spa:before-mount-routing-event",r(!0)))}));var y=l.map((function(e){return Co(e).then((function(e){return ai(e,p)}))})),v=f.filter((function(e){return l.indexOf(e)<0})).map((function(e){return ai(e,p)}));return p.catch((function(e){throw n(),e})).then((function(){return n(),Promise.all(y.concat(v)).catch((function(e){throw o.forEach((function(t){return t.reject(e)})),e})).then(t)}))}))):(a=l,Promise.resolve().then((function(){var e=l.map(Co);return Promise.all(e).then(n).then((function(){return[]})).catch((function(e){throw n(),e}))})))}function ai(e,t){return Yr(e)?io(e).then((function(e){return t.then((function(){return Yr(e)?co(e):e}))})):t.then((function(){return e}))}var si=!1;function ui(e){var t;si=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,xo=t),Eo&&ii()}function ci(){return si}Eo&&setTimeout((function(){si||console.warn(Nr(1,!1))}),5e3);var li={getRawAppData:function(){return[].concat(Fo)},reroute:ii,NOT_LOADED:Br,toLoadPromise:Co,toBootstrapPromise:io,unregisterApplication:Yo};function fi(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}}Eo&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=li);var di;function hi(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function pi(e){return function t(n){return 0===arguments.length||hi(n)?t:e.apply(this,arguments)}}function yi(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return hi(n)?t:pi((function(t){return e(n,t)}));default:return hi(n)&&hi(r)?t:hi(n)?pi((function(t){return e(t,r)})):hi(r)?pi((function(t){return e(n,t)})):e(n,r)}}}function vi(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function gi(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function mi(e,t){return Object.prototype.hasOwnProperty.call(t,e)}fi((function(e){if(!e||"string"!=typeof e)return!1;for(var t=/\${(.*?)}/g,n=t.exec(e);n;){if(!di.includes(n[1]))return!1;n=t.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+(di=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(e){return"${"+e+"}"})).join(", "));const bi="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var wi=Object.prototype.toString,_i=function(){return"[object Arguments]"===wi.call(arguments)?function(e){return"[object Arguments]"===wi.call(e)}:function(e){return mi("callee",e)}}();const Si=_i;var Oi=!{toString:null}.propertyIsEnumerable("toString"),Ci=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],xi=function(){return arguments.propertyIsEnumerable("length")}(),Ei=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const ji="function"!=typeof Object.keys||xi?pi((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=xi&&Si(e);for(t in e)!mi(t,e)||o&&"length"===t||(r[r.length]=t);if(Oi)for(n=Ci.length-1;n>=0;)mi(t=Ci[n],e)&&!Ei(r,t)&&(r[r.length]=t),n-=1;return r})):pi((function(e){return Object(e)!==e?[]:Object.keys(e)})),Pi=pi((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function Ai(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function ki(e,t,n,r){var o=function(e,t){return Ti(e,t,n.slice(),r.slice())},i=vi(e);return!gi((function(e,t){return!gi(o,t,e)}),vi(t),i)}function Ti(e,t,n,r){if(bi(e,t))return!0;var o=Pi(e);if(o!==Pi(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":Ai(e))!==(void 0===t?"undefined":Ai(t))||!bi(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!bi(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&ki(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&ki(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=ji(e);if(a.length!==ji(t).length)return!1;var s=n.concat([e]),u=r.concat([t]);for(i=a.length-1;i>=0;){var c=a[i];if(!mi(c,t)||!Ti(t[c],e[c],s,u))return!1;i-=1}return!0}var Mi=yi((function(e,t){return Ti(e,t,[],[])}));const Ii=Mi;function Di(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return hi(n)?t:yi((function(t,r){return e(n,t,r)}));case 2:return hi(n)&&hi(r)?t:hi(n)?yi((function(t,n){return e(t,r,n)})):hi(r)?yi((function(t,r){return e(n,t,r)})):pi((function(t){return e(n,r,t)}));default:return hi(n)&&hi(r)&&hi(o)?t:hi(n)&&hi(r)?yi((function(t,n){return e(t,n,o)})):hi(n)&&hi(o)?yi((function(t,n){return e(t,r,n)})):hi(r)&&hi(o)?yi((function(t,r){return e(n,t,r)})):hi(n)?pi((function(t){return e(t,r,o)})):hi(r)?pi((function(t){return e(n,t,o)})):hi(o)?pi((function(t){return e(n,r,t)})):e(n,r,o)}}}function Li(e){return"[object Object]"===Object.prototype.toString.call(e)}var Ni=Di((function(e,t,n){var r,o={};for(r in t)mi(r,t)&&(o[r]=mi(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)mi(r,n)&&!mi(r,o)&&(o[r]=n[r]);return o}));const Ri=Ni;var Bi=Di((function e(t,n,r){return Ri((function(n,r,o){return Li(r)&&Li(o)?e(t,r,o):t(n,r,o)}),n,r)}));const Hi=Bi,Vi=yi((function(e,t){return Hi((function(e,t,n){return n}),e,t)}));function Ui(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?Ui(e[s],t,n,!0):e[s];return o};switch(Pi(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const $i=pi((function(e){return null!=e&&"function"==typeof e.clone?e.clone():Ui(e,[],[],!0)})),Ki=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var Fi=pi((function(e){return!!Ki(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));const Zi=Fi;var qi=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Wi=yi((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const Gi=Wi;function zi(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function Yi(e,t,n,r){return e["@@transducer/result"](n[r](Gi(e["@@transducer/step"],e),t))}var Ji="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Qi(e,t,n){if("function"==typeof e&&(e=function(e){return new qi(e)}(e)),Zi(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return Yi(e,t,n,"fantasy-land/reduce");if(null!=n[Ji])return zi(e,t,n[Ji]());if("function"==typeof n.next)return zi(e,t,n);if("function"==typeof n.reduce)return Yi(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const Xi=Di(Qi);var ea=fi((function(e){return Array.isArray(e)}),"must be an array"),ta=fi((function(e){return"boolean"==typeof e}),"must be a boolean"),na=fi((function(e){return"number"==typeof e}),"must be a number"),ra=fi((function(e){return"string"==typeof e}),"must be a string"),oa=fi((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),ia=fi((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),aa=(0,h.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),sa=(0,h.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});sa.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var ua=(0,h.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ca(e){return(0,h.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})}var la=(0,h.createGlobalStore)("config-implementer-tools",{config:{}});function fa(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 da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(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){da(e,t,n[t])}))}return e}function pa(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function ya(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||ga(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.")}()}function va(e){return function(e){if(Array.isArray(e))return fa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ga(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ga(e,t){if(e){if("string"==typeof e)return fa(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)?fa(e,t):void 0}}function ma(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=Pa(s,e,t);ca(s).setState({loaded:!0,config:u})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function ba(e,t){var n,r,o=(n=ka(Ea(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=ya(o.value,2),s=a[0],u=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(u)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=ya(d.value,2),y=p[0];xa(p[1],s,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return ha({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=ya(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=(0,h.getGlobalStore)("config-extension-slots",{slots:{}}),s=a.getState(),u={slots:ha({},s.slots,i)};Ii(s,u)||a.setState(u)}function wa(e,t){var n=function(e,t){var n=Oa($i(e.schemas)),r=va(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=ya(s.value,2);n=ka([n,Ca(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return n}(e,t);la.setState({config:n})}function _a(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=t.mountedExtensions[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=Sa(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=pa(ha({},r[c.slotName]),da({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}(0,h.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})}function Sa(e,t,n,r,o,i){var a,s,u,c,l=function(e){return ya(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=Ea(o,i),p=Aa(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==c?c:{},v=ka([Aa(d,h),y]),g=null!=f?f:o.schemas[t];Ta(g,v,d);var m=Na(g,v);return Ia(g,m,d),delete m.extensionSlots,m}function Oa(e){return e.hasOwnProperty("_default")?pa(ha({},e),{_value:e._default,_source:"default"}):Ba(e)?Object.keys(e).reduce((function(t,n){return t[n]=Oa(e[n]),t}),{}):{}}function Ca(e,t){return Ba(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ca(e[r],t),n}),{}):{_value:e,_source:t}}function xa(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Ba(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Ea(e,t){return va(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])}function ja(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var s,u=function(){var o=s.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!Ba(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||ja(e,a,i);var u=a._elements;if(Ra(u)&&ja(e,u,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(Cr).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(Cr).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),u&&y&&![Cr.Array,Cr.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Pa(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=Aa(e,Ea(t,n));Ta(r,o,e);var i=Na(r,o);return Ia(r,i,e),delete i.extensionSlots,i}function Aa(e,t){var n=t.map((function(t){return t[e]})).filter((function(e){return!!e}));return ka(n)}function ka(e){return Xi(Vi)({},e)}function Ta(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e.hasOwnProperty(u)?Ma(f,c,l):"extensionSlots"===u&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}function Ma(e,t,n){Da(n,e._type,t),Ba(t)?e._type===Cr.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u];Ta(e._elements,c,"".concat(n,".").concat(u))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||Ta(e,t,n):e._type===Cr.Array&&function(e,t,n){if(Ra(e._elements))for(var r=0;r<t.length;r++)Ma(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;Da("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ia(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&La(n,e._validators,t),Ba(t)){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e._type===Cr.Object&&e._elements?Ia(e._elements,c,l):Ia(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ia(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}function Da(e,t,n){t&&La(e,[{Array:ea,Boolean:ta,ConceptUuid:ia,Number:na,Object:oa,String:ra,UUID:ia,PersonAttributeTypeUuid:ia,PatientIdentifierTypeUuid:ia}[t]],n)}function La(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(n);"string"==typeof u&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(u)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(u)))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}}ma(aa.getState(),sa.getState()),aa.subscribe((function(e){return ma(e,sa.getState())})),sa.subscribe((function(e){return ma(aa.getState(),e)})),wa(aa.getState(),sa.getState()),aa.subscribe((function(e){return wa(e,sa.getState())})),sa.subscribe((function(e){return wa(aa.getState(),e)})),ba(aa.getState(),sa.getState()),aa.subscribe((function(e){return ba(e,sa.getState())})),sa.subscribe((function(e){return ba(aa.getState(),e)})),_a(aa.getState(),ua.getState(),sa.getState()),aa.subscribe((function(e){_a(e,ua.getState(),sa.getState())})),ua.subscribe((function(e){_a(aa.getState(),e,sa.getState())})),sa.subscribe((function(e){_a(aa.getState(),ua.getState(),e)}));var Na=function(e,t){var n=$i(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,s=function(){var t=a.value,r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&Ra(i))if(o._type===Cr.Array&&Array.isArray(r)){var s=r.map((function(e){return Na(i,e)}));n[t]=s}else if(o._type===Cr.Object){var u=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;r[h]=Na(i,r[h])}}catch(e){c=!0,l=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}}}else if(Ba(o)){var p=n.hasOwnProperty(t)?r:{};Ba(p)&&(n[t]=Na(o,p))}},u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)s()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n};function Ra(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0}function Ba(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var Ha={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:Cr.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:Cr.Object,_default:{}}};u(570);const Va=function(e,t){return e===t||e!=e&&t!=t},Ua=function(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1};var $a=Array.prototype.splice;function Ka(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ka.prototype.clear=function(){this.__data__=[],this.size=0},Ka.prototype.delete=function(e){var t=this.__data__,n=Ua(t,e);return!(n<0||(n==t.length-1?t.pop():$a.call(t,n,1),--this.size,0))},Ka.prototype.get=function(e){var t=this.__data__,n=Ua(t,e);return n<0?void 0:t[n][1]},Ka.prototype.has=function(e){return Ua(this.__data__,e)>-1},Ka.prototype.set=function(e,t){var n=this.__data__,r=Ua(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const Fa=Ka,Za="object"==typeof global&&global&&global.Object===Object&&global;var qa="object"==typeof self&&self&&self.Object===Object&&self;const Wa=Za||qa||Function("return this")(),Ga=Wa.Symbol;var za=Object.prototype,Ya=za.hasOwnProperty,Ja=za.toString,Qa=Ga?Ga.toStringTag:void 0;var Xa=Object.prototype.toString;var es=Ga?Ga.toStringTag:void 0;const ts=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":es&&es in Object(e)?function(e){var t=Ya.call(e,Qa),n=e[Qa];try{e[Qa]=void 0;var r=!0}catch(e){}var o=Ja.call(e);return r&&(t?e[Qa]=n:delete e[Qa]),o}(e):function(e){return Xa.call(e)}(e)},ns=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},rs=function(e){if(!ns(e))return!1;var t=ts(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},os=Wa["__core-js_shared__"];var is,as=(is=/[^.]+$/.exec(os&&os.keys&&os.keys.IE_PROTO||""))?"Symbol(src)_1."+is:"";var ss=Function.prototype.toString;const us=function(e){if(null!=e){try{return ss.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var cs=/^\[object .+?Constructor\]$/,ls=Function.prototype,fs=Object.prototype,ds=ls.toString,hs=fs.hasOwnProperty,ps=RegExp("^"+ds.call(hs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ys=function(e){return!(!ns(e)||(t=e,as&&as in t))&&(rs(e)?ps:cs).test(us(e));var t},vs=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ys(n)?n:void 0},gs=vs(Wa,"Map"),ms=vs(Object,"create");var bs=Object.prototype.hasOwnProperty;var ws=Object.prototype.hasOwnProperty;function _s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_s.prototype.clear=function(){this.__data__=ms?ms(null):{},this.size=0},_s.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_s.prototype.get=function(e){var t=this.__data__;if(ms){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bs.call(t,e)?t[e]:void 0},_s.prototype.has=function(e){var t=this.__data__;return ms?void 0!==t[e]:ws.call(t,e)},_s.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ms&&void 0===t?"__lodash_hash_undefined__":t,this};const Ss=_s,Os=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function Cs(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cs.prototype.clear=function(){this.size=0,this.__data__={hash:new Ss,map:new(gs||Fa),string:new Ss}},Cs.prototype.delete=function(e){var t=Os(this,e).delete(e);return this.size-=t?1:0,t},Cs.prototype.get=function(e){return Os(this,e).get(e)},Cs.prototype.has=function(e){return Os(this,e).has(e)},Cs.prototype.set=function(e,t){var n=Os(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const xs=Cs;function Es(e){var t=this.__data__=new Fa(e);this.size=t.size}Es.prototype.clear=function(){this.__data__=new Fa,this.size=0},Es.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Es.prototype.get=function(e){return this.__data__.get(e)},Es.prototype.has=function(e){return this.__data__.has(e)},Es.prototype.set=function(e,t){var n,r,o=this.__data__;if(n=o,null!=(r=Fa)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r){var i=o.__data__;if(!gs||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new xs(i)}return o.set(e,t),this.size=o.size,this};const js=Es;function Ps(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new xs;++t<n;)this.add(e[t])}Ps.prototype.add=Ps.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ps.prototype.has=function(e){return this.__data__.has(e)};const As=Ps,ks=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ts=function(e,t){return e.has(t)},Ms=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new As:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!ks(t,(function(e,t){if(!Ts(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Is=Wa.Uint8Array,Ds=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Ls=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Ns=Ga?Ga.prototype:void 0,Rs=Ns?Ns.valueOf:void 0;const Bs=Array.isArray;var Hs=Object.prototype.propertyIsEnumerable,Vs=Object.getOwnPropertySymbols;const Us=Vs?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(Vs(e),(function(t){return Hs.call(e,t)})))}:function(){return[]},$s=function(e){return null!=e&&"object"==typeof e},Ks=function(e){return $s(e)&&"[object Arguments]"==ts(e)};var Fs=Object.prototype,Zs=Fs.hasOwnProperty,qs=Fs.propertyIsEnumerable,Ws=Ks(function(){return arguments}())?Ks:function(e){return $s(e)&&Zs.call(e,"callee")&&!qs.call(e,"callee")};const Gs=Ws;var zs="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ys=zs&&"object"==typeof module&&module&&!module.nodeType&&module,Js=Ys&&Ys.exports===zs?Wa.Buffer:void 0;const Qs=(Js?Js.isBuffer:void 0)||function(){return!1};var Xs=/^(?:0|[1-9]\d*)$/;const eu=function(e,t){var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Xs.test(e))&&e>-1&&e%1==0&&e<t},tu=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var nu={};nu["[object Float32Array]"]=nu["[object Float64Array]"]=nu["[object Int8Array]"]=nu["[object Int16Array]"]=nu["[object Int32Array]"]=nu["[object Uint8Array]"]=nu["[object Uint8ClampedArray]"]=nu["[object Uint16Array]"]=nu["[object Uint32Array]"]=!0,nu["[object Arguments]"]=nu["[object Array]"]=nu["[object ArrayBuffer]"]=nu["[object Boolean]"]=nu["[object DataView]"]=nu["[object Date]"]=nu["[object Error]"]=nu["[object Function]"]=nu["[object Map]"]=nu["[object Number]"]=nu["[object Object]"]=nu["[object RegExp]"]=nu["[object Set]"]=nu["[object String]"]=nu["[object WeakMap]"]=!1;var ru="object"==typeof exports&&exports&&!exports.nodeType&&exports,ou=ru&&"object"==typeof module&&module&&!module.nodeType&&module,iu=ou&&ou.exports===ru&&Za.process,au=function(){try{return ou&&ou.require&&ou.require("util").types||iu&&iu.binding&&iu.binding("util")}catch(e){}}(),su=au&&au.isTypedArray;const uu=su?(cu=su,function(e){return cu(e)}):function(e){return $s(e)&&tu(e.length)&&!!nu[ts(e)]};var cu,lu=Object.prototype.hasOwnProperty;const fu=function(e,t){var n=Bs(e),r=!n&&Gs(e),o=!n&&!r&&Qs(e),i=!n&&!r&&!o&&uu(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!t&&!lu.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||eu(c,u))||s.push(c);return s};var du=Object.prototype;const hu=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var pu=Object.prototype.hasOwnProperty;const yu=function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||du))return hu(e);var t,n,r=[];for(var o in Object(e))pu.call(e,o)&&"constructor"!=o&&r.push(o);return r},vu=function(e){return null!=(t=e)&&tu(t.length)&&!rs(t)?fu(e):yu(e);var t},gu=function(e){return function(e,t,n){var r=t(e);return Bs(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,vu,Us)};function mu(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var bu=Object.prototype.hasOwnProperty;const wu=vs(Wa,"DataView"),_u=vs(Wa,"Promise"),Su=vs(Wa,"Set"),Ou=vs(Wa,"WeakMap");var Cu="[object Map]",xu="[object Promise]",Eu="[object Set]",ju="[object WeakMap]",Pu="[object DataView]",Au=us(wu),ku=us(gs),Tu=us(_u),Mu=us(Su),Iu=us(Ou),Du=ts;(wu&&Du(new wu(new ArrayBuffer(1)))!=Pu||gs&&Du(new gs)!=Cu||_u&&Du(_u.resolve())!=xu||Su&&Du(new Su)!=Eu||Ou&&Du(new Ou)!=ju)&&(Du=function(e){var t=ts(e),n="[object Object]"==t?e.constructor:void 0,r=n?us(n):"";if(r)switch(r){case Au:return Pu;case ku:return Cu;case Tu:return xu;case Mu:return Eu;case Iu:return ju}return t});const Lu=Du;var Nu="[object Arguments]",Ru="[object Array]",Bu="[object Object]",Hu=Object.prototype.hasOwnProperty;const Vu=function(e,t,n,r,o,i){var a=Bs(e),s=Bs(t),u=a?Ru:Lu(e),c=s?Ru:Lu(t),l=(u=u==Nu?Bu:u)==Bu,f=(c=c==Nu?Bu:c)==Bu,d=u==c;if(d&&Qs(e)){if(!Qs(t))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new js),a||uu(e)?Ms(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Is(e),new Is(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Va(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ds;case"[object Set]":var u=1&r;if(s||(s=Ls),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Ms(s(e),s(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Rs)return Rs.call(e)==Rs.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var h=l&&Hu.call(e,"__wrapped__"),p=f&&Hu.call(t,"__wrapped__");if(h||p){var y=h?e.value():e,v=p?t.value():t;return i||(i=new js),o(y,v,n,r,i)}}return!!d&&(i||(i=new js),function(e,t,n,r,o,i){var a=1&n,s=gu(e),u=s.length;if(u!=gu(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:bu.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<u;){var y=e[l=s[c]],v=t[l];if(r)var g=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&mu(m,m)&&"function"==typeof b&&mu(b,b)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))},Uu=function e(t,n,r,o,i){return t===n||(null==t||null==n||!$s(t)&&!$s(n)?t!=t&&n!=n:Vu(t,n,r,o,e,i))},$u=function(e,t){return Uu(e,t)},Ku=function(e){return void 0===e};var Fu=(0,h.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Zu=function(){return(0,h.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function qu(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,s=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var u=i.value,c=!0,l=!1,f=void 0;try{for(var d,h=u.instances[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;t.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}$u(a.configExtensionStore.getState().mountedExtensions,t)||a.configExtensionStore.setState({mountedExtensions:t})}function Wu(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 Gu(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Yu(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.")}()}function zu(e){return function(e){if(Array.isArray(e))return Wu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Yu(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yu(e,t){if(e){if("string"==typeof e)return Wu(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)?Wu(e,t):void 0}}qu(Fu.getState()),Fu.subscribe(qu),Zu();var Ju=Zu(),Qu=(0,h.getGlobalStore)("extensions",{slots:{}}),Xu=(0,a.getExtensionSlotsConfigStore)(),ec=(0,a.getExtensionsConfigStore)();function tc(e,t,n){var r={},o=!0,i=!1,s=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=Gu(u.value,2),f=l[0],d=l[1],h=oc(f,e,(0,a.getExtensionSlotConfigFromStore)(t,d.name).config,n);r[f]={moduleName:d.moduleName,assignedExtensions:h}}}catch(e){i=!0,s=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw s}}$u(Qu.getState().slots,r)||Qu.setState({slots:r})}function nc(e){return Gu(e.split("#"),1)[0]}function rc(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1}function oc(e,t,n,r){var o=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=Ju.getState().extensions;return zu(t).concat(zu(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,s=rc(e,o,null===(r=i[nc(e)])||void 0===r?void 0:r.order,t),u=rc(n,o,null===(a=i[nc(n)])||void 0===a?void 0:a.order,t);return-1===u?-1:-1===s?1:s-u}))}(n,t.slots[e].attachedIds),i=[],s=void 0,u=!0,c=!1,l=void 0;try{for(var f,d=o[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value,p=(0,a.getExtensionConfigFromStore)(r,e,h).config,y=nc(h),v=t.extensions[y];if(v){var g,m,b,w=null!==(b=null!==(m=null==p||null===(g=p["Display conditions"])||void 0===g?void 0:g.privileges)&&void 0!==m?m:v.privileges)&&void 0!==b?b:[];if(w&&("string"==typeof w||Array.isArray(w)&&w.length>0)){var _;if(Ku(s)&&(s=null===(_=(0,vr.getSessionStore)().getState().session)||void 0===_?void 0:_.user),!s)continue;if(!(0,vr.userHasAccess)(w,s))continue}i.push({id:h,name:y,moduleName:v.moduleName,config:p,featureFlag:v.featureFlag,meta:v.meta})}}}catch(e){c=!0,l=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}return i}function ic(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 ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sc(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){ac(e,t,n[t])}))}return e}function uc(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ic(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)?ic(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.")}()}Ju.subscribe((function(e){tc(e,Xu.getState(),ec.getState())})),Xu.subscribe((function(e){tc(Ju.getState(),e,ec.getState())})),ec.subscribe((function(e){tc(Ju.getState(),Xu.getState(),e)}));var cc={flags:function(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(localStorage)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(a.startsWith("openmrs:feature-flag:")){var s=a.replace("openmrs:feature-flag:",""),u=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(s))||"{}");e[s]=sc({enabled:"true"===localStorage.getItem(a)},u)}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}()};(0,h.getGlobalStore)("feature-flags",cc).subscribe((function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e.flags)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=uc(o.value,2),s=a[0],u=a[1];localStorage.setItem("openmrs:feature-flag:".concat(s),u.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(s),JSON.stringify({label:u.label,description:u.description}))}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}));var lc,fc=u(954),dc=u(45);function hc(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 pc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yc(e,t){if(e){if("string"==typeof e)return hc(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)?hc(e,t):void 0}}function vc(e,t){var n=function(n){r[n]=function(){var r=arguments;e.setState((function(e){for(var o,i=[e],a=0;a<r.length;a++)i.push(r[a]);return(o=t)[n].apply(o,function(e){if(Array.isArray(e))return hc(e)}(s=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||yc(s)||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 s}))}};"function"==typeof t&&(t=t(e));var r={};for(var o in t)n(o);return r}function gc(e){return function(t){var n=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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||yc(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.")}()}((0,fc.useState)(e.getState()),2),r=n[0],o=n[1];return(0,fc.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),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){pc(e,t,n[t])}))}return e}({},r,(0,fc.useMemo)((function(){return t?vc(e,t):{}}),[t]))}}fc.default.createContext({moduleName:""}),u(103),u(279);try{require("react").createContext()}catch(v){}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(lc||(lc={})),gc((0,dc.getExtensionInternalStore)()),gc((0,dc.getExtensionStore)());var mc=u(921);const bc=new WeakMap,wc={},_c=()=>{},Sc=_c(),Oc=Object,Cc=e=>e===Sc,xc=e=>"function"==typeof e,Ec=(e,t)=>({...e,...t}),jc="undefined",Pc=typeof window!=jc,Ac=typeof document!=jc,kc=(e,t)=>{const n=bc.get(e);return[()=>e.get(t)||wc,r=>{const o=e.get(t);n[5](t,Ec(o,r),o||wc)},n[6]]},Tc=new WeakMap;let Mc=0;const Ic=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(Oc(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=Tc.get(e),o)return o;if(o=++Mc+"~",Tc.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=Ic(e[i])+",";Tc.set(e,o)}if(n==Oc){o="#";const t=Oc.keys(e).sort();for(;!Cc(i=t.pop());)Cc(e[i])||(o+=i+":"+Ic(e[i])+",");Tc.set(e,o)}}return o};let Dc=!0;const[Lc,Nc]=Pc&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[_c,_c],Rc={isOnline:()=>Dc,isVisible:()=>{const e=Ac&&document.visibilityState;return Cc(e)||"hidden"!==e}},Bc={initFocus:e=>(Ac&&document.addEventListener("visibilitychange",e),Lc("focus",e),()=>{Ac&&document.removeEventListener("visibilitychange",e),Nc("focus",e)}),initReconnect:e=>{const t=()=>{Dc=!0,e()},n=()=>{Dc=!1};return Lc("online",t),Lc("offline",n),()=>{Nc("online",t),Nc("offline",n)}}},Hc=!fc.default.useId,Vc=!Pc||"Deno"in window,Uc=Vc?fc.useEffect:fc.useLayoutEffect,$c="undefined"!=typeof navigator&&navigator.connection,Kc=!Vc&&$c&&(["slow-2g","2g"].includes($c.effectiveType)||$c.saveData),Fc=e=>{if(xc(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?Ic(e):"",t]};let Zc=0;const qc=()=>++Zc;async function Wc(...e){const[t,n,r,o]=e,i=Ec({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let u=i.optimisticData;const c=!1!==i.revalidate,l=i.throwOnError;if(xc(n)){const e=n,r=[],o=t.keys();for(let n=o.next();!n.done;n=o.next()){const o=n.value;!o.startsWith("$inf$")&&e(t.get(o)._k)&&r.push(o)}return Promise.all(r.map(f))}return f(n);async function f(n){const[o]=Fc(n);if(!o)return;const[i,f]=kc(t,o),[d,h,p]=bc.get(t),y=d[o],v=()=>c&&(delete p[o],y&&y[0])?y[0](2).then((()=>i().data)):i().data;if(e.length<3)return v();let g,m=r;const b=qc();h[o]=[b,0];const w=!Cc(u),_=i(),S=_.data,O=_._c,C=Cc(O)?S:O;if(w&&(u=xc(u)?u(C):u,f({data:u,_c:C})),xc(m))try{m=m(C)}catch(e){g=e}if(m&&xc(m.then)){if(m=await m.catch((e=>{g=e})),b!==h[o][0]){if(g)throw g;return m}g&&w&&(e=>"function"==typeof s?s(e):!1!==s)(g)&&(a=!0,m=C,f({data:m,_c:Sc}))}a&&(g||(xc(a)&&(m=a(m,C)),f({data:m,_c:Sc}))),h[o][1]=qc();const x=await v();if(f({_c:Sc}),!g)return a?x:m;if(l)throw g}}const Gc=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},zc=(e,t)=>{if(!bc.has(e)){const n=Ec(Bc,t),r={},o=Wc.bind(Sc,e);let i=_c;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},u=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(let e=o.length;e--;)o[e](r,n)},c=()=>{if(!bc.has(e)&&(bc.set(e,[r,{},{},{},o,u,s]),!Vc)){const t=n.initFocus(setTimeout.bind(Sc,Gc.bind(Sc,r,0))),o=n.initReconnect(setTimeout.bind(Sc,Gc.bind(Sc,r,1)));i=()=>{t&&t(),o&&o(),bc.delete(e)}}};return c(),[e,o,c,i]}return[e,bc.get(e)[4]]},[Yc,Jc]=zc(new Map),Qc=Ec({onLoadingSlow:_c,onSuccess:_c,onError:_c,onErrorRetry:(e,t,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Cc(i)&&a>i||setTimeout(r,s,o)},onDiscarded:_c,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Kc?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Kc?5e3:3e3,compare:(e,t)=>Ic(e)==Ic(t),isPaused:()=>!1,cache:Yc,mutate:Jc,fallback:{}},Rc),Xc=(0,fc.createContext)({}),el=Pc&&window.__SWR_DEVTOOLS_USE__;(el?window.__SWR_DEVTOOLS_USE__:[]).concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const r=Fc(t)[0],[,,,o]=bc.get(Yc),i=o[r];return i?(delete o[r],i):n(...e)}),r)));el&&(window.__SWR_DEVTOOLS_REACT__=fc.default);const tl={dedupe:!0};Oc.defineProperty((e=>{const{value:t}=e,n=(0,fc.useContext)(Xc),r=xc(t),o=(0,fc.useMemo)((()=>r?t(n):t),[r,n,t]),i=(0,fc.useMemo)((()=>r?o:((e,t)=>{const n=Ec(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Ec(o,a))}return n})(n,o)),[r,n,o]),a=o&&o.provider,[s]=(0,fc.useState)((()=>a?zc(a(i.cache||Yc),o):Sc));return s&&(i.cache=s[0],i.mutate=s[1]),Uc((()=>{if(s)return s[2]&&s[2](),s[3]}),[]),(0,fc.createElement)(Xc.Provider,Ec(e,{value:i}))}),"defaultValue",{value:Qc});var nl=u(23),rl=u.n(nl),ol=u(701),il=u.n(ol);rl().extend(il());var al={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=al)}),1e3);var sl={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?sl.enableCssCustomProperties=!0:sl.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?sl.enableUseControlledStateWithValue=!0:sl.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?sl.enableCssGrid=!0:sl.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE&&"true"===process.env.CARBON_ENABLE_V11_RELEASE?sl.enableV11Release=!0:sl.enableV11Release=!1}catch(e){sl.enableCssCustomProperties=!1,sl.enableUseControlledStateWithValue=!1,sl.enableCssGrid=!1,sl.enableV11Release=!1}var ul=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:sl.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:sl.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:sl.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:sl.enableV11Release}];function cl(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 ll(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||fl(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.")}()}function fl(e,t){if(e){if("string"==typeof e)return dl(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dl(e,t):void 0}}function dl(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}for(var hl=function(){function e(t){var n=this;(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r})(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=fl(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=ll(t.value,2),o=r[0],i=r[1];this.flags.has(o)||this.flags.set(o,i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&cl(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),pl=new hl(undefined),yl=0;yl<ul.length;yl++){var vl=ul[yl];pl.add(vl.name,vl.enabled)}!function(){pl.merge.apply(pl,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0}),new s.Subject,new s.Subject,new s.Subject,(0,h.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,u(740),(0,h.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase});var gl,ml={"Brand color #1":{_default:"#005d5d",_type:Cr.String},"Brand color #2":{_default:"#004144",_type:Cr.String},"Brand color #3":{_default:"#007d79",_type:Cr.String},preferredCalendar:{_type:Cr.Object,_default:{am:"ethiopic"}}};Number.MAX_SAFE_INTEGER,function(e,t){ja(e,t);var n=Vi(t,Ha),r=aa.getState();aa.setState({schemas:pa(ha({},r.schemas),da({},e,n))})}("@openmrs/esm-styleguide",ml),gl=function(e,t){document.documentElement.style.setProperty(e,t)},(0,a.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(gl("--brand-01",e.config["Brand color #1"]),gl("--brand-02",e.config["Brand color #2"]),gl("--brand-03",e.config["Brand color #3"]))})),i("omrs-logo-full-color",e),i("omrs-logo-full-mono",e),i("omrs-logo-full-grey",e),i("omrs-logo-partial-color",t),i("omrs-logo-partial-mono",t),i("omrs-logo-partial-grey",t),i("omrs-logo-icon-color",n),i("omrs-logo-icon-mono",n),i("omrs-logo-icon-grey",n),i("omrs-logo-white",'<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'),i("omrs-icon-visibility",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'),i("omrs-icon-menu",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'),i("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'),i("omrs-icon-arrow-back",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'),i("omrs-icon-arrow-forward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'),i("omrs-icon-arrow-downward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'),i("omrs-icon-arrow-upward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'),i("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'),i("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'),i("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'),i("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'),i("omrs-icon-supervised-user-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'),i("omrs-icon-home",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'),i("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'),i("omrs-icon-important-notification",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'),i("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'),i("omrs-icon-access-time",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'),i("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'),i("omrs-icon-remove",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'),i("omrs-icon-check-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'),i("omrs-icon-zoomoutmap",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'),i("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'),i("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>')})(),(()=>{"use strict";u.r(c)})(),c})())}}}));
|
|
2
|
+
System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(e,t){var n={},r={},o={},i={},a={},s={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(a,"__esModule",{value:!0}),{setters:[function(e){n.getExtensionInternalStore=e.getExtensionInternalStore,n.getExtensionStore=e.getExtensionStore},function(){},function(e){o.createGlobalStore=e.createGlobalStore,o.getGlobalStore=e.getGlobalStore},function(e){Object.keys(e).forEach((function(t){i[t]=e[t]}))},function(e){Object.keys(e).forEach((function(t){a[t]=e[t]}))},function(e){s.BehaviorSubject=e.BehaviorSubject,s.Subject=e.Subject}],execute:function(){e((()=>{var e={23:function(e){function t(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e.exports=function(){"use strict";var e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},m=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:m,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+m(r,2,"0")+":"+m(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),i=n-o<0,a=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:u,d:s,D:d,h:a,m:i,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=v;var _=function(e){return t(e,E)},S=function e(t,n,r){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;w[s]=t,o=s}return!r&&o&&(b=o),o||!r&&b},O=function(e,t){if(_(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new E(n)},C=g;C.l=S,C.i=_,C.w=function(e,t){return O(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){var v=function(e){this.$L=S(e.locale,null,!0),this.parse(e)},m=v.prototype;return m.parse=function(e){this.$d=function(e){var n=e.date,r=e.utc;if(null===n)return new Date(NaN);if(C.u(n))return new Date;if(t(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(p);if(o){var i=o[2]-1||0,a=(o[7]||"0").substring(0,3);return r?new Date(Date.UTC(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,a)}}return new Date(n)}(e),this.$x=e.x||{},this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===h)},m.isSame=function(e,t){var n=O(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return O(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<O(e)},m.$g=function(e,t,n){return C.u(e)?this[t]:this.set(n,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var n=this,r=!!C.u(t)||t,l=C.p(e),h=function(e,t){var o=C.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},p=function(e,t){return C.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,m=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case f:return r?h(1,0):h(31,11);case c:return r?h(1,v):h(0,v+1);case u:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return h(r?m-w:m+(6-w),v);case s:case d:return p(g+"Hours",0);case a:return p(g+"Minutes",1);case i:return p(g+"Seconds",2);case o:return p(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var n,u=C.p(e),l="set"+(this.$u?"UTC":""),h=(n={},n[s]=l+"Date",n[d]=l+"Date",n[c]=l+"Month",n[f]=l+"FullYear",n[a]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[u],p=u===s?this.$D+(t-this.$W):t;if(u===c||u===f){var y=this.clone().set(d,1);y.$d[h](p),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[C.p(e)]()},m.add=function(t,r){var l,d=this;t=Number(t);var h=C.p(r),p=function(e){var n=O(d);return C.w(n.date(n.date()+Math.round(e*t)),d)};if(h===c)return this.set(c,this.$M+t);if(h===f)return this.set(f,this.$y+t);if(h===s)return p(1);if(h===u)return p(7);var y=(l={},l[i]=e,l[a]=n,l[o]=1e3,l)[h]||1,v=this.$d.getTime()+t*y;return C.w(v,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=C.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,c=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return C.s(i%12||12,e,"0")},d=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:C.s(s+1,2,"0"),MMM:l(n.monthsShort,s,c,3),MMMM:l(c,s),D:this.$D,DD:C.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,u,2),ddd:l(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:C.s(i,2,"0"),h:f(1),hh:f(2),a:d(i,a,!0),A:d(i,a,!1),m:String(a),mm:C.s(a,2,"0"),s:String(this.$s),ss:C.s(this.$s,2,"0"),SSS:C.s(this.$ms,3,"0"),Z:o};return r.replace(y,(function(e,t){return t||p[e]||o.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(t,r,d){var h,p=C.p(r),y=O(t),v=(y.utcOffset()-this.utcOffset())*e,m=this-y,g=C.m(this,y);return g=(h={},h[f]=g/12,h[c]=g,h[l]=g/3,h[u]=(m-v)/6048e5,h[s]=(m-v)/864e5,h[a]=m/n,h[i]=m/e,h[o]=m/1e3,h)[p]||m,d?g:C.a(g)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return w[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=S(e,t,!0);return r&&(n.$L=r),n},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},v}(),x=E.prototype;return O.prototype=x,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",f],["$D",d]].forEach((function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),O.extend=function(e,t){return e.$i||(e(t,E,O),e.$i=!0),O},O.locale=S,O.isDayjs=_,O.unix=function(e){return O(1e3*e)},O.en=w[b],O.Ls=w,O.p={},O}()},701:function(e){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},279:(e,t,n)=>{"use strict";var r=n(493);r.createRoot,r.hydrateRoot},978:(e,t,n)=>{"use strict";var r=n(954),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,u=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,l=r[1];return s((function(){o.value=n,o.getSnapshot=t,c(o)&&l({inst:o})}),[e,n,t]),a((function(){return c(o)&&l({inst:o}),e((function(){c(o)&&l({inst:o})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:l},921:(e,t,n)=>{"use strict";e.exports=n(978)},641:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-config","@openmrs/esm-error-handling","@openmrs/esm-offline"],(function(e,t){var i={},a={},s={};return{setters:[function(e){i.Type=e.Type,i.defineConfigSchema=e.defineConfigSchema,i.getConfig=e.getConfig,i.navigate=e.navigate,i.validators=e.validators},function(e){a.reportError=e.reportError},function(e){s.getSynchronizationItems=e.getSynchronizationItems}],execute:function(){e(function(){var e={385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e,t){var n=s[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;var r=a()((function(){return t}));return s[e]={value:r,active:!0},r},t=function(e,t){var n=s[e];if(!n){var r=a()((function(){return null!=t?t:{}}));return s[e]={value:r,active:!1},r}return n.value},n=function(e,t,n){var r=t(e.getState());return e.subscribe((function(e){var o=t(e);o!==r&&(r=o,n(o))}))},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]})},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})}},o={};r.r(o),r.d(o,{createGlobalStore:function(){return e},getGlobalStore:function(){return t},subscribeTo:function(){return n}});var i=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)?o:Object.assign({},t,o),n.forEach((function(e){return e(t,i)}))}},o=function(){return t},i={setState:r,getState:o,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()}};return t=e(r,o,i),i},a=function(e){return e?i(e):i},s={};return setTimeout((function(){"development"===window.spaEnv&&(window.stores=s)}),1e3),o}())}}}))},824:function(e){"use strict";e.exports=i},254:function(e){"use strict";e.exports=a},738:function(e){"use strict";e.exports=s}},t={};function u(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,u),o.exports}u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){"use strict";var e=function(e,t){function n(){this.constructor=e}G(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},t=function(e){return"function"==typeof e},i=function(e){setTimeout((function(){throw e}),0)},a=function(e){return e.reduce((function(e,t){return e.concat(r(t,X)?t.errors:t)}),[])},s=function(e){return e},l=function(e){if(e||(e=Y.Promise||Promise),!e)throw new Error("no Promise impl found");return e},f=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},d=function(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)},h=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},y=function(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)},v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");var n=y(e);if(t.headers||(t.headers={}),_e(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(je)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(Pe)){var r=new URL(n,window.location.toString());r.searchParams.has("_summary")||(r.searchParams.set("_summary","data"),n=r.toString())}var o,i,a=Error();return window.fetch(n,t).then((o=function(e){var t,r;return 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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(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,s])}}}(this,(function(o){switch(o.label){case 0:return(t=e).ok?204===t.status?(t.data=null,[2,t]):[2,t.clone().text().then((function(e){try{e&&(t.data=JSON.parse(e))}catch(e){}return t}))]:[3,1];case 1:return[4,(0,Se.getConfig)("@openmrs/esm-api")];case 2:return r=o.sent().redirectAuthFailure,n===y(Ae)&&403===t.status||r.enabled&&r.errors.includes(t.status)?((0,Se.navigate)({to:r.url}),[2,r.resolvePromise?Promise.resolve():new Promise((function(){}))]):[2,t.clone().text().then((function(e){var r=e;try{r=JSON.parse(e)}catch(e){}throw new ke(n,t,r,a)}),(function(e){throw new ke(n,t,null,a)}))];case 3:return[2]}}))},i=function(){var e=this,t=arguments;return new Promise((function(n,r){var i=o.apply(e,t);function a(e){d(i,n,r,a,s,"next",e)}function s(e){d(i,n,r,a,s,"throw",e)}a(void 0)}))},function(e){return i.apply(this,arguments)}))},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return t.signal=n.signal,new ie((function(r){var o=!1;return v(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},g=function(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Le<Date.now()-6e4||!De.getState().loaded)&&_(),new ie((function(t){var n=function(n){var r;n.loaded&&(e.includeAuthStatus?t.next(n.session):t.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(De.getState()),De.subscribe(n)}))},w=function(){return(Le<Date.now()-6e4||!De.getState().loaded)&&_(),De},_=function(){return new Promise((function(e,t){Le=Date.now(),v(Ae).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,s,u;s=null!==(a=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==a?a:r.locale,u=document.documentElement.getAttribute("lang"),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(s)&&s!==u&&document.documentElement.setAttribute("lang",s),e(n.data),De.setState({loaded:!0,session:n.data})})).catch((function(e){return(0,Te.reportError)("Failed to fetch new session information: ".concat(e)),t(e),{sessionId:"",authenticated:!1}}))}))},S=function(){De.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},O=function(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!Ie(t.privileges.find((function(t){return e===t.display}))):Array.isArray(e)?e.every((function(e){return!Ie(t.privileges.find((function(t){return e===t.display})))})):(Ie(e)||console.error('Could not understand privileges "'.concat(e,'"')),!0)}(e,t)||function(e){return!Ie(e.roles.find((function(e){return"System Developer"===e.display})))}(t)},C=function(){var e,t;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(De.getState()),e||(t=De.subscribe(o))}))},E=function(){return new Promise((function(e,t){b().subscribe((function(t){e(t.sessionLocation)}),t).unsubscribe()}))},x=function(e,t){return Ne.apply(this,arguments)},j=function(){(0,Se.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Se.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Se.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Se.validators.isUrl]},errors:{_type:Se.Type.Array,_default:[401],_elements:{_type:Se.Type.Number,_validators:[Se.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Se.Type.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}}}),_()},P=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 s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)},k=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){A(i,r,o,a,s,"next",e)}function s(e){A(i,r,o,a,s,"throw",e)}a(void 0)}))}},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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||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,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.")}()},M=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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(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,s])}}},I=function(e,t){return Be.apply(this,arguments)},D=function(e){return He.apply(this,arguments)},L=function(e){return function(t){return 0===e?We:t.lift(new Ge(e))}},N=function(e,t){return function(n){if("function"!=typeof e)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Ye(e,t))}},R=function(){return(0,Me.getGlobalStore)("visit",Xe)},B=function(e,t){R().setState({patientUuid:e,manuallySetVisitUuid:t})},H=function(e,t,n){var r=null!=n?n:Qe;return m("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(L(1)).pipe(N((function(e){return e})))},V=function(e,t){return m("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},U=function(e,t,n){return m("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},$=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},K=function(){return m("/ws/rest/v1/visittype").pipe(N((function(e){return e.data.results.map($)}))).pipe(L(1))},F=function(e){return{uuid:e.uuid,display:e.display}},Z=function(){return m("/ws/rest/v1/location").pipe(N((function(e){return e.data.results.map(F)}))).pipe(L(1))};u.r(c),u.d(c,{OpenmrsFetchError:function(){return ke},VisitMode:function(){return et},VisitStatus:function(){return tt},backendDependencies:function(){return rt},clearCurrentUser:function(){return S},defaultVisitCustomRepresentation:function(){return Qe},fetchCurrentPatient:function(){return I},fhirBaseUrl:function(){return Pe},getCurrentUser:function(){return b},getLocations:function(){return Z},getLoggedInUser:function(){return C},getSessionLocation:function(){return E},getSessionStore:function(){return w},getStartedVisit:function(){return nt},getVisitStore:function(){return R},getVisitTypes:function(){return K},getVisitsForPatient:function(){return H},makeUrl:function(){return y},openmrsFetch:function(){return v},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return _},restBaseUrl:function(){return je},saveVisit:function(){return V},sessionEndpoint:function(){return Ae},setCurrentVisit:function(){return B},setSessionLocation:function(){return x},setupApiModule:function(){return j},toLocationObject:function(){return F},toVisitTypeObject:function(){return $},updateVisit:function(){return U},userHasAccess:function(){return O}});var q,W,G=function(e,t){return G=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},G(e,t)},z=!1,Y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,z=e},get useDeprecatedSynchronousErrorHandling(){return z}},J={closed:!0,next:function(e){},error:function(e){if(Y.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},Q=Array.isArray||function(e){return e&&"number"==typeof e.length},X=function(){var e=function(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this};return e.prototype=Object.create(Error.prototype),e}(),ee=function(){var e=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return e.prototype.unsubscribe=function(){var n;if(!this.closed){var o,i=this,s=i._parentOrParents,u=i._ctorUnsubscribe,c=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(s,e))s.remove(this);else if(null!==s)for(var f=0;f<s.length;++f)s[f].remove(this);if(t(c)){u&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){n=r(e,X)?a(e.errors):[e]}}if(Q(l)){f=-1;for(var d=l.length;++f<d;){var h=l[f];if(null!==(o=h)&&"object"==typeof o)try{h.unsubscribe()}catch(e){n=n||[],r(e,X)?n=n.concat(a(e.errors)):n.push(e)}}}if(n)throw new X(n)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!r(n,e)){var i=n;(n=new e)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var a=n._parentOrParents;if(null===a)n._parentOrParents=this;else if(r(a,e)){if(a===this)return n;n._parentOrParents=[a,this]}else{if(-1!==a.indexOf(this))return n;a.push(this)}var s=this._subscriptions;return null===s?this._subscriptions=[n]:s.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}(),te="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),ne=function(t){function n(e,o,i){var a=t.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=J;break;case 1:if(!e){a.destination=J;break}if("object"==typeof e){r(e,n)?(a.syncErrorThrowable=e.syncErrorThrowable,a.destination=e,e.add(a)):(a.syncErrorThrowable=!0,a.destination=new re(a,e));break}default:a.syncErrorThrowable=!0,a.destination=new re(a,e,o,i)}return a}return e(n,t),n.prototype[te]=function(){return this},n.create=function(e,t,r){var o=new n(e,t,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(e){this.isStopped||this._next(e)},n.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},n.prototype._next=function(e){this.destination.next(e)},n.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},n}(ee),re=function(n){var r=function(e,r,o,i){var a,s=n.call(this)||this;s._parentSubscriber=e;var u=s;return t(r)?a=r:r&&(a=r.next,o=r.error,i=r.complete,r!==J&&(t((u=Object.create(r)).unsubscribe)&&s.add(u.unsubscribe.bind(u)),u.unsubscribe=s.unsubscribe.bind(s))),s._context=u,s._next=a,s._error=o,s._complete=i,s};return e(r,n),r.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;Y.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},r.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=Y.useDeprecatedSynchronousErrorHandling;if(this._error)n&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)n?(t.syncErrorValue=e,t.syncErrorThrown=!0):i(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;i(e)}}},r.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};Y.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},r.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),Y.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},r.prototype.__tryOrSetError=function(e,t,n){if(!Y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return Y.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},r.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},r}(ne),oe="function"==typeof Symbol&&Symbol.observable||"@@observable",ie=function(){var e=function(e){this._isScalar=!1,e&&(this._subscribe=e)};return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var o=this.operator,i=function(e,t,n){if(e){if(r(e,ne))return e;if(e[te])return e[te]()}return e||t||n?new ne(e,t,n):new ne(J)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Y.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Y.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Y.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,o=t.destination,i=t.isStopped;if(n||i)return!1;e=o&&r(o,ne)?o:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=l(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[oe]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?s:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=l(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}(),ae="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,se="object"==typeof self&&self&&self.Object===Object&&self,ue=(ae||se||Function("return this")()).Symbol,ce=Object.prototype,le=ce.hasOwnProperty,fe=ce.toString,de=ue?ue.toStringTag:void 0,he=Object.prototype.toString,pe=ue?ue.toStringTag:void 0,ye=(q=Object.getPrototypeOf,W=Object,function(e){return q(W(e))}),ve=Function.prototype,me=Object.prototype,ge=ve.toString,be=me.hasOwnProperty,we=ge.call(Object),_e=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":pe&&pe in Object(e)?function(e){var t=le.call(e,de),n=e[de];try{e[de]=void 0;var r=!0}catch(e){}var o=fe.call(e);return r&&(t?e[de]=n:delete e[de]),o}(e):function(e){return he.call(e)}(e)}(e))return!1;var t=ye(e);if(null===t)return!0;var n=be.call(t,"constructor")&&t.constructor;return"function"==typeof n&&r(n,n)&&ge.call(n)==we},Se=u(824);function Oe(e,t,n){return Oe=p()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&Ee(o,n.prototype),o},Oe.apply(null,arguments)}function Ce(e){return Ce=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ce(e)}function Ee(e,t){return Ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ee(e,t)}function xe(e){var t="function"==typeof Map?new Map:void 0;return xe=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Oe(e,arguments,Ce(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ee(r,e)},xe(e)}var je="/ws/rest/v1/",Pe="/ws/fhir2/R4",Ae="".concat(je,"session"),ke=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ee(e,t)}(a,e);var t,n,i=(t=a,n=p(),function(){var e,r=Ce(t);if(n){var i=Ce(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":o(n))&&"function"!=typeof t?f(e):t;var n}(this,e)});function a(e,t,n,o){var s;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,a),h(f(s=i.call(this)),"response",void 0),h(f(s),"responseBody",void 0),s.message="Server responded with ".concat(t.status," (").concat(t.statusText,") for url ").concat(e,". Check err.responseBody or network tab in dev tools for more info"),o.message=s.message,s.responseBody=n,s.response=t,s.stack="Stacktrace for outgoing request:\n".concat(o.stack,"\nStacktrace for incoming response:\n").concat(s.stack),s}return a}(xe(Error)),Te=u(254),Me=u(385),Ie=function(e){return void 0===e},De=(0,Me.createGlobalStore)("session",{loaded:!1,session:null}),Le=0;function Ne(){var e;return e=function(e,t){return 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:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(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,s])}}}(this,(function(n){switch(n.label){case 0:return[4,v(Ae,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal})];case 1:return n.sent(),[4,_()];case 2:return n.sent(),[2]}}))},Ne=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){g(i,r,o,a,s,"next",e)}function s(e){g(i,r,o,a,s,"throw",e)}a(void 0)}))},Ne.apply(this,arguments)}var Re=u(738);function Be(){return Be=k((function(e,t){var n,r,o,i,a,s=arguments;return M(this,(function(u){switch(u.label){case 0:return n=!(s.length>2&&void 0!==s[2])||s[2],e?(r=null,[4,Promise.all([v("".concat(Pe,"/Patient/").concat(e),t).catch((function(e){return r=e})),n?D(e):Promise.resolve(null)])]):[3,2];case 1:if(o=T.apply(void 0,[u.sent(),2]),i=o[0],a=o[1],i.ok)return[2,i.data];if(a)return[2,a];if(r)throw r;u.label=2;case 2:return[2,null]}}))})),Be.apply(this,arguments)}function He(){return(He=k((function(e){var t,n,r;return M(this,(function(o){switch(o.label){case 0:return[4,(0,Re.getSynchronizationItems)("patient-registration")];case 1:return t=o.sent(),n=t.find((function(t){return t.fhirPatient.id===e})),[2,null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null]}}))}))).apply(this,arguments)}var Ve=function(){var e=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return e.prototype=Object.create(Error.prototype),e}(),Ue=function(t){var n=function(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r};return e(n,t),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e=this.subject,t=e.observers;if(this.subject=null,t&&0!==t.length&&!e.isStopped&&!e.closed){var n=t.indexOf(this.subscriber);-1!==n&&t.splice(n,1)}}},n}(ee),$e=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(ne),Ke=function(t){var n=function(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e};return e(n,t),n.prototype[te]=function(){return new $e(this)},n.prototype.lift=function(e){var t=new Fe(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Ve;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},n.prototype.error=function(e){if(this.closed)throw new Ve;this.hasError=!0,this.thrownError=e,this.isStopped=!0;for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].error(e);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ve;this.isStopped=!0;for(var e=this.observers,t=e.length,n=e.slice(),r=0;r<t;r++)n[r].complete();this.observers.length=0},n.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},n.prototype._trySubscribe=function(e){if(this.closed)throw new Ve;return t.prototype._trySubscribe.call(this,e)},n.prototype._subscribe=function(e){if(this.closed)throw new Ve;return this.hasError?(e.error(this.thrownError),ee.EMPTY):this.isStopped?(e.complete(),ee.EMPTY):(this.observers.push(e),new Ue(this,e))},n.prototype.asObservable=function(){var e=new ie;return e.source=this,e},n.create=function(e,t){return new Fe(e,t)},n}(ie),Fe=function(t){var n=function(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r};return e(n,t),n.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},n.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},n.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},n.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):ee.EMPTY},n}(Ke),Ze=function(t){var n=function(e){var n=t.call(this)||this;return n._value=e,n};return e(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ve;return this._value},n.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},n}(Ke),qe=function(){var e=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return e.prototype=Object.create(Error.prototype),e}(),We=new ie((function(e){return e.complete()})),Ge=function(){var e=function(e){if(this.total=e,this.total<0)throw new qe};return e.prototype.call=function(e,t){return t.subscribe(new ze(e,this.total))},e}(),ze=function(t){var n=function(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r};return e(n,t),n.prototype._next=function(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(ne),Ye=function(){var e=function(e,t){this.project=e,this.thisArg=t};return e.prototype.call=function(e,t){return t.subscribe(new Je(e,this.project,this.thisArg))},e}(),Je=function(t){var n=function(e,n,r){var o=t.call(this,e)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return e(n,t),n.prototype._next=function(e){var t;try{t=this.project.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}this.destination.next(t)},n}(ne),Qe="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display),startDatetime,stopDatetime)",Xe=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};R().subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))}));var et,tt,nt=new Ze(null);!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(et||(et={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(tt||(tt={}));var rt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),c}())}}}))},66:()=>{function e(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}System.register(["@openmrs/esm-state"],(function(t,n){var r={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){var t=function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(e){return e&&e.sensitive?"":"i"},r=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){return function(e){if(Array.isArray(e))return r(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 r(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)?r(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.")}()},s=function(t){return n=t.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):e(n,r))?t.matcher:"string"==typeof t.matcher?p(t.matcher):p(t.path);var n,r},u=function(e){return c([e])},c=function(e){var t=l(),n=e.map((function(e){return{matcher:s(e),settings:e}})),r=a(t).concat(a(n));y.setState(r,!0)},l=function(){return y.getState()},f=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},d=function(e,t){if(e.length>0){var n=v(e,t);if(n){for(var r=[n],o=v(e,n.settings.parent);void 0!==o;)r.push(o),o=v(e,o.settings.parent);return r.reverse()}}return[]},h=function(e){return d(l(),e)};function p(r,o,i){return e(r,RegExp)?function(e,t){if(!t)return e;var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return e}(r,o):Array.isArray(r)?function(e,t,r){var o=e.map((function(e){return p(e,t,r).source}));return new RegExp("(?:"+o.join("|")+")",n(r))}(r,o,i):function(e,r,o){return function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,c=o.end,l=void 0===c||c,f=o.encode,d=void 0===f?function(e){return e}:f,h="["+t(o.endsWith||"")+"]|$",p="["+t(o.delimiter||"/#?")+"]",y=u?"^":"",v=0,m=e;v<m.length;v++){var g=m[v];if("string"==typeof g)y+=t(d(g));else{var b=t(d(g.prefix)),w=t(d(g.suffix));if(g.pattern)if(r&&r.push(g),b||w)if("+"===g.modifier||"*"===g.modifier){var _="*"===g.modifier?"?":"";y+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+_}else y+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else y+="("+g.pattern+")"+g.modifier;else y+="(?:"+b+w+")"+g.modifier}}if(l)a||(y+=p+"?"),y+=o.endsWith?"(?="+h+")":"$";else{var S=e[e.length-1],O="string"==typeof S?p.indexOf(S[S.length-1])>-1:void 0===S;a||(y+="(?:"+p+"(?="+h+"))?"),O||(y+="(?="+p+"|"+h+")")}return new RegExp(y,n(o))}(function(e,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(e),o=n.prefixes,i=void 0===o?"./":o,a="[^"+t(n.delimiter||"/#?")+"]+?",s=[],u=0,c=0,l="",f=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var p=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var m=p||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(s.push(l),l=""),s.push({name:y||u++,prefix:m,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var g=p||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(s.push(l),l=""),f("OPEN")){m=h();var b=f("NAME")||"",w=f("PATTERN")||"",_=h();d("CLOSE"),s.push({name:b||(w?u++:""),pattern:b&&!w?a:w,prefix:m,suffix:_,modifier:f("MODIFIER")||""})}else d("END")}}return s}(e,o),r,o)}(r,o,i)}o.r(i),o.d(i,{filterBreadcrumbs:function(){return d},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return h},registerBreadcrumb:function(){return u},registerBreadcrumbs:function(){return c}});var y=(0,o(685).createGlobalStore)("breadcrumbs",[]);function v(e,t){if(t)return function(e,t){return(n=e.filter((function(e){return e.matcher.test(t)})),function(e){if(Array.isArray(e))return e}(n)||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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return f(e,1);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)?f(e,1):void 0}}(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.")}())[0];var n}(e,t)||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=v(e,n.join("/"));if(r)return r}}(e,t)}}(),i}())}}}))},714:()=>{function e(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}System.register(["@openmrs/esm-state","single-spa"],(function(t,n){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){t(function(){"use strict";var t={685:function(e){e.exports=r},645:function(e){e.exports=o}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){var t=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},n=function(e){return function n(r){return 0===arguments.length||t(r)?n:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return t(o)?r:n((function(t){return e(o,t)}));default:return t(o)&&t(i)?r:t(o)?n((function(t){return e(t,i)})):t(i)?n((function(t){return e(o,t)})):e(o,i)}}},o=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n},s=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},u=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},c=function(e,t,n,r){var i=o(e);function a(e,t){return le(e,t,n.slice(),r.slice())}return!s((function(e,t){return!s(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,s){switch(arguments.length){case 0:return o;case 1:return t(i)?o:r((function(t,n){return e(i,t,n)}));case 2:return t(i)&&t(a)?o:t(i)?r((function(t,n){return e(t,a,n)})):t(a)?r((function(t,n){return e(i,t,n)})):n((function(t){return e(i,a,t)}));default:return t(i)&&t(a)&&t(s)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,s)})):t(i)&&t(s)?r((function(t,n){return e(t,a,n)})):t(a)&&t(s)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,s)})):t(a)?n((function(t){return e(i,t,s)})):t(s)?n((function(t){return e(i,a,t)})):e(i,a,s)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)},h=function(e,t,n,r){return e["@@transducer/result"](n[r](Oe(e["@@transducer/step"],e),t))},p=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},y=function(e){return(0,Me.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},v=function(){return(0,Me.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(e){return g(v().getState(),e)},g=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},b=function(){return(0,Me.getGlobalStore)("config-extensions",{configs:{}})},w=function(e,t){var n=Object.assign({},_(b().getState(),e,t));return n.config=ye(["Display conditions","Translation overrides"],n.config),n},_=function(e,t,n){var r,o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},S=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},O=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){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){O(e,t,n[t])}))}return e},E=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},x=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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||P(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.")}()},j=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||P(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.")}()},P=function(e,t){if(e){if("string"==typeof e)return S(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)?S(e,t):void 0}},A=function(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=$(s,e,t);y(s).setState({loaded:!0,config:u})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},k=function(e,t){var n,r,o=(n=F(U(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=x(o.value,2),s=a[0],u=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(u)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=x(d.value,2),y=p[0];V(p[1],s,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return C({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=x(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=v(),s=a.getState(),u={slots:C({},s.slots,i)};fe(s,u)||a.setState(u)},T=function(e,t){var n=function(e,t){var n=Re(ge(e.schemas)),r=j(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=x(s.value,2);n=F([n,Be(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return n}(e,t);Ne.setState({config:n})},M=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=t.mountedExtensions[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=H(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=E(C({},r[c.slotName]),O({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}b().setState({configs:r})},I=function(e,t){He(e,t);var n=pe(t,Ke),r=Ie.getState();Ie.setState({schemas:E(C({},r.schemas),O({},e,n))})},D=function(e,t){He(e,t);var n=pe(t,Ke),r=Ie.getState();r.schemas[e]&&console.warn("Config schema for extension ".concat(e," already exists. If there are multiple extensions with this same name, one will probably crash.")),Ie.setState({schemas:E(C({},r.schemas),O({},e,n))})},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Ie.getState();Ie.setState({providedConfigs:j(n.providedConfigs).concat([{source:t,config:e}])})},N=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=ye(["Display conditions","Translation overrides"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},R=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=e.config;t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},B=function(e,t,n){Z(e,t,n);var r=$e(e,t);return Ue(e,r,n),r},H=function(e,t,n,r,o,i){var a,s,u,c,l=function(e){return x(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=U(o,i),p=K(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==c?c:{},v=F([K(d,h),y]),m=null!=f?f:o.schemas[t];Z(m,v,d);var g=$e(m,v);return Ue(m,g,d),delete g.extensionSlots,g},V=function(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(z(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},U=function(e,t){return j(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},$=function(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=K(e,U(t,n));Z(r,o,e);var i=$e(r,o);return Ue(r,i,e),delete i.extensionSlots,i},K=function(e,t){return F(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},F=function(e){return Ee(pe)({},e)},Z=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e.hasOwnProperty(u)?Ve(f,c,l):"extensionSlots"===u&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}},q=function(e,t,n){t&&W(e,[{Array:xe,Boolean:je,ConceptUuid:Te,Number:Pe,Object:ke,String:Ae,UUID:Te,PersonAttributeTypeUuid:Te,PatientIdentifierTypeUuid:Te}[t]],n)},W=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(n);"string"==typeof u&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(u)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(u)))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},G=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},z=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},Y=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},J=function(e,t){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return Q(e,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){Y(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Q=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},X=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(t,n);o.startsWith(r)?(0,Fe.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return me},configExtensionStore:function(){return Le},configInternalStore:function(){return Ie},defineConfigSchema:function(){return I},defineExtensionConfigSchema:function(){return D},getConfig:function(){return N},getConfigInternal:function(){return R},getConfigStore:function(){return y},getExtensionConfig:function(){return w},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return g},getExtensionSlotsConfigStore:function(){return v},getExtensionsConfigStore:function(){return b},implementerToolsConfigStore:function(){return Ne},inRange:function(){return Ze},interpolateString:function(){return Q},interpolateUrl:function(){return J},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return qe},navigate:function(){return X},oneOf:function(){return Ge},processConfig:function(){return B},provide:function(){return L},temporaryConfigStore:function(){return De},validator:function(){return p},validators:function(){return ze}});var ee="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},te=Object.prototype.toString,ne=function(){return"[object Arguments]"===te.call(arguments)?function(e){return"[object Arguments]"===te.call(e)}:function(e){return u("callee",e)}}(),re=ne,oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ae=function(){return arguments.propertyIsEnumerable("length")}(),se=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1},ue="function"!=typeof Object.keys||ae?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ae&&re(e);for(t in e)!u(t,e)||o&&"length"===t||(r[r.length]=t);if(oe)for(n=ie.length-1;n>=0;)u(t=ie[n],e)&&!se(r,t)&&(r[r.length]=t),n-=1;return r})):n((function(e){return Object(e)!==e?[]:Object.keys(e)})),ce=n((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function le(t,n,r,o){if(ee(t,n))return!0;var i,a,s=ce(t);if(s!==ce(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(s){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===(i=t.constructor,null==(a=String(i).match(/^function (\w*)/))?"":a[1]))return t===n;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":e(t))!=(void 0===n?"undefined":e(n))||!ee(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!ee(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===t)return o[l]===n;l-=1}switch(s){case"Map":return t.size===n.size&&c(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&c(t.values(),n.values(),r.concat([t]),o.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ue(t);if(f.length!==ue(n).length)return!1;var d=r.concat([t]),h=o.concat([n]);for(l=f.length-1;l>=0;){var p=f[l];if(!u(p,n)||!le(n[p],t[p],d,h))return!1;l-=1}return!0}var fe=r((function(e,t){return le(e,t,[],[])})),de=l((function(e,t,n){var r,o={};for(r in t)u(r,t)&&(o[r]=u(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)u(r,n)&&!u(r,o)&&(o[r]=n[r]);return o})),he=l((function e(t,n,r){return de((function(n,r,o){return f(r)&&f(o)?e(t,r,o):t(n,r,o)}),n,r)})),pe=r((function(e,t){return he((function(e,t,n){return n}),e,t)})),ye=r((function(e,t){for(var n={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var a in t)r.hasOwnProperty(a)||(n[a]=t[a]);return n}));function ve(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?ve(e[s],t,n,!0):e[s];return o};switch(ce(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}var me,ge=n((function(e){return null!=e&&"function"==typeof e.clone?e.clone():ve(e,[],[],!0)})),be=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},we=n((function(e){return!!be(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),_e=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Se=r((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))})),Oe=Se,Ce="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Ee=l((function(e,t,n){if("function"==typeof e&&(e=function(e){return new _e(e)}(e)),we(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return h(e,t,n,"fantasy-land/reduce");if(null!=n[Ce])return d(e,t,n[Ce]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return h(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(me||(me={}));var xe=p((function(e){return Array.isArray(e)}),"must be an array"),je=p((function(e){return"boolean"==typeof e}),"must be a boolean"),Pe=p((function(e){return"number"==typeof e}),"must be a number"),Ae=p((function(e){return"string"==typeof e}),"must be a string"),ke=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Te=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Me=i(685),Ie=(0,Me.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),De=(0,Me.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});De.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Le=(0,Me.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Ne=(0,Me.createGlobalStore)("config-implementer-tools",{config:{}});function Re(e){return e.hasOwnProperty("_default")?E(C({},e),{_value:e._default,_source:"default"}):z(e)?Object.keys(e).reduce((function(t,n){return t[n]=Re(e[n]),t}),{}):{}}function Be(e,t){return z(e)?Object.keys(e).reduce((function(n,r){return n[r]=Be(e[r],t),n}),{}):{_value:e,_source:t}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var s,u=function(){var o=s.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!z(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||He(e,a,i);var u=a._elements;if(G(u)&&He(e,u,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(me).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(me).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),u&&y&&![me.Array,me.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Ve(e,t,n){q(n,e._type,t),z(t)?e._type===me.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u];Z(e._elements,c,"".concat(n,".").concat(u))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||Z(e,t,n):e._type===me.Array&&function(e,t,n){if(G(e._elements))for(var r=0;r<t.length;r++)Ve(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;q("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ue(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&W(n,e._validators,t),z(t)){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e._type===me.Object&&e._elements?Ue(e._elements,c,l):Ue(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ue(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}A(Ie.getState(),De.getState()),Ie.subscribe((function(e){return A(e,De.getState())})),De.subscribe((function(e){return A(Ie.getState(),e)})),T(Ie.getState(),De.getState()),Ie.subscribe((function(e){return T(e,De.getState())})),De.subscribe((function(e){return T(Ie.getState(),e)})),k(Ie.getState(),De.getState()),Ie.subscribe((function(e){return k(e,De.getState())})),De.subscribe((function(e){return k(Ie.getState(),e)})),M(Ie.getState(),Le.getState(),De.getState()),Ie.subscribe((function(e){M(e,Le.getState(),De.getState())})),Le.subscribe((function(e){M(Ie.getState(),e,De.getState())})),De.subscribe((function(e){M(Ie.getState(),Le.getState(),e)}));var $e=function(e,t){var n=ge(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,s=function(){var t=a.value,r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&G(i))if(o._type===me.Array&&Array.isArray(r)){var s=r.map((function(e){return $e(i,e)}));n[t]=s}else if(o._type===me.Object){var u=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;r[h]=$e(i,r[h])}}catch(e){c=!0,l=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}}}else if(z(o)){var p=n.hasOwnProperty(t)?r:{};z(p)&&(n[t]=$e(o,p))}},u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)s()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n},Ke={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:me.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:me.Object,_default:{}}},Fe=i(645),Ze=function(e,t){return p((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},qe=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var n=/\${(.*?)}/g,r=n.exec(e);r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+t.map((function(e){return"${"+e+"}"})).join(", "))},We=qe([]),Ge=function(e){return p((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},ze={inRange:Ze,isUrl:We,isUrlWithTemplateParameters:qe,oneOf:Ge}}(),a}())}}}))},674:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){"use strict";var e={728: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){var t=n(e);setTimeout((function(){throw t}))},t=function(){var t=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(t.stack),e(r)}},n=function(e){var t,n,r,o,i;if(n=e,null!=(r=Error)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):(o=n,null!=(i=r)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):o instanceof i))return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t="Object thrown as error: ".concat(JSON.stringify(e))}catch(n){t="Object thrown as error with the following properties: ".concat(Object.keys(e))}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())};r.r(o),r.d(o,{createErrorHandler:function(){return t},reportError:function(){return e}});var i=r(728);window.onerror=function(e){return console.error("Unexpected error: ",e),(0,i.dispatchNotificationShown)({description:null!=e?e:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){var t;console.error("Unhandled rejection: ",e.reason),(0,i.dispatchNotificationShown)({description:null!==(t=e.reason)&&void 0!==t?t:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}}(),o}())}}}))},570:()=>{System.register(["@openmrs/esm-state"],(function(e,t){var n={};return{setters:[function(e){n.getGlobalStore=e.getGlobalStore}],execute:function(){e(function(){"use strict";var e={685: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,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},n=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(n){t(e,n,r[n])}))}return e},i=function(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e},a=function(e,r,o){var a;d.setState((function(s){var u;return{flags:i(n({},s.flags),t({},e,{enabled:null!==(a=null===(u=s.flags[e])||void 0===u?void 0:u.enabled)&&void 0!==a&&a,label:r,description:o}))}}))},s=function(e){return d.getState().flags[e].enabled},u=function(e,t){d.subscribe((function(n){t(n.flags[e].enabled)}))},c=function(e,r){d.setState((function(o){return{flags:i(n({},o.flags),t({},e,i(n({},o.flags[e]),{enabled:r})))}}))};r.r(o),r.d(o,{featureFlagsStore:function(){return d},getFeatureFlag:function(){return s},registerFeatureFlag:function(){return a},setFeatureFlag:function(){return c},subscribeToFeatureFlag:function(){return u}});var l=r(685),f={flags:function(){var e={},t=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(localStorage)[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var s=i.value;if(s.startsWith("openmrs:feature-flag:")){var u=s.replace("openmrs:feature-flag:",""),c=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(u))||"{}");e[u]=n({enabled:"true"===localStorage.getItem(s)},c)}}}catch(e){r=!0,o=e}finally{try{t||null==a.return||a.return()}finally{if(r)throw o}}return e}()},d=(0,l.getGlobalStore)("feature-flags",f);d.subscribe((function(t){var n,r=!0,o=!1,i=void 0;try{for(var a,s=Object.entries(t.flags)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=function(e){if(Array.isArray(e))return e}(n=a.value)||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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(n)||function(t,n){if(t){if("string"==typeof t)return e(t,2);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,2):void 0}}(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.")}(),c=u[0],l=u[1];localStorage.setItem("openmrs:feature-flag:".concat(c),l.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(c),JSON.stringify({label:l.label,description:l.description}))}}catch(t){o=!0,i=t}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}))}(),o}())}}}))},103:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){"use strict";var e=function(e){window.dispatchEvent(new CustomEvent(d,{detail:{online:e}}))},t=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(d,t),function(){return window.removeEventListener(d,t)}},n=function(e){return e({online:navigator.onLine}),t(e)},r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(h,{detail:e}))},o=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},i=function(e){window.dispatchEvent(new CustomEvent(p,{detail:e}))},a=function(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},u=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(y,t),function(){return window.removeEventListener(y,t)}},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},l={d:function(e,t){for(var n in t)l.o(t,n)&&!l.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})}},f={};l.r(f),l.d(f,{dispatchActionableNotificationShown:function(){return a},dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return i},dispatchPrecacheStaticDependencies:function(){return r},subscribeActionableNotificationShown:function(){return u},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return s},subscribePrecacheStaticDependencies:function(){return o},subscribeToastShown:function(){return c}});var d="openmrs:connectivity-changed",h="openmrs:precache-static-dependencies",p="openmrs:notification-shown",y="openmrs:actionable-notification-shown",v="openmrs:toast-shown";return f}())}}}))},45:e=>{"use strict";e.exports=n},740:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o},954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=a},792:e=>{"use strict";e.exports=s}},t={};function u(n){var r=t[n];if(void 0!==r)return r.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,u),o.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return(()=>{"use strict";const e='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n',t='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n',n='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n';var r=document.createElement("div"),o=function(){document.body.appendChild(r)};function i(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,r.appendChild(n))}r.id="omrs-svgs-container",r.style.display="none","complete"===document.readyState?o():window.addEventListener("load",o);var a=u(714),s=u(792);function c(e,t,n){return c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&f(o,n.prototype),o},c.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function d(e){var t="function"==typeof Map?new Map:void 0;return d=function(e){if(null===e||!function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,e)},d(e)}"".concat("/ws/rest/v1/","session"),d(Error),u(674);var h=u(685);(0,h.createGlobalStore)("session",{loaded:!1,session:null});try{self["workbox:window:6.5.3"]&&_()}catch(p){}function p(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function y(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 v(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return y(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}try{self["workbox:core:6.5.3"]&&_()}catch(p){}var m=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function g(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var b=function(e,t){this.type=e,Object.assign(this,t)};function w(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function S(){}var O={type:"SKIP_WAITING"};function C(e,t){if(!t)return e&&e.then?e.then(S):Promise.resolve()}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new m,r.en=new m,r.on=new m,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!g(t.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=t,e.removeEventListener("updatefound",r.cn)):(r.hn=t,r.an.add(t),r.rn.resolve(t)),++r.tn,t.addEventListener("statechange",r.ln)},r.ln=function(e){var t=r.fn,n=e.target,o=n.state,i=n===r.vn,a={sw:n,isExternal:i,originalEvent:e};!i&&r.mn&&(a.isUpdate=!0),r.dispatchEvent(new b(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new b("waiting",a))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(e){var t=r.hn,n=t!==navigator.serviceWorker.controller;r.dispatchEvent(new b("controlling",{isExternal:n,originalEvent:e,sw:t,isUpdate:r.mn})),n||r.on.resolve(t)},r.gn=(o=function(e){var t=e.data,n=e.ports,o=e.source;return w(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new b("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return C(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),w(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&g(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new b("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?C(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return w(this.getSW(),(function(t){return p(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&p(this.fn.waiting,O)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&g(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return w(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(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)}}(r.prototype,o)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=v(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const E="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,x=Object.keys,j=Array.isArray;function P(e,t){return"object"!=typeof t||x(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||E.Promise||(E.Promise=Promise);const A=Object.getPrototypeOf,k={}.hasOwnProperty;function T(e,t){return k.call(e,t)}function M(e,t){"function"==typeof t&&(t=t(A(e))),("undefined"==typeof Reflect?x:Reflect.ownKeys)(t).forEach((n=>{D(e,n,t[n])}))}const I=Object.defineProperty;function D(e,t,n,r){I(e,t,P(n&&T(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function L(e){return{from:function(t){return e.prototype=Object.create(t.prototype),D(e.prototype,"constructor",e),{extend:M.bind(null,e.prototype)}}}}const N=Object.getOwnPropertyDescriptor;function R(e,t){let n;return N(e,t)||(n=A(e))&&R(n,t)}const B=[].slice;function H(e,t,n){return B.call(e,t,n)}function V(e,t){return t(e)}function U(e){if(!e)throw new Error("Assertion Failed")}function $(e){E.setImmediate?setImmediate(e):setTimeout(e,0)}function K(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function F(e,t){if(T(e,t))return e[t];if(!t)return e;if("string"!=typeof t){for(var n=[],r=0,o=t.length;r<o;++r){var i=F(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:F(s,t.substr(a+1))}}function Z(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){U("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Z(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?j(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&T(e,a)||(u=e[a]={}),Z(u,s,n)}}else void 0===n?j(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function q(e){var t={};for(var n in e)T(e,n)&&(t[n]=e[n]);return t}const W=[].concat;function G(e){return W.apply([],e)}const z="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(G([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>E[e])),Y=z.map((e=>E[e]));K(z,(e=>[e,!0]));let J=null;function Q(e){J="undefined"!=typeof WeakMap&&new WeakMap;const t=X(e);return J=null,t}function X(e){if(!e||"object"!=typeof e)return e;let t=J&&J.get(e);if(t)return t;if(j(e)){t=[],J&&J.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(X(e[n]))}else if(Y.indexOf(e.constructor)>=0)t=e;else{const n=A(e);for(var o in t=n===Object.prototype?{}:Object.create(n),J&&J.set(e,t),e)T(e,o)&&(t[o]=X(e[o]))}return t}const{toString:ee}={};function te(e){return ee.call(e).slice(8,-1)}const ne="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",re="symbol"==typeof ne?function(e){var t;return null!=e&&(t=e[ne])&&t.apply(e)}:function(){return null},oe={};function ie(e){var t,n,r,o;if(1===arguments.length){if(j(e))return e.slice();if(this===oe&&"string"==typeof e)return[e];if(o=re(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const ae="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var se="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function ue(e,t){se=e,ce=t}var ce=()=>!0;const le=!new Error("").stack;function fe(){if(le)try{throw fe.arguments,new Error}catch(e){return e}return new Error}function de(e,t){var n=e.stack;return n?(t=t||0,0===n.indexOf(e.name)&&(t+=(e.name+e.message).split("\n").length),n.split("\n").slice(t).filter(ce).map((e=>"\n"+e)).join("")):""}var he=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],pe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(he),ye={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function ve(e,t){this._e=fe(),this.name=e,this.message=t}function me(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function ge(e,t,n,r){this._e=fe(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=me(e,t)}function be(e,t){this._e=fe(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=me(e,t)}L(ve).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+de(this._e,2))}},toString:function(){return this.name+": "+this.message}}),L(ge).from(ve),L(be).from(ve);var we=pe.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const _e=ve;var Se=pe.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=fe(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ye[t]||n,this.inner=null)}return L(r).from(_e),e[t]=r,e}),{});Se.Syntax=SyntaxError,Se.Type=TypeError,Se.Range=RangeError;var Oe=he.reduce(((e,t)=>(e[t+"Error"]=Se[t],e)),{}),Ce=pe.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Se[t]),e)),{});function Ee(){}function xe(e){return e}function je(e,t){return null==e||e===xe?t:function(n){return t(e(n))}}function Pe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Ae(e,t){return e===Ee?t:function(){var n=e.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=t.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Pe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Pe(o,this.onerror):o),void 0!==i?i:n}}function ke(e,t){return e===Ee?t:function(){e.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Pe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Pe(r,this.onerror):r)}}function Te(e,t){return e===Ee?t:function(n){var r=e.apply(this,arguments);P(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var a=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Pe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Pe(i,this.onerror):i),void 0===r?void 0===a?void 0:a:P(r,a)}}function Me(e,t){return e===Ee?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Ie(e,t){return e===Ee?t:function(){var n=e.apply(this,arguments);if(n&&"function"==typeof n.then){for(var r=this,o=arguments.length,i=new Array(o);o--;)i[o]=arguments[o];return n.then((function(){return t.apply(r,i)}))}return t.apply(this,arguments)}}Ce.ModifyError=ge,Ce.DexieError=ve,Ce.BulkError=be;var De={};const[Le,Ne,Re]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,A(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,A(t),e]})(),Be=Ne&&Ne.then,He=Le&&Le.constructor,Ve=!!Re;var Ue=!1,$e=Re?()=>{Re.then(ft)}:E.setImmediate?setImmediate.bind(null,ft):E.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{ft(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(ft,0)},Ke=function(e,t){Qe.push([e,t]),Ze&&($e(),Ze=!1)},Fe=!0,Ze=!0,qe=[],We=[],Ge=null,ze=xe,Ye={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Lt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Lt(e[0],e[1])}catch(e){}}))}},Je=Ye,Qe=[],Xe=0,et=[];function tt(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ee,this._lib=!1;var t=this._PSD=Je;if(se&&(this._stackHolder=fe(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==De)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&it(this,this._value))}this._state=null,this._value=null,++t.ref,ot(this,e)}const nt={get:function(){var e=Je,t=_t;function n(n,r){var o=!e.global&&(e!==Je||t!==_t);const i=o&&!Et();var a=new tt(((t,a)=>{st(this,new rt(It(n,e,o,i),It(r,e,o,i),t,a,e))}));return se&<(a,this),a}return n.prototype=De,n},set:function(e){D(this,"then",e&&e.prototype===De?nt:{get:function(){return e},set:nt.set})}};function rt(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function ot(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&dt();t&&"function"==typeof t.then?ot(e,((e,n)=>{t instanceof tt?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,at(e)),n&&ht()}}),it.bind(null,e))}catch(t){it(e,t)}}function it(e,t){if(We.push(t),null===e._state){var n=e._lib&&dt();t=ze(t),e._state=!1,e._value=t,se&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=R(t,"stack");t._promise=e,D(t,"stack",{get:()=>Ue?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){qe.some((t=>t._value===e._value))||qe.push(e)}(e),at(e),n&&ht()}}function at(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)st(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Xe&&(++Xe,Ke((()=>{0==--Xe&&pt()}),[]))}function st(e,t){if(null!==e._state){var n=e._state?t.onFulfilled:t.onRejected;if(null===n)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++Xe,Ke(ut,[n,e,t])}else e._listeners.push(t)}function ut(e,t,n){try{Ge=t;var r,o=t._value;t._state?r=e(o):(We.length&&(We=[]),r=e(o),-1===We.indexOf(o)&&function(e){for(var t=qe.length;t;)if(qe[--t]._value===e._value)return void qe.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ge=null,0==--Xe&&pt(),--n.psd.ref||n.psd.finalize()}}function ct(e,t,n){if(t.length===n)return t;var r="";if(!1===e._state){var o,i,a=e._value;null!=a?(o=a.name||"Error",i=a.message||a,r=de(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return se&&((r=de(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&ct(e._prev,t,n)),t}function lt(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function ft(){dt()&&ht()}function dt(){var e=Fe;return Fe=!1,Ze=!1,e}function ht(){var e,t,n;do{for(;Qe.length>0;)for(e=Qe,Qe=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Qe.length>0);Fe=!0,Ze=!0}function pt(){var e=qe;qe=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=et.slice(0),n=t.length;n;)t[--n]()}function yt(e){return new tt(De,!1,e)}function vt(e,t){var n=Je;return function(){var r=dt(),o=Je;try{return At(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{At(o,!1),r&&ht()}}}M(tt.prototype,{then:nt,_then:function(e,t){st(this,new rt(null,null,e,t,Je))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):yt(e))):this.then(null,(e=>e&&e.name===t?n(e):yt(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),yt(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Ue=!0;var e=ct(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Ue=!1}}},timeout:function(e,t){return e<1/0?new tt(((n,r)=>{var o=setTimeout((()=>r(new Se.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&D(tt.prototype,Symbol.toStringTag,"Dexie.Promise"),Ye.env=kt(),M(tt,{all:function(){var e=ie.apply(null,arguments).map(xt);return new tt((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>tt.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof tt)return e;if(e&&"function"==typeof e.then)return new tt(((t,n)=>{e.then(t,n)}));var t=new tt(De,!0,e);return lt(t,Ge),t},reject:yt,race:function(){var e=ie.apply(null,arguments).map(xt);return new tt(((t,n)=>{e.map((e=>tt.resolve(e).then(t,n)))}))},PSD:{get:()=>Je,set:e=>Je=e},totalEchoes:{get:()=>_t},newPSD:Ot,usePSD:Tt,scheduler:{get:()=>Ke,set:e=>{Ke=e}},rejectionMapper:{get:()=>ze,set:e=>{ze=e}},follow:(e,t)=>new tt(((n,r)=>Ot(((t,n)=>{var r=Je;r.unhandleds=[],r.onunhandled=n,r.finalize=Pe((function(){!function(e){et.push((function t(){e(),et.splice(et.indexOf(t),1)})),++Xe,Ke((()=>{0==--Xe&&pt()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),He&&(He.allSettled&&D(tt,"allSettled",(function(){const e=ie.apply(null,arguments).map(xt);return new tt((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>tt.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),He.any&&"undefined"!=typeof AggregateError&&D(tt,"any",(function(){const e=ie.apply(null,arguments).map(xt);return new tt(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>tt.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const mt={awaits:0,echoes:0,id:0};var gt=0,bt=[],wt=0,_t=0,St=0;function Ot(e,t,n,r){var o=Je,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++St;var a=Ye.env;i.env=Ve?{Promise:tt,PromiseProp:{value:tt,configurable:!0,writable:!0},all:tt.all,race:tt.race,allSettled:tt.allSettled,any:tt.any,resolve:tt.resolve,reject:tt.reject,nthen:Dt(a.nthen,i),gthen:Dt(a.gthen,i)}:{},t&&P(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Tt(i,e,n,r);return 0===i.ref&&i.finalize(),s}function Ct(){return mt.id||(mt.id=++gt),++mt.awaits,mt.echoes+=100,mt.id}function Et(){return!!mt.awaits&&(0==--mt.awaits&&(mt.id=0),mt.echoes=100*mt.awaits,!0)}function xt(e){return mt.echoes&&e&&e.constructor===He?(Ct(),e.then((e=>(Et(),e)),(e=>(Et(),Nt(e))))):e}function jt(e){++_t,mt.echoes&&0!=--mt.echoes||(mt.echoes=mt.id=0),bt.push(Je),At(e,!0)}function Pt(){var e=bt[bt.length-1];bt.pop(),At(e,!1)}function At(e,t){var n=Je;if((t?!mt.echoes||wt++&&e===Je:!wt||--wt&&e===Je)||Mt(t?jt.bind(null,e):Pt),e!==Je&&(Je=e,n===Ye&&(Ye.env=kt()),Ve)){var r=Ye.env.Promise,o=e.env;Ne.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(E,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function kt(){var e=E.Promise;return Ve?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(E,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Ne.then,gthen:e.prototype.then}:{}}function Tt(e,t,n,r,o){var i=Je;try{return At(e,!0),t(n,r,o)}finally{At(i,!1)}}function Mt(e){Be.call(Le,e)}function It(e,t,n,r){return"function"!=typeof e?e:function(){var o=Je;n&&Ct(),At(t,!0);try{return e.apply(this,arguments)}finally{At(o,!1),r&&Mt(Et)}}}function Dt(e,t){return function(n,r){return e.call(this,It(n,t),It(r,t))}}function Lt(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(E.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),P(r,o)):E.CustomEvent&&P(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&E.dispatchEvent&&(dispatchEvent(r),!E.PromiseRejectionEvent&&E.onunhandledrejection))try{E.onunhandledrejection(r)}catch(e){}se&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+Be).indexOf("[native code]")&&(Ct=Et=Ee);var Nt=tt.reject;function Rt(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Je.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===we.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Rt(e,t,n,r)))):Nt(o)}return o._promise(t,((e,t)=>Ot((()=>(Je.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return Nt(new Se.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Nt(new Se.DatabaseClosed);e.open().catch(Ee)}return e._state.dbReadyPromise.then((()=>Rt(e,t,n,r)))}const Bt=String.fromCharCode(65535),Ht="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Vt=[],Ut="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),$t=Ut,Kt=Ut,Ft=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Zt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const qt={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Wt(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Q(t))[e],t)}class Gt{_trans(e,t,n){const r=this._tx||Je.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Se.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=dt();try{return r&&r.db===this.db?r===Je.trans?r._promise(e,i,n):Ot((()=>r._promise(e,i,n)),{trans:r,transless:Je.transless||Je}):Rt(this.db,e,[this.name],i)}finally{a&&ht()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(j(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=x(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==Bt)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&se&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Zt(n,a&&a.multi?e=>{const t=F(e,o);return j(t)&&t.some((e=>i(s,e)))}:e=>i(s,F(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,j(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(T(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){P(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Wt(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?tt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Z(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||j(e))return this.where(":id").equals(e).modify(t);{const n=F(e,this.schema.primKey.keyPath);if(void 0===n)return Nt(new Se.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?x(t).forEach((n=>{Z(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Wt(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?tt.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Z(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?tt.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:qt}))).then((e=>e.numFailures?tt.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Se.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Se.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Wt(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new be(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Se.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Se.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Wt(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new be(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new be(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function zt(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){x(e).forEach((function(t){var n=e[t];if(j(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Se.InvalidArgument("Invalid event config");var r=i(t,xe,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){$((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=Me),o||(o=Ee);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}}function Yt(e,t){return L(t).from({prototype:e}),t}function Jt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Qt(e,t){e.filter=Zt(e.filter,t)}function Xt(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Zt(r(),t()):t,e.justLimit=n&&!r}function en(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Se.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function tn(e,t,n){const r=en(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function nn(e,t,n,r){const o=e.replayFilter?Zt(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),T(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),rn(tn(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return rn(tn(e,r,n),Zt(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function rn(e,t,n,r){var o=vt(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=Ee}),(t=>{e.fail(t),n=Ee}))||o(e.value,e,(e=>n=e)),n()}))}))}function on(e,t){try{const n=an(e),r=an(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(sn(e),sn(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=on(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function an(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=te(e);return"ArrayBuffer"===n?"binary":n}function sn(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class un{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,Nt.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,Nt.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Zt(t.algorithm,e)}_iterate(e,t){return nn(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&P(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>nn(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Jt(t,!0))return n.count({trans:e,query:{index:en(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return nn(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Jt(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=en(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return nn(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Jt(t)?Xt(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Xt(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Xt(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Qt(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Qt(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Zt(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Jt(t,!0)&&t.limit>0)return this._read((e=>{var n=en(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Qt(this._ctx,(function(e){var t=e.primaryKey.toString(),r=T(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=x(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];F(t,a)!==s&&(Z(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,c=this.db._options.modifyChunkSize||200,l=[];let f=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of x(n))l.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=l=>{const f=Math.min(c,o.length-l);return a.getMany({trans:n,keys:o.slice(l,l+f),cache:"immutable"}).then((d=>{const p=[],y=[],v=s?[]:null,m=[];for(let e=0;e<f;++e){const t=d[e],n={value:Q(t),primKey:o[l+e]};!1!==r.call(n,n.value,n)&&(null==n.value?m.push(o[l+e]):s||0===on(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[l+e])):(m.push(o[l+e]),p.push(n.value)))}const g=Jt(t)&&t.limit===1/0&&("function"!=typeof e||e===cn)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)m.splice(parseInt(t),1);h(p.length,e)}))).then((()=>(y.length>0||g&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:g,changeSpec:"function"!=typeof e&&e}).then((e=>h(y.length,e))))).then((()=>(m.length>0||g&&e===cn)&&a.mutate({trans:n,type:"delete",keys:m,criteria:g}).then((e=>h(m.length,e))))).then((()=>o.length>l+f&&i(l+c)))}))};return i(0).then((()=>{if(l.length>0)throw new ge("Error modifying one or more objects",l,f,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Jt(e)&&(e.isPrimKey&&!Kt||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new ge("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(cn)}}const cn=(e,t)=>t.value=null;function ln(e,t){return e<t?-1:e===t?0:1}function fn(e,t){return e>t?-1:e===t?0:1}function dn(e,t,n){var r=e instanceof gn?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function hn(e){return new e.Collection(e,(()=>mn(""))).limit(0)}function pn(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var c=t[u];if(c!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],c)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function yn(e,t,n,r){var o,i,a,s,u,c,l,f=n.length;if(!n.every((e=>"string"==typeof e)))return dn(e,"String expected.");function d(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?ln:fn;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),c=e,l="next"===e?"":r}d("next");var h=new e.Collection(e,(()=>vn(s[0],u[f-1]+r)));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,u,p))return!0;for(var h=null,y=p;y<f;++y){var v=pn(o,d,s[y],u[y],a,c);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+l)}:r),!1})),h}function vn(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function mn(e){return{type:1,lower:e,upper:e}}class gn{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?hn(this):new this.Collection(this,(()=>vn(e,t,!n,!r)))}catch(e){return dn(this,Ht)}}equals(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>mn(e)))}above(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(e,void 0,!0)))}aboveOrEqual(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(e,void 0,!1)))}below(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?dn(this,Ht):new this.Collection(this,(()=>vn(void 0,e)))}startsWith(e){return"string"!=typeof e?dn(this,"String expected."):this.between(e,e+Bt,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):yn(this,((e,t)=>0===e.indexOf(t[0])),[e],Bt)}equalsIgnoreCase(e){return yn(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=ie.apply(oe,arguments);return 0===e.length?hn(this):yn(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=ie.apply(oe,arguments);return 0===e.length?hn(this):yn(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,Bt)}anyOf(){const e=ie.apply(oe,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return dn(this,Ht)}if(0===e.length)return hn(this);const n=new this.Collection(this,(()=>vn(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=ie.apply(oe,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return dn(this,Ht)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return hn(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return dn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Se.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let c,l=r;function f(e,t){return l(e[0],t[0])}try{c=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),c.sort(f)}catch(e){return dn(this,Ht)}let d=0;const h=u?e=>r(e,c[d][1])>0:e=>r(e,c[d][1])>=0,p=s?e=>o(e,c[d][0])>0:e=>o(e,c[d][0])>=0;let y=h;const v=new this.Collection(this,(()=>vn(c[0][0],c[c.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=h,l=r):(y=p,l=o),c.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++d,d===c.length)return t(n),!1;return!!function(e){return!h(e)&&!p(e)}(o)||(0===this._cmp(o,c[d][1])||0===this._cmp(o,c[d][0])||t((()=>{l===r?e.continue(c[d][0]):e.continue(c[d][1])})),!1)})),v}startsWithAnyOf(){const e=ie.apply(oe,arguments);return e.every((e=>"string"==typeof e))?0===e.length?hn(this):this.inAnyRange(e.map((e=>[e,e+Bt]))):dn(this,"startsWithAnyOf() only works with strings")}}function bn(e){return vt((function(t){return wn(t),e(t.target.error),!1}))}function wn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const _n=zt(null,"storagemutated");class Sn{_lock(){return U(!Je.global),++this._reculock,1!==this._reculock||Je.global||(Je.lockOwnerFor=this),this}_unlock(){if(U(!Je.global),0==--this._reculock)for(Je.global||(Je.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Tt(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Je.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(U(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Se.DatabaseClosed(n);case"MissingAPIError":throw new Se.MissingAPI(n.message,n);default:throw new Se.OpenFailed(n)}if(!this.active)throw new Se.TransactionInactive;return U(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=vt((t=>{wn(t),this._reject(e.error)})),e.onabort=vt((t=>{wn(t),this.active&&this._reject(new Se.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=vt((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&_n.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return Nt(new Se.ReadOnly("Transaction is readonly"));if(!this.active)return Nt(new Se.TransactionInactive);if(this._locked())return new tt(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Je])}));if(n)return Ot((()=>{var e=new tt(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new tt(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=tt.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new tt(((e,r)=>{n.then((n=>t._waitingQueue.push(vt(e.bind(null,n)))),(e=>t._waitingQueue.push(vt(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Se.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(T(t,e))return t[e];const n=this.schema[e];if(!n)throw new Se.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function On(e,t,n,r,o,i,a){return{name:e,keyPath:t,unique:n,multi:r,auto:o,compound:i,src:(n&&!a?"&":"")+(r?"*":"")+(o?"++":"")+Cn(t)}}function Cn(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function En(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:K(n,(e=>[e.name,e]))}}let xn=e=>{try{return e.only([[]]),xn=()=>[[]],[[]]}catch(e){return xn=()=>Bt,Bt}};function jn(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>F(t,e)}(e):t=>F(t,e)}function Pn(e){return[].slice.call(e)}let An=0;function kn(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function Tn({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Pn(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=j(t),o=null==t,i={},a={name:e.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:t,autoIncrement:n,unique:!0,extractKey:jn(t)},indexes:Pn(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:j(o),keyPath:o,unique:n,multiEntry:r,extractKey:jn(o)};return i[kn(o)]=a,a})),getIndexByKeyPath:e=>i[kn(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[kn(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=vt(s);const c=e.objectStore(t),l=null==c.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:d}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const p=[],y=[];let v=0;const m=e=>{++v,wn(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(h=c.clear()):p.push(h=c.delete(r(a)))}else{const[e,t]=f?l?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<d;++r)p.push(h=t&&void 0!==t[r]?c[n](e[r],t[r]):c[n](e[r])),h.onerror=m;else for(let t=0;t<d;++t)p.push(h=c[n](e[t])),h.onerror=m}const g=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};h.onerror=e=>{m(e),g(e)},h.onsuccess=g}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=vt(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,c=0,l=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++l===c&&r(s)},d=bn(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=d,++c);0===c&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=vt(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=bn(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=vt(o);const{trans:a,values:s,limit:u,query:c}=n,l=u===1/0?void 0:u,{index:f,range:d}=c,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,l):p.getAllKeys(y,l);e.onsuccess=e=>o({result:e.target.result}),e.onerror=bn(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=bn(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=vt(s);const{index:c,range:l}=o,f=e.objectStore(t),d=c.isPrimaryKey?f:f.index(c.name),h=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(r(l),h):d.openKeyCursor(r(l),h);p.onerror=bn(u),p.onsuccess=vt((t=>{const n=p.result;if(!n)return void s(null);n.___id=++An,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=vt(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=vt(e),p.onerror=bn(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=vt((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),c=r(i),l=c?u.count(c):u.count();l.onsuccess=vt((t=>e(t.target.result))),l.onerror=bn(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:xn(t),schema:o}}(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Mn({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=R(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?D(t,n,{get(){return this.table(n)},set(e){I(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function In({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Dn(e,t){return e._cfg.version-t._cfg.version}function Ln(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ut)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function Nn(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>Rn(o,e))),o}function Rn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Bn(e,t,n){const r={};return H(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=On(Cn(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=On(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=En(e,i,a)})),r}function Hn({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+H(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&E.WorkerGlobalScope&&E instanceof E.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class Vn{_parseStoresSpec(e,t){x(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return On(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),j(r),0===t)})),o=r.shift();if(o.multi)throw new Se.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Se.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Se.Schema("Index must have a name and cannot be an empty string")})),t[n]=En(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?P(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{P(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,In(t,[t._allTables,t,t.Transaction.prototype]),Mn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],x(o),o),t._storeNames=x(o),this}upgrade(e){return this._cfg.contentUpgrade=Ie(this._cfg.contentUpgrade||Ee,e),this}}function Un(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ur("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function $n(e){return e&&"function"==typeof e.databases}function Kn(e){return Ot((function(){return Je.letThrough=!0,e()}))}function Fn(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Zn(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):j(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function qn(e,t,n){var r=arguments.length;if(r<2)throw new Se.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,G(o),n]}function Wn(e,t,n,r,o){return tt.resolve().then((()=>{const i=Je.transless||Je,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===we.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Wn(e,t,n,null,o)))):Nt(r)}const u=ae(o);let c;u&&Ct();const l=tt.follow((()=>{if(c=o.call(a,a),c)if(u){var e=Et.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=Zn(c))}),s);return(c&&"function"==typeof c.then?tt.resolve(c).then((e=>a.active?e:Nt(new Se.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):l.then((()=>c))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),Nt(e))))}))}function Gn(e,t,n){const r=j(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const zn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=kn(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,c=t>0,l={...n,isVirtual:c,keyTail:t,keyLength:u,extractKey:jn(e),unique:!c&&n.unique};return s.push(l),l.isPrimaryKey||i.push(l),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),l}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Gn(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Gn(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const c={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[kn(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Gn(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Gn(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return c}}}};function Yn(e,t,n,r){return n=n||{},r=r||"",x(e).forEach((o=>{if(T(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=te(i);e!==te(a)?n[r+o]=t[o]:"Object"===e?Yn(i,a,n,r+o+"."):i!==a&&(n[r+o]=t[o])}else i!==a&&(n[r+o]=t[o])}else n[r+o]=void 0})),x(t).forEach((o=>{T(e,o)||(n[r+o]=t[o])})),n}const Jn={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=Je.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===Ee)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===Ee&&s.fire===Ee)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===Ee)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===Ee)break;return o._promise("readwrite",(()=>function(e){return c(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Je.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const c=o.map(((n,o)=>{const c=u[o],l={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(l,n,c,t);else if("add"===e.type||void 0===c){const i=a.fire.call(l,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||Z(e.values[o],r.keyPath,n))}else{const r=Yn(c,e.values[o]),i=s.fire.call(l,r,n,c,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{T(t,e)?t[e]=i[e]:Z(t,e,i[e])}))}}return l}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=c[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(c.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function c(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:c(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Qn(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===on(t.keys[o],e[i])&&(r.push(n?Q(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Xn={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Qn(e.keys,e.trans._cache,"clone"===e.cache);return t?tt.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Q(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function er(e){return!("from"in e)}const tr=function(e,t){if(!this){const t=new tr;return e&&"d"in e&&P(t,e),t}P(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function nr(e,t,n){const r=on(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(er(e))return P(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(on(n,e.from)<0)return o?nr(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},ir(e);if(on(t,e.to)>0)return i?nr(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},ir(e);on(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),on(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&rr(e,o),i&&a&&rr(e,i)}function rr(e,t){er(t)||function e(t,{from:n,to:r,l:o,r:i}){nr(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function or(e){let t=er(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&on(e,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!n||on(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function ir(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=ar(n)}e.d=ar(e)}function ar({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}M(tr.prototype,{add(e){return rr(this,e),this},addKey(e){return nr(this,e,e),this},addKeys(e){return e.forEach((e=>nr(this,e,e))),this},[ne](){return or(this)}});const sr={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new tr(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,c={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new tr)},c=u(""),l=u(":dels"),{type:f}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return o.mutate(e).then((e=>{if(j(d)){"delete"!==f&&(d=e.results),c.addKeys(d);const t=Qn(d,p);t||"add"===f||l.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&j(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==on(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};l.add(e),c.add(e)}else c.add(n),l.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},l=({query:{index:t,range:n}})=>{var r,o;return[t,new tr(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new tr(e.key)],getMany:e=>[a,(new tr).addKeys(e.keys)],count:l,query:l,openCursor:l};return x(f).forEach((e=>{c[e]=function(i){const{subscr:a}=Je;if(a){const c=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new tr)},l=c(""),d=c(":dels"),[h,p]=f[e](i);if(c(h.name||"").add(p),!h.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(l.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?l.addKeys(e):d.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(d.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return d.addKey(t),t}},value:{get:()=>(t&&l.addKey(e.primaryKey),e.value)}})}return n}))}d.add(n)}}return o[e].apply(this,arguments)}})),c}}}};class ur{constructor(e,t){this._middlewares={},this.verno=0;const n=ur.dependencies;this._options=t={addons:ur.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ee,dbReadyPromise:null,cancelOpen:Ee,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new tt((e=>{o.dbReadyResolve=e})),o.openCanceller=new tt(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=zt(this,"populate","blocked","versionchange","close",{ready:[Ie,Ee]}),this.on.ready.subscribe=V(this.on.ready.subscribe,(e=>(t,n)=>{ur.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||tt.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,Yt(un.prototype,(function(e,t){this.db=i;let n=qt,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==xe?s:null}}))),this.Table=function(e){return Yt(Gt.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:zt(null,{creating:[Ae,Ee],reading:[je,xe],updating:[Te,Ee],deleting:[ke,Ee]})}))}(this),this.Transaction=function(e){return Yt(Sn.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=zt(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new tt(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),Nt(e)}))}))}(this),this.Version=function(e){return Yt(Vn.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return Yt(gn.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Se.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=xn(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Vt.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(zn),this.use(Jn),this.use(sr),this.use(Xn),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new Se.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Se.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Dn),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Je.letThrough||this._vip)?e():new tt(((e,t)=>{if(this._state.openComplete)return t(new Se.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Se.DatabaseClosed);this.open().catch(Ee)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?Nt(t.dbOpenError):e));se&&(t.openCanceller._stackHolder=fe()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Se.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return tt.race([r,("undefined"==typeof navigator?tt.resolve():Fn()).then((()=>new tt(((r,i)=>{if(o(),!n)throw new Se.MissingAPI;const u=e.name,c=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!c)throw new Se.MissingAPI;c.onerror=bn(i),c.onblocked=vt(e._fireOnBlocked),c.onupgradeneeded=vt((r=>{if(a=c.transaction,t.autoSchema&&!e._options.allowEmptyDB){c.onerror=wn,a.abort(),c.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=vt((()=>{i(new Se.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=bn(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=c.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=Je.transless||Je;Ot((()=>{Je.trans=i,Je.transless=s,0===t?(x(o).forEach((e=>{Nn(n,e,o[e].primKey,o[e].indexes)})),Tn(e,n),tt.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=Bn(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;Hn(e,o,r),Hn(e,u,r),a=e._dbSchema=u;const c=Ln(o,u);c.add.forEach((e=>{Nn(r,e[0],e[1].primKey,e[1].indexes)})),c.change.forEach((e=>{if(e.recreate)throw new Se.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>Rn(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Rn(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const l=i._cfg.contentUpgrade;if(l&&i._cfg.version>t){Tn(e,r),n._memoizedTables={},s=!0;let t=q(u);c.del.forEach((e=>{t[e]=o[e]})),In(e,[e.Transaction.prototype]),Mn(e,[e.Transaction.prototype],x(t),t),n.schema=t;const i=ae(l);let a;i&&Ct();const f=tt.follow((()=>{if(a=l(n),a&&i){var e=Et.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?tt.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&$t||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),In(e,[e.Transaction.prototype]),Mn(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?tt.resolve(o.shift()(n.idbtrans)).then(e):tt.resolve()}().then((()=>{var e,t;t=r,x(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||Nn(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),c.onsuccess=vt((()=>{a=null;const n=e._novip.idbdb=c.result,o=H(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Bn(0,t,n);e._storeNames=H(t.objectStoreNames,0),Mn(e,[e._allTables],x(r),r)}(e,n,r):(Hn(e,e._dbSchema,r),function(e,t){const n=Ln(Bn(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Tn(e,r)}catch(e){}var i;Vt.push(e),n.onversionchange=vt((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=vt((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!$n(e)&&"__dbnames"!==n&&Un(e,t).put({name:n}).catch(Ee)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],tt.resolve(Kn((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Ie,Ee);return t.onReadyBeingFired=[],tt.resolve(Kn((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),Nt(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=Vt.indexOf(this);if(t>=0&&Vt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new tt((t=>{e.dbReadyResolve=t})),e.openCanceller=new tt(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Se.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new tt(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=vt((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!$n(e)&&"__dbnames"!==n&&Un(e,t).delete(n).catch(Ee)}(this._deps,this.name),n()})),e.onerror=bn(r),e.onblocked=this._fireOnBlocked};if(e)throw new Se.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return x(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=qn.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Je.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Se.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Se.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Se.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):Nt(e)}const s=Wn.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):Je.trans?Tt(Je.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!T(this._allTables,e))throw new Se.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const cr="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class lr{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[cr](){return this}}function fr(e,t){return x(t).forEach((n=>{rr(e[n]||(e[n]=new tr),t[n])})),e}let dr;try{dr={indexedDB:E.indexedDB||E.mozIndexedDB||E.webkitIndexedDB||E.msIndexedDB,IDBKeyRange:E.IDBKeyRange||E.webkitIDBKeyRange}}catch(v){dr={indexedDB:null,IDBKeyRange:null}}const hr=ur;function pr(e){let t=yr;try{yr=!0,_n.storagemutated.fire(e)}finally{yr=t}}M(hr,{...Ce,delete:e=>new hr(e,{addons:[]}).delete(),exists:e=>new hr(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return $n(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Un(e,t).toCollection().primaryKeys()}(hr.dependencies).then(e)}catch(e){return Nt(new Se.MissingAPI)}},defineClass:()=>function(e){P(this,e)},ignoreTransaction:e=>Je.trans?Tt(Je.transless,e):e(),vip:Kn,async:function(e){return function(){try{var t=Zn(e.apply(this,arguments));return t&&"function"==typeof t.then?t:tt.resolve(t)}catch(e){return Nt(e)}}},spawn:function(e,t,n){try{var r=Zn(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:tt.resolve(r)}catch(e){return Nt(e)}},currentTransaction:{get:()=>Je.trans||null},waitFor:function(e,t){const n=tt.resolve("function"==typeof e?hr.ignoreTransaction(e):e).timeout(t||6e4);return Je.trans?Je.trans.waitFor(n):n},Promise:tt,debug:{get:()=>se,set:e=>{ue(e,"dexie"===e?()=>!0:Ft)}},derive:L,extend:P,props:M,override:V,Events:zt,on:_n,liveQuery:function(e){return new lr((t=>{const n=ae(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,_n.storagemutated.unsubscribe(l)}};t.start&&t.start(a);let s=!1,u=!1;function c(){return x(i).some((e=>o[e]&&function(e,t){const n=or(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=or(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(on(s.from,o.to)<=0&&on(s.to,o.from)>=0)return!0;on(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const l=e=>{fr(o,e),c()&&f()},f=()=>{if(s||r)return;o={};const d={},h=function(t){n&&Ct();const r=()=>Ot(e,{subscr:t,trans:null}),o=Je.trans?Tt(Je.transless,r):r();return n&&o.then(Et,Et),o}(d);u||(_n("storagemutated",l),u=!0),s=!0,Promise.resolve(h).then((e=>{s=!1,r||(c()?f():(o={},i=d,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:fr,getByKeyPath:F,setByKeyPath:Z,delByKeyPath:function(e,t){"string"==typeof t?Z(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Z(e,t,void 0)}))},shallowClone:q,deepClone:Q,getObjectDiff:Yn,cmp:on,asap:$,minKey:-1/0,addons:[],connections:Vt,errnames:we,dependencies:dr,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),hr.maxKey=xn(hr.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(_n("storagemutated",(e=>{if(!yr){let t;Ut?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),yr=!0,dispatchEvent(t),yr=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{yr||pr(e)})));let yr=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),_n("storagemutated",(t=>{yr||e.postMessage(t)})),e.onmessage=e=>{e.data&&pr(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){_n("storagemutated",(e=>{try{yr||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&pr(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&pr(e.changedParts)}))}tt.rejectionMapper=function(e,t){if(!e||e instanceof ve||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Oe[e.name])return e;var n=new Oe[e.name](t||e.message,e);return"stack"in e&&D(n,"stack",{get:function(){return this.inner.stack}}),n},ue(se,Ft);var vr=u(641);function mr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function br(e){return br=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},br(e)}function wr(e,t){return wr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wr(e,t)}function _r(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=br(e);if(t){var o=br(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?mr(e):t;var n}(this,n)}}new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wr(e,t)}(n,e);var t=_r(n);function n(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),gr(mr(e=t.call(this,"EsmOffline")),"syncQueue",void 0),gr(mr(e),"dynamicOfflineData",void 0),e.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),e.syncQueue=e.table("syncQueue"),e.dynamicOfflineData=e.table("dynamicOfflineData"),e}return n}(ur)),(0,h.createGlobalStore)("offline-synchronization",{}),(0,h.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});var Sr,Or,Cr,Er=function(){try{return JSON.parse(localStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function xr(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(0,h.getGlobalStore)("visit",Er).subscribe((function(e){var t;t=e,localStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))})),new s.BehaviorSubject(null),function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(Sr||(Sr={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Or||(Or={})),u(66),function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(Cr||(Cr={}));var jr=Object.freeze({__proto__:null,get start(){return ui},get ensureJQuerySupport(){return Ro},get setBootstrapMaxTime(){return go},get setMountMaxTime(){return bo},get setUnmountMaxTime(){return wo},get setUnloadMaxTime(){return _o},get registerApplication(){return Go},get unregisterApplication(){return Yo},get getMountedApps(){return Zo},get getAppStatus(){return Wo},get unloadApplication(){return Jo},get checkActivityFunctions(){return zo},get getAppNames(){return qo},get pathToActiveWhen(){return ei},get navigateToUrl(){return Ao},get triggerAppChange(){return oi},get addErrorHandler(){return Dr},get removeErrorHandler(){return Lr},get mountRootParcel(){return ho},get NOT_LOADED(){return Br},get LOADING_SOURCE_CODE(){return Hr},get NOT_BOOTSTRAPPED(){return Vr},get BOOTSTRAPPING(){return Ur},get NOT_MOUNTED(){return $r},get MOUNTING(){return Kr},get UPDATING(){return Zr},get LOAD_ERROR(){return Wr},get MOUNTED(){return Fr},get UNMOUNTING(){return qr},get SKIP_BECAUSE_BROKEN(){return Gr}});function Pr(e){return(Pr="function"==typeof Symbol&&"symbol"==xr(Symbol.iterator)?function(e){return void 0===e?"undefined":xr(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":xr(e)})(e)}function Ar(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kr=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==u.g?u.g:"undefined"!=typeof self?self:{}).CustomEvent,Tr=function(){try{var e=new kr("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?kr:"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},Mr=[];function Ir(e,t,n){var r=Rr(e,t,n);Mr.length?Mr.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function Dr(e){if("function"!=typeof e)throw Error(Nr(28,!1));Mr.push(e)}function Lr(e){if("function"!=typeof e)throw Error(Nr(29,!1));var t=!1;return Mr=Mr.filter((function(n){var r=n===e;return t=t||r,!r})),t}function Nr(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 Rr(e,t,n){var r,o,i,a="".concat(Xr(t)," '").concat(Jr(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(Nr(30,!1,t.status,Jr(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=Jr(t),t.status=n,r}var Br="NOT_LOADED",Hr="LOADING_SOURCE_CODE",Vr="NOT_BOOTSTRAPPED",Ur="BOOTSTRAPPING",$r="NOT_MOUNTED",Kr="MOUNTING",Fr="MOUNTED",Zr="UPDATING",qr="UNMOUNTING",Wr="LOAD_ERROR",Gr="SKIP_BECAUSE_BROKEN";function zr(e){return e.status===Fr}function Yr(e){try{return e.activeWhen(window.location)}catch(t){return Ir(t,e,Gr),!1}}function Jr(e){return e.name}function Qr(e){return Boolean(e.unmountThisParcel)}function Xr(e){return Qr(e)?"parcel":"application"}function eo(){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 to(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function no(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!to(t,(function(e){return"function"!=typeof e}))));var t}function ro(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=Xr(e),o=Jr(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return oo(n)?n:Promise.reject(Nr(15,!1,r,o,t,a))}))}),Promise.resolve())}}function oo(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function io(e,t){var n=function(){return e.status=$r,e};return Promise.resolve().then((function(){return e.status!==Vr?e:(e.status=Ur,e.bootstrap?So(e,"bootstrap").then(n).catch((function(n){if(t)throw Rr(n,e,Gr);return Ir(n,e,Gr),e})):Promise.resolve().then(n))}))}function ao(e,t){return Promise.resolve().then((function(){var n=function(){return So(e,"unmount").then((function(){e.status=$r})).catch((function(n){if(t)throw Rr(n,e,Gr);Ir(n,e,Gr)}))};if(e.status!==Fr)return e;e.status=qr;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 Rr(n,e,Gr);Ir(n,e,Gr)}))})).then((function(){return e}))}))}var so=!1,uo=!1;function co(e,t){return Promise.resolve().then((function(){return e.status!==$r?e:(so||(window.dispatchEvent(new Tr("single-spa:before-first-mount")),so=!0),So(e,"mount").then((function(){return e.status=Fr,uo||(window.dispatchEvent(new Tr("single-spa:first-mount")),uo=!0),e})).catch((function(n){var r=function(){if(t)throw Rr(n,e,Gr);return Ir(n,e,Gr),e};return e.status=Fr,ao(e,!0).then(r,r)})))}))}var lo=0,fo={parcels:{}};function ho(){return po.apply(fo,arguments)}function po(e,t){var n=this;if(!e||"object"!==Pr(e)&&"function"!=typeof e)throw Error(Nr(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(Nr(3,!1,Pr(e.name)));if("object"!==Pr(t))throw Error(Nr(4,!1,name,Pr(t)));if(!t.domElement)throw Error(Nr(5,!1,name));var r,o=lo++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?Hr:Vr,customProps:t,parentName:Jr(n),unmountThisParcel:function(){return d.then((function(){if(s.status!==Fr)throw Error(Nr(6,!1,name,s.status));return ao(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return c(e),e})).catch((function(e){throw s.status=Gr,l(e),e}))}};n.parcels[o]=s;var u=a();if(!u||"function"!=typeof u.then)throw Error(Nr(7,!1));var c,l,f=(u=u.then((function(e){if(!e)throw Error(Nr(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!no(e.bootstrap))throw Error(Nr(9,!1,t));if(!no(e.mount))throw Error(Nr(10,!1,t));if(!no(e.unmount))throw Error(Nr(11,!1,t));if(e.update&&!no(e.update))throw Error(Nr(12,!1,t));var n=ro(e,"bootstrap"),i=ro(e,"mount"),a=ro(e,"unmount");s.status=Vr,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=Oo(e.timeouts),e.update&&(s.update=ro(e,"update"),r.update=function(e){return s.customProps=e,yo(function(e){return Promise.resolve().then((function(){if(e.status!==Fr)throw Error(Nr(32,!1,Jr(e)));return e.status=Zr,So(e,"update").then((function(){return e.status=Fr,e})).catch((function(t){throw Rr(t,e,Gr)}))}))}(s))})}))).then((function(){return io(s,!0)})),d=f.then((function(){return co(s,!0)})),h=new Promise((function(e,t){c=e,l=t}));return r={mount:function(){return yo(Promise.resolve().then((function(){if(s.status!==$r)throw Error(Nr(13,!1,name,s.status));return n.parcels[o]=s,co(s)})))},unmount:function(){return yo(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:yo(u),bootstrapPromise:yo(f),mountPromise:yo(d),unmountPromise:yo(h)}}function yo(e){return e.then((function(){return null}))}function vo(e){var t=Jr(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==Pr(n)||null===n||Array.isArray(n))&&(n={},console.warn(Nr(40,!1),t,n));var r=eo({},n,{name:t,mountParcel:po.bind(e),singleSpa:jr});return Qr(e)&&(r.unmountSelf=e.unmountThisParcel),r}var mo={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 go(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(16,!1));mo.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function bo(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(17,!1));mo.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function wo(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(18,!1));mo.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function _o(e,t,n){if("number"!=typeof e||e<=0)throw Error(Nr(19,!1));mo.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function So(e,t){var n=e.timeouts[t],r=n.warningMillis,o=Xr(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](vo(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var c=Nr(31,!1,t,o,Jr(e),n.millis);function l(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(c)):console.error(c);else if(!u){var t=e,o=t*r;console.warn(c),o+r<n.millis&&setTimeout((function(){return l(t+1)}),r)}}}))}function Oo(e){var t={};for(var n in mo)t[n]=eo({},mo[n],e&&e[n]||{});return t}function Co(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Br&&e.status!==Wr?e:(e.status=Hr,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(vo(e));if(!oo(r))throw n=!0,Error(Nr(33,!1,Jr(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==Pr(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!no(t.bootstrap)&&(r=35),no(t.mount)||(r=36),no(t.unmount)||(r=37);var o=Xr(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(Nr(r,!1,o,Jr(e),i),t),Ir(void 0,e,Gr),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=eo({},e.devtools.overlays,t.devtools.overlays)),e.status=Vr,e.bootstrap=ro(t,"bootstrap"),e.mount=ro(t,"mount"),e.unmount=ro(t,"unmount"),e.unload=ro(t,"unload"),e.timeouts=Oo(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Gr:(r=Wr,e.loadErrorTime=(new Date).getTime()),Ir(t,e,r),e})));var t,n}))}var Eo,xo="undefined"!=typeof window,jo={hashchange:[],popstate:[]},Po=["hashchange","popstate"];function Ao(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(Nr(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Lo(window.location.href),r=Lo(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 ko(e){var t=this;if(e){var n=e[0].type;Po.indexOf(n)>=0&&jo[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function To(){ii([],arguments)}function Mo(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Eo&&n===o||(ci()?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)):ii([])),r}}if(xo){window.addEventListener("hashchange",To),window.addEventListener("popstate",To);var Io=window.addEventListener,Do=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&Po.indexOf(e)>=0)||to(jo[e],(function(e){return e===t})))return Io.apply(this,arguments);jo[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Po.indexOf(e)>=0))return Do.apply(this,arguments);jo[e]=jo[e].filter((function(e){return e!==t}))},window.history.pushState=Mo(window.history.pushState,"pushState"),window.history.replaceState=Mo(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(Nr(41,!1)):window.singleSpaNavigate=Ao}function Lo(e){var t=document.createElement("a");return t.href=e,t}var No=!1;function Ro(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!No){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return Bo.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return Bo.call(this,n,window.removeEventListener,e,t,arguments)},No=!0}}function Bo(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Po.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var Ho={};function Vo(e){return Promise.resolve().then((function(){var t=Ho[Jr(e)];if(!t)return e;if(e.status===Br)return Uo(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==$r&&e.status!==Wr)return e;var n=e.status===Wr?Promise.resolve():So(e,"unload");return e.status="UNLOADING",n.then((function(){return Uo(e,t),e})).catch((function(n){return function(e,t,n){delete Ho[Jr(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,Ir(n,e,Gr),t.reject(n)}(e,t,n),e}))}))}function Uo(e,t){delete Ho[Jr(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Br,t.resolve()}function $o(e,t,n,r){Ho[Jr(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Ho[Jr(e)],"promise",{get:t})}function Ko(e){return Ho[e]}var Fo=[];function Zo(){return Fo.filter(zr).map(Jr)}function qo(){return Fo.map(Jr)}function Wo(e){var t=to(Fo,(function(t){return Jr(t)===e}));return t?t.status:null}function Go(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===Pr(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(Nr(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(Nr(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(Nr(20,!1));if("object"!==Pr(e.app)&&"function"!=typeof e.app)throw Error(Nr(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(Nr(24,!1));if(!Xo(e.customProps))throw Error(Nr(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(Nr(20,!1));if(!t)throw Error(Nr(23,!1));if("function"!=typeof n)throw Error(Nr(24,!1));if(!Xo(r))throw Error(Nr(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:ei(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(-1!==qo().indexOf(o.name))throw Error(Nr(21,!1,o.name));Fo.push(eo({loadErrorTime:null,status:Br,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),xo&&(Ro(),ii())}function zo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Fo.filter((function(t){return t.activeWhen(e)})).map(Jr)}function Yo(e){if(0===Fo.filter((function(t){return Jr(t)===e})).length)throw Error(Nr(25,!1,e));return Jo(e).then((function(){var t=Fo.map(Jr).indexOf(e);Fo.splice(t,1)}))}function Jo(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(Nr(26,!1));var n=to(Fo,(function(t){return Jr(t)===e}));if(!n)throw Error(Nr(27,!1,e));var r,o=Ko(Jr(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){$o(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,Qo(n,o.resolve,o.reject)):r=new Promise((function(e,t){$o(n,(function(){return r}),e,t),Qo(n,e,t)})),r}function Qo(e,t,n){ao(e).then(Vo).then((function(){t(),setTimeout((function(){ii()}))})).catch(n)}function Xo(e){return!e||"function"==typeof e||"object"===Pr(e)&&null!==e&&!Array.isArray(e)}function ei(e,t){var n=function(e,t){var n=function(n){var a=e.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":a,n===e.length)if(o)t&&(i+="$");else{var s=t?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(s,"$"):"".concat(i,"(/").concat(s,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==e[0]&&(e="/"+e);for(var a=0;a<e.length;a++){var s=e[a];(!o&&":"===s||o&&"/"===s)&&n(a)}return n(e.length),new RegExp(i,"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 ti=!1,ni=[],ri=xo&&window.location.href;function oi(){return ii()}function ii(){var e=function(){d=!0},t=function(){var e=Zo();o.forEach((function(t){return t.resolve(e)}));try{var t=0===a.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new Tr(t,r())),window.dispatchEvent(new Tr("single-spa:routing-event",r()))}catch(e){setTimeout((function(){throw e}))}if(ti=!1,ni.length>0){var n=ni;ni=[],ii(n)}return e},n=function(){o.forEach((function(e){ko(e.eventArguments)})),ko(i)},r=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r={},o=(Ar(e={},Fr,[]),Ar(e,$r,[]),Ar(e,Br,[]),Ar(e,Gr,[]),e);t?(l.concat(f).forEach((function(e,t){y(e,Fr)})),u.forEach((function(e){y(e,Br)})),c.forEach((function(e){y(e,$r)}))):a.forEach((function(e){y(e)}));var s={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:a.length,originalEvent:null==i?void 0:i[0],oldUrl:h,newUrl:p,navigationIsCanceled:d}};return n&&eo(s.detail,n),s;function y(e,t){var n=Jr(e);t=t||Wo(n),r[n]=t,(o[t]=o[t]||[]).push(n)}},o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1?arguments[1]:void 0;if(ti)return new Promise((function(e,t){ni.push({resolve:e,reject:t,eventArguments:i})}));var a,s=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Fo.forEach((function(i){var a=i.status!==Gr&&Yr(i);switch(i.status){case Wr:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Br:case Hr:a&&n.push(i);break;case Vr:case $r:!a&&Ko(Jr(i))?e.push(i):a&&r.push(i);break;case Fr:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),u=s.appsToUnload,c=s.appsToUnmount,l=s.appsToLoad,f=s.appsToMount,d=!1,h=ri,p=ri=window.location.href;return ci()?(ti=!0,a=u.concat(l,c,f),Promise.resolve().then((function(){if(window.dispatchEvent(new Tr(0===a.length?"single-spa:before-no-app-change":"single-spa:before-app-change",r(!0))),window.dispatchEvent(new Tr("single-spa:before-routing-event",r(!0,{cancelNavigation:e}))),d)return window.dispatchEvent(new Tr("single-spa:before-mount-routing-event",r(!0))),t(),void Ao(h);var i=u.map(Vo),s=c.map(ao).map((function(e){return e.then(Vo)})).concat(i),p=Promise.all(s);p.then((function(){window.dispatchEvent(new Tr("single-spa:before-mount-routing-event",r(!0)))}));var y=l.map((function(e){return Co(e).then((function(e){return ai(e,p)}))})),v=f.filter((function(e){return l.indexOf(e)<0})).map((function(e){return ai(e,p)}));return p.catch((function(e){throw n(),e})).then((function(){return n(),Promise.all(y.concat(v)).catch((function(e){throw o.forEach((function(t){return t.reject(e)})),e})).then(t)}))}))):(a=l,Promise.resolve().then((function(){var e=l.map(Co);return Promise.all(e).then(n).then((function(){return[]})).catch((function(e){throw n(),e}))})))}function ai(e,t){return Yr(e)?io(e).then((function(e){return t.then((function(){return Yr(e)?co(e):e}))})):t.then((function(){return e}))}var si=!1;function ui(e){var t;si=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,Eo=t),xo&&ii()}function ci(){return si}xo&&setTimeout((function(){si||console.warn(Nr(1,!1))}),5e3);var li={getRawAppData:function(){return[].concat(Fo)},reroute:ii,NOT_LOADED:Br,toLoadPromise:Co,toBootstrapPromise:io,unregisterApplication:Yo};function fi(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}}xo&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=li);var di;function hi(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function pi(e){return function t(n){return 0===arguments.length||hi(n)?t:e.apply(this,arguments)}}function yi(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return hi(n)?t:pi((function(t){return e(n,t)}));default:return hi(n)&&hi(r)?t:hi(n)?pi((function(t){return e(t,r)})):hi(r)?pi((function(t){return e(n,t)})):e(n,r)}}}function vi(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function mi(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function gi(e,t){return Object.prototype.hasOwnProperty.call(t,e)}fi((function(e){if(!e||"string"!=typeof e)return!1;for(var t=/\${(.*?)}/g,n=t.exec(e);n;){if(!di.includes(n[1]))return!1;n=t.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+(di=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(e){return"${"+e+"}"})).join(", "));const bi="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var wi=Object.prototype.toString,_i=function(){return"[object Arguments]"===wi.call(arguments)?function(e){return"[object Arguments]"===wi.call(e)}:function(e){return gi("callee",e)}}();const Si=_i;var Oi=!{toString:null}.propertyIsEnumerable("toString"),Ci=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Ei=function(){return arguments.propertyIsEnumerable("length")}(),xi=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const ji="function"!=typeof Object.keys||Ei?pi((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=Ei&&Si(e);for(t in e)!gi(t,e)||o&&"length"===t||(r[r.length]=t);if(Oi)for(n=Ci.length-1;n>=0;)gi(t=Ci[n],e)&&!xi(r,t)&&(r[r.length]=t),n-=1;return r})):pi((function(e){return Object(e)!==e?[]:Object.keys(e)})),Pi=pi((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function Ai(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function ki(e,t,n,r){var o=function(e,t){return Ti(e,t,n.slice(),r.slice())},i=vi(e);return!mi((function(e,t){return!mi(o,t,e)}),vi(t),i)}function Ti(e,t,n,r){if(bi(e,t))return!0;var o=Pi(e);if(o!==Pi(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":Ai(e))!==(void 0===t?"undefined":Ai(t))||!bi(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!bi(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&ki(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&ki(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=ji(e);if(a.length!==ji(t).length)return!1;var s=n.concat([e]),u=r.concat([t]);for(i=a.length-1;i>=0;){var c=a[i];if(!gi(c,t)||!Ti(t[c],e[c],s,u))return!1;i-=1}return!0}var Mi=yi((function(e,t){return Ti(e,t,[],[])}));const Ii=Mi;function Di(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return hi(n)?t:yi((function(t,r){return e(n,t,r)}));case 2:return hi(n)&&hi(r)?t:hi(n)?yi((function(t,n){return e(t,r,n)})):hi(r)?yi((function(t,r){return e(n,t,r)})):pi((function(t){return e(n,r,t)}));default:return hi(n)&&hi(r)&&hi(o)?t:hi(n)&&hi(r)?yi((function(t,n){return e(t,n,o)})):hi(n)&&hi(o)?yi((function(t,n){return e(t,r,n)})):hi(r)&&hi(o)?yi((function(t,r){return e(n,t,r)})):hi(n)?pi((function(t){return e(t,r,o)})):hi(r)?pi((function(t){return e(n,t,o)})):hi(o)?pi((function(t){return e(n,r,t)})):e(n,r,o)}}}function Li(e){return"[object Object]"===Object.prototype.toString.call(e)}var Ni=Di((function(e,t,n){var r,o={};for(r in t)gi(r,t)&&(o[r]=gi(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)gi(r,n)&&!gi(r,o)&&(o[r]=n[r]);return o}));const Ri=Ni;var Bi=Di((function e(t,n,r){return Ri((function(n,r,o){return Li(r)&&Li(o)?e(t,r,o):t(n,r,o)}),n,r)}));const Hi=Bi,Vi=yi((function(e,t){return Hi((function(e,t,n){return n}),e,t)}));function Ui(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?Ui(e[s],t,n,!0):e[s];return o};switch(Pi(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const $i=pi((function(e){return null!=e&&"function"==typeof e.clone?e.clone():Ui(e,[],[],!0)})),Ki=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var Fi=pi((function(e){return!!Ki(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));const Zi=Fi;var qi=function(){var e=function(e){this.f=e};return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),Wi=yi((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,c){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,c,l){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const Gi=Wi;function zi(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function Yi(e,t,n,r){return e["@@transducer/result"](n[r](Gi(e["@@transducer/step"],e),t))}var Ji="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Qi(e,t,n){if("function"==typeof e&&(e=function(e){return new qi(e)}(e)),Zi(n))return function(e,t,n){for(var r=0,o=n.length;r<o;){if((t=e["@@transducer/step"](t,n[r]))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}(e,t,n);if("function"==typeof n["fantasy-land/reduce"])return Yi(e,t,n,"fantasy-land/reduce");if(null!=n[Ji])return zi(e,t,n[Ji]());if("function"==typeof n.next)return zi(e,t,n);if("function"==typeof n.reduce)return Yi(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const Xi=Di(Qi);var ea=fi((function(e){return Array.isArray(e)}),"must be an array"),ta=fi((function(e){return"boolean"==typeof e}),"must be a boolean"),na=fi((function(e){return"number"==typeof e}),"must be a number"),ra=fi((function(e){return"string"==typeof e}),"must be a string"),oa=fi((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),ia=fi((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),aa=(0,h.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),sa=(0,h.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});sa.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var ua=(0,h.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ca(e){return(0,h.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})}var la=(0,h.createGlobalStore)("config-implementer-tools",{config:{}});function fa(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 da(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(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){da(e,t,n[t])}))}return e}function pa(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function ya(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||ma(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.")}()}function va(e){return function(e){if(Array.isArray(e))return fa(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ma(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ma(e,t){if(e){if("string"==typeof e)return fa(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)?fa(e,t):void 0}}function ga(e,t){var n=!0,r=!1,o=void 0;try{for(var i,a=Object.keys(e.schemas)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var s=i.value,u=Pa(s,e,t);ca(s).setState({loaded:!0,config:u})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}}function ba(e,t){var n,r,o=(n=ka(xa(e,t)),function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=ya(o.value,2),s=a[0],u=a[1],c=!0,l=!1,f=void 0;try{for(var d,h=Object.entries(u)[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=ya(d.value,2),y=p[0];Ea(p[1],s,y)}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(e,t){var r,o;return(null===(r=n[t])||void 0===r?void 0:r.extensionSlots)&&(e[t]=null===(o=n[t])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,t){return ha({},e,r[t])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var t=ya(e,2);return[t[0],{loaded:!0,config:t[1]}]}))),a=(0,h.getGlobalStore)("config-extension-slots",{slots:{}}),s=a.getState(),u={slots:ha({},s.slots,i)};Ii(s,u)||a.setState(u)}function wa(e,t){var n=function(e,t){var n=Oa($i(e.schemas)),r=va(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[t.config,"temporary config"]]),o=!0,i=!1,a=void 0;try{for(var s,u=r[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=ya(s.value,2);n=ka([n,Ca(c[0],c[1])])}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}return n}(e,t);la.setState({config:n})}function _a(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var s,u=t.mountedExtensions[Symbol.iterator]();!(o=(s=u.next()).done);o=!0){var c=s.value,l=Sa(c.slotModuleName,c.extensionModuleName,c.slotName,c.extensionId,e,n);r[c.slotName]=pa(ha({},r[c.slotName]),da({},c.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw a}}(0,h.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})}function Sa(e,t,n,r,o,i){var a,s,u,c,l=function(e){return ya(e.split("#"),1)[0]}(r),f=o.schemas[l],d=f?l:t,h=xa(o,i),p=Aa(e,h),y=null!==(c=null==p||null===(a=p.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==c?c:{},v=ka([Aa(d,h),y]),m=null!=f?f:o.schemas[t];Ta(m,v,d);var g=Na(m,v);return Ia(m,g,d),delete g.extensionSlots,g}function Oa(e){return e.hasOwnProperty("_default")?pa(ha({},e),{_value:e._default,_source:"default"}):Ba(e)?Object.keys(e).reduce((function(t,n){return t[n]=Oa(e[n]),t}),{}):{}}function Ca(e,t){return Ba(e)?Object.keys(e).reduce((function(n,r){return n[r]=Ca(e[r],t),n}),{}):{_value:e,_source:t}}function Ea(e,t,n){var r="Extension slot config '".concat(t,".extensionSlots.").concat(n),o=Object.keys(e).filter((function(e){return!["add","remove","order","configure"].includes(e)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),e.add&&(Array.isArray(e.add)&&e.add.every((function(e){return"string"==typeof e}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),e.remove&&(Array.isArray(e.remove)&&e.remove.every((function(e){return"string"==typeof e}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),e.order&&(Array.isArray(e.order)&&e.order.every((function(e){return"string"==typeof e}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Ba(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function xa(e,t){return va(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])}function ja(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="Please verify that you are running the latest version and, if so, alert the maintainer.",o=!0,i=!1,a=void 0;try{for(var s,u=function(){var o=s.value,i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!Ba(a))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";a.hasOwnProperty("_default")||ja(e,a,i);var u=a._elements;if(Ra(u)&&ja(e,u,i+"._elements"),a._validators){var c=!0,l=!1,f=void 0;try{for(var d,h=a._validators[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}var y=a._type;y&&!Object.values(Cr).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(Cr).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(a).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!n.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(a))),u&&y&&![Cr.Array,Cr.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(y)))},c=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(s=c.next()).done);o=!0)u()}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}}function Pa(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=t.schemas[e],o=Aa(e,xa(t,n));Ta(r,o,e);var i=Na(r,o);return Ia(r,i,e),delete i.extensionSlots,i}function Aa(e,t){var n=t.map((function(t){return t[e]})).filter((function(e){return!!e}));return ka(n)}function ka(e){return Xi(Vi)({},e)}function Ta(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e.hasOwnProperty(u)?Ma(f,c,l):"extensionSlots"===u&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}function Ma(e,t,n){Da(n,e._type,t),Ba(t)?e._type===Cr.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u];Ta(e._elements,c,"".concat(n,".").concat(u))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||Ta(e,t,n):e._type===Cr.Array&&function(e,t,n){if(Ra(e._elements))for(var r=0;r<t.length;r++)Ma(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;Da("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ia(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&La(n,e._validators,t),Ba(t)){var r=!0,o=!1,i=void 0;try{for(var a,s=Object.keys(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,c=t[u],l=n+"."+u,f=e[u];e._type===Cr.Object&&e._elements?Ia(e._elements,c,l):Ia(f,c,l)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ia(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}function Da(e,t,n){t&&La(e,[{Array:ea,Boolean:ta,ConceptUuid:ia,Number:na,Object:oa,String:ra,UUID:ia,PersonAttributeTypeUuid:ia,PatientIdentifierTypeUuid:ia}[t]],n)}function La(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=(0,a.value)(n);"string"==typeof u&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(u)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(u)))}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}}ga(aa.getState(),sa.getState()),aa.subscribe((function(e){return ga(e,sa.getState())})),sa.subscribe((function(e){return ga(aa.getState(),e)})),wa(aa.getState(),sa.getState()),aa.subscribe((function(e){return wa(e,sa.getState())})),sa.subscribe((function(e){return wa(aa.getState(),e)})),ba(aa.getState(),sa.getState()),aa.subscribe((function(e){return ba(e,sa.getState())})),sa.subscribe((function(e){return ba(aa.getState(),e)})),_a(aa.getState(),ua.getState(),sa.getState()),aa.subscribe((function(e){_a(e,ua.getState(),sa.getState())})),ua.subscribe((function(e){_a(aa.getState(),e,sa.getState())})),sa.subscribe((function(e){_a(aa.getState(),ua.getState(),e)}));var Na=function(e,t){var n=$i(t);if(!e)return n;var r=!0,o=!1,i=void 0;try{for(var a,s=function(){var t=a.value,r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);var i=o._elements;if(r&&Ra(i))if(o._type===Cr.Array&&Array.isArray(r)){var s=r.map((function(e){return Na(i,e)}));n[t]=s}else if(o._type===Cr.Object){var u=!0,c=!1,l=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value;r[h]=Na(i,r[h])}}catch(e){c=!0,l=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}}}else if(Ba(o)){var p=n.hasOwnProperty(t)?r:{};Ba(p)&&(n[t]=Na(o,p))}},u=Object.keys(e)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0)s()}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n};function Ra(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0}function Ba(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}var Ha={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:Cr.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:Cr.Object,_default:{}}};u(570);const Va=function(e,t){return e===t||e!=e&&t!=t},Ua=function(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1};var $a=Array.prototype.splice;function Ka(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ka.prototype.clear=function(){this.__data__=[],this.size=0},Ka.prototype.delete=function(e){var t=this.__data__,n=Ua(t,e);return!(n<0||(n==t.length-1?t.pop():$a.call(t,n,1),--this.size,0))},Ka.prototype.get=function(e){var t=this.__data__,n=Ua(t,e);return n<0?void 0:t[n][1]},Ka.prototype.has=function(e){return Ua(this.__data__,e)>-1},Ka.prototype.set=function(e,t){var n=this.__data__,r=Ua(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const Fa=Ka,Za="object"==typeof global&&global&&global.Object===Object&&global;var qa="object"==typeof self&&self&&self.Object===Object&&self;const Wa=Za||qa||Function("return this")(),Ga=Wa.Symbol;var za=Object.prototype,Ya=za.hasOwnProperty,Ja=za.toString,Qa=Ga?Ga.toStringTag:void 0;var Xa=Object.prototype.toString;var es=Ga?Ga.toStringTag:void 0;const ts=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":es&&es in Object(e)?function(e){var t=Ya.call(e,Qa),n=e[Qa];try{e[Qa]=void 0;var r=!0}catch(e){}var o=Ja.call(e);return r&&(t?e[Qa]=n:delete e[Qa]),o}(e):function(e){return Xa.call(e)}(e)},ns=function(e){var t,n=void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;return null!=e&&("object"==n||"function"==n)},rs=function(e){if(!ns(e))return!1;var t=ts(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},os=Wa["__core-js_shared__"];var is,as=(is=/[^.]+$/.exec(os&&os.keys&&os.keys.IE_PROTO||""))?"Symbol(src)_1."+is:"";var ss=Function.prototype.toString;const us=function(e){if(null!=e){try{return ss.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var cs=/^\[object .+?Constructor\]$/,ls=Function.prototype,fs=Object.prototype,ds=ls.toString,hs=fs.hasOwnProperty,ps=RegExp("^"+ds.call(hs).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const ys=function(e){return!(!ns(e)||(t=e,as&&as in t))&&(rs(e)?ps:cs).test(us(e));var t},vs=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ys(n)?n:void 0},ms=vs(Wa,"Map"),gs=vs(Object,"create");var bs=Object.prototype.hasOwnProperty;var ws=Object.prototype.hasOwnProperty;function _s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}_s.prototype.clear=function(){this.__data__=gs?gs(null):{},this.size=0},_s.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_s.prototype.get=function(e){var t=this.__data__;if(gs){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return bs.call(t,e)?t[e]:void 0},_s.prototype.has=function(e){var t=this.__data__;return gs?void 0!==t[e]:ws.call(t,e)},_s.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=gs&&void 0===t?"__lodash_hash_undefined__":t,this};const Ss=_s,Os=function(e,t){var n,r,o,i=e.__data__;return("string"==(o=void 0===(n=t)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":typeof r)||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function Cs(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cs.prototype.clear=function(){this.size=0,this.__data__={hash:new Ss,map:new(ms||Fa),string:new Ss}},Cs.prototype.delete=function(e){var t=Os(this,e).delete(e);return this.size-=t?1:0,t},Cs.prototype.get=function(e){return Os(this,e).get(e)},Cs.prototype.has=function(e){return Os(this,e).has(e)},Cs.prototype.set=function(e,t){var n=Os(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const Es=Cs;function xs(e){var t=this.__data__=new Fa(e);this.size=t.size}xs.prototype.clear=function(){this.__data__=new Fa,this.size=0},xs.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},xs.prototype.get=function(e){return this.__data__.get(e)},xs.prototype.has=function(e){return this.__data__.has(e)},xs.prototype.set=function(e,t){var n,r,o=this.__data__;if(n=o,null!=(r=Fa)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r){var i=o.__data__;if(!ms||i.length<199)return i.push([e,t]),this.size=++o.size,this;o=this.__data__=new Es(i)}return o.set(e,t),this.size=o.size,this};const js=xs;function Ps(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Es;++t<n;)this.add(e[t])}Ps.prototype.add=Ps.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ps.prototype.has=function(e){return this.__data__.has(e)};const As=Ps,ks=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Ts=function(e,t){return e.has(t)},Ms=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var c=i.get(e),l=i.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,h=2&n?new As:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!ks(t,(function(e,t){if(!Ts(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Is=Wa.Uint8Array,Ds=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Ls=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var Ns=Ga?Ga.prototype:void 0,Rs=Ns?Ns.valueOf:void 0;const Bs=Array.isArray;var Hs=Object.prototype.propertyIsEnumerable,Vs=Object.getOwnPropertySymbols;const Us=Vs?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(Vs(e),(function(t){return Hs.call(e,t)})))}:function(){return[]},$s=function(e){return null!=e&&"object"==typeof e},Ks=function(e){return $s(e)&&"[object Arguments]"==ts(e)};var Fs=Object.prototype,Zs=Fs.hasOwnProperty,qs=Fs.propertyIsEnumerable,Ws=Ks(function(){return arguments}())?Ks:function(e){return $s(e)&&Zs.call(e,"callee")&&!qs.call(e,"callee")};const Gs=Ws;var zs="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ys=zs&&"object"==typeof module&&module&&!module.nodeType&&module,Js=Ys&&Ys.exports===zs?Wa.Buffer:void 0;const Qs=(Js?Js.isBuffer:void 0)||function(){return!1};var Xs=/^(?:0|[1-9]\d*)$/;const eu=function(e,t){var n,r=void 0===e?"undefined":(n=e)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Xs.test(e))&&e>-1&&e%1==0&&e<t},tu=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var nu={};nu["[object Float32Array]"]=nu["[object Float64Array]"]=nu["[object Int8Array]"]=nu["[object Int16Array]"]=nu["[object Int32Array]"]=nu["[object Uint8Array]"]=nu["[object Uint8ClampedArray]"]=nu["[object Uint16Array]"]=nu["[object Uint32Array]"]=!0,nu["[object Arguments]"]=nu["[object Array]"]=nu["[object ArrayBuffer]"]=nu["[object Boolean]"]=nu["[object DataView]"]=nu["[object Date]"]=nu["[object Error]"]=nu["[object Function]"]=nu["[object Map]"]=nu["[object Number]"]=nu["[object Object]"]=nu["[object RegExp]"]=nu["[object Set]"]=nu["[object String]"]=nu["[object WeakMap]"]=!1;var ru="object"==typeof exports&&exports&&!exports.nodeType&&exports,ou=ru&&"object"==typeof module&&module&&!module.nodeType&&module,iu=ou&&ou.exports===ru&&Za.process,au=function(){try{return ou&&ou.require&&ou.require("util").types||iu&&iu.binding&&iu.binding("util")}catch(e){}}(),su=au&&au.isTypedArray;const uu=su?(cu=su,function(e){return cu(e)}):function(e){return $s(e)&&tu(e.length)&&!!nu[ts(e)]};var cu,lu=Object.prototype.hasOwnProperty;const fu=function(e,t){var n=Bs(e),r=!n&&Gs(e),o=!n&&!r&&Qs(e),i=!n&&!r&&!o&&uu(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var c in e)!t&&!lu.call(e,c)||a&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||eu(c,u))||s.push(c);return s};var du=Object.prototype;const hu=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var pu=Object.prototype.hasOwnProperty;const yu=function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||du))return hu(e);var t,n,r=[];for(var o in Object(e))pu.call(e,o)&&"constructor"!=o&&r.push(o);return r},vu=function(e){return null!=(t=e)&&tu(t.length)&&!rs(t)?fu(e):yu(e);var t},mu=function(e){return function(e,t,n){var r=t(e);return Bs(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,vu,Us)};function gu(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var bu=Object.prototype.hasOwnProperty;const wu=vs(Wa,"DataView"),_u=vs(Wa,"Promise"),Su=vs(Wa,"Set"),Ou=vs(Wa,"WeakMap");var Cu="[object Map]",Eu="[object Promise]",xu="[object Set]",ju="[object WeakMap]",Pu="[object DataView]",Au=us(wu),ku=us(ms),Tu=us(_u),Mu=us(Su),Iu=us(Ou),Du=ts;(wu&&Du(new wu(new ArrayBuffer(1)))!=Pu||ms&&Du(new ms)!=Cu||_u&&Du(_u.resolve())!=Eu||Su&&Du(new Su)!=xu||Ou&&Du(new Ou)!=ju)&&(Du=function(e){var t=ts(e),n="[object Object]"==t?e.constructor:void 0,r=n?us(n):"";if(r)switch(r){case Au:return Pu;case ku:return Cu;case Tu:return Eu;case Mu:return xu;case Iu:return ju}return t});const Lu=Du;var Nu="[object Arguments]",Ru="[object Array]",Bu="[object Object]",Hu=Object.prototype.hasOwnProperty;const Vu=function(e,t,n,r,o,i){var a=Bs(e),s=Bs(t),u=a?Ru:Lu(e),c=s?Ru:Lu(t),l=(u=u==Nu?Bu:u)==Bu,f=(c=c==Nu?Bu:c)==Bu,d=u==c;if(d&&Qs(e)){if(!Qs(t))return!1;a=!0,l=!1}if(d&&!l)return i||(i=new js),a||uu(e)?Ms(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Is(e),new Is(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Va(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Ds;case"[object Set]":var u=1&r;if(s||(s=Ls),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=Ms(s(e),s(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Rs)return Rs.call(e)==Rs.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var h=l&&Hu.call(e,"__wrapped__"),p=f&&Hu.call(t,"__wrapped__");if(h||p){var y=h?e.value():e,v=p?t.value():t;return i||(i=new js),o(y,v,n,r,i)}}return!!d&&(i||(i=new js),function(e,t,n,r,o,i){var a=1&n,s=mu(e),u=s.length;if(u!=mu(t).length&&!a)return!1;for(var c=u;c--;){var l=s[c];if(!(a?l in t:bu.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++c<u;){var y=e[l=s[c]],v=t[l];if(r)var m=a?r(v,y,l,t,e,i):r(y,v,l,e,t,i);if(!(void 0===m?y===v||o(y,v,n,r,i):m)){h=!1;break}p||(p="constructor"==l)}if(h&&!p){var g=e.constructor,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&gu(g,g)&&"function"==typeof b&&gu(b,b)||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))},Uu=function e(t,n,r,o,i){return t===n||(null==t||null==n||!$s(t)&&!$s(n)?t!=t&&n!=n:Vu(t,n,r,o,e,i))},$u=function(e,t){return Uu(e,t)},Ku=function(e){return void 0===e};var Fu=(0,h.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Zu=function(){return(0,h.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};function qu(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,s=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var u=i.value,c=!0,l=!1,f=void 0;try{for(var d,h=u.instances[Symbol.iterator]();!(c=(d=h.next()).done);c=!0){var p=d.value;t.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(e){l=!0,f=e}finally{try{c||null==h.return||h.return()}finally{if(l)throw f}}}}catch(e){r=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}$u(a.configExtensionStore.getState().mountedExtensions,t)||a.configExtensionStore.setState({mountedExtensions:t})}function Wu(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 Gu(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Yu(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.")}()}function zu(e){return function(e){if(Array.isArray(e))return Wu(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Yu(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yu(e,t){if(e){if("string"==typeof e)return Wu(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)?Wu(e,t):void 0}}qu(Fu.getState()),Fu.subscribe(qu),Zu();var Ju=Zu(),Qu=(0,h.getGlobalStore)("extensions",{slots:{}}),Xu=(0,a.getExtensionSlotsConfigStore)(),ec=(0,a.getExtensionsConfigStore)();function tc(e,t,n){var r={},o=!0,i=!1,s=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var l=Gu(u.value,2),f=l[0],d=l[1],h=oc(f,e,(0,a.getExtensionSlotConfigFromStore)(t,d.name).config,n);r[f]={moduleName:d.moduleName,assignedExtensions:h}}}catch(e){i=!0,s=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw s}}$u(Qu.getState().slots,r)||Qu.setState({slots:r})}function nc(e){return Gu(e.split("#"),1)[0]}function rc(e,t,n,r){var o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(e);return-1!==i?2e3+i:-1}function oc(e,t,n,r){var o=function(e,t){var n=e.add||[],r=e.remove||[],o=e.order||[],i=Ju.getState().extensions;return zu(t).concat(zu(n)).filter((function(e){return!r.includes(e)})).sort((function(e,n){var r,a,s=rc(e,o,null===(r=i[nc(e)])||void 0===r?void 0:r.order,t),u=rc(n,o,null===(a=i[nc(n)])||void 0===a?void 0:a.order,t);return-1===u?-1:-1===s?1:s-u}))}(n,t.slots[e].attachedIds),i=[],s=void 0,u=!0,c=!1,l=void 0;try{for(var f,d=o[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var h=f.value,p=(0,a.getExtensionConfigFromStore)(r,e,h).config,y=nc(h),v=t.extensions[y];if(v){var m,g,b,w,_,S=null!==(b=null!==(g=null==p||null===(m=p["Display conditions"])||void 0===m?void 0:m.privileges)&&void 0!==g?g:v.privileges)&&void 0!==b?b:[];if(S&&("string"==typeof S||Array.isArray(S)&&S.length>0)){var O;if(Ku(s)&&(s=null===(O=(0,vr.getSessionStore)().getState().session)||void 0===O?void 0:O.user),!s)continue;if(!(0,vr.userHasAccess)(S,s))continue}i.push({id:h,name:y,moduleName:v.moduleName,config:p,featureFlag:v.featureFlag,meta:v.meta,online:null===(w=v.online)||void 0===w||w,offline:null!==(_=v.offline)&&void 0!==_&&_})}}}catch(e){c=!0,l=e}finally{try{u||null==d.return||d.return()}finally{if(c)throw l}}return i}function ic(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 ac(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sc(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){ac(e,t,n[t])}))}return e}function uc(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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ic(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)?ic(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.")}()}Ju.subscribe((function(e){tc(e,Xu.getState(),ec.getState())})),Xu.subscribe((function(e){tc(Ju.getState(),e,ec.getState())})),ec.subscribe((function(e){tc(Ju.getState(),Xu.getState(),e)}));var cc={flags:function(){var e={},t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(localStorage)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;if(a.startsWith("openmrs:feature-flag:")){var s=a.replace("openmrs:feature-flag:",""),u=JSON.parse(localStorage.getItem("openmrs:feature-flag-meta:".concat(s))||"{}");e[s]=sc({enabled:"true"===localStorage.getItem(a)},u)}}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}return e}()};(0,h.getGlobalStore)("feature-flags",cc).subscribe((function(e){var t=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(e.flags)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=uc(o.value,2),s=a[0],u=a[1];localStorage.setItem("openmrs:feature-flag:".concat(s),u.enabled.toString()),localStorage.setItem("openmrs:feature-flag-meta:".concat(s),JSON.stringify({label:u.label,description:u.description}))}}catch(e){n=!0,r=e}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}));var lc,fc=u(954),dc=u(45);function hc(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 pc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yc(e,t){if(e){if("string"==typeof e)return hc(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)?hc(e,t):void 0}}function vc(e,t){var n=function(n){r[n]=function(){var r=arguments;e.setState((function(e){for(var o,i=[e],a=0;a<r.length;a++)i.push(r[a]);return(o=t)[n].apply(o,function(e){if(Array.isArray(e))return hc(e)}(s=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||yc(s)||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 s}))}};"function"==typeof t&&(t=t(e));var r={};for(var o in t)n(o);return r}function mc(e){return function(t){var n=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,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||yc(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.")}()}((0,fc.useState)(e.getState()),2),r=n[0],o=n[1];return(0,fc.useEffect)((function(){return e.subscribe((function(e){return o(e)}))}),[]),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){pc(e,t,n[t])}))}return e}({},r,(0,fc.useMemo)((function(){return t?vc(e,t):{}}),[t]))}}fc.default.createContext({moduleName:""}),u(103),u(279);try{require("react").createContext()}catch(v){}!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(lc||(lc={})),mc((0,dc.getExtensionInternalStore)()),mc((0,dc.getExtensionStore)());var gc=u(921);const bc=()=>{},wc=bc(),_c=Object,Sc=e=>e===wc,Oc=e=>"function"==typeof e,Cc=(e,t)=>({...e,...t}),Ec=new WeakMap;let xc=0;const jc=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(_c(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=Ec.get(e),o)return o;if(o=++xc+"~",Ec.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=jc(e[i])+",";Ec.set(e,o)}if(n==_c){o="#";const t=_c.keys(e).sort();for(;!Sc(i=t.pop());)Sc(e[i])||(o+=i+":"+jc(e[i])+",");Ec.set(e,o)}}return o},Pc=new WeakMap,Ac={},kc={},Tc="undefined",Mc=typeof window!=Tc,Ic=typeof document!=Tc,Dc=(e,t)=>{const n=Pc.get(e);return[()=>!Sc(t)&&e.get(t)||Ac,r=>{if(!Sc(t)){const o=e.get(t);t in kc||(kc[t]=o),n[5](t,Cc(o,r),o||Ac)}},n[6],()=>!Sc(t)&&t in kc?kc[t]:!Sc(t)&&e.get(t)||Ac]};let Lc=!0;const[Nc,Rc]=Mc&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[bc,bc],Bc={isOnline:()=>Lc,isVisible:()=>{const e=Ic&&document.visibilityState;return Sc(e)||"hidden"!==e}},Hc={initFocus:e=>(Ic&&document.addEventListener("visibilitychange",e),Nc("focus",e),()=>{Ic&&document.removeEventListener("visibilitychange",e),Rc("focus",e)}),initReconnect:e=>{const t=()=>{Lc=!0,e()},n=()=>{Lc=!1};return Nc("online",t),Nc("offline",n),()=>{Rc("online",t),Rc("offline",n)}}},Vc=!fc.default.useId,Uc=!Mc||"Deno"in window,$c=Uc?fc.useEffect:fc.useLayoutEffect,Kc="undefined"!=typeof navigator&&navigator.connection,Fc=!Uc&&Kc&&(["slow-2g","2g"].includes(Kc.effectiveType)||Kc.saveData),Zc=e=>{if(Oc(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?jc(e):"",t]};let qc=0;const Wc=()=>++qc;async function Gc(...e){const[t,n,r,o]=e,i=Cc({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let u=i.optimisticData;const c=!1!==i.revalidate,l=i.throwOnError;if(Oc(n)){const e=n,r=[],o=t.keys();for(const n of o)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(f))}return f(n);async function f(n){const[o]=Zc(n);if(!o)return;const[i,f]=Dc(t,o),[d,h,p,y]=Pc.get(t),v=()=>{const e=d[o];return c&&(delete p[o],delete y[o],e&&e[0])?e[0](2).then((()=>i().data)):i().data};if(e.length<3)return v();let m,g=r;const b=Wc();h[o]=[b,0];const w=!Sc(u),_=i(),S=_.data,O=_._c,C=Sc(O)?S:O;if(w&&(u=Oc(u)?u(C,S):u,f({data:u,_c:C})),Oc(g))try{g=g(C)}catch(e){m=e}if(g&&(e=>Oc(e.then))(g)){if(g=await g.catch((e=>{m=e})),b!==h[o][0]){if(m)throw m;return g}m&&w&&(e=>"function"==typeof s?s(e):!1!==s)(m)&&(a=!0,f({data:C,_c:wc}))}if(a&&!m)if(Oc(a)){const e=a(g,C);f({data:e,error:wc,_c:wc})}else f({data:g,error:wc,_c:wc});if(h[o][1]=Wc(),Promise.resolve(v()).then((()=>{f({_c:wc})})),!m)return g;if(l)throw m}}const zc=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Yc=(e,t)=>{if(!Pc.has(e)){const n=Cc(Hc,t),r={},o=Gc.bind(wc,e);let i=bc;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},u=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(const e of o)e(n,r)},c=()=>{if(!Pc.has(e)&&(Pc.set(e,[r,{},{},{},o,u,s]),!Uc)){const t=n.initFocus(setTimeout.bind(wc,zc.bind(wc,r,0))),o=n.initReconnect(setTimeout.bind(wc,zc.bind(wc,r,1)));i=()=>{t&&t(),o&&o(),Pc.delete(e)}}};return c(),[e,o,c,i]}return[e,Pc.get(e)[4]]},[Jc,Qc]=Yc(new Map),Xc=Cc({onLoadingSlow:bc,onSuccess:bc,onError:bc,onErrorRetry:(e,t,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!Sc(i)&&a>i||setTimeout(r,s,o)},onDiscarded:bc,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Fc?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Fc?5e3:3e3,compare:(e,t)=>jc(e)==jc(t),isPaused:()=>!1,cache:Jc,mutate:Qc,fallback:{}},Bc),el=(0,fc.createContext)({}),tl=Mc&&window.__SWR_DEVTOOLS_USE__;(tl?window.__SWR_DEVTOOLS_USE__:[]).concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=Zc(t),[,,,o]=Pc.get(Jc);if(r.startsWith("$inf$"))return n(...e);const i=o[r];return Sc(i)?n(...e):(delete o[r],i)}),r)));tl&&(window.__SWR_DEVTOOLS_REACT__=fc.default);const nl=fc.default.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e)}),rl={dedupe:!0};_c.defineProperty((e=>{const{value:t}=e,n=(0,fc.useContext)(el),r=Oc(t),o=(0,fc.useMemo)((()=>r?t(n):t),[r,n,t]),i=(0,fc.useMemo)((()=>r?o:((e,t)=>{const n=Cc(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=Cc(o,a))}return n})(n,o)),[r,n,o]),a=o&&o.provider,s=(0,fc.useRef)(wc);a&&!s.current&&(s.current=Yc(a(i.cache||Jc),o));const u=s.current;return u&&(i.cache=u[0],i.mutate=u[1]),$c((()=>{if(u)return u[2]&&u[2](),u[3]}),[]),(0,fc.createElement)(el.Provider,Cc(e,{value:i}))}),"defaultValue",{value:Xc});var ol=u(23),il=u.n(ol),al=u(701),sl=u.n(al);il().extend(sl());var ul={};setTimeout((function(){"development"===window.spaEnv&&(window.stores=ul)}),1e3);var cl={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?cl.enableCssCustomProperties=!0:cl.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?cl.enableUseControlledStateWithValue=!0:cl.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?cl.enableCssGrid=!0:cl.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE?"true"===process.env.CARBON_ENABLE_V11_RELEASE?cl.enableV11Release=!0:cl.enableV11Release=!1:cl.enableV11Release=!0,process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST&&"true"===process.env.CARBON_ENABLE_EXPERIMENTAL_TILE_CONTRAST?cl.enableExperimentalTileContrast=!0:cl.enableExperimentalTileContrast=!1,process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS&&"true"===process.env.CARBON_ENABLE_V12_TILE_DEFAULT_ICONS?cl.enableV12TileDefaultIcons=!0:cl.enableV12TileDefaultIcons=!1,process.env.CARBON_ENABLE_V12_OVERFLOWMENU&&"true"===process.env.CARBON_ENABLE_V12_OVERFLOWMENU?cl.enableV12Overflowmenu=!0:cl.enableV12Overflowmenu=!1}catch(e){cl.enableCssCustomProperties=!1,cl.enableUseControlledStateWithValue=!1,cl.enableCssGrid=!1,cl.enableV11Release=!0,cl.enableExperimentalTileContrast=!1,cl.enableV12TileDefaultIcons=!1,cl.enableV12Overflowmenu=!1}var ll=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:cl.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:cl.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:cl.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:cl.enableV11Release},{name:"enable-experimental-tile-contrast",description:"Enable the experimental tile improved contrast styles\n",enabled:cl.enableExperimentalTileContrast},{name:"enable-v12-tile-default-icons",description:"Enable rendering of default icons in the tile components\n",enabled:cl.enableV12TileDefaultIcons},{name:"enable-v12-overflowmenu",description:"Enable the use of the v12 OverflowMenu leveraging the Menu subcomponents\n",enabled:cl.enableV12Overflowmenu}];function fl(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,(void 0,"symbol"==(void 0===(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?"undefined":(o=i)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)?i:String(i)),r)}var o,i}function dl(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,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||hl(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.")}()}function hl(e,t){if(e){if("string"==typeof e)return pl(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(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pl(e,t):void 0}}function pl(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}for(var yl=function(){function e(t){var n=this;(function(e,t){if(n=e,!(null!=(r=t)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r))throw new TypeError("Cannot call a class as a function");var n,r})(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=hl(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=dl(t.value,2),o=r[0],i=r[1];this.flags.has(o)||this.flags.set(o,i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&fl(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),vl=new yl(undefined),ml=0;ml<ll.length;ml++){var gl=ll[ml];vl.add(gl.name,gl.enabled)}!function(){vl.merge.apply(vl,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-experimental-tile-contrast":!1}),new s.Subject,new s.Subject,new s.Subject,(0,h.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,u(740),(0,h.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase});var bl,wl={"Brand color #1":{_default:"#005d5d",_type:Cr.String},"Brand color #2":{_default:"#004144",_type:Cr.String},"Brand color #3":{_default:"#007d79",_type:Cr.String},preferredCalendar:{_type:Cr.Object,_default:{am:"ethiopic"}}};Number.MAX_SAFE_INTEGER,function(e,t){ja(e,t);var n=Vi(t,Ha),r=aa.getState();aa.setState({schemas:pa(ha({},r.schemas),da({},e,n))})}("@openmrs/esm-styleguide",wl),bl=function(e,t){document.documentElement.style.setProperty(e,t)},(0,a.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(bl("--brand-01",e.config["Brand color #1"]),bl("--brand-02",e.config["Brand color #2"]),bl("--brand-03",e.config["Brand color #3"]))})),i("omrs-logo-full-color",e),i("omrs-logo-full-mono",e),i("omrs-logo-full-grey",e),i("omrs-logo-partial-color",t),i("omrs-logo-partial-mono",t),i("omrs-logo-partial-grey",t),i("omrs-logo-icon-color",n),i("omrs-logo-icon-mono",n),i("omrs-logo-icon-grey",n),i("omrs-logo-white",'<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'),i("omrs-icon-visibility",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'),i("omrs-icon-menu",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'),i("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'),i("omrs-icon-arrow-back",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'),i("omrs-icon-arrow-forward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'),i("omrs-icon-arrow-downward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'),i("omrs-icon-arrow-upward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'),i("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'),i("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'),i("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'),i("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'),i("omrs-icon-supervised-user-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'),i("omrs-icon-home",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'),i("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'),i("omrs-icon-important-notification",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'),i("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'),i("omrs-icon-access-time",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'),i("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'),i("omrs-icon-remove",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'),i("omrs-icon-check-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'),i("omrs-icon-zoomoutmap",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'),i("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'),i("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>')})(),(()=>{"use strict";u.r(c)})(),c})())}}}));
|
|
3
3
|
//# sourceMappingURL=openmrs-esm-styleguide.js.map
|