@openmrs/esm-devtools-app 3.4.1-pre.151 → 3.4.1-pre.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/889.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 889.js.LICENSE.txt */
2
- (self.webpackChunk_openmrs_esm_devtools_app=self.webpackChunk_openmrs_esm_devtools_app||[]).push([[889],{159:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,h=Object.create(f.prototype),d=new p(o||[]);return h._invoke=(a=t,c=n,s=d,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(n,s);if(r){if(r===j)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?E:x,o.arg===j)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=E,s.method="throw",s.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",E="completed",j={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(d([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=c.prototype=u.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var o=i(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,j;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}};return t[e](r,r.exports,c),r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){function n(){this.constructor=t}G(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,X)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=Y.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},p=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){h(i,r,o,u,a,"next",t)}function a(t){h(i,r,o,u,a,"throw",t)}u(void 0)}))}},d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}},v=function(t,e){return!e||"object"!==jt(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),_t(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=p(W().mark((function t(e){var r,i;return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,St.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(At)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,St.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Ct(n,r,e,o)}),(function(t){throw new Ct(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new it((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Mt<Date.now()-6e4||!Lt.getState().loaded)&&x(),new it((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Lt.getState()),Lt.subscribe(n)}))},S=function(){return(Mt<Date.now()-6e4||!Lt.getState().loaded)&&x(),Lt},x=function(){return new Promise((function(t,e){Mt=Date.now(),g(At).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Lt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,It.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Lt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},E=function(t,e){return r=e,("string"==typeof(n=t)?!Rt(r.privileges.find((function(t){return n===t.display}))):Array.isArray(n)?n.every((function(t){return!Rt(r.privileges.find((function(e){return t===e.display})))})):(console.error('Could not understand privileges "'.concat(n,'"')),!0))||!Rt(e.roles.find((function(t){return"System Developer"===t.display})));var n,r},j=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Lt.getState()),t||(e=Lt.subscribe(o))}))},k=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},A=function(t,e){return Nt.apply(this,arguments)},C=function(){(0,St.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:St.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:St.Type.String,_default:"${openmrsSpaBase}/login",_validators:[St.validators.isUrl]},errors:{_type:St.Type.Array,_default:[401],_elements:{_type:St.Type.Number,_validators:[St.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:St.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."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Tt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?Gt:e.lift(new Zt(t))}},D=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new Jt(t,e))}},R=function(t,e,n){var r=null!=n?n:Xt;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(D((function(t){return t})))},L=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},N=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},B=function(){return m("/ws/rest/v1/visittype").pipe(D((function(t){return t.data.results.map(N)}))).pipe(I(1))},U=function(t){return{uuid:t.uuid,display:t.display}},F=function(){return m("/ws/rest/v1/location").pipe(D((function(t){return t.data.results.map(U)}))).pipe(I(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Ct},VisitMode:function(){return Bt},VisitStatus:function(){return Ut},backendDependencies:function(){return ee},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return Xt},fetchCurrentPatient:function(){return T},fhir:function(){return Tt},fhirBaseUrl:function(){return Pt},getCurrentUser:function(){return _},getLocations:function(){return F},getLoggedInUser:function(){return j},getSessionLocation:function(){return k},getSessionStore:function(){return S},getStartedVisit:function(){return te},getVisitTypes:function(){return B},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return L},sessionEndpoint:function(){return At},setSessionLocation:function(){return A},setupApiModule:function(){return C},toLocationObject:function(){return U},toVisitTypeObject:function(){return N},updateVisit:function(){return M},userHasAccess:function(){return E}});var K,$,z,H,V,q=c(602),W=c.n(q),G=function(t,e){return(G=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},Z=!1,Y={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,Z=t},get useDeprecatedSynchronousErrorHandling(){return Z}},J={closed:!0,next:function(t){},error:function(t){if(Y.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},Q=Array.isArray||function(t){return t&&"number"==typeof t.length},X=(K=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},K.prototype=Object.create(Error.prototype),K),tt=function(){var t,n=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)};return n.prototype.unsubscribe=function(){var t;if(!this.closed){var o,i=this,a=i._parentOrParents,c=i._ctorUnsubscribe,s=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(a,n))a.remove(this);else if(null!==a)for(var f=0;f<a.length;++f)a[f].remove(this);if(e(s)){c&&(this._unsubscribe=void 0);try{s.call(this)}catch(e){t=r(e,X)?u(e.errors):[e]}}if(Q(l)){f=-1;for(var h=l.length;++f<h;){var p=l[f];if(null!==(o=p)&&"object"==typeof o)try{p.unsubscribe()}catch(e){t=t||[],r(e,X)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new X(t)}},n.prototype.add=function(t){var e=t;if(!t)return n.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new n(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,n)){var i=e;(e=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var u=e._parentOrParents;if(null===u)e._parentOrParents=this;else if(r(u,n)){if(u===this)return e;e._parentOrParents=[u,this]}else{if(-1!==u.indexOf(this))return e;u.push(this)}var a=this._subscriptions;return null===a?this._subscriptions=[e]:a.push(e),e},n.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},n.EMPTY=((t=new n).closed=!0,t),n}(),et="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),nt=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=J;break;case 1:if(!t){u.destination=J;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new rt(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new rt(u,t,o,i)}return u}return t(n,e),n.prototype[et]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(tt),rt=(z=function(t,n,r,o){var i,u=$.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==J&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t(z,$=nt),z.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;Y.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},z.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=Y.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},z.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};Y.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},z.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),Y.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},z.prototype.__tryOrSetError=function(t,e,n){if(!Y.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return Y.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z),ot="function"==typeof Symbol&&Symbol.observable||"@@observable",it=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,nt))return t;if(t[et])return t[et]()}return t||e||n?new nt(t,e,n):new nt(J)}(t,e,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},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){Y.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,nt)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ot]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ut="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,at="object"==typeof self&&self&&self.Object===Object&&self,ct=(ut||at||Function("return this")()).Symbol,st=Object.prototype,lt=st.hasOwnProperty,ft=st.toString,ht=ct?ct.toStringTag:void 0,pt=Object.prototype.toString,dt=ct?ct.toStringTag:void 0,vt=(H=Object.getPrototypeOf,V=Object,function(t){return H(V(t))}),yt=Function.prototype,gt=Object.prototype,mt=yt.toString,bt=gt.hasOwnProperty,wt=mt.call(Object),_t=function(t){if(null==(e=t)||"object"!=typeof e||"[object Object]"!=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":dt&&dt in Object(t)?function(t){var e=lt.call(t,ht),n=t[ht];try{t[ht]=void 0;var r=!0}catch(t){}var o=ft.call(t);return r&&(e?t[ht]=n:delete t[ht]),o}(t):(e=t,pt.call(e));var e}(t))return!1;var e,n=vt(t);if(null===n)return!0;var o=bt.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&mt.call(o)==wt},St=c(824);function xt(t,e,n){return xt=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Et(o,n.prototype),o},xt.apply(null,arguments)}function Ot(t){return(Ot=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Et(t,e){return(Et=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var jt=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function kt(t){var e="function"==typeof Map?new Map:void 0;return kt=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return xt(t,arguments,Ot(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Et(r,t)},kt(t)}var At="/ws/rest/v1/session",Ct=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Et(t,e)}(i,t);var e,n,o=(e=i,n=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(t){return!1}}(),function(){var t,r=Ot(e);if(n){var o=Ot(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(kt(Error)),Pt="/ws/fhir2/R4",Tt={read:function(t){var e,n;return g((n={url:"".concat(Pt,"/").concat(t.type,"/").concat(t.patient),method:"GET",headers:null!==(e=t.headers)&&void 0!==e?e:{}}).url,{method:n.method,headers:n.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:n}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:n}}))}},It=c(254),Dt=c(385),Rt=function(t){return void 0===t},Lt=(0,Dt.createGlobalStore)("session",{loaded:!1,session:null}),Mt=0;function Nt(){return(Nt=w(W().mark((function t(e,n){return W().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(At,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Bt,Ut,Ft,Kt=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),$t=function(e){var n=function(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r};return t(n,e),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(tt),zt=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(nt),Ht=function(e){var n=function(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t};return t(n,e),n.prototype[et]=function(){return new zt(this)},n.prototype.lift=function(t){var e=new Vt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new Kt;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new Kt;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Kt;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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(t){if(this.closed)throw new Kt;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new Kt;return this.hasError?(t.error(this.thrownError),tt.EMPTY):this.isStopped?(t.complete(),tt.EMPTY):(this.observers.push(t),new $t(this,t))},n.prototype.asObservable=function(){var t=new it;return t.source=this,t},n.create=function(t,e){return new Vt(t,e)},n}(it),Vt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):tt.EMPTY},n}(Ht),qt=function(e){var n=function(t){var n=e.call(this)||this;return n._value=t,n};return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Kt;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Ht),Wt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),Gt=new it((function(t){return t.complete()})),Zt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Wt};return t.prototype.call=function(t,e){return e.subscribe(new Yt(t,this.total))},t}(),Yt=function(e){var n=function(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r};return t(n,e),n.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(nt),Jt=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new Qt(t,this.project,this.thisArg))},t}(),Qt=function(e){var n=function(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return t(n,e),n.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(nt),Xt="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,value),location:(uuid,name,display),startDatetime,stopDatetime)",te=new qt(null);(Ft=Bt||(Bt={})).NEWVISIT="startVisit",Ft.EDITVISIT="editVisit",Ft.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Ut||(Ut={}));var ee={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},810:()=>{function t(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?d(e.matcher):d(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},p=function(t){return h(l(),t)};function d(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return d(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+e(o.endsWith||"")+"]|$",d="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=t[t.length-1],x="string"==typeof S?d.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+d+"(?="+p+"))?"),x||(v+="(?="+d+"|"+p+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return h},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},347:()=>{var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=o(t);function u(t,e){return st(t,e,n.slice(),r.slice())}return!a((function(t,e){return!a(u,e,t)}),o(e),i)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t){return"[object Object]"===Object.prototype.toString.call(t)},h=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},p=function(t,e,n,r){return t["@@transducer/result"](n[r](xt(t["@@transducer/step"],t),e))},d=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,It.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,It.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,It.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){var n=Object.assign({},S(w().getState(),t,e));return n.config=dt(["Display conditions"],n.config),n},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},E=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},j=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||A(t,e)||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.")}()},k=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},A=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},C=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=K(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=z(F(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=j(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(c)[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var d=j(h.value,2),v=d[0];U(d[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return E({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=j(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:E({},a.slots,i)};lt(a,c)||u.setState(c)},T=function(t,e){var n=function(t,e){var n=Ut(mt(t.schemas)),r=k(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=j(a.value,2);n=z([n,Ft(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Bt.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=B(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},D=function(t,e){Kt(t,e);var n=pt(e,Vt),r=Rt.getState();Rt.setState({schemas:E({},r.schemas,O({},t,n))})},R=function(t,e){Kt(t,e);var n=pt(e,Vt),r=Rt.getState();r.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Rt.setState({schemas:E({},r.schemas,O({},t,n))})},L=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Rt.getState();Rt.setState({providedConfigs:k(n.providedConfigs).concat([{source:e,config:t}])})},M=function(t){return new Promise((function(e){var n=function(t){if(t.loaded&&t.config){var n=dt(["Display conditions"],t.config);e(n),o&&o()}},r=y(t);n(r.getState());var o=r.subscribe(n)}))},N=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(t,e,n);var o=Ht(t,e,r);return zt(t,o,n),o},B=function(t,e,n,r,o,i){var u,a,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=F(o,i),d=$(t,p),v=null!==(s=null==d||null===(u=d.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([$(h,p),v]),g=null!=f?f:o.schemas[e];H(g,y,h);var m=Ht(g,y,o.devDefaultsAreOn);return zt(g,m,h),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(G(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},F=function(t,e){return k(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},K=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=$(t,F(e,n));H(r,o,t);var i=Ht(r,o,e.devDefaultsAreOn);return zt(r,i,t),delete i.extensionSlots,i},$=function(t,e){return z(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},z=function(t){return Et(pt)({},t)},H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?$t(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},V=function(t,e,n){e&&q(t,[{Array:jt,Boolean:kt,ConceptUuid:Tt,Number:At,Object:Pt,String:Ct,UUID:Tt,PersonAttributeTypeUuid:Tt,PatientIdentifierTypeUuid:Tt}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},G=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Q=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(e,n);o.startsWith(r)?(0,qt.navigateToUrl)(o):window.location.assign(o)};i.r(u),i.d(u,{Type:function(){return yt},configExtensionStore:function(){return Nt},configInternalStore:function(){return Rt},defineConfigSchema:function(){return D},defineExtensionConfigSchema:function(){return R},getConfig:function(){return M},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Bt},inRange:function(){return Wt},interpolateString:function(){return J},interpolateUrl:function(){return Y},isUrl:function(){return Zt},isUrlWithTemplateParameters:function(){return Gt},navigate:function(){return Q},oneOf:function(){return Yt},processConfig:function(){return N},provide:function(){return L},temporaryConfigStore:function(){return Mt},validator:function(){return d},validators:function(){return Jt}});var X="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return c("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),ut=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)c(e=ot[n],t)&&!ut(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ct=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(X(e,n))return!0;var i,u,a=ct(e);if(a!==ct(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!X(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),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=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var d=f[l];if(!c(d,n)||!st(n[d],e[d],h,p))return!1;l-=1}return!0}var lt=r((function(t,e){return st(t,e,[],[])})),ft=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),ht=l((function t(e,n,r){return ft((function(n,r,o){return f(r)&&f(o)?t(e,r,o):e(n,r,o)}),n,r)})),pt=r((function(t,e){return ht((function(t,e,n){return n}),t,e)})),dt=r((function(t,e){for(var n={},r={},o=0,i=t.length;o<i;)r[t[o]]=1,o+=1;for(var u in e)r.hasOwnProperty(u)||(n[u]=e[u]);return n}));function vt(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?vt(t[a],e,n,!0):t[a];return o};switch(ct(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var yt,gt,mt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():vt(t,[],[],!0)})),bt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},wt=n((function(t){return!!bt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),_t=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),St=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),xt=St,Ot="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Et=l((function(t,e,n){if("function"==typeof t&&(t=new _t(t)),wt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return p(t,e,n,"fantasy-land/reduce");if(null!=n[Ot])return h(t,e,n[Ot]());if("function"==typeof n.next)return h(t,e,n);if("function"==typeof n.reduce)return p(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));(gt=yt||(yt={})).Array="Array",gt.Boolean="Boolean",gt.ConceptUuid="ConceptUuid",gt.Number="Number",gt.Object="Object",gt.String="String",gt.UUID="UUID",gt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",gt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var jt=d((function(t){return Array.isArray(t)}),"must be an array"),kt=d((function(t){return"boolean"==typeof t}),"must be a boolean"),At=d((function(t){return"number"==typeof t}),"must be a number"),Ct=d((function(t){return"string"==typeof t}),"must be a string"),Pt=d((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Tt=d((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),It=i(685),Dt={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Rt=(0,It.createGlobalStore)("config-internal",Dt),Lt=v();Rt.subscribe((function(t){var e;t.devDefaultsAreOn!=Lt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Lt=t.devDefaultsAreOn)}));var Mt=(0,It.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Mt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Nt=(0,It.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Bt=(0,It.createGlobalStore)("config-implementer-tools",{config:{}});function Ut(t){return t.hasOwnProperty("_default")?E({},t,{_value:t._default,_source:"default"}):G(t)?Object.keys(t).reduce((function(e,n){return e[n]=Ut(t[n]),e}),{}):{}}function Ft(t,e){return G(t)?Object.keys(t).reduce((function(n,r){return n[r]=Ft(t[r],e),n}),{}):{_value:t,_source:e}}function Kt(t,e){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,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if("Display conditions"===a&&console.error("".concat(t,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),!G(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Kt(t,c,a);var s=c._elements;if(W(s)&&Kt(t,s,a+"._elements"),c._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=c._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=c._type;y&&!Object.values(yt).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(yt).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![yt.Array,yt.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").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)))},s=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function $t(t,e,n){V(n,t._type,e),G(e)?t._type===yt.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];H(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||H(t,e,n):t._type===yt.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)$t(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;V("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function zt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),G(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===yt.Object&&t._elements?zt(t._elements,s,l):zt(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)zt(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}C(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return C(t,Mt.getState())})),Mt.subscribe((function(t){return C(Rt.getState(),t)})),T(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return T(t,Mt.getState())})),Mt.subscribe((function(t){return T(Rt.getState(),t)})),P(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return P(t,Mt.getState())})),Mt.subscribe((function(t){return P(Rt.getState(),t)})),I(Rt.getState(),Nt.getState(),Mt.getState()),Rt.subscribe((function(t){I(t,Nt.getState(),Mt.getState())})),Nt.subscribe((function(t){I(Rt.getState(),t,Mt.getState())})),Mt.subscribe((function(t){I(Rt.getState(),Nt.getState(),t)}));var Ht=function(t,e,n){var r=mt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===yt.Array&&Array.isArray(u)){var l=u.map((function(t){return Ht(s,t,n)}));r[i]=l}else if(a._type===yt.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(u)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;u[y]=Ht(s,u[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(G(a)){var g=r.hasOwnProperty(i)?u:{};G(g)&&(r[i]=Ht(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Vt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:yt.Array,_default:[]}}},qt=i(645),Wt=function(t,e){return d((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Gt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return d((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Zt=Gt([]),Yt=function(t){return d((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Jt={inRange:Wt,isUrl:Zt,isUrlWithTemplateParameters:Gt,oneOf:Yt}}(),u}())}}}))},708:()=>{System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,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 t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},547:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","single-spa"],(function(i,u){var a={},c={},s={},l={};return{setters:[function(t){a.configExtensionStore=t.configExtensionStore,a.getExtensionConfigFromStore=t.getExtensionConfigFromStore,a.getExtensionSlotConfig=t.getExtensionSlotConfig,a.getExtensionSlotConfigFromStore=t.getExtensionSlotConfigFromStore,a.getExtensionSlotsConfigStore=t.getExtensionSlotsConfigStore,a.getExtensionsConfigStore=t.getExtensionsConfigStore},function(t){c.createGlobalStore=t.createGlobalStore,c.getGlobalStore=t.getGlobalStore},function(t){s.getSessionStore=t.getSessionStore,s.userHasAccess=t.userHasAccess},function(t){l.mountRootParcel=t.mountRootParcel}],execute:function(){i(function(){var i={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=s},824:function(t){"use strict";t.exports=a},685:function(t){"use strict";t.exports=c},645:function(t){"use strict";t.exports=l}},f={};function h(t){var e=f[t];if(void 0!==e)return e.exports;var n=f[t]={exports:{}};return i[t](n,n.exports,h),n.exports}h.y=u,h.d=function(t,e){for(var n in e)h.o(e,n)&&!h.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),h.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},h.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;h.g.importScripts&&(t=h.g.location+"");var e=h.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h.p=t}();var p={};return(0,h(968).s)(1),function(){"use strict";var i=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},u=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},a=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},c=function(t){var e=this.__data__=new V(t);this.size=e.size},s=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new St;++e<n;)this.add(t[e])},l=function(t){var e=Le.getState(),n=t(e);n!==e&&Le.setState(n)},f=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,h=a.instances[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:a.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}Ie(De.configExtensionStore.getState().mountedExtensions,e)||De.configExtensionStore.setState({mountedExtensions:e})},d=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},v=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){v(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},g=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||b(t,e)||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(t){return function(t){if(Array.isArray(t))return d(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},b=function(t,e){if(t){if("string"==typeof t)return d(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}},w=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=g(a.value,2),l=s[0],f=s[1],h=P(l,t,(0,De.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}Ie(Fe.getState().slots,r)||Fe.setState({slots:r})},_=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}},S=function(t){return g(t.split("#"),1)[0]},x=function(t,e){var n=S(e);return t.extensions[n]},O=function(t){return x(Ue.getState(),t)},E=function(t,e){l((function(n){var r=n.slots[t];return y({},n,r?{slots:y({},n.slots,v({},t,y({},r,{attachedIds:m(r.attachedIds).concat([e])})))}:{slots:y({},n.slots,v({},t,y({},_(t),{attachedIds:[e]})))})}))},j=function(t,e){l((function(n){var r=n.slots[t];return r&&r.attachedIds.includes(e)?y({},n,{slots:y({},n.slots,v({},t,y({},r,{attachedIds:r.attachedIds.filter((function(t){return t!==e}))})))}):n}))},k=function(t){l((function(e){var n=e.slots[t];return n?y({},e,{slots:y({},e.slots,v({},t,y({},n,{attachedIds:[]})))}):e}))},A=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=e?e:navigator.onLine;return t.filter((function(t){return D(n,t.online,t.offline)}))},P=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=Ue.getState().extensions,m(i).concat(m(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=A(t,c,null===(n=s[S(t)])||void 0===n?void 0:n.order,i),u=A(e,c,null===(r=s[S(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],h=void 0,p=!0,d=!1,v=void 0;try{for(var y,g=l[Symbol.iterator]();!(p=(y=g.next()).done);p=!0){var b=y.value,w=(0,De.getExtensionConfigFromStore)(r,t,b).config,_=S(b),x=e.extensions[_];if(x){var O,E,j=null!==(E=null==w||null===(O=w["Display conditions"])||void 0===O?void 0:O.privileges)&&void 0!==E?E:x.privileges;if(j&&("string"==typeof j||Array.isArray(j)&&j.length>0)){var k;if(void 0===h&&(h=null===(k=(0,Be.getSessionStore)().getState().session)||void 0===k?void 0:k.user),!h)continue;if(!(0,Be.userHasAccess)(j,h))continue}f.push({id:b,name:_,moduleName:x.moduleName,config:w,meta:x.meta,online:x.online,offline:x.offline})}}}catch(t){d=!0,v=t}finally{try{p||null==g.return||g.return()}finally{if(d)throw v}}return f},T=function(t){return P(t,Ue.getState(),(0,De.getExtensionSlotConfig)(t).config,$e.getState())},I=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return D(n,t,e)},D=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(t?e:n)},R=function(t,e){var n=navigator.onLine?t:e;return"object"==typeof n?n:{}},L=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},M=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},N=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){M(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},B=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o},U=function(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return L(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},F=function(t,e,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(t){return t},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},u=S(r),a=O(r),c=!0,s=null;if(t){if(!a)throw Error("Couldn't find extension '".concat(u,"' to attach to '").concat(e,"'"));var f=a.load,h=a.online,p=a.offline,d=a.meta,v=a.moduleName;I(h,p)&&(f().then((function(u){var a=u.default,l=B(u,["default"]);c&&(s=(0,qe.mountRootParcel)(o(null!=a?a:l),N({},R(h,p),i,{_meta:d,_extensionContext:{extensionId:r,extensionSlotName:e,extensionSlotModuleName:n,extensionModuleName:v},domElement:t})))})),l((function(o){var i={domElement:t,id:r,slotName:e,slotModuleName:n};return N({},o,{extensions:N({},o.extensions,M({},u,N({},o.extensions[u],{instances:U(o.extensions[u].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(e," but no DOM element was available."));return function(){c=!1,s&&("MOUNTED"!==s.getStatus()?s.mountPromise.then((function(){s&&s.unmount()})):s.unmount())}};h.r(p),h.d(p,{attach:function(){return E},checkStatus:function(){return I},checkStatusFor:function(){return D},detach:function(){return j},detachAll:function(){return k},extensionStore:function(){return We},getAssignedExtensions:function(){return T},getConnectedExtensions:function(){return C},getCustomProps:function(){return R},getExtensionInternalStore:function(){return Me},getExtensionNameFromId:function(){return S},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Ne},registerExtension:function(){return ze},registerExtensionSlot:function(){return He},renderExtension:function(){return F},reset:function(){return Ve},updateInternalExtensionStore:function(){return l}});var K=function(t,e){return t===e||t!=t&&e!=e},$=function(t,e){for(var n=t.length;n--;)if(K(t[n][0],e))return n;return-1},z=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(t){var e=this.__data__,n=$(e,t);return!(n<0||(n==e.length-1?e.pop():z.call(e,n,1),--this.size,0))},i.prototype.get=function(t){var e=this.__data__,n=$(e,t);return n<0?void 0:e[n][1]},i.prototype.has=function(t){return $(this.__data__,t)>-1},i.prototype.set=function(t,e){var n=this.__data__,r=$(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var H,V=i,q="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,W="object"==typeof self&&self&&self.Object===Object&&self,G=q||W||Function("return this")(),Z=G.Symbol,Y=Object.prototype,J=Y.hasOwnProperty,Q=Y.toString,X=Z?Z.toStringTag:void 0,tt=Object.prototype.toString,et=Z?Z.toStringTag:void 0,nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":et&&et in Object(t)?function(t){var e=J.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(t){}var o=Q.call(t);return r&&(e?t[X]=n:delete t[X]),o}(t):(e=t,tt.call(e));var e},rt=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},ot=function(t){if(!rt(t))return!1;var e=nt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},it=G["__core-js_shared__"],ut=(H=/[^.]+$/.exec(it&&it.keys&&it.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",at=Function.prototype.toString,ct=function(t){if(null!=t){try{return at.call(t)}catch(t){}try{return t+""}catch(t){}}return""},st=/^\[object .+?Constructor\]$/,lt=Function.prototype,ft=Object.prototype,ht=lt.toString,pt=ft.hasOwnProperty,dt=RegExp("^"+ht.call(pt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vt=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!rt(t)||(e=t,ut&&ut in e))&&(ot(t)?dt:st).test(ct(t));var e}(r)?r:void 0},yt=vt(G,"Map"),gt=vt(Object,"create"),mt=Object.prototype.hasOwnProperty,bt=Object.prototype.hasOwnProperty;u.prototype.clear=function(){this.__data__=gt?gt(null):{},this.size=0},u.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},u.prototype.get=function(t){var e=this.__data__;if(gt){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return mt.call(e,t)?e[t]:void 0},u.prototype.has=function(t){var e=this.__data__;return gt?void 0!==e[t]:bt.call(e,t)},u.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gt&&void 0===e?"__lodash_hash_undefined__":e,this};var wt=u,_t=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};a.prototype.clear=function(){this.size=0,this.__data__={hash:new wt,map:new(yt||V),string:new wt}},a.prototype.delete=function(t){var e=_t(this,t).delete(t);return this.size-=e?1:0,e},a.prototype.get=function(t){return _t(this,t).get(t)},a.prototype.has=function(t){return _t(this,t).has(t)},a.prototype.set=function(t,e){var n=_t(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var St=a;c.prototype.clear=function(){this.__data__=new V,this.size=0},c.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},c.prototype.get=function(t){return this.__data__.get(t)},c.prototype.has=function(t){return this.__data__.has(t)},c.prototype.set=function(t,e){var n=this.__data__;if(r(n,V)){var o=n.__data__;if(!yt||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new St(o)}return n.set(t,e),this.size=n.size,this};var xt=c;s.prototype.add=s.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},s.prototype.has=function(t){return this.__data__.has(t)};var Ot=s,Et=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},jt=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,p=2&n?new Ot:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],v=e[f];if(r)var y=u?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Et(e,(function(t,e){if(u=e,!p.has(u)&&(d===t||o(d,t,n,r,i)))return p.push(e);var u}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},kt=G.Uint8Array,At=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ct=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Pt=Z?Z.prototype:void 0,Tt=Pt?Pt.valueOf:void 0,It=Array.isArray,Dt=Object.prototype.propertyIsEnumerable,Rt=Object.getOwnPropertySymbols,Lt=Rt?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Rt(t),(function(e){return Dt.call(t,e)})))}:function(){return[]},Mt=function(t){return null!=t&&"object"==typeof t},Nt=function(t){return Mt(t)&&"[object Arguments]"==nt(t)},Bt=Object.prototype,Ut=Bt.hasOwnProperty,Ft=Bt.propertyIsEnumerable,Kt=Nt(function(){return arguments}())?Nt:function(t){return Mt(t)&&Ut.call(t,"callee")&&!Ft.call(t,"callee")},$t=Kt,zt=e&&!e.nodeType&&e,Ht=zt&&t&&!t.nodeType&&t,Vt=Ht&&Ht.exports===zt?G.Buffer:void 0,qt=(Vt?Vt.isBuffer:void 0)||function(){return!1},Wt=/^(?:0|[1-9]\d*)$/,Gt=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;var Yt,Jt,Qt,Xt=e&&!e.nodeType&&e,te=Xt&&t&&!t.nodeType&&t,ee=te&&te.exports===Xt&&q.process,ne=function(){try{return te&&te.require&&te.require("util").types||ee&&ee.binding&&ee.binding("util")}catch(t){}}(),re=ne&&ne.isTypedArray,oe=re?(Yt=re,function(t){return Yt(t)}):function(t){return Mt(t)&&Gt(t.length)&&!!Zt[nt(t)]},ie=Object.prototype.hasOwnProperty,ue=Object.prototype,ae=(Jt=Object.keys,Qt=Object,function(t){return Jt(Qt(t))}),ce=Object.prototype.hasOwnProperty,se=function(t){return n=Lt,r=function(t){return null!=(e=t)&&Gt(e.length)&&!ot(e)?function(t,e){var n,r,i,u=It(t),a=!u&&$t(t),c=!u&&!a&&qt(t),s=!u&&!a&&!c&&oe(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(var p in t)!ie.call(t,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=h,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&Wt.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||ue))return ae(t);var e,n,r=[];for(var o in Object(t))ce.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),It(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},le=Object.prototype.hasOwnProperty,fe=vt(G,"DataView"),he=vt(G,"Promise"),pe=vt(G,"Set"),de=vt(G,"WeakMap"),ve="[object Map]",ye="[object Promise]",ge="[object Set]",me="[object WeakMap]",be="[object DataView]",we=ct(fe),_e=ct(yt),Se=ct(he),xe=ct(pe),Oe=ct(de),Ee=nt;(fe&&Ee(new fe(new ArrayBuffer(1)))!=be||yt&&Ee(new yt)!=ve||he&&Ee(he.resolve())!=ye||pe&&Ee(new pe)!=ge||de&&Ee(new de)!=me)&&(Ee=function(t){var e=nt(t),n="[object Object]"==e?t.constructor:void 0,r=n?ct(n):"";if(r)switch(r){case we:return be;case _e:return ve;case Se:return ye;case xe:return ge;case Oe:return me}return e});var je=Ee,ke="[object Arguments]",Ae="[object Array]",Ce="[object Object]",Pe=Object.prototype.hasOwnProperty,Te=function t(e,n,o,i,u){return e===n||(null==e||null==n||!Mt(e)&&!Mt(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=It(t),c=It(e),s=a?Ae:je(t),l=c?Ae:je(e),f=(s=s==ke?Ce:s)==Ce,h=(l=l==ke?Ce:l)==Ce,p=s==l;if(p&&qt(t)){if(!qt(e))return!1;a=!0,f=!1}if(p&&!f)return u||(u=new xt),a||oe(t)?jt(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new kt(t),new kt(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return K(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=At;case"[object Set]":var c=1&r;if(a||(a=Ct),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=jt(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Tt)return Tt.call(t)==Tt.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var d=f&&Pe.call(t,"__wrapped__"),v=h&&Pe.call(e,"__wrapped__");if(d||v){var y=d?t.value():t,g=v?e.value():e;return u||(u=new xt),i(y,g,n,o,u)}}return!!p&&(u||(u=new xt),function(t,e,n,o,i,u){var a=1&n,c=se(t),s=c.length;if(s!=se(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:le.call(e,f)))return!1}var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(d=!1)}return u.delete(t),u.delete(e),d}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Ie=function(t,e){return Te(t,e)},De=h(824),Re=h(685),Le=(0,Re.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Me=function(){return(0,Re.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Ne=function(){return(0,Re.getGlobalStore)("extensions",{slots:{}})};f(Le.getState()),Le.subscribe(f);var Be=h(766),Ue=Me(),Fe=Ne(),Ke=(0,De.getExtensionSlotsConfigStore)(),$e=(0,De.getExtensionsConfigStore)();Ue.subscribe((function(t){w(t,Ke.getState(),$e.getState())})),Ke.subscribe((function(t){w(Ue.getState(),t,$e.getState())})),$e.subscribe((function(t){w(Ue.getState(),Ke.getState(),t)}));var ze=Ue.action((function(t,e){t.extensions[e.name]=y({},e,{instances:[]})})),He=Ue.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),t;if(o&&o==e)return t;if(t.slots[n])return y({},t,{slots:y({},t.slots,v({},n,y({},t.slots[n],{moduleName:e})))});var i=_(n,e);return y({},t,{slots:y({},t.slots,v({},n,i))})})),Ve=Fe.action((function(){return{slots:{},extensions:{}}})),qe=h(645),We=Me()}(),p}())}}}))},889:(t,e,n)=>{"use strict";n.r(e);var r=n(159),o={};for(const t in r)"default"!==t&&(o[t]=()=>r[t]);n.d(e,o);var i=n(810);o={};for(const t in i)"default"!==t&&(o[t]=()=>i[t]);n.d(e,o);var u=n(347);o={};for(const t in u)"default"!==t&&(o[t]=()=>u[t]);n.d(e,o);var a=n(708);o={};for(const t in a)"default"!==t&&(o[t]=()=>a[t]);n.d(e,o);var c=n(547);o={};for(const t in c)"default"!==t&&(o[t]=()=>c[t]);n.d(e,o);var s=n(473);o={};for(const t in s)"default"!==t&&(o[t]=()=>s[t]);n.d(e,o);var l=n(630);o={};for(const t in l)"default"!==t&&(o[t]=()=>l[t]);n.d(e,o);var f=n(336);o={};for(const t in f)"default"!==t&&(o[t]=()=>f[t]);n.d(e,o);var h=n(493);o={};for(const t in h)"default"!==t&&(o[t]=()=>h[t]);n.d(e,o);var p=n(390);o={};for(const t in p)"default"!==t&&(o[t]=()=>p[t]);n.d(e,o)},473:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},a=function(t){window.dispatchEvent(new CustomEvent(d,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var h="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",d="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},630:(t,e,n)=>{function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||p(t,e)||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 f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function p(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(t,e){var r={},i={};return{setters:[function(t){r.getLoggedInUser=t.getLoggedInUser},function(t){i.createGlobalStore=t.createGlobalStore}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var u,a,s,l,f=e&&c(e.prototype,i)?e:i,h=Object.create(f.prototype),d=new p(r||[]);return h._invoke=(u=t,a=n,s=d,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(n,s);if(r){if(r===j)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var i=o(u,a,s);if("normal"===i.type){if(l=s.done?E:x,i.arg===j)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=E,s.method="throw",s.arg=i.arg)}}),h},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){function i(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var S="suspendedStart",x="suspendedYield",O="executing",E="completed",j={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(d([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=a.prototype=i.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,j;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return u.prototype=a,n(P,"constructor",a),n(a,"constructor",u),u.displayName=n(a,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=r},685:function(t){"use strict";t.exports=i}},p={};function d(e){var n=p[e];if(void 0!==n)return n.exports;var r=p[e]={exports:{}};return t[e](r,r.exports,d),r.exports}d.y=e,d.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return d.d(e,{a:e}),e},d.d=function(t,e){for(var n in e)d.o(e,n)&&!d.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),d.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},d.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;d.g.importScripts&&(t=d.g.location+"");var e=d.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=t}();var v={};return(0,d(968).s)(1),function(){"use strict";var t=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},e=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},r=function(t,n){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,n){if(t){if("string"==typeof t)return e(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[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.")}return(r=t[Symbol.iterator]()).next.bind(r)},i=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},p=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},y=function(){},g=function(t,e){if(!e)return t&&t.then?t.then(y):Promise.resolve()},m=function(t,e){if(void 0!==In)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(t," will not be registered.")),In;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new Tn(t,e);return In=n.register().then((function(){return n.controlling.then((function(){return n}))}))},b=function(){return null!=In?In:Promise.resolve(void 0)},w=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},S=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){w(i,r,o,u,a,"next",t)}function a(t){w(i,r,o,u,a,"throw",t)}u(void 0)}))}},x=function(t){return Bn.apply(this,arguments)},O=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},E=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){O(i,r,o,u,a,"next",t)}function a(t){O(i,r,o,u,a,"throw",t)}u(void 0)}))}},j=function(){return Un.apply(this,arguments)},k=function(){return Fn.apply(this,arguments)},A=function(){return Kn.apply(this,arguments)},C=function(){return $n.apply(this,arguments)},P=function(){return{current:Hn,notAvailable:"unavailable"===Hn,active:"on"===Hn}},T=function(t){"unavailable"!==Hn&&"unavailable"!==t&&(localStorage.setItem(zn,"on"===t?"active":"disabled"),Hn=t)},I=function(){return Vn.apply(this,arguments)},D=function(t,e){return"object"!=typeof e||Wn(e).forEach((function(n){t[n]=e[n]})),t},R=function(t,e){return Yn.call(t,e)},L=function(t,e){"function"==typeof e&&(e=e(Zn(t))),("undefined"==typeof Reflect?Wn:Reflect.ownKeys)(e).forEach((function(n){M(t,n,e[n])}))},M=function(t,e,n,r){Jn(t,e,D(n&&R(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},N=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),M(t.prototype,"constructor",t),{extend:L.bind(null,t.prototype)}}}},B=function(t,e,n){return tr.call(t,e,n)},U=function(t,e){return e(t)},F=function(t){if(!t)throw new Error("Assertion Failed")},K=function(t){qn.setImmediate?setImmediate(t):setTimeout(t,0)},$=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},z=function(t){var e={};for(var n in t)R(t,n)&&(e[n]=t[n]);return e},H=function(t){return rr.apply([],t)},V=function(t){ur="undefined"!=typeof WeakMap&&new WeakMap;var e=ar(t);return ur=null,e},q=function(t){return cr.call(t).slice(8,-1)},W=function(t){var e,n,r,o;if(1===arguments.length){if(Gn(t))return t.slice();if(this===fr&&"string"==typeof t)return[t];if(o=lr(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},G=function(t,e){pr=t,dr=e},Z=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(dr).map((function(t){return"\n"+t})).join("")):""},Y=function(t,e){this._e=yr(),this.name=t,this.message=e},J=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},Q=function(t,e,n,r){this._e=yr(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=J(t,e)},X=function(t,e){this._e=yr(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=J(t,e)},tt=function(){},et=function(t){return t},nt=function(t,e){return null==t||t===et?e:function(n){return e(t(n))}},rt=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},ot=function(t,e){return t===tt?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?rt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?rt(o,this.onerror):o),void 0!==i?i:n}},it=function(t,e){return t===tt?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?rt(n,this.onsuccess):n),r&&(this.onerror=this.onerror?rt(r,this.onerror):r)}},ut=function(t,e){return t===tt?e:function(n){var r=t.apply(this,arguments);D(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?rt(o,this.onsuccess):o),i&&(this.onerror=this.onerror?rt(i,this.onerror):i),void 0===r?void 0===u?void 0:u:D(r,u)}},at=function(t,e){return t===tt?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},ct=function(t,e){return t===tt?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}},st=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=tt,this._lib=!1;var e=this._PSD=zr;if(pr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Er)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&ft(this,this._value))}this._state=null,this._value=null,++e.ref,Gr(this,t)},lt=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},ft=function(t,e){if(Ur.push(e),null===t._state){var n=t._lib&&gt();e=Kr(e),t._state=!1,t._value=e,pr&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=Xn(e,"stack");e._promise=t,M(e,"stack",{get:function(){return Dr?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,Br.some((function(t){return t._value===r._value}))||Br.push(r),ht(t),n&&mt()}var r},ht=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)pt(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Vr&&(++Vr,Lr((function(){0==--Vr&&bt()}),[]))},pt=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Vr,Lr(dt,[n,t,e])}else t._listeners.push(e)},dt=function(t,e,n){try{Fr=e;var r,o=e._value;e._state?r=t(o):(Ur.length&&(Ur=[]),r=t(o),-1===Ur.indexOf(o)&&function(t){for(var e=Br.length;e;)if(Br[--e]._value===t._value)return void Br.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Fr=null,0==--Vr&&bt(),--n.psd.ref||n.psd.finalize()}},vt=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},yt=function(){gt()&&mt()},gt=function(){var t=Mr;return Mr=!1,Nr=!1,t},mt=function(){var t,e,n;do{for(;Hr.length>0;)for(t=Hr,Hr=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Hr.length>0);Mr=!0,Nr=!0},bt=function(){var t=Br;Br=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=qr.slice(0),n=e.length;n;)e[--n]()},wt=function(t){return new st(Er,!1,t)},_t=function(t,e){var n=zr;return function(){var r=gt(),o=zr;try{return At(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{At(o,!1),r&&mt()}}},St=function(t,e,n,r){var o=zr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++eo;var u=$r.env;i.env=Ir?{Promise:st,PromiseProp:{value:st,configurable:!0,writable:!0},all:st.all,race:st.race,allSettled:st.allSettled,any:st.any,resolve:st.resolve,reject:st.reject,nthen:Dt(u.nthen,i),gthen:Dt(u.gthen,i)}:{},e&&D(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=Pt(i,t,n,r);return 0===i.ref&&i.finalize(),a},xt=function(){return Yr.id||(Yr.id=++Jr),++Yr.awaits,Yr.echoes+=100,Yr.id},Ot=function(){return!!Yr.awaits&&(0==--Yr.awaits&&(Yr.id=0),Yr.echoes=100*Yr.awaits,!0)},Et=function(t){return Yr.echoes&&t&&t.constructor===Tr?(xt(),t.then((function(t){return Ot(),t}),(function(t){return Ot(),no(t)}))):t},jt=function(t){++to,Yr.echoes&&0!=--Yr.echoes||(Yr.echoes=Yr.id=0),Qr.push(zr),At(t,!0)},kt=function(){var t=Qr[Qr.length-1];Qr.pop(),At(t,!1)},At=function(t,e){var n=zr;if((e?!Yr.echoes||Xr++&&t===zr:!Xr||--Xr&&t===zr)||Tt(e?jt.bind(null,t):kt),t!==zr&&(zr=t,n===$r&&($r.env=Ct()),Ir)){var r=$r.env.Promise,o=t.env;Ar.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(qn,"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))}},Ct=function(){var t=qn.Promise;return Ir?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(qn,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Ar.then,gthen:t.prototype.then}:{}},Pt=function(t,e,n,r,o){var i=zr;try{return At(t,!0),e(n,r,o)}finally{At(i,!1)}},Tt=function(t){Pr.call(kr,t)},It=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=zr;n&&xt(),At(e,!0);try{return t.apply(this,arguments)}finally{At(o,!1),r&&Tt(Ot)}}},Dt=function(t,e){return function(n,r){return t.call(this,It(n,e),It(r,e))}},Rt=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(qn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),D(r,o)):qn.CustomEvent&&D(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&qn.dispatchEvent&&(dispatchEvent(r),!qn.PromiseRejectionEvent&&qn.onunhandledrejection))try{qn.onunhandledrejection(r)}catch(t){}pr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},Lt=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},Mt=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=V(e))[t],e}},Nt=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=at),o||(o=tt);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){Wn(t).forEach((function(e){var n=t[e];if(Gn(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Sr.InvalidArgument("Invalid event config");var r=i(e,et,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){K((function(){t.apply(null,e)}))}))}))}}))}},Bt=function(t,e){return N(e).from({prototype:t}),e},Ut=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},Ft=function(t,e){t.filter=Lt(t.filter,e)},Kt=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return Lt(r(),e())}:e,t.justLimit=n&&!r},$t=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Sr.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},zt=function(t,e,n){var r=$t(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},Ht=function(t,e,n,r){var o=t.replayFilter?Lt(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),R(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Vt(zt(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Vt(zt(t,r,n),Lt(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Vt=function(t,e,n,r){var o=_t(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=tt}),(function(e){t.fail(e),n=tt}))||o(t.value,t,(function(t){return n=t})),n()}))}))},qt=function(t){var e=void 0===t?"undefined":h(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=q(t);return"ArrayBuffer"===n?"binary":n},Wt=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},Gt=function(t,e){return t<e?-1:t===e?0:1},Zt=function(t,e){return t>e?-1:t===e?0:1},Yt=function(t,e,n){var r=c(t,go)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},Jt=function(t){return new t.Collection(t,(function(){return ee("")})).limit(0)},Qt=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Xt=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Yt(t,"String expected.");function h(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?Gt:Zt;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(function(){return te(a[0],c[f-1]+r)}));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,d))return!0;for(var p=null,v=d;v<f;++v){var y=Qt(o,h,a[v],c[v],u,s);null===y&&null===p?d=v+1:(null===p||u(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p},te=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},ee=function(t){return{type:1,lower:t,upper:t}},ne=function(t){return _t((function(e){return re(e),t(e.target.error),!1}))},re=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},oe=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+ie(e)}},ie=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},ue=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:$(n,(function(t){return[t.name,t]}))}},ae=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return er(t,e)}:function(e){return er(e,t)};var e},ce=function(t){return[].slice.call(t)},se=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},le=function(t,e){var n,r,o,i,u,a,f=t._novip,h=e.db,p=(n=f._middlewares,r=h,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=ce((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=Gn(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:ae(e)},indexes:ce(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:Gn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ae(o)};return i[se(o)]=u,u})),getIndexByKeyPath:function(t){return i[se(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[se(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=_t(t);var s=e.objectStore(o),f=null==s.keyPath,h="put"===n||"add"===n;if(!h&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var p,d=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,re(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(p=s.clear()):v.push(p=s.delete(r(a)))}else{var b=l(h?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(h)for(var S=0;S<d;++S)v.push(p=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),p.onerror=m;else for(var x=0;x<d;++x)v.push(p=s[n](w[x])),p.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};p.onerror=function(t){m(t),O(t)},p.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=_t(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},h=ne(r),p=0;p<a;++p)null!=n[p]&&((i=u.get(n[p]))._pos=p,i.onsuccess=f,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=_t(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=ne(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=_t(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,h=s.range,p=u.objectStore(o),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===c)return e({result:[]});if(n){var y=a?d.getAll(v,l):d.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=ne(i)}else{var g=0,m=a||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=ne(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=_t(t);var s=i.index,l=i.range,f=e.objectStore(o),h=s.isPrimaryKey?f:f.index(s.name),p=u?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=ne(c),d.onsuccess=_t((function(n){var r=d.result;if(r){r.___id=++_o,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=_t(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=_t(t),d.onerror=ne(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(d.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=_t((function(t){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=_t((function(e){return t(e.target.result)})),l.onerror=ne(e)}))}};var e,n,o})),h={};return f.forEach((function(t){return h[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!h[t])throw new Error("Table '".concat(t,"' not found"));return h[t]},MIN_KEY:-1/0,MAX_KEY:wo(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=p.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},fe=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=Xn(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?M(e,t,{get:function(){return this.table(t)},set:function(e){Jn(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},he=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},pe=function(t,e){return t._cfg.version-e._cfg.version},de=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!ao)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},ve=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return ye(o,t)})),o},ye=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},ge=function(t,e,n){var r={};return B(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=oe(ie(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=oe(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=ue(t,i,u)})),r},me=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,h="string"==typeof f?f:"["+B(f).join("+")+"]";if(e[u]){var p=e[u].idxByName[h];p&&(p.name=l,delete e[u].idxByName[h],e[u].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&qn.WorkerGlobalScope&&c(qn,qn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},be=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new Io("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},we=function(t){return t&&"function"==typeof t.databases},_e=function(t){return St((function(){return zr.letThrough=!0,t()}))},Se=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},xe=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Gn(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},Oe=function(t,e,n){var r=arguments.length;if(r<2)throw new Sr.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=H(o);return[t,i,n]},Ee=function(t,e,n){for(var r=Gn(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},je=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===po(e.keys[o],t[i])&&(r.push(n?V(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},ke=function(t){return!("from"in t)},Ae=function(t,e){ke(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Co(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},Ce=function(t){var e=ke(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&po(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||po(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},Pe=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=Te(u)}t.d=Te(t)},Te=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},Ie=function(t,e){return Wn(e).forEach((function(n){Ae(t[n]||(t[n]=new Ao),e[n])})),t},De=function(t){var e=Mo;try{Mo=!0,mo.storagemutated.fire(t)}finally{Mo=e}},Re=function(t,e){return!e||"object"!==Ho(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},Le=function(){return new Vo},Me=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Ne=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},Be=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Ne(i,r,o,u,a,"next",t)}function a(t){Ne(i,r,o,u,a,"throw",t)}u(void 0)}))}},Ue=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Fe=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Ue(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Ke=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},$e=function(){return Go},ze=function(){return Zo.apply(this,arguments)},He=function(t,e,n,r){return Yo.apply(this,arguments)},Ve=function(){return Jo.apply(this,arguments)},qe=function(t,e,n,r){return Qo.apply(this,arguments)},We=function(t,e,n){return Xo.apply(this,arguments)},Ge=function(t,e){return ti.apply(this,arguments)},Ze=function(t,e){return ei.apply(this,arguments)},Ye=function(t){return ni.apply(this,arguments)},Je=function(t){return ri.apply(this,arguments)},Qe=function(t){return oi.apply(this,arguments)},Xe=function(t){var e;return!!(null===(e=Wo[t])||void 0===e?void 0:e.options.onBeginEditSyncItem)},tn=function(t){return ii.apply(this,arguments)},en=function(t){return ui.apply(this,arguments)},nn=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Wo[t]={type:t,dependsOn:e,process:n,options:r}},rn=function(){if(!zo&&!(zo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return zo(ai)},on=function(){return pi+hi()},un=function(t){return t.startsWith(pi)},an=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},cn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},sn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){cn(i,r,o,u,a,"next",t)}function a(t){cn(i,r,o,u,a,"throw",t)}u(void 0)}))}},ln=function(t){return function(t){if(Array.isArray(t))return an(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return an(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?an(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},fn=function(){return Object.values(di)},hn=function(t){di[t.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(t.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),di[t.id]=t},pn=function(t){return vi.apply(this,arguments)},dn=function(t,e){return yi.apply(this,arguments)},vn=function(t,e){return gi.apply(this,arguments)},yn=function(t,e,n){return mi.apply(this,arguments)},gn=function(t,e){return bi.apply(this,arguments)},mn=function(t,e,n){return wi.apply(this,arguments)},bn=function(t,e){return _i.apply(this,arguments)},wn=function(t,e,n){return Si.apply(this,arguments)},_n=function(){return xi.apply(this,arguments)},Sn=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},xn=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){Sn(i,r,o,u,a,"next",t)}function a(t){Sn(i,r,o,u,a,"throw",t)}u(void 0)}))}},On=function(){return kn(),Oi},En=function(t,e){kn(),hn({type:"patient",displayName:e.displayName,id:t,isSynced:function(){return Promise.resolve(!0)},sync:function(t,n){return e.onOfflinePatientAdded({patientUuid:t,signal:null!=n?n:(new AbortController).signal})}})},jn=function(t){return Ei.apply(this,arguments)},kn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};d.r(v),d.d(v,{activateOfflineCapability:function(){return I},beginEditSynchronizationItem:function(){return tn},canBeginEditSynchronizationItemsOfType:function(){return Xe},deleteSynchronizationItem:function(){return en},generateOfflineUuid:function(){return on},getCurrentOfflineMode:function(){return P},getDynamicOfflineDataEntries:function(){return pn},getDynamicOfflineDataEntriesFor:function(){return dn},getDynamicOfflineDataHandlers:function(){return fn},getFullSynchronizationItems:function(){return Je},getFullSynchronizationItemsFor:function(){return Ze},getOfflineDb:function(){return Le},getOfflinePatientDataStore:function(){return On},getOfflineSynchronizationStore:function(){return $e},getOmrsServiceWorker:function(){return b},getSynchronizationItem:function(){return Qe},getSynchronizationItems:function(){return Ye},getSynchronizationItemsFor:function(){return Ge},isOfflineUuid:function(){return un},messageOmrsServiceWorker:function(){return x},offlineUuidPrefix:function(){return pi},omrsOfflineCachingStrategyHttpHeaderName:function(){return Ln},omrsOfflineResponseBodyHttpHeaderName:function(){return Dn},omrsOfflineResponseStatusHttpHeaderName:function(){return Rn},putDynamicOfflineData:function(){return vn},putDynamicOfflineDataFor:function(){return yn},queueSynchronizationItem:function(){return We},queueSynchronizationItemFor:function(){return qe},registerOfflinePatientHandler:function(){return En},registerOmrsServiceWorker:function(){return m},removeDynamicOfflineData:function(){return gn},removeDynamicOfflineDataFor:function(){return mn},runSynchronization:function(){return ze},setCurrentOfflineMode:function(){return T},setupDynamicOfflineDataHandler:function(){return hn},setupOfflineSync:function(){return nn},syncAllDynamicOfflineData:function(){return bn},syncDynamicOfflineData:function(){return wn},syncOfflinePatientData:function(){return jn}});try{self["workbox:window:6.5.1"]&&_()}catch(t){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var An=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Cn=function(t,e){this.type=t,Object.assign(this,e)},Pn={type:"SKIP_WAITING"},Tn=function(e){var n,r,o=function(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new An,r.en=new An,r.on=new An,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!i(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new Cn(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new Cn("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new Cn("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return p(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Cn("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var u,a=o.prototype;return a.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var u=this;return e=function(){return u.mn=Boolean(navigator.serviceWorker.controller),u.yn=u.pn(),p(u.bn(),(function(t){u.fn=t,u.yn&&(u.hn=u.yn,u.en.resolve(u.yn),u.on.resolve(u.yn),u.yn.addEventListener("statechange",u.ln,{once:!0}));var e=u.fn.waiting;return e&&i(e.scriptURL,u.sn.toString())&&(u.hn=e,Promise.resolve().then((function(){u.dispatchEvent(new Cn("waiting",{sw:e,wasWaitingBeforeRegister:!0}))})).then((function(){}))),u.hn&&(u.rn.resolve(u.hn),u.an.add(u.hn)),u.fn.addEventListener("updatefound",u.cn),navigator.serviceWorker.addEventListener("controllerchange",u.dn),u.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return g(new Promise((function(t){return window.addEventListener("load",t)})))}())&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},a.update=function(){try{return this.fn?g(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},a.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},a.messageSW=function(e){try{return p(this.getSW(),(function(n){return t(n,e)}))}catch(t){return Promise.reject(t)}},a.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&t(this.fn.waiting,Pn)},a.pn=function(){var t=navigator.serviceWorker.controller;return t&&i(t.scriptURL,this.sn.toString())?t:void 0},a.bn=function(){try{var t=this;return function(e,n){try{var r=p(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(u=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(o.prototype,u),o}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=r(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),In=void 0,Dn="x-omrs-offline-response-body",Rn="x-omrs-offline-response-status",Ln="x-omrs-offline-caching-strategy",Mn=d(602),Nn=d.n(Mn);function Bn(){return(Bn=S(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,b();case 2:if(!(n=t.sent)){t.next=9;break}return t.next=6,n.messageSW(e);case 6:t.t0=t.sent,t.next=10;break;case 9:t.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return t.abrupt("return",t.t0);case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Un(){return(Un=E(Nn().mark((function t(){var e;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=window.sessionStorage,t.prev=1,e.setItem("someKeyHere","test"),e.removeItem("someKeyHere"),t.next=10;break;case 6:if(t.prev=6,t.t0=t.catch(1),t.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==e.length){t.next=10;break}return t.abrupt("return",!0);case 10:return t.abrupt("return",!1);case 11:case"end":return t.stop()}}),t,null,[[1,6]])})))).apply(this,arguments)}function Fn(){return(Fn=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",!window.indexedDB);case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Kn(){return Kn=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){var e=indexedDB.open("test");e.onerror=function(){return t(!0)},e.onsuccess=function(){return t(!1)}})));case 1:case"end":return t.stop()}}),t)}))),Kn.apply(this,arguments)}function $n(){return($n=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,A();case 2:if(t.t1=t.sent,t.t1){t.next=7;break}return t.next=6,k();case 6:t.t1=t.sent;case 7:if(t.t0=t.t1,t.t0){t.next=12;break}return t.next=11,j();case 11:t.t0=t.sent;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var zn="openmrs3:offline-mode",Hn="unavailable";function Vn(){return(Vn=E(Nn().mark((function t(){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,C();case 2:t.sent||(Hn="active"===localStorage.getItem(zn)?"on":"off"),navigator.onLine;case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Wn=Object.keys,Gn=Array.isArray;"undefined"==typeof Promise||qn.Promise||(qn.Promise=Promise);var Zn=Object.getPrototypeOf,Yn={}.hasOwnProperty,Jn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(t,e){var n;return Qn(t,e)||(n=Zn(t))&&Xn(n,e)}var tr=[].slice;function er(t,e){if(R(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=er(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:er(a,e.substr(u+1))}}function nr(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){F("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)nr(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?Gn(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),nr(c,a,n)}}else void 0===n?Gn(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var rr=[].concat,or="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return qn[t]})),ir=or.map((function(t){return qn[t]}));$(or,(function(t){return[t,!0]}));var ur=null;function ar(t){if(!t||"object"!=typeof t)return t;var e=ur&&ur.get(t);if(e)return e;if(Gn(t)){e=[],ur&&ur.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(ar(t[n]))}else if(ir.indexOf(t.constructor)>=0)e=t;else{var o=Zn(t);for(var i in e=o===Object.prototype?{}:Object.create(o),ur&&ur.set(t,e),t)R(t,i)&&(e[i]=ar(t[i]))}return e}var cr={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",lr="symbol"==(void 0===sr?"undefined":h(sr))?function(t){var e;return null!=t&&(e=t[sr])&&e.apply(t)}:function(){return null},fr={},hr="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},pr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),dr=function(){return!0},vr=!new Error("").stack;function yr(){if(vr)try{throw yr.arguments,new Error}catch(t){return t}return new Error}var gr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],mr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(gr),br={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"};N(Y).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Z(this._e,2))}},toString:function(){return this.name+": "+this.message}}),N(Q).from(Y),N(X).from(Y);var wr=mr.reduce((function(t,e){return t[e]=e+"Error",t}),{}),_r=Y,Sr=mr.reduce((function(t,e){var n=function(t,n){this._e=yr(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=br[e]||r,this.inner=null)},r=e+"Error";return N(n).from(_r),t[e]=n,t}),{});Sr.Syntax=SyntaxError,Sr.Type=TypeError,Sr.Range=RangeError;var xr=gr.reduce((function(t,e){return t[e+"Error"]=Sr[e],t}),{}),Or=mr.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Sr[e]),t}),{});Or.ModifyError=Q,Or.DexieError=Y,Or.BulkError=X;var Er={},jr=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,Zn(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,Zn(e),t]}(),3),kr=jr[0],Ar=jr[1],Cr=jr[2],Pr=Ar&&Ar.then,Tr=kr&&kr.constructor,Ir=!!Cr,Dr=!1,Rr=Cr?function(){Cr.then(yt)}:qn.setImmediate?setImmediate.bind(null,yt):qn.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){yt(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(yt,0)},Lr=function(t,e){Hr.push([t,e]),Nr&&(Rr(),Nr=!1)},Mr=!0,Nr=!0,Br=[],Ur=[],Fr=null,Kr=et,$r={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Rt,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{Rt(t[0],t[1])}catch(t){}}))}},zr=$r,Hr=[],Vr=0,qr=[],Wr={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==zr||n!==to),u=i&&!Ot(),a=new st((function(n,a){pt(o,new lt(It(t,e,i,u),It(r,e,i,u),n,a,e))}));return pr&&vt(a,this),a},e=zr,n=to;return t.prototype=Er,t},set:function(t){M(this,"then",t&&t.prototype===Er?Wr:{get:function(){return t},set:Wr.set})}};function Gr(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&gt();e&&"function"==typeof e.then?Gr(t,(function(t,n){c(e,st)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,ht(t)),n&&mt()}}),ft.bind(null,t))}catch(e){ft(t,e)}}function Zr(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=Z(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return pr&&((r=Z(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&Zr(t._prev,e,n)),e}L(st.prototype,{then:Wr,_then:function(t,e){pt(this,new lt(null,null,t,e,zr))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):wt(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):wt(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),wt(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Dr=!0;var t=Zr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Dr=!1}}},timeout:function(t,e){var n=this;return t<1/0?new st((function(r,o){var i=setTimeout((function(){return o(new Sr.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&M(st.prototype,Symbol.toStringTag,"Dexie.Promise"),$r.env=Ct(),L(st,{all:function(){var t=W.apply(null,arguments).map(Et);return new st((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return st.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,st))return t;if(t&&"function"==typeof t.then)return new st((function(e,n){t.then(e,n)}));var e=new st(Er,!0,t);return vt(e,Fr),e},reject:wt,race:function(){var t=W.apply(null,arguments).map(Et);return new st((function(e,n){t.map((function(t){return st.resolve(t).then(e,n)}))}))},PSD:{get:function(){return zr},set:function(t){return zr=t}},totalEchoes:{get:function(){return to}},newPSD:St,usePSD:Pt,scheduler:{get:function(){return Lr},set:function(t){Lr=t}},rejectionMapper:{get:function(){return Kr},set:function(t){Kr=t}},follow:function(t,e){return new st((function(n,r){return St((function(e,n){var r=zr;r.unhandleds=[],r.onunhandled=n,r.finalize=rt((function(){var t=this;qr.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),qr.splice(qr.indexOf(r),1)})),++Vr,Lr((function(){0==--Vr&&bt()}),[])}),r.finalize),t()}),e,n,r)}))}}),Tr&&(Tr.allSettled&&M(st,"allSettled",(function(){var t=W.apply(null,arguments).map(Et);return new st((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return st.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Tr.any&&"undefined"!=typeof AggregateError&&M(st,"any",(function(){var t=W.apply(null,arguments).map(Et);return new st((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return st.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var Yr={awaits:0,echoes:0,id:0},Jr=0,Qr=[],Xr=0,to=0,eo=0;-1===(""+Pr).indexOf("[native code]")&&(xt=Ot=tt);var no=st.reject;function ro(t,e,n,r){if(t.idbdb&&(t._state.openComplete||zr.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return ro(t,e,n,r)}))):no(o)}return o._promise(e,(function(t,e){return St((function(){return zr.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return no(new Sr.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return no(new Sr.DatabaseClosed);t.open().catch(tt)}return t._state.dbReadyPromise.then((function(){return ro(t,e,n,r)}))}var oo=String.fromCharCode(65535),io="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",uo=[],ao="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),co=ao,so=ao,lo=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},fo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},ho=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Sr.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||zr.trans,i=this.name,u=gt();try{return o&&o.db===this.db?o===zr.trans?o._promise(t,r,n):St((function(){return o._promise(t,r,n)}),{trans:o,transless:zr.transless||zr}):ro(this.db,t,[this.name],r)}finally{u&&mt()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(Gn(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=Wn(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==oo)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&pr&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?Lt(a,c&&c.multi?function(t){var n=er(t,r);return Gn(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,er(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,Gn(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(R(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){D(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Mt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||Gn(t))return this.where(":id").equals(t).modify(e);var n=er(t,this.schema.primKey.keyPath);if(void 0===n)return no(new Sr.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?Wn(e).forEach((function(n){nr(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=Mt(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{nr(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:fo})})).then((function(t){return t.numFailures?st.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Mt(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Sr.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Sr.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(Mt(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new X("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new X("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function po(t,e){try{var n=qt(t),r=qt(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Wt(t),Wt(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=po(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var vo=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,no.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,no.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=Lt(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return Ht(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&D(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return Ht(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(Ut(n,!0))return r.count({trans:t,query:{index:$t(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return Ht(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&Ut(n,!0)&&n.limit>0){var r=n.valueMapper,o=$t(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return Ht(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,Ut(e)?Kt(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):Kt(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),Kt(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return Ft(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return Ft(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=Lt(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&Ut(e,!0)&&e.limit>0)return this._read((function(t){var n=$t(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return Ft(this._ctx,(function(t){var e=t.primaryKey.toString(),r=R(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=Wn(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];er(e,o)!==a&&(nr(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,h=[],p=0,d=[],v=function(t,e){var n=e.failures,r=e.numFailures;p+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=Wn(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;h.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(h){for(var p=[],d=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=h[m],w={value:V(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===po(l(b),l(w.value))?(d.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),p.push(w.value)))}var _=Ut(n)&&n.limit===1/0&&("function"!=typeof t||t===yo)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(p.length,t)}))).then((function(){return(d.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:d,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(d.length,t)}))})).then((function(){return(g.length>0||_&&t===yo)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(h.length>0)throw new Q("Error modifying one or more objects",h,p,d);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return Ut(t)&&(t.isPrimKey&&!so||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new Q("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(yo)}}]),t}(),yo=function(t,e){return e.value=null},go=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Jt(this):new this.Collection(this,(function(){return te(t,e,!n,!r)}))}catch(t){return Yt(this,io)}}},{key:"equals",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return ee(t)}))}},{key:"above",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Yt(this,io):new this.Collection(this,(function(){return te(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Yt(this,"String expected."):this.between(t,t+oo,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Xt(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],oo)}},{key:"equalsIgnoreCase",value:function(t){return Xt(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Jt(this):Xt(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=W.apply(fr,arguments);return 0===t.length?Jt(this):Xt(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,oo)}},{key:"anyOf",value:function(){var t=this,e=W.apply(fr,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Yt(this,io)}if(0===e.length)return Jt(this);var r=new this.Collection(this,(function(){return te(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=W.apply(fr,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Yt(this,io)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return h(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return Jt(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Yt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Sr.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,h=i;try{(s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[])).sort(r)}catch(t){return Yt(this,io)}var p=0,d=f?function(t){return i(t,s[p][1])>0}:function(t){return i(t,s[p][1])>=0},v=l?function(t){return u(t,s[p][0])>0}:function(t){return u(t,s[p][0])>=0},y=d,g=new this.Collection(this,(function(){return te(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=d,h=i):(y=v,h=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++p===s.length)return e(r),!1;return!((d(u=o)||v(u))&&(0===n._cmp(o,s[p][1])||0===n._cmp(o,s[p][0])||e((function(){h===i?t.continue(s[p][0]):t.continue(s[p][1])})),1));var u})),g}},{key:"startsWithAnyOf",value:function(){var t=W.apply(fr,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?Jt(this):this.inAnyRange(t.map((function(t){return[t,t+oo]}))):Yt(this,"startsWithAnyOf() only works with strings")}}]),t}(),mo=Nt(null,"storagemutated"),bo=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return F(!zr.global),++this._reculock,1!==this._reculock||zr.global||(zr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(F(!zr.global),0==--this._reculock)for(zr.global||(zr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{Pt(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&zr.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(F(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Sr.DatabaseClosed(r);case"MissingAPIError":throw new Sr.MissingAPI(r.message,r);default:throw new Sr.OpenFailed(r)}if(!this.active)throw new Sr.TransactionInactive;return F(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=_t((function(n){re(n),e._reject(t.error)})),t.onabort=_t((function(n){re(n),e.active&&e._reject(new Sr.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=_t((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&mo.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return no(new Sr.ReadOnly("Transaction is readonly"));if(!this.active)return no(new Sr.TransactionInactive);if(this._locked())return new st((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},zr])}));if(n)return St((function(){var t=r,n=new st((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new st((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=st.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new st((function(t,r){n.then((function(n){return e._waitingQueue.push(_t(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(_t(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Sr.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(R(e,t))return e[t];var n=this.schema[t];if(!n)throw new Sr.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),wo=function(t){try{return t.only([[]]),wo=function(){return[[]]},[[]]}catch(t){return wo=function(){return oo},oo}},_o=0,So=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){Wn(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return oe(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),Gn(r),0===e)})),o=r.shift();if(o.multi)throw new Sr.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Sr.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Sr.Schema("Index must have a name and cannot be an empty string")})),e[n]=ue(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?D(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){D(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,he(e,[e._allTables,e,e.Transaction.prototype]),fe(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],Wn(o),o),e._storeNames=Wn(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=ct(this._cfg.contentUpgrade||tt,t),this}}]),t}();function xo(t,e,n,r,o){return st.resolve().then((function(){var i=zr.transless||zr,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===wr.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return xo(t,e,n,null,o)}))):no(r)}var c,s=hr(o);s&&xt();var l=st.follow((function(){if(c=o.call(u,u))if(s){var t=Ot.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xe(c))}),a);return(c&&"function"==typeof c.then?st.resolve(c).then((function(t){return u.active?t:no(new Sr.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),no(t)}))}))}var Oo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:Ee(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:Ee(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=se(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:ae(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,h=void 0;try{for(var p,d=o.indexes[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;a(v.keyPath,0,v)}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[se(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(Ee(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(Ee(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function Eo(t,e,n,r){return n=n||{},r=r||"",Wn(t).forEach((function(o){if(R(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=q(i);a!==q(u)?n[r+o]=e[o]:"Object"===a?Eo(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),Wn(e).forEach((function(o){R(t,o)||(n[r+o]=e[o])})),n}var jo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e,o,i=zr.trans,u=t.keys||(e=r,"delete"===(o=t).type?o.keys:o.keys||o.values.map(e.extractKey));if(!u)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:u}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,u).then((function(e){var o=u.map((function(n,o){var u=e[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,i);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],i);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||nr(t.values[o],r.keyPath,n))}else{var h=Eo(u,t.values[o]),p=l.fire.call(s,h,n,u,i);if(p){var d=t.values[o];Object.keys(p).forEach((function(t){R(d,t)?d[t]=p[t]:nr(d,t,p[t])}))}}return s}));return n.mutate(t).then((function(n){for(var r=n.failures,i=n.results,a=n.numFailures,c=n.lastResult,s=0;s<u.length;++s){var l=i?i[s]:u[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===t.type&&e[s]?t.values[s]:l)}return{failures:r,results:i,numFailures:a,lastResult:c}})).catch((function(t){return o.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=zr.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===tt&&l.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===tt)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===tt)break;return i._promise("readwrite",(function(){return h((e=t).trans,e.range,1e4);var e}),!0)}return n.mutate(t);function h(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},ko={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=je(t.keys,t.trans._cache,"clone"===t.cache);return e?st.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?V(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},Ao=function(t,e){if(!this){var n=new Ao;return t&&"d"in t&&D(n,t),n}D(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Co(t,e,n){var r=po(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(ke(t))return D(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(po(n,t.from)<0)return o?Co(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},Pe(t);if(po(e,t.to)>0)return i?Co(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},Pe(t);po(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),po(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&Ae(t,o),i&&u&&Ae(t,i)}}L(Ao.prototype,a({add:function(t){return Ae(this,t),this},addKey:function(t){return Co(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Co(e,t,t)})),this}},sr,(function(){return Ce(this)})));var Po,To={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new Ao(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new Ao)},s=c(""),f=c(":dels"),h=t.type,p=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),d=p[0],v=p[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(Gn(d)){"delete"!==h&&(d=t.results),s.addKeys(d);var e=je(d,y);e||"add"===h||f.addKeys(d),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&Gn(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==po(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(d){var r={from:d.lower,to:d.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),h=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new Ao(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},p={get:function(t){return[u,new Ao(t.key)]},getMany:function(t){return[u,(new Ao).addKeys(t.keys)]},count:h,query:h,openCursor:h};return Wn(p).forEach((function(t){f[t]=function(i){var u=zr.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new Ao)},h=f(""),d=f(":dels"),v=l(p[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return h.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?h.addKeys(n):d.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return d.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return d.addKey(t),t}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return e}))}d.add(n)}}return o[t].apply(this,arguments)}})),f}})}},Io=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f,h={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:tt,dbReadyPromise:null,cancelOpen:tt,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};h.dbReadyPromise=new st((function(t){h.dbReadyResolve=t})),h.openCanceller=new st((function(t,e){h.cancelOpen=e})),this._state=h,this.name=e,this.on=Nt(this,"populate","blocked","versionchange","close",{ready:[ct,tt]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||st.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,Bt(vo.prototype,(function(t,e){this.db=a;var n=fo,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.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:u!==et?u:null}}))),this.Table=(f=this,Bt(ho.prototype,(function(t,e,n){this.db=f,this._tx=n,this.name=t,this.schema=e,this.hook=f._allTables[t]?f._allTables[t].hook:Nt(null,{creating:[ot,tt],reading:[nt,et],updating:[ut,tt],deleting:[it,tt]})}))),this.Transaction=(l=this,Bt(bo.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=Nt(this,"complete","error","abort"),this.parent=o||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 st((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),no(t)}))}))),this.Version=function(t){return Bt(So.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Bt(go.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Sr.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=wo(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),uo.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Oo),this.use(jo),this.use(To),this.use(ko),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Sr.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Sr.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(pe),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||zr.letThrough||this._vip)?t():new st((function(t,n){if(e._state.openComplete)return n(new Sr.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Sr.DatabaseClosed);e.open().catch(tt)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Sr.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?no(n.dbOpenError):t}));pr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return st.race([o,("undefined"==typeof navigator?st.resolve():Se()).then((function(){return new st((function(o,i){if(e(),!r)throw new Sr.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Sr.MissingAPI;s.onerror=ne(i),s.onblocked=_t(t._fireOnBlocked),s.onupgradeneeded=_t((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=re,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=_t((function(){i(new Sr.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=ne(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=zr.transless||zr;St((function(){var r,c,s,l,f,h,p,d,v;zr.trans=i,zr.transless=a,0===e?(Wn(o).forEach((function(t){ve(n,t,o[t].primKey,o[t].indexes)})),le(t,n),st.follow((function(){return t.on.populate.fire(i)})).catch(u)):(r=t,c=e,s=i,l=n,f=r._novip,h=[],p=f._versions,d=f._dbSchema=ge(0,f.idbdb,l),v=!1,p.filter((function(t){return t._cfg.version>=c})).forEach((function(t){h.push((function(){var e=d,n=t._cfg.dbschema;me(f,e,l),me(f,n,l),d=f._dbSchema=n;var r=de(e,n);r.add.forEach((function(t){ve(l,t[0],t[1].primKey,t[1].indexes)})),r.change.forEach((function(t){if(t.recreate)throw new Sr.Upgrade("Not yet support for changing primary key");var e=l.objectStore(t.name);t.add.forEach((function(t){return ye(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),ye(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var o=t._cfg.contentUpgrade;if(o&&t._cfg.version>c){le(f,l),s._memoizedTables={},v=!0;var i=z(n);r.del.forEach((function(t){i[t]=e[t]})),he(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],Wn(i),i),s.schema=i;var u,a=hr(o);a&&xt();var h=st.follow((function(){if((u=o(s))&&a){var t=Ot.bind(null,null);u.then(t,t)}}));return u&&"function"==typeof u.then?st.resolve(u):h.then((function(){return u}))}})),h.push((function(e){var n,r;v&&co||(n=t._cfg.dbschema,r=e,[].slice.call(r.db.objectStoreNames).forEach((function(t){return null==n[t]&&r.db.deleteObjectStore(t)}))),he(f,[f.Transaction.prototype]),fe(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function t(){return h.length?st.resolve(h.shift()(s.idbtrans)).then(t):st.resolve()}().then((function(){var t,e;e=l,Wn(t=d).forEach((function(n){e.db.objectStoreNames.contains(n)||ve(e,n,t[n].primKey,t[n].indexes)}))}))).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=_t((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,h=B(f.objectStoreNames);if(h.length>0)try{var p=f.transaction(1===(l=h).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=ge(0,e,n);r._storeNames=B(e.objectStoreNames,0),fe(r,[r._allTables],Wn(o),o)}(t,f,p):(me(t,t._dbSchema,p),r=p,!((i=de(ge(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),le(t,p)}catch(t){}uo.push(t),f.onversionchange=_t((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=_t((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).put({name:e}).catch(tt)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],st.resolve(_e((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ct,tt);return n.onReadyBeingFired=[],st.resolve(_e((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),no(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=uo.indexOf(this);if(e>=0&&uo.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new st((function(e){t.dbReadyResolve=e})),t.openCanceller=new st((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Sr.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new st((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=_t((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!we(n)&&"__dbnames"!==e&&be(n,r).delete(e).catch(tt)}(t._deps,t.name),r()})),e.onerror=ne(o),e.onblocked=i._fireOnBlocked};if(e)throw new Sr.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return Wn(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=Oe.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=zr.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Sr.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Sr.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Sr.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):no(t)}var l=xo.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):zr.trans?Pt(zr.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!R(this._allTables,t))throw new Sr.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Do="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ro=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Do,value:function(){return this}}]),t}();try{Po={indexedDB:qn.indexedDB||qn.mozIndexedDB||qn.webkitIndexedDB||qn.msIndexedDB,IDBKeyRange:qn.IDBKeyRange||qn.webkitIDBKeyRange}}catch(t){Po={indexedDB:null,IDBKeyRange:null}}var Lo=Io;L(Lo,s({},Or,{delete:function(t){return new Lo(t,{addons:[]}).delete()},exists:function(t){return new Lo(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return we(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):be(e,n).toCollection().primaryKeys()}(Lo.dependencies).then(t)}catch(t){return no(new Sr.MissingAPI)}},defineClass:function(){return function(t){D(this,t)}},ignoreTransaction:function(t){return zr.trans?Pt(zr.transless,t):t()},vip:_e,async:function(t){return function(){try{var e=xe(t.apply(this,arguments));return e&&"function"==typeof e.then?e:st.resolve(e)}catch(t){return no(t)}}},spawn:function(t,e,n){try{var r=xe(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:st.resolve(r)}catch(t){return no(t)}},currentTransaction:{get:function(){return zr.trans||null}},waitFor:function(t,e){var n=st.resolve("function"==typeof t?Lo.ignoreTransaction(t):t).timeout(e||6e4);return zr.trans?zr.trans.waitFor(n):n},Promise:st,debug:{get:function(){return pr},set:function(t){G(t,"dexie"===t?function(){return!0}:lo)}},derive:N,extend:D,props:L,override:U,Events:Nt,on:mo,liveQuery:function(t){return new Ro((function(e){var n=function(){return Wn(u).some((function(t){return i[t]&&function(t,e){var n=Ce(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=Ce(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(po(a.from,o.to)<=0&&po(a.to,o.from)>=0)return!0;po(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=hr(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,mo.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){Ie(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var h={},p=function(e){r&&xt();var n=function(){return St(t,{subscr:e,trans:null})},o=zr.trans?Pt(zr.transless,n):n();return r&&o.then(Ot,Ot),o}(h);s||(mo("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(t){c=!1,o||(n()?f():(i={},u=h,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:Ie,getByKeyPath:er,setByKeyPath:nr,delByKeyPath:function(t,e){"string"==typeof e?nr(t,e,void 0):"length"in e&&[].map.call(e,(function(e){nr(t,e,void 0)}))},shallowClone:z,deepClone:V,getObjectDiff:Eo,cmp:po,asap:K,minKey:-1/0,addons:[],connections:uo,errnames:wr,dependencies:Po,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),Lo.maxKey=wo(Lo.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(mo("storagemutated",(function(t){var e;Mo||(ao?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),Mo=!0,dispatchEvent(e),Mo=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;Mo||De(e)})));var Mo=!1;if("undefined"!=typeof BroadcastChannel){var No=new BroadcastChannel("x-storagemutated-1");mo("storagemutated",(function(t){Mo||No.postMessage(t)})),No.onmessage=function(t){t.data&&De(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){mo("storagemutated",(function(t){try{Mo||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&De(e.changedParts)}}));var Bo=self.document&&navigator.serviceWorker;Bo&&Bo.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&De(e.changedParts)}))}st.rejectionMapper=function(t,e){if(!t||c(t,Y)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!xr[t.name])return t;var n=new xr[t.name](e||t.message,t);return"stack"in t&&M(n,"stack",{get:function(){return this.inner.stack}}),n},G(pr,lo);var Uo=d(766),Fo=d(685);function Ko(t){return(Ko=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $o(t,e){return($o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var zo,Ho=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},Vo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$o(t,e)}(o,t);var e,n,r=(e=o,n=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(t){return!1}}(),function(){var t,r=Ko(e);if(n){var o=Ko(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return Re(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(Io),qo=new Vo,Wo={},Go=(0,Fo.createGlobalStore)("offline-synchronization",{});function Zo(){return Zo=Be(Nn().mark((function t(){var e,n,r,o,i,u,a,c,s,l,f,h,p;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Go.getState().synchronization){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,qo.syncQueue.count();case 4:e=t.sent,n={},r=Object.entries(Wo),o=r.length,i={},u=new AbortController,a=function(){var t=Go.getState().synchronization;Go.setState({synchronization:Fe({},t,{pendingCount:t.pendingCount-1})})},t.prev=11,Go.setState({synchronization:{totalCount:e,pendingCount:e,abortController:u}}),c=0;case 14:if(!(c<o&&r.length>0)){t.next=30;break}s=r.length;case 16:if(!s--){t.next=27;break}if(l=Ke(r[s],2),f=l[0],h=l[1],!(p=h.dependsOn.map((function(t){return n[t]}))).every(Boolean)){t.next=25;break}return i[f]={},t.next=23,Promise.all(p);case 23:n[f]=He(h,i,u,a),r.splice(s,1);case 25:t.next=16;break;case 27:c++,t.next=14;break;case 30:return t.next=32,Promise.allSettled(Object.values(n));case 32:return t.prev=32,Go.setState({synchronization:void 0}),t.finish(32);case 35:case"end":return t.stop()}}),t,null,[[11,,32,35]])}))),Zo.apply(this,arguments)}function Yo(){return Yo=Be(Nn().mark((function t(e,n,r,o){var i,u,a,c,s,l,f,h,p,d,v,y,g,m,b,w;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=e.type,u=e.dependsOn,a=e.process,c=[],s=[],t.next=5,Ve();case 5:return l=t.sent,t.next=8,qo.syncQueue.where({type:i,userId:l}).each((function(t,e){c.push([e.primaryKey,t.content,t.descriptor]),s.push(t.content)}));case 8:f=0;case 9:if(!(f<c.length)){t.next=31;break}return h=Ke(c[f],3),p=h[0],d=h[1],v=h[2],y=v.id,g=v.dependencies,m=void 0===g?[]:g,t.prev=11,t.next=14,a(d,{abort:r,index:f,items:s,userId:l,dependencies:m.map((function(t){var e=t.id,r=t.type;return u.includes(r)?n[r][e]:void 0}))});case 14:return b=t.sent,void 0!==y&&(n[i][y]=b),t.next=18,qo.syncQueue.delete(p);case 18:t.next=25;break;case 20:return t.prev=20,t.t0=t.catch(11),t.next=25,qo.syncQueue.update(p,{lastError:{name:null===t.t0||void 0===t.t0?void 0:t.t0.name,message:null!==(w=null===t.t0||void 0===t.t0?void 0:t.t0.message)&&void 0!==w?w:null===t.t0||void 0===t.t0?void 0:t.t0.toString()}});case 25:return t.prev=25,o(),t.finish(25);case 28:f++,t.next=9;break;case 31:case"end":return t.stop()}}),t,null,[[11,20,25,28]])}))),Yo.apply(this,arguments)}function Jo(){return(Jo=Be(Nn().mark((function t(){var e;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Uo.getLoggedInUser)();case 2:return e=t.sent,t.abrupt("return",(null==e?void 0:e.uuid)||"*");case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Qo(){return(Qo=Be(Nn().mark((function t(e,n,r,o){var i,u;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===(i=o&&o.id)){t.next=4;break}return t.next=4,qo.syncQueue.where({type:n,userId:e}).filter((function(t){return(null==t?void 0:t.descriptor.id)===i})).delete().catch(Io.errnames.DatabaseClosed);case 4:return t.next=6,qo.syncQueue.add({type:n,content:r,userId:e,descriptor:o||{},createdOn:new Date}).catch(Io.errnames.DatabaseClosed,(function(){return-1}));case 6:return u=t.sent,t.abrupt("return",u);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Xo(){return(Xo=Be(Nn().mark((function t(e,n,r){var o;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return o=t.sent,t.next=5,qe(o,e,n,r);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ti(){return(ti=Be(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ze(e,n);case 2:return r=t.sent,t.abrupt("return",r.map((function(t){return t.content})));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ei(){return(ei=Be(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,userId:e}:{userId:e},t.next=3,qo.syncQueue.where(r).toArray().catch(Io.errnames.DatabaseClosed,(function(){return[]}));case 3:return t.abrupt("return",t.sent);case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ni(){return(ni=Be(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return n=t.sent,t.next=5,Ge(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ri(){return(ri=Be(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Ve();case 2:return n=t.sent,t.next=5,Ze(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function oi(){return(oi=Be(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.get(e).catch(Io.errnames.DatabaseClosed,(function(){}));case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ii(){return(ii=Be(Nn().mark((function t(e){var n,r,o;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Qe(e);case 3:if(r=t.sent){t.next=6;break}throw new Error("No sync item with the ID ".concat(e," exists."));case 6:if(o=null===(n=Wo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){t.next=9;break}throw new Error("A sync item with the ID ".concat(e,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ui(){return(ui=Be(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,qo.syncQueue.delete(e).catch(Io.errnames.DatabaseClosed);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}for(var ai=new Uint8Array(16),ci=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,si=function(t){return"string"==typeof t&&ci.test(t)},li=[],fi=0;fi<256;++fi)li.push((fi+256).toString(16).substr(1));var hi=function(t,e,n){var r=(t=t||{}).random||(t.rng||rn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var o=0;o<16;++o)e[n+o]=r[o];return e}return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(li[t[e+0]]+li[t[e+1]]+li[t[e+2]]+li[t[e+3]]+"-"+li[t[e+4]]+li[t[e+5]]+"-"+li[t[e+6]]+li[t[e+7]]+"-"+li[t[e+8]]+li[t[e+9]]+"-"+li[t[e+10]]+li[t[e+11]]+li[t[e+12]]+li[t[e+13]]+li[t[e+14]]+li[t[e+15]]).toLowerCase();if(!si(n))throw TypeError("Stringified UUID is invalid");return n}(r)},pi="OFFLINE+",di={};function vi(){return(vi=sn(Nn().mark((function t(e){var n;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return n=t.sent,t.next=5,dn(n,e);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function yi(){return(yi=sn(Nn().mark((function t(e,n){var r,o;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n?{type:n,users:e}:{users:e},o=new Vo,t.next=4,o.dynamicOfflineData.where(r).toArray().catch(Io.errnames.DatabaseClosed,(function(){return[]}));case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function gi(){return(gi=sn(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,yn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function mi(){return(mi=sn(Nn().mark((function t(e,n,r){var o,i;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Vo,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(Io.errnames.DatabaseClosed,(function(){}));case 3:if(i=t.sent){t.next=9;break}return t.next=7,o.dynamicOfflineData.add({users:[e],type:n,identifier:r}).catch(Io.errnames.DatabaseClosed);case 7:t.next=12;break;case 9:if(i.users.includes(e)){t.next=12;break}return t.next=12,o.dynamicOfflineData.update(i.id,{users:ln(i.users).concat([e])}).catch(Io.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function bi(){return(bi=sn(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,_n();case 2:return r=t.sent,t.next=5,mn(r,e,n);case 5:return t.abrupt("return",t.sent);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function wi(){return(wi=sn(Nn().mark((function t(e,n,r){var o,i;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=new Vo,t.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:e}).catch(Io.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=t.sent)){t.next=12;break}if(!(i.users.length>1)){t.next=10;break}return t.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(t){return t!==e}))}).catch(Io.errnames.DatabaseClosed);case 8:t.next=12;break;case 10:return t.next=12,o.dynamicOfflineData.delete(i.id).catch(Io.errnames.DatabaseClosed);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _i(){return _i=sn(Nn().mark((function t(e,n){var r;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,pn(e);case 2:return r=t.sent,t.next=5,Promise.all(r.map(function(){var t=sn(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",wn(e.type,e.identifier,n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()));case 5:case"end":return t.stop()}}),t)}))),_i.apply(this,arguments)}function Si(){return Si=sn(Nn().mark((function t(e,n,r){var o,i,u,a,c,s,l,f,h;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,vn(e,n);case 2:return o=new Vo,t.next=5,_n();case 5:return i=t.sent,t.next=8,o.dynamicOfflineData.get({type:e,identifier:n}).catch(Io.errnames.DatabaseClosed,(function(){}));case 8:if(u=t.sent,a=fn().filter((function(t){return t.type===e})),u){t.next=12;break}return t.abrupt("return");case 12:return t.next=14,Promise.all(a.map(function(){var t=sn(Nn().mark((function t(e){var o,i,u;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e.sync(n,r),t.abrupt("return",{id:e.id,error:void 0});case 5:return t.prev=5,t.t0=t.catch(0),u=null!==(i=null===(o=t.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:t.t0.toString(),t.abrupt("return",{id:e.id,error:u});case 11:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(e){return t.apply(this,arguments)}}()));case 14:if(c=t.sent,s=c.filter((function(t){return!t.error})).map((function(t){return t.id})),l=c.filter((function(t){return t.error})).map((function(t){return t.id})),f=c.filter((function(t){return t.error})).map((function(t){return{handlerId:t.id,message:t.error}})),h={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!u.id){t.next=22;break}return t.next=22,o.dynamicOfflineData.update(u.id,{syncState:h}).catch(Io.errnames.DatabaseClosed);case 22:case"end":return t.stop()}}),t)}))),Si.apply(this,arguments)}function xi(){return(xi=sn(Nn().mark((function t(){var e;return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,Uo.getLoggedInUser)();case 2:if(e=t.sent.uuid){t.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return t.abrupt("return",e);case 6:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Oi=(0,Fo.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function Ei(){return(Ei=xn(Nn().mark((function t(e){return Nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return kn(),t.next=3,wn("patient",e);case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}}(),v}())}}}))},336:(t,e,n)=>{function r(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}t=n.nmd(t);var o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,u){var a={},c={},s={},l={},f={},h={},p={},d={},v={};return{setters:[function(t){a.createContext=t.createContext,a.createElement=t.createElement,a.default=t.default,a.useCallback=t.useCallback,a.useContext=t.useContext,a.useDebugValue=t.useDebugValue,a.useEffect=t.useEffect,a.useLayoutEffect=t.useLayoutEffect,a.useMemo=t.useMemo,a.useReducer=t.useReducer,a.useRef=t.useRef,a.useState=t.useState},function(t){c.getConfigStore=t.getConfigStore,c.getExtensionConfigFromStore=t.getExtensionConfigFromStore,c.getExtensionsConfigStore=t.getExtensionsConfigStore,c.interpolateUrl=t.interpolateUrl,c.navigate=t.navigate},function(t){s.getConnectedExtensions=t.getConnectedExtensions,s.getExtensionInternalStore=t.getExtensionInternalStore,s.getExtensionStore=t.getExtensionStore,s.registerExtensionSlot=t.registerExtensionSlot,s.renderExtension=t.renderExtension},function(t){l.subscribeConnectivityChanged=t.subscribeConnectivityChanged},function(t){f.default=t.default},function(t){h.default=t.default},function(t){p.I18nextProvider=t.I18nextProvider},function(t){d.defaultVisitCustomRepresentation=t.defaultVisitCustomRepresentation,d.fetchCurrentPatient=t.fetchCurrentPatient,d.getCurrentUser=t.getCurrentUser,d.getLocations=t.getLocations,d.getSessionStore=t.getSessionStore,d.getVisitTypes=t.getVisitTypes,d.openmrsFetch=t.openmrsFetch,d.userHasAccess=t.userHasAccess},function(t){v.default=t.default}],execute:function(){i(function(){var i={332:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},891:function(t,e,n){var i;t=n.nmd(t),function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},p=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},d=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},E=function(t,e){var n=null==t?0:t.length;return n?C(t,e)/n:tt},j=function(t){return function(e){return null==e?u:e[t]}},k=function(t){return function(e){return null==t?u:t[e]}},A=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},C=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,q(t)+1).replace(Vt,""):t},I=function(t){return function(e){return t(e)}},D=function(t,e){return v(e,(function(e){return t[e]}))},R=function(t,e){return t.has(e)},L=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},M=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},N=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},B=function(t){return"\\"+$e[t]},U=function(t){return Me.test(t)},F=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},K=function(t,e){return function(n){return t(e(n))}},$=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==Z||(t[n]=Z,i[o++]=n)}return i},z=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},H=function(t){return U(t)?function(t){for(var e=Re.lastIndex=0;Re.test(t);)++e;return e}(t):un(t)},V=function(t){return U(t)?t.match(Re)||[]:t.split("")},q=function(t){for(var e=t.length;e--&&qt.test(t.charAt(e)););return e},W="Expected a function",G="__lodash_hash_undefined__",Z="__lodash_placeholder__",Y=32,J=128,Q=1/0,X=9007199254740991,tt=NaN,et=4294967295,nt=[["ary",J],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",Y],["partialRight",64],["rearg",256]],rt="[object Arguments]",ot="[object Array]",it="[object Boolean]",ut="[object Date]",at="[object Error]",ct="[object Function]",st="[object GeneratorFunction]",lt="[object Map]",ft="[object Number]",ht="[object Object]",pt="[object Promise]",dt="[object RegExp]",vt="[object Set]",yt="[object String]",gt="[object Symbol]",mt="[object WeakMap]",bt="[object ArrayBuffer]",wt="[object DataView]",_t="[object Float32Array]",St="[object Float64Array]",xt="[object Int8Array]",Ot="[object Int16Array]",Et="[object Int32Array]",jt="[object Uint8Array]",kt="[object Uint8ClampedArray]",At="[object Uint16Array]",Ct="[object Uint32Array]",Pt=/\b__p \+= '';/g,Tt=/\b(__p \+=) '' \+/g,It=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dt=/&(?:amp|lt|gt|quot|#39);/g,Rt=/[&<>"']/g,Lt=RegExp(Dt.source),Mt=RegExp(Rt.source),Nt=/<%-([\s\S]+?)%>/g,Bt=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Ft=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kt=/^\w*$/,$t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zt=/[\\^$.*+?()[\]{}|]/g,Ht=RegExp(zt.source),Vt=/^\s+/,qt=/\s/,Wt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gt=/\{\n\/\* \[wrapped with (.+)\] \*/,Zt=/,? & /,Yt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Jt=/[()=,{}\[\]\/\s]/,Qt=/\\(\\)?/g,Xt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,te=/\w*$/,ee=/^[-+]0x[0-9a-f]+$/i,ne=/^0b[01]+$/i,re=/^\[object .+?Constructor\]$/,oe=/^0o[0-7]+$/i,ie=/^(?:0|[1-9]\d*)$/,ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ae=/($^)/,ce=/['\n\r\u2028\u2029\\]/g,se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",le="a-z\\xdf-\\xf6\\xf8-\\xff",fe="A-Z\\xc0-\\xd6\\xd8-\\xde",he="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="["+he+"]",de="["+se+"]",ve="\\d+",ye="["+le+"]",ge="[^\ud800-\udfff"+he+ve+"\\u2700-\\u27bf"+le+fe+"]",me="\ud83c[\udffb-\udfff]",be="[^\ud800-\udfff]",we="(?:\ud83c[\udde6-\uddff]){2}",_e="[\ud800-\udbff][\udc00-\udfff]",Se="["+fe+"]",xe="(?:"+ye+"|"+ge+")",Oe="(?:"+Se+"|"+ge+")",Ee="(?:['’](?:d|ll|m|re|s|t|ve))?",je="(?:['’](?:D|LL|M|RE|S|T|VE))?",ke="(?:"+de+"|"+me+")?",Ae="[\\ufe0e\\ufe0f]?",Ce=Ae+ke+"(?:\\u200d(?:"+[be,we,_e].join("|")+")"+Ae+ke+")*",Pe="(?:"+["[\\u2700-\\u27bf]",we,_e].join("|")+")"+Ce,Te="(?:"+[be+de+"?",de,we,_e,"[\ud800-\udfff]"].join("|")+")",Ie=RegExp("['’]","g"),De=RegExp(de,"g"),Re=RegExp(me+"(?="+me+")|"+Te+Ce,"g"),Le=RegExp([Se+"?"+ye+"+"+Ee+"(?="+[pe,Se,"$"].join("|")+")",Oe+"+"+je+"(?="+[pe,Se+xe,"$"].join("|")+")",Se+"?"+xe+"+"+Ee,Se+"+"+je,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,Pe].join("|"),"g"),Me=RegExp("[\\u200d\ud800-\udfff"+se+"\\ufe0e\\ufe0f]"),Ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Be=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ue=-1,Fe={};Fe[_t]=Fe[St]=Fe[xt]=Fe[Ot]=Fe[Et]=Fe[jt]=Fe[kt]=Fe[At]=Fe[Ct]=!0,Fe[rt]=Fe[ot]=Fe[bt]=Fe[it]=Fe[wt]=Fe[ut]=Fe[at]=Fe[ct]=Fe[lt]=Fe[ft]=Fe[ht]=Fe[dt]=Fe[vt]=Fe[yt]=Fe[mt]=!1;var Ke={};Ke[rt]=Ke[ot]=Ke[bt]=Ke[wt]=Ke[it]=Ke[ut]=Ke[_t]=Ke[St]=Ke[xt]=Ke[Ot]=Ke[Et]=Ke[lt]=Ke[ft]=Ke[ht]=Ke[dt]=Ke[vt]=Ke[yt]=Ke[gt]=Ke[jt]=Ke[kt]=Ke[At]=Ke[Ct]=!0,Ke[at]=Ke[ct]=Ke[mt]=!1;var $e={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ze=parseFloat,He=parseInt,Ve="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,qe="object"==typeof self&&self&&self.Object===Object&&self,We=Ve||qe||Function("return this")(),Ge=e&&!e.nodeType&&e,Ze=Ge&&t&&!t.nodeType&&t,Ye=Ze&&Ze.exports===Ge,Je=Ye&&Ve.process,Qe=function(){try{return Ze&&Ze.require&&Ze.require("util").types||Je&&Je.binding&&Je.binding("util")}catch(t){}}(),Xe=Qe&&Qe.isArrayBuffer,tn=Qe&&Qe.isDate,en=Qe&&Qe.isMap,nn=Qe&&Qe.isRegExp,rn=Qe&&Qe.isSet,on=Qe&&Qe.isTypedArray,un=j("length"),an=k({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),cn=k({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),sn=k({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ln=function t(e){var n,i,k=function(t){if(Po(t)&&!Pa(t)&&!r(t,le)){if(r(t,se))return t;if(bi.call(t,"__wrapped__"))return no(t)}return new se(t)},qt=function(){},se=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},le=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=et,this.__views__=[]},fe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pe;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=Pa(t),r=!n&&Ca(t),o=!n&&!r&&Ia(t),i=!n&&!r&&!o&&Na(t),u=n||r||o||i,a=u?P(t.length,hi):[],c=a.length;for(var s in t)!e&&!bi.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Fr(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[An(0,e-1)]:u},me=function(t,e){return Xr(or(t),ke(e,0,t.length))},be=function(t){return Xr(or(t))},we=function(t,e,n){(n!==u&&!So(t[e],n)||n===u&&!(e in t))&&Ee(t,e,n)},_e=function(t,e,n){var r=t[e];bi.call(t,e)&&So(r,n)&&(n!==u||e in t)||Ee(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(So(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return mu(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ir(e,Ho(e),t)},Ee=function(t,e,n){"__proto__"==e&&Ni?Ni(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},je=function(t,e){for(var n=-1,r=e.length,o=ii(r),i=null==t;++n<r;)o[n]=i?u:$o(t,e[n]);return o},ke=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},Ae=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=li(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ce=function(t,e,n){if("function"!=typeof t)throw new pi(W);return Ku((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=p,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,I(n))),r?(i=d,u=!1):e.length>=200&&(i=R,u=!1,e=new de(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Te=function(t,e){var n=!0;return mu(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Re=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Ro(a):n(a,c)))var c=a,s=i}return s},Me=function(t,e){var n=[];return mu(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},$e=function(t,e){return t&&_u(t,e,Ho)},Ve=function(t,e){return t&&Su(t,e,Ho)},qe=function(t,e){return h(e,(function(e){return jo(t[e])}))},Ge=function(t,e){for(var n=0,r=(e=Yn(e,t)).length;null!=t&&n<r;)t=t[to(e[n++])];return n&&n==r?t:u},Ze=function(t,e,n){var r=e(t);return Pa(t)?r:y(r,n(t))},Je=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":Mi&&Mi in li(t)?function(t){var e=bi.call(t,Mi),n=t[Mi];try{t[Mi]=u;var r=!0}catch(t){}var o=Si.call(t);return r&&(e?t[Mi]=n:delete t[Mi]),o}(t):(e=t,Si.call(e));var e},Qe=function(t,e){return t>e},un=function(t,e){return null!=t&&bi.call(t,e)},fn=function(t,e){return null!=t&&e in li(t)},hn=function(t,e,n){for(var r=n?d:p,o=t[0].length,i=t.length,a=i,c=ii(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,I(e))),s=Zi(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new de(a&&f):u}f=t[0];var h=-1,y=c[0];t:for(;++h<o&&l.length<s;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?R(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?R(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},pn=function(t,e,n){var r=null==(t=Gr(t,e=Yn(e,t)))?t:t[to(ao(e))];return null==r?u:a(r,t,n)},dn=function(t){return Po(t)&&Je(t)==rt},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=li(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var h=new ve;if(r)var p=r(l,f,s,t,e,h);if(!(p===u?xu(f,l,3,r,h):p))return!1}}return!0},yn=function(t){return!(!Co(t)||(e=t,_i&&_i in e))&&(jo(t)?Ei:re).test(eo(t));var e},gn=function(t){return"function"==typeof t?t:null==t?Qo:"object"==typeof t?Pa(t)?Sn(t[0],t[1]):_n(t):ni(t)},mn=function(t){if(!Hr(t))return Wi(t);var e=[];for(var n in li(t))bi.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=xo(t)?ii(t.length):[];return mu(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Lr(t);return 1==e.length&&e[0][2]?qr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return $r(t)&&Vr(e)?qr(to(t),e):function(n){var r=$o(n,t);return r===u&&r===e?zo(n,t):xu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return Fr(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Pa(t)?function(e){return Ge(e,1===t.length?t[0]:t)}:t})):[Qo];var r=-1;return e=v(e,I(Dr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},En=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=Ge(t,u);n(a,u)&&Dn(i,Yn(u,t),a)}return i},jn=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=or(e)),n&&(a=v(t,I(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Di.call(a,c,1),Di.call(t,c,1);return t},kn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;Fr(o)?Di.call(t,o,1):$n(t,o)}}return t},An=function(t,e){return t+$i(Qi()*(e-t+1))},Cn=function(t,e){var n="";if(!t||e<1||e>X)return n;do{e%2&&(n+=t),(e=$i(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return $u(Wr(t,e,Qo),t+"")},Tn=function(t){return ge(Wo(t))},In=function(t,e){var n=Wo(t);return Xr(n,ke(e,0,n.length))},Dn=function(t,e,n,r){if(!Co(t))return t;for(var o=-1,i=(e=Yn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=to(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Co(f)?f:Fr(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Rn=function(t){return Xr(Wo(t))},Ln=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=ii(o);++r<o;)i[r]=t[r+e];return i},Mn=function(t,e){var n;return mu(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Nn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Ro(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Bn(t,e,Qo,n)},Bn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Ro(e),l=e===u;o<i;){var f=$i((o+i)/2),h=n(t[f]),p=h!==u,d=null===h,v=h==h,y=Ro(h);if(a)var g=r||v;else g=l?v&&(r||p):c?v&&p&&(r||!d):s?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return Zi(i,4294967294)},Un=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!So(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Fn=function(t){return"number"==typeof t?t:Ro(t)?tt:+t},Kn=function(t,e,n){var r=-1,o=p,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=d;else if(i>=200){var s=e?null:Tu(t);if(s)return z(s);u=!1,o=R,c=new de}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},$n=function(t,e){return null==(t=Gr(t,e=Yn(e,t)))||delete t[to(ao(e))]},zn=function(t,e,n,r){return Dn(t,e,n(Ge(t,e)),r)},Hn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Ln(t,r?0:i,r?i+1:o):Ln(t,r?i+1:0,r?o:i)},Vn=function(t,e){var n=t;return r(n,le)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Kn(t[0]):[];for(var o=-1,i=ii(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Kn(wu(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Gn=function(t){return Oo(t)?t:[]},Zn=function(t){return"function"==typeof t?t:Qo},Yn=function(t,e){return Pa(t)?t:$r(t,e)?[t]:zu(Ko(t))},Jn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Ln(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Ci?Ci(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new Ai(e).set(new Ai(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Ro(t),a=e!==u,c=null===e,s=e==e,l=Ro(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=Gi(i-u,0),l=ii(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=Gi(i-a,0),f=ii(l+s),h=!r;++o<l;)f[o]=t[o];for(var p=o;++c<s;)f[p+c]=e[c];for(;++u<a;)(h||o<i)&&(f[p+n[u]]=t[o++]);return f},or=function(t,e){var n=-1,r=t.length;for(e||(e=ii(r));++n<r;)e[n]=t[n];return e},ir=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?Ee(n,c,s):_e(n,c,s)}return n},ur=function(t,e){return function(n,r){var o=Pa(n)?c:xe,i=e?e():{};return o(n,t,Dr(r,2),i)}},ar=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&Kr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=li(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},cr=function(t,e){return function(n,r){if(null==n)return n;if(!xo(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=li(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},sr=function(t){return function(e,n,r){for(var o=-1,i=li(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},lr=function(t){return function(e){var n=U(e=Ko(e))?V(e):u,r=n?n[0]:e.charAt(0),o=n?Jn(n,1).join(""):e.slice(1);return r[t]()+o}},fr=function(t){return function(e){return g(Yo(Zo(e).replace(Ie,"")),t,"")}},hr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=yu(t.prototype),r=t.apply(n,e);return Co(r)?r:n}},pr=function(t){return function(e,n,r){var o=li(e);if(!xo(e)){var i=Dr(n,3);e=Ho(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},dr=function(t){return Ar((function(e){var n=e.length,r=n,o=se.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new pi(W);if(o&&!a&&"wrapper"==Tr(i))var a=new se([],!0)}for(r=a?r:n;++r<n;){var c=Tr(i=e[r]),s="wrapper"==c?Du(i):u;a=s&&zr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Tr(s[0])].apply(a,s[3]):1==i.length&&zr(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Pa(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},vr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},$e(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},yr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=ku(n),r=ku(r)):(n=Fn(n),r=Fn(r)),o=t(n,r)}return o}},gr=function(t){return Ar((function(e){return e=v(e,I(Dr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},mr=function(t,e){var n=(e=e===u?" ":ku(e)).length;if(n<2)return n?Cn(e,t):e;var r=Cn(e,Ki(t/H(e)));return U(e)?Jn(V(r),0,t).join(""):r.slice(0,t)},br=function(t){return function(e,n,r){return r&&"number"!=typeof r&&Kr(e,n,r)&&(n=r=u),e=Mo(e),n===u?(n=e,e=0):n=Mo(n),function(t,e,n,r){for(var o=-1,i=Gi(Ki((e-t)/(n||1)),0),u=ii(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:Mo(r),t)}},wr=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Uo(e),n=Uo(n)),t(e,n)}},_r=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?Y:64,4&(e&=~(f?64:Y))||(e&=-4);var h=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],p=n.apply(u,h);return zr(t)&&Fu(p,h),p.placeholder=r,Jr(p,t,e)},Sr=function(t){var e=si[t];return function(t,n){if(t=Uo(t),(n=null==n?0:Zi(No(n),292))&&Vi(t)){var r=(Ko(t)+"e").split("e");return+((r=(Ko(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},xr=function(t){return function(e){var n,r,o=Mu(e);return o==lt?F(e):o==vt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},Or=function(t,e,n,o,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new pi(W);var h=o?o.length:0;if(h||(e&=-97,o=i=u),s=s===u?s:Gi(No(s),0),l=l===u?l:No(l),h-=i?i.length:0,64&e){var p=o,d=i;o=i=u}var v,y,g,m,b=f?u:Du(t),w=[t,e,n,o,i,p,d,c,s,l];if(b&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==J&&8==n||r==J&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?nr(c,a,e[4]):a,t[4]=c?$(t[3],Z):e[4]}(a=e[5])&&(c=t[5],t[5]=c?rr(c,a,e[6]):a,t[6]=c?$(t[5],Z):e[6]),(a=e[7])&&(t[7]=a),r&J&&(t[8]=null==t[8]?e[8]:Zi(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(w,b),t=w[0],e=w[1],n=w[2],o=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:Gi(w[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=hr(v=t),function t(){for(var e=arguments.length,n=ii(e),o=e,i=Ir(t);o--;)n[o]=arguments[o];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:$(n,i);return(e-=c.length)<g?_r(v,y,Pu,t.placeholder,u,n,c,u,u,g-e):a(this&&this!==We&&r(this,t)?m:v,this,n)}):e!=Y&&33!=e||i.length?Pu.apply(u,w):function(t,e,n,o){var i=1&e,u=hr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=o.length,h=ii(f+s),p=this&&this!==We&&r(this,e)?u:t;++l<f;)h[l]=o[l];for(;s--;)h[l++]=arguments[++c];return a(p,i?n:this,h)}}(t,e,n,o);else var _=function(t,e,n){var o=1&e,i=hr(t);return function e(){return(this&&this!==We&&r(this,e)?i:t).apply(o?n:this,arguments)}}(t,e,n);return Jr((b?Eu:Fu)(_,w),t,e)},Er=function(t,e,n,r){return t===u||So(t,yi[n])&&!bi.call(r,n)?e:t},jr=function(t){return Io(t)?u:t},kr=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new de:u;for(i.set(t,e),i.set(e,t);++h<c;){var v=t[h],y=e[h];if(r)var g=a?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==u){if(g)continue;p=!1;break}if(d){if(!b(e,(function(t,e){if(!R(d,e)&&(v===t||o(v,t,n,r,i)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Ar=function(t){return $u(Wr(t,u,io),t+"")},Cr=function(t){return Ze(t,Ho,Ru)},Pr=function(t){return Ze(t,Vo,Lu)},Tr=function(t){for(var e=t.name+"",n=au[e],r=bi.call(au,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Ir=function(t){return(bi.call(k,"placeholder")?k:t).placeholder},Dr=function(){var t=k.iteratee||Xo;return t=t===Xo?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Rr=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map},Lr=function(t){for(var e=Ho(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Vr(o)]}return e},Mr=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Nr=function(t,e,n){for(var r=-1,o=(e=Yn(e,t)).length,i=!1;++r<o;){var u=to(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ao(o)&&Fr(u,o)&&(Pa(t)||Ca(t))},Br=function(t){return"function"!=typeof t.constructor||Hr(t)?{}:yu(Pi(t))},Ur=function(t){return Pa(t)||Ca(t)||!!(Ri&&t&&t[Ri])},Fr=function(t,e){var n=void 0===t?"undefined":o(t);return!!(e=null==e?X:e)&&("number"==n||"symbol"!=n&&ie.test(t))&&t>-1&&t%1==0&&t<e},Kr=function(t,e,n){if(!Co(n))return!1;var r=void 0===e?"undefined":o(e);return!!("number"==r?xo(n)&&Fr(e,n.length):"string"==r&&e in n)&&So(n[e],t)},$r=function(t,e){if(Pa(t))return!1;var n=void 0===t?"undefined":o(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ro(t))||Kt.test(t)||!Ft.test(t)||null!=e&&t in li(e)},zr=function(t){var e=Tr(t),n=k[e];if("function"!=typeof n||!(e in le.prototype))return!1;if(t===n)return!0;var r=Du(n);return!!r&&t===r[0]},Hr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||yi)},Vr=function(t){return t==t&&!Co(t)},qr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in li(n))}},Wr=function(t,e,n){return e=Gi(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=Gi(r.length-e,0),u=ii(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=ii(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},Gr=function(t,e){return e.length<2?t:Ge(t,Ln(e,0,-1))},Zr=function(t,e){for(var n=t.length,r=Zi(e.length,n),o=or(t);r--;){var i=e[r];t[r]=Fr(i,n)?o[i]:u}return t},Yr=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},Jr=function(t,e,n){var r,o,i,u=e+"";return $u(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Wt,"{\n/* [wrapped with "+e+"] */\n")}(u,(o=(r=u.match(Gt))?r[1].split(Zt):[],i=n,s(nt,(function(t){var e="_."+t[0];i&t[1]&&!p(o,e)&&o.push(e)})),o.sort())))},Qr=function(t){var e=0,n=0;return function(){var r=Yi(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},Xr=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=An(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},to=function(t){if("string"==typeof t||Ro(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},eo=function(t){if(null!=t){try{return mi.call(t)}catch(t){}try{return t+""}catch(t){}}return""},no=function(t){if(r(t,le))return t.clone();var e=new se(t.__wrapped__,t.__chain__);return e.__actions__=or(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},ro=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),_(t,Dr(e,3),o)},oo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=No(n),o=n<0?Gi(r+o,0):Zi(o,r-1)),_(t,Dr(e,3),o,!0)},io=function(t){return null!=t&&t.length?wu(t,1):[]},uo=function(t){return t&&t.length?t[0]:u},ao=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},co=function(t,e){return t&&t.length&&e&&e.length?jn(t,e):t},so=function(t){return null==t?t:Xi.call(t)},lo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(Oo(t))return e=Gi(t.length,e),!0})),P(e,(function(e){return v(t,j(e))}))},fo=function(t,e){if(!t||!t.length)return[];var n=lo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},ho=function(t){var e=k(t);return e.__chain__=!0,e},po=function(t,e){return e(t)},vo=function(t,e){return(Pa(t)?s:mu)(t,Dr(e,3))},yo=function(t,e){return(Pa(t)?l:bu)(t,Dr(e,3))},go=function(t,e){return(Pa(t)?v:wn)(t,Dr(e,3))},mo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,Or(t,J,u,u,u,u,e)},bo=function(t,e){var n;if("function"!=typeof e)throw new pi(W);return t=No(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},wo=function(t,e,n){var r,o,i,a,c,s,l=0,f=!1,h=!1,p=!0;if("function"!=typeof t)throw new pi(W);function d(e){var n=r,i=o;return r=o=u,l=e,a=t.apply(i,n)}function v(t){return l=t,c=Ku(g,e),f?d(t):a}function y(t){var n=t-s;return s===u||n>=e||n<0||h&&t-l>=i}function g(){var t,n,r=ya();if(y(r))return m(r);c=Ku(g,(n=e-((t=r)-s),h?Zi(n,i-(t-l)):n))}function m(t){return c=u,p&&r?d(t):(r=o=u,a)}function b(){var t=ya(),n=y(t);if(r=arguments,o=this,s=t,n){if(c===u)return v(s);if(h)return Cu(c),c=Ku(g,e),d(s)}return c===u&&(c=Ku(g,e)),a}return e=Uo(e)||0,Co(n)&&(f=!!n.leading,i=(h="maxWait"in n)?Gi(Uo(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==u&&Cu(c),l=0,r=s=o=c=u},b.flush=function(){return c===u?a:m(ya())},b},_o=function(t){if("function"!=typeof t)throw new pi(W);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},So=function(t,e){return t===e||t!=t&&e!=e},xo=function(t){return null!=t&&Ao(t.length)&&!jo(t)},Oo=function(t){return Po(t)&&xo(t)},Eo=function(t){if(!Po(t))return!1;var e=Je(t);return e==at||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Io(t)},jo=function(t){if(!Co(t))return!1;var e=Je(t);return e==ct||e==st||"[object AsyncFunction]"==e||"[object Proxy]"==e},ko=function(t){return"number"==typeof t&&t==No(t)},Ao=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=X},Co=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Po=function(t){return null!=t&&"object"==typeof t},To=function(t){return"number"==typeof t||Po(t)&&Je(t)==ft},Io=function(t){if(!Po(t)||Je(t)!=ht)return!1;var e=Pi(t);if(null===e)return!0;var n=bi.call(e,"constructor")&&e.constructor;return"function"==typeof n&&r(n,n)&&mi.call(n)==xi},Do=function(t){return"string"==typeof t||!Pa(t)&&Po(t)&&Je(t)==yt},Ro=function(t){return"symbol"==(void 0===t?"undefined":o(t))||Po(t)&&Je(t)==gt},Lo=function(t){if(!t)return[];if(xo(t))return Do(t)?V(t):or(t);if(Li&&t[Li])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Li]());var e=Mu(t);return(e==lt?F:e==vt?z:Wo)(t)},Mo=function(t){return t?(t=Uo(t))===Q||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},No=function(t){var e=Mo(t),n=e%1;return e==e?n?e-n:e:0},Bo=function(t){return t?ke(No(t),0,et):0},Uo=function(t){if("number"==typeof t)return t;if(Ro(t))return tt;if(Co(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Co(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ne.test(t);return n||oe.test(t)?He(t.slice(2),n?2:8):ee.test(t)?tt:+t},Fo=function(t){return ir(t,Vo(t))},Ko=function(t){return null==t?"":ku(t)},$o=function(t,e,n){var r=null==t?u:Ge(t,e);return r===u?n:r},zo=function(t,e){return null!=t&&Nr(t,e,fn)},Ho=function(t){return xo(t)?ye(t):mn(t)},Vo=function(t){return xo(t)?ye(t,!0):function(t){if(!Co(t))return function(t){var e=[];if(null!=t)for(var n in li(t))e.push(n);return e}(t);var e=Hr(t),n=[];for(var r in t)("constructor"!=r||!e&&bi.call(t,r))&&n.push(r);return n}(t)},qo=function(t,e){if(null==t)return{};var n=v(Pr(t),(function(t){return[t]}));return e=Dr(e),En(t,n,(function(t,n){return e(t,n[0])}))},Wo=function(t){return null==t?[]:D(t,Ho(t))},Go=function(t){return sc(Ko(t).toLowerCase())},Zo=function(t){return(t=Ko(t))&&t.replace(ue,an).replace(De,"")},Yo=function(t,e,n){return t=Ko(t),(e=n?u:e)===u?(r=t,Ne.test(r)?function(t){return t.match(Le)||[]}(t):function(t){return t.match(Yt)||[]}(t)):t.match(e)||[];var r},Jo=function(t){return function(){return t}},Qo=function(t){return t},Xo=function(t){return gn("function"==typeof t?t:gu(t,1))},ti=function(t,e,n){var r=Ho(e),o=qe(e,r);null!=n||Co(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=qe(e,Ho(e)));var i=!(Co(n)&&"chain"in n&&!n.chain),u=jo(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=or(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ei=function(){},ni=function(t){return $r(t)?j(to(t)):(e=t,function(t){return Ge(t,e)});var e},ri=function(){return[]},oi=function(){return!1},ii=(e=null==e?We:ln.defaults(We.Object(),e,ln.pick(We,Be))).Array,ui=e.Date,ai=e.Error,ci=e.Function,si=e.Math,li=e.Object,fi=e.RegExp,hi=e.String,pi=e.TypeError,di=ii.prototype,vi=ci.prototype,yi=li.prototype,gi=e["__core-js_shared__"],mi=vi.toString,bi=yi.hasOwnProperty,wi=0,_i=(n=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Si=yi.toString,xi=mi.call(li),Oi=We._,Ei=fi("^"+mi.call(bi).replace(zt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ji=Ye?e.Buffer:u,ki=e.Symbol,Ai=e.Uint8Array,Ci=ji?ji.allocUnsafe:u,Pi=K(li.getPrototypeOf,li),Ti=li.create,Ii=yi.propertyIsEnumerable,Di=di.splice,Ri=ki?ki.isConcatSpreadable:u,Li=ki?ki.iterator:u,Mi=ki?ki.toStringTag:u,Ni=function(){try{var t=Mr(li,"defineProperty");return t({},"",{}),t}catch(t){}}(),Bi=e.clearTimeout!==We.clearTimeout&&e.clearTimeout,Ui=ui&&ui.now!==We.Date.now&&ui.now,Fi=e.setTimeout!==We.setTimeout&&e.setTimeout,Ki=si.ceil,$i=si.floor,zi=li.getOwnPropertySymbols,Hi=ji?ji.isBuffer:u,Vi=e.isFinite,qi=di.join,Wi=K(li.keys,li),Gi=si.max,Zi=si.min,Yi=ui.now,Ji=e.parseInt,Qi=si.random,Xi=di.reverse,tu=Mr(e,"DataView"),eu=Mr(e,"Map"),nu=Mr(e,"Promise"),ru=Mr(e,"Set"),ou=Mr(e,"WeakMap"),iu=Mr(li,"create"),uu=ou&&new ou,au={},cu=eo(tu),su=eo(eu),lu=eo(nu),fu=eo(ru),hu=eo(ou),pu=ki?ki.prototype:u,du=pu?pu.valueOf:u,vu=pu?pu.toString:u,yu=(i=function(){},function(t){if(!Co(t))return{};if(Ti)return Ti(t);i.prototype=t;var e=new i;return i.prototype=u,e});function gu(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Co(t))return t;var h,p,d,v=Pa(t);if(v){if(p=(h=t).length,d=new h.constructor(p),p&&"string"==typeof h[0]&&bi.call(h,"index")&&(d.index=h.index,d.input=h.input),a=d,!c)return or(t,a)}else{var y=Mu(t),g=y==ct||y==st;if(Ia(t))return Qn(t,c);if(y==ht||y==rt||g&&!o){if(a=l||g?{}:Br(t),!c)return l?function(t,e){return ir(t,Lu(t),e)}(t,function(t,e){return t&&ir(e,Vo(e),t)}(a,t)):function(t,e){return ir(t,Ru(t),e)}(t,Oe(a,t))}else{if(!Ke[y])return o?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case bt:return Xn(t);case it:case ut:return new o(+t);case wt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case _t:case St:case xt:case Ot:case Et:case jt:case kt:case At:case Ct:return tr(t,n);case lt:return new o;case ft:case yt:return new o(t);case dt:return function(t){var e=new t.constructor(t.source,te.exec(t));return e.lastIndex=t.lastIndex,e}(t);case vt:return new o;case gt:return r=t,du?li(du.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),Ma(t)?t.forEach((function(r){a.add(gu(r,e,n,r,t,i))})):Ra(t)&&t.forEach((function(r,o){a.set(o,gu(r,e,n,o,t,i))}));var b=v?u:(f?l?Pr:Cr:l?Vo:Ho)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,gu(r,e,n,o,t,i))})),a}k.templateSettings={escape:Nt,evaluate:Bt,interpolate:Ut,variable:"",imports:{_:k}},(k.prototype=qt.prototype).constructor=k,se.prototype=yu(qt.prototype),se.prototype.constructor=se,le.prototype=yu(qt.prototype),le.prototype.constructor=le,fe.prototype.clear=function(){this.__data__=iu?iu(null):{},this.size=0},fe.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},fe.prototype.get=function(t){var e=this.__data__;if(iu){var n=e[t];return n===G?u:n}return bi.call(e,t)?e[t]:u},fe.prototype.has=function(t){var e=this.__data__;return iu?e[t]!==u:bi.call(e,t)},fe.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=iu&&e===u?G:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Di.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new fe,map:new(eu||he),string:new fe}},pe.prototype.delete=function(t){var e=Rr(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return Rr(this,t).get(t)},pe.prototype.has=function(t){return Rr(this,t).has(t)},pe.prototype.set=function(t,e){var n=Rr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},de.prototype.add=de.prototype.push=function(t){return this.__data__.set(t,G),this},de.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(r(n,he)){var o=n.__data__;if(!eu||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new pe(o)}return n.set(t,e),this.size=n.size,this};var mu=cr($e),bu=cr(Ve,!0);function wu(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=Ur),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?wu(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var _u=sr(),Su=sr(!0);function xu(t,e,n,o,i){return t===e||(null==t||null==e||!Po(t)&&!Po(e)?t!=t&&e!=e:function(t,e,n,o,i,a){var c=Pa(t),s=Pa(e),l=c?ot:Mu(t),f=s?ot:Mu(e),h=(l=l==rt?ht:l)==ht,p=(f=f==rt?ht:f)==ht,d=l==f;if(d&&Ia(t)){if(!Ia(e))return!1;c=!0,h=!1}if(d&&!h)return a||(a=new ve),c||Na(t)?kr(t,e,n,o,i,a):function(t,e,n,r,o,i,u){switch(n){case wt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case bt:return!(t.byteLength!=e.byteLength||!i(new Ai(t),new Ai(e)));case it:case ut:case ft:return So(+t,+e);case at:return t.name==e.name&&t.message==e.message;case dt:case yt:return t==e+"";case lt:var a=F;case vt:var c=1&r;if(a||(a=z),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=kr(a(t),a(e),r,o,i,u);return u.delete(t),l;case gt:if(du)return du.call(t)==du.call(e)}return!1}(t,e,l,n,o,i,a);if(!(1&n)){var v=h&&bi.call(t,"__wrapped__"),y=p&&bi.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,o,a)}}return!!d&&(a||(a=new ve),function(t,e,n,o,i,a){var c=1&n,s=Cr(t),l=s.length;if(l!=Cr(e).length&&!c)return!1;for(var f=l;f--;){var h=s[f];if(!(c?h in e:bi.call(e,h)))return!1}var p=a.get(t),d=a.get(e);if(p&&d)return p==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[h=s[f]],m=e[h];if(o)var b=c?o(m,g,h,e,t,a):o(g,m,h,t,e,a);if(!(b===u?g===m||i(g,m,n,o,a):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&r(w,w)&&"function"==typeof _&&r(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,o,i,a))}(t,e,n,o,xu,i))}function Ou(t,e,n,r,o){t!==e&&_u(e,(function(i,a){if(o||(o=new ve),Co(i))!function(t,e,n,r,o,i,a){var c=Yr(t,n),s=Yr(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,h=f===u;if(h){var p=Pa(s),d=!p&&Ia(s),v=!p&&!d&&Na(s);f=s,p||d||v?Pa(c)?f=c:Oo(c)?f=or(c):d?(h=!1,f=Qn(s,!0)):v?(h=!1,f=tr(s,!0)):f=[]:Io(s)||Ca(s)?(f=c,Ca(c)?f=Fo(c):Co(c)&&!jo(c)||(f=Br(s))):h=!1}h&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Ou,r,o);else{var c=r?r(Yr(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Vo)}var Eu=uu?function(t,e){return uu.set(t,e),t}:Qo,ju=Ni?function(t,e){return Ni(t,"toString",{configurable:!0,enumerable:!1,value:Jo(e),writable:!0})}:Qo;function ku(t){if("string"==typeof t)return t;if(Pa(t))return v(t,ku)+"";if(Ro(t))return vu?vu.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Au=Pn,Cu=Bi||function(t){return We.clearTimeout(t)};function Pu(t,e,n,o,i,a,c,s,l,f){var h=e&J,p=1&e,d=2&e,v=24&e,y=512&e,g=d?u:hr(t);return function u(){for(var m=arguments.length,b=ii(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Ir(u),S=N(b,_);if(o&&(b=nr(b,o,i,v)),a&&(b=rr(b,a,c,v)),m-=S,v&&m<f){var x=$(b,_);return _r(t,e,Pu,u.placeholder,n,b,x,s,l,f-m)}var O=p?n:this,E=d?O[t]:t;return m=b.length,s?b=Zr(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==We&&r(this,u)&&(E=g||hr(E)),E.apply(O,b)}}var Tu=ru&&1/z(new ru([,-0]))[1]==Q?function(t){return new ru(t)}:ei;function Iu(t,e,n,r,o,i){return Co(t)&&Co(e)&&(i.set(e,t),Ou(t,e,u,Iu,i),i.delete(e)),t}var Du=uu?function(t){return uu.get(t)}:ei,Ru=zi?function(t){return null==t?[]:(t=li(t),h(zi(t),(function(e){return Ii.call(t,e)})))}:ri,Lu=zi?function(t){for(var e=[];t;)y(e,Ru(t)),t=Pi(t);return e}:ri,Mu=Je;(tu&&Mu(new tu(new ArrayBuffer(1)))!=wt||eu&&Mu(new eu)!=lt||nu&&Mu(nu.resolve())!=pt||ru&&Mu(new ru)!=vt||ou&&Mu(new ou)!=mt)&&(Mu=function(t){var e=Je(t),n=e==ht?t.constructor:u,r=n?eo(n):"";if(r)switch(r){case cu:return wt;case su:return lt;case lu:return pt;case fu:return vt;case hu:return mt}return e});var Nu,Bu,Uu=gi?jo:oi,Fu=Qr(Eu),Ku=Fi||function(t,e){return We.setTimeout(t,e)},$u=Qr(ju),zu=(Nu=_a((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace($t,(function(t,n,r,o){e.push(r?o.replace(Qt,"$1"):n||t)})),e}),(function(t){return 500===Bu.size&&Bu.clear(),t})),Bu=Nu.cache,Nu),Hu=Pn((function(t,e){return Oo(t)?Pe(t,wu(e,1,Oo,!0)):[]})),Vu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),Dr(n,2)):[]})),qu=Pn((function(t,e){var n=ao(e);return Oo(n)&&(n=u),Oo(t)?Pe(t,wu(e,1,Oo,!0),u,n):[]})),Wu=Pn((function(t){var e=v(t,Gn);return e.length&&e[0]===t[0]?hn(e):[]})),Gu=Pn((function(t){var e=ao(t),n=v(t,Gn);return e===ao(n)?e=u:n.pop(),n.length&&n[0]===t[0]?hn(n,Dr(e,2)):[]})),Zu=Pn((function(t){var e=ao(t),n=v(t,Gn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?hn(n,u,e):[]})),Yu=Pn(co),Ju=Ar((function(t,e){var n=null==t?0:t.length,r=je(t,e);return kn(t,v(e,(function(t){return Fr(t,n)?+t:t})).sort(er)),r})),Qu=Pn((function(t){return Kn(wu(t,1,Oo,!0))})),Xu=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),Kn(wu(t,1,Oo,!0),Dr(e,2))})),ta=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,Kn(wu(t,1,Oo,!0),u,e)})),ea=Pn((function(t,e){return Oo(t)?Pe(t,e):[]})),na=Pn((function(t){return qn(h(t,Oo))})),ra=Pn((function(t){var e=ao(t);return Oo(e)&&(e=u),qn(h(t,Oo),Dr(e,2))})),oa=Pn((function(t){var e=ao(t);return e="function"==typeof e?e:u,qn(h(t,Oo),u,e)})),ia=Pn(lo),ua=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,fo(t,n)})),aa=Ar((function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,i=function(e){return je(e,t)};return e>1||this.__actions__.length||!r(o,le)||!Fr(n)?this.thru(i):((o=o.slice(n,+n+(e?1:0))).__actions__.push({func:po,args:[i],thisArg:u}),new se(o,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ca=ur((function(t,e,n){bi.call(t,n)?++t[n]:Ee(t,n,1)})),sa=pr(ro),la=pr(oo),fa=ur((function(t,e,n){bi.call(t,n)?t[n].push(e):Ee(t,n,[e])})),ha=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=xo(t)?ii(t.length):[];return mu(t,(function(t){i[++r]=o?a(e,t,n):pn(t,e,n)})),i})),pa=ur((function(t,e,n){Ee(t,n,e)})),da=ur((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),va=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&Kr(t,e[0],e[1])?e=[]:n>2&&Kr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,wu(e,1),[])})),ya=Ui||function(){return We.Date.now()},ga=Pn((function(t,e,n){var r=1;if(n.length){var o=$(n,Ir(ga));r|=Y}return Or(t,r,e,n,o)})),ma=Pn((function(t,e,n){var r=3;if(n.length){var o=$(n,Ir(ma));r|=Y}return Or(e,r,t,n,o)})),ba=Pn((function(t,e){return Ce(t,1,e)})),wa=Pn((function(t,e,n){return Ce(t,Uo(e)||0,n)}));function _a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new pi(W);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(_a.Cache||pe),n}_a.Cache=pe;var Sa,xa=Au((function(t,e){var n=(e=1==e.length&&Pa(e[0])?v(e[0],I(Dr())):v(wu(e,1),I(Dr()))).length;return Pn((function(r){for(var o=-1,i=Zi(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Oa=Pn((function(t,e){var n=$(e,Ir(Oa));return Or(t,Y,u,e,n)})),Ea=Pn((function(t,e){var n=$(e,Ir(Ea));return Or(t,64,u,e,n)})),ja=Ar((function(t,e){return Or(t,256,u,u,u,e)})),ka=wr(Qe),Aa=wr((function(t,e){return t>=e})),Ca=dn(function(){return arguments}())?dn:function(t){return Po(t)&&bi.call(t,"callee")&&!Ii.call(t,"callee")},Pa=ii.isArray,Ta=Xe?I(Xe):function(t){return Po(t)&&Je(t)==bt},Ia=Hi||oi,Da=tn?I(tn):function(t){return Po(t)&&Je(t)==ut},Ra=en?I(en):function(t){return Po(t)&&Mu(t)==lt},La=nn?I(nn):function(t){return Po(t)&&Je(t)==dt},Ma=rn?I(rn):function(t){return Po(t)&&Mu(t)==vt},Na=on?I(on):function(t){return Po(t)&&Ao(t.length)&&!!Fe[Je(t)]},Ba=wr(bn),Ua=wr((function(t,e){return t<=e})),Fa=ar((function(t,e){if(Hr(e)||xo(e))ir(e,Ho(e),t);else for(var n in e)bi.call(e,n)&&_e(t,n,e[n])})),Ka=ar((function(t,e){ir(e,Vo(e),t)})),$a=ar((function(t,e,n,r){ir(e,Vo(e),t,r)})),za=ar((function(t,e,n,r){ir(e,Ho(e),t,r)})),Ha=Ar(je),Va=Pn((function(t,e){t=li(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&Kr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Vo(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||So(f,yi[l])&&!bi.call(t,l))&&(t[l]=i[l])}return t})),qa=Pn((function(t){return t.push(u,Iu),a(Ja,u,t)})),Wa=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),t[e]=n}),Jo(Qo)),Ga=vr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Si.call(e)),bi.call(t,e)?t[e].push(n):t[e]=[n]}),Dr),Za=Pn(pn),Ya=ar((function(t,e,n){Ou(t,e,n)})),Ja=ar((function(t,e,n,r){Ou(t,e,n,r)})),Qa=Ar((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Yn(e,t),r||(r=e.length>1),e})),ir(t,Pr(t),n),r&&(n=gu(n,7,jr));for(var o=e.length;o--;)$n(n,e[o]);return n})),Xa=Ar((function(t,e){return null==t?{}:En(n=t,e,(function(t,e){return zo(n,e)}));var n})),tc=xr(Ho),ec=xr(Vo),nc=fr((function(t,e,n){return e=e.toLowerCase(),t+(n?Go(e):e)})),rc=fr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),oc=fr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ic=lr("toLowerCase"),uc=fr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),ac=fr((function(t,e,n){return t+(n?" ":"")+sc(e)})),cc=fr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),sc=lr("toUpperCase"),lc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return Eo(t)?t:new ai(t)}})),fc=Ar((function(t,e){return s(e,(function(e){e=to(e),Ee(t,e,ga(t[e],t))})),t})),hc=dr(),pc=dr(!0),dc=Pn((function(t,e){return function(n){return pn(n,t,e)}})),vc=Pn((function(t,e){return function(n){return pn(t,n,e)}})),yc=gr(v),gc=gr(f),mc=gr(b),bc=br(),wc=br(!0),_c=yr((function(t,e){return t+e}),0),Sc=Sr("ceil"),xc=yr((function(t,e){return t/e}),1),Oc=Sr("floor"),Ec=yr((function(t,e){return t*e}),1),jc=Sr("round"),kc=yr((function(t,e){return t-e}),0);return k.after=function(t,e){if("function"!=typeof e)throw new pi(W);return t=No(t),function(){if(--t<1)return e.apply(this,arguments)}},k.ary=mo,k.assign=Fa,k.assignIn=Ka,k.assignInWith=$a,k.assignWith=za,k.at=Ha,k.before=bo,k.bind=ga,k.bindAll=fc,k.bindKey=ma,k.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Pa(t)?t:[t]},k.chain=ho,k.chunk=function(t,e,n){e=(n?Kr(t,e,n):e===u)?1:Gi(No(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=ii(Ki(r/e));o<r;)a[i++]=Ln(t,o,o+=e);return a},k.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},k.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ii(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Pa(n)?or(n):[n],wu(e,1))},k.cond=function(t){var e=null==t?0:t.length,n=Dr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new pi(W);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},k.conforms=function(t){return e=gu(t,1),n=Ho(e),function(t){return Ae(t,e,n)};var e,n},k.constant=Jo,k.countBy=ca,k.create=function(t,e){var n=yu(t);return null==e?n:Oe(n,e)},k.curry=function t(e,n,r){var o=Or(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.curryRight=function t(e,n,r){var o=Or(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.debounce=wo,k.defaults=Va,k.defaultsDeep=qa,k.defer=ba,k.delay=wa,k.difference=Hu,k.differenceBy=Vu,k.differenceWith=qu,k.drop=function(t,e,n){var r=null==t?0:t.length;return r?Ln(t,(e=n||e===u?1:No(e))<0?0:e,r):[]},k.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Ln(t,0,(e=r-(e=n||e===u?1:No(e)))<0?0:e):[]},k.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!0,!0):[]},k.dropWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!0):[]},k.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&Kr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=No(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:No(r))<0&&(r+=o),r=n>r?0:Bo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},k.filter=function(t,e){return(Pa(t)?h:Me)(t,Dr(e,3))},k.flatMap=function(t,e){return wu(go(t,e),1)},k.flatMapDeep=function(t,e){return wu(go(t,e),Q)},k.flatMapDepth=function(t,e,n){return n=n===u?1:No(n),wu(go(t,e),n)},k.flatten=io,k.flattenDeep=function(t){return null!=t&&t.length?wu(t,Q):[]},k.flattenDepth=function(t,e){return null!=t&&t.length?wu(t,e=e===u?1:No(e)):[]},k.flip=function(t){return Or(t,512)},k.flow=hc,k.flowRight=pc,k.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},k.functions=function(t){return null==t?[]:qe(t,Ho(t))},k.functionsIn=function(t){return null==t?[]:qe(t,Vo(t))},k.groupBy=fa,k.initial=function(t){return null!=t&&t.length?Ln(t,0,-1):[]},k.intersection=Wu,k.intersectionBy=Gu,k.intersectionWith=Zu,k.invert=Wa,k.invertBy=Ga,k.invokeMap=ha,k.iteratee=Xo,k.keyBy=pa,k.keys=Ho,k.keysIn=Vo,k.map=go,k.mapKeys=function(t,e){var n={};return e=Dr(e,3),$e(t,(function(t,r,o){Ee(n,e(t,r,o),t)})),n},k.mapValues=function(t,e){var n={};return e=Dr(e,3),$e(t,(function(t,r,o){Ee(n,r,e(t,r,o))})),n},k.matches=function(t){return _n(gu(t,1))},k.matchesProperty=function(t,e){return Sn(t,gu(e,1))},k.memoize=_a,k.merge=Ya,k.mergeWith=Ja,k.method=dc,k.methodOf=vc,k.mixin=ti,k.negate=_o,k.nthArg=function(t){return t=No(t),Pn((function(e){return xn(e,t)}))},k.omit=Qa,k.omitBy=function(t,e){return qo(t,_o(Dr(e)))},k.once=function(t){return bo(2,t)},k.orderBy=function(t,e,n,r){return null==t?[]:(Pa(e)||(e=null==e?[]:[e]),Pa(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},k.over=yc,k.overArgs=xa,k.overEvery=gc,k.overSome=mc,k.partial=Oa,k.partialRight=Ea,k.partition=da,k.pick=Xa,k.pickBy=qo,k.property=ni,k.propertyOf=function(t){return function(e){return null==t?u:Ge(t,e)}},k.pull=Yu,k.pullAll=co,k.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,Dr(n,2)):t},k.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,u,n):t},k.pullAt=Ju,k.range=bc,k.rangeRight=wc,k.rearg=ja,k.reject=function(t,e){return(Pa(t)?h:Me)(t,_o(Dr(e,3)))},k.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Dr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return kn(t,o),n},k.rest=function(t,e){if("function"!=typeof t)throw new pi(W);return Pn(t,e=e===u?e:No(e))},k.reverse=so,k.sampleSize=function(t,e,n){return e=(n?Kr(t,e,n):e===u)?1:No(e),(Pa(t)?me:In)(t,e)},k.set=function(t,e,n){return null==t?t:Dn(t,e,n)},k.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Dn(t,e,n,r)},k.shuffle=function(t){return(Pa(t)?be:Rn)(t)},k.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&Kr(t,e,n)?(e=0,n=r):(e=null==e?0:No(e),n=n===u?r:No(n)),Ln(t,e,n)):[]},k.sortBy=va,k.sortedUniq=function(t){return t&&t.length?Un(t):[]},k.sortedUniqBy=function(t,e){return t&&t.length?Un(t,Dr(e,2)):[]},k.split=function(t,e,n){return n&&"number"!=typeof n&&Kr(t,e,n)&&(e=n=u),(n=n===u?et:n>>>0)?(t=Ko(t))&&("string"==typeof e||null!=e&&!La(e))&&!(e=ku(e))&&U(t)?Jn(V(t),0,n):t.split(e,n):[]},k.spread=function(t,e){if("function"!=typeof t)throw new pi(W);return e=null==e?0:Gi(No(e),0),Pn((function(n){var r=n[e],o=Jn(n,0,e);return r&&y(o,r),a(t,this,o)}))},k.tail=function(t){var e=null==t?0:t.length;return e?Ln(t,1,e):[]},k.take=function(t,e,n){return t&&t.length?Ln(t,0,(e=n||e===u?1:No(e))<0?0:e):[]},k.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Ln(t,(e=r-(e=n||e===u?1:No(e)))<0?0:e,r):[]},k.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3),!1,!0):[]},k.takeWhile=function(t,e){return t&&t.length?Hn(t,Dr(e,3)):[]},k.tap=function(t,e){return e(t),t},k.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new pi(W);return Co(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),wo(t,e,{leading:r,maxWait:e,trailing:o})},k.thru=po,k.toArray=Lo,k.toPairs=tc,k.toPairsIn=ec,k.toPath=function(t){return Pa(t)?v(t,to):Ro(t)?[t]:or(zu(Ko(t)))},k.toPlainObject=Fo,k.transform=function(t,e,n){var r=Pa(t),o=r||Ia(t)||Na(t);if(e=Dr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Co(t)&&jo(i)?yu(Pi(t)):{}}return(o?s:$e)(t,(function(t,r,o){return e(n,t,r,o)})),n},k.unary=function(t){return mo(t,1)},k.union=Qu,k.unionBy=Xu,k.unionWith=ta,k.uniq=function(t){return t&&t.length?Kn(t):[]},k.uniqBy=function(t,e){return t&&t.length?Kn(t,Dr(e,2)):[]},k.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Kn(t,u,e):[]},k.unset=function(t,e){return null==t||$n(t,e)},k.unzip=lo,k.unzipWith=fo,k.update=function(t,e,n){return null==t?t:zn(t,e,Zn(n))},k.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:zn(t,e,Zn(n),r)},k.values=Wo,k.valuesIn=function(t){return null==t?[]:D(t,Vo(t))},k.without=ea,k.words=Yo,k.wrap=function(t,e){return Oa(Zn(e),t)},k.xor=na,k.xorBy=ra,k.xorWith=oa,k.zip=ia,k.zipObject=function(t,e){return Wn(t||[],e||[],_e)},k.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Dn)},k.zipWith=ua,k.entries=tc,k.entriesIn=ec,k.extend=Ka,k.extendWith=$a,ti(k,k),k.add=_c,k.attempt=lc,k.camelCase=nc,k.capitalize=Go,k.ceil=Sc,k.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=Uo(n))==n?n:0),e!==u&&(e=(e=Uo(e))==e?e:0),ke(Uo(t),e,n)},k.clone=function(t){return gu(t,4)},k.cloneDeep=function(t){return gu(t,5)},k.cloneDeepWith=function(t,e){return gu(t,5,e="function"==typeof e?e:u)},k.cloneWith=function(t,e){return gu(t,4,e="function"==typeof e?e:u)},k.conformsTo=function(t,e){return null==e||Ae(t,e,Ho(e))},k.deburr=Zo,k.defaultTo=function(t,e){return null==t||t!=t?e:t},k.divide=xc,k.endsWith=function(t,e,n){t=Ko(t),e=ku(e);var r=t.length,o=n=n===u?r:ke(No(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},k.eq=So,k.escape=function(t){return(t=Ko(t))&&Mt.test(t)?t.replace(Rt,cn):t},k.escapeRegExp=function(t){return(t=Ko(t))&&Ht.test(t)?t.replace(zt,"\\$&"):t},k.every=function(t,e,n){var r=Pa(t)?f:Te;return n&&Kr(t,e,n)&&(e=u),r(t,Dr(e,3))},k.find=sa,k.findIndex=ro,k.findKey=function(t,e){return w(t,Dr(e,3),$e)},k.findLast=la,k.findLastIndex=oo,k.findLastKey=function(t,e){return w(t,Dr(e,3),Ve)},k.floor=Oc,k.forEach=vo,k.forEachRight=yo,k.forIn=function(t,e){return null==t?t:_u(t,Dr(e,3),Vo)},k.forInRight=function(t,e){return null==t?t:Su(t,Dr(e,3),Vo)},k.forOwn=function(t,e){return t&&$e(t,Dr(e,3))},k.forOwnRight=function(t,e){return t&&Ve(t,Dr(e,3))},k.get=$o,k.gt=ka,k.gte=Aa,k.has=function(t,e){return null!=t&&Nr(t,e,un)},k.hasIn=zo,k.head=uo,k.identity=Qo,k.includes=function(t,e,n,r){t=xo(t)?t:Wo(t),n=n&&!r?No(n):0;var o=t.length;return n<0&&(n=Gi(o+n,0)),Do(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},k.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:No(n);return o<0&&(o=Gi(r+o,0)),S(t,e,o)},k.inRange=function(t,e,n){return e=Mo(e),n===u?(n=e,e=0):n=Mo(n),(r=t=Uo(t))>=Zi(o=e,i=n)&&r<Gi(o,i);var r,o,i},k.invoke=Za,k.isArguments=Ca,k.isArray=Pa,k.isArrayBuffer=Ta,k.isArrayLike=xo,k.isArrayLikeObject=Oo,k.isBoolean=function(t){return!0===t||!1===t||Po(t)&&Je(t)==it},k.isBuffer=Ia,k.isDate=Da,k.isElement=function(t){return Po(t)&&1===t.nodeType&&!Io(t)},k.isEmpty=function(t){if(null==t)return!0;if(xo(t)&&(Pa(t)||"string"==typeof t||"function"==typeof t.splice||Ia(t)||Na(t)||Ca(t)))return!t.length;var e=Mu(t);if(e==lt||e==vt)return!t.size;if(Hr(t))return!mn(t).length;for(var n in t)if(bi.call(t,n))return!1;return!0},k.isEqual=function(t,e){return xu(t,e)},k.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?xu(t,e,u,n):!!r},k.isError=Eo,k.isFinite=function(t){return"number"==typeof t&&Vi(t)},k.isFunction=jo,k.isInteger=ko,k.isLength=Ao,k.isMap=Ra,k.isMatch=function(t,e){return t===e||vn(t,e,Lr(e))},k.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Lr(e),n)},k.isNaN=function(t){return To(t)&&t!=+t},k.isNative=function(t){if(Uu(t))throw new ai("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},k.isNil=function(t){return null==t},k.isNull=function(t){return null===t},k.isNumber=To,k.isObject=Co,k.isObjectLike=Po,k.isPlainObject=Io,k.isRegExp=La,k.isSafeInteger=function(t){return ko(t)&&t>=-9007199254740991&&t<=X},k.isSet=Ma,k.isString=Do,k.isSymbol=Ro,k.isTypedArray=Na,k.isUndefined=function(t){return t===u},k.isWeakMap=function(t){return Po(t)&&Mu(t)==mt},k.isWeakSet=function(t){return Po(t)&&"[object WeakSet]"==Je(t)},k.join=function(t,e){return null==t?"":qi.call(t,e)},k.kebabCase=rc,k.last=ao,k.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=No(n))<0?Gi(r+o,0):Zi(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},k.lowerCase=oc,k.lowerFirst=ic,k.lt=Ba,k.lte=Ua,k.max=function(t){return t&&t.length?Re(t,Qo,Qe):u},k.maxBy=function(t,e){return t&&t.length?Re(t,Dr(e,2),Qe):u},k.mean=function(t){return E(t,Qo)},k.meanBy=function(t,e){return E(t,Dr(e,2))},k.min=function(t){return t&&t.length?Re(t,Qo,bn):u},k.minBy=function(t,e){return t&&t.length?Re(t,Dr(e,2),bn):u},k.stubArray=ri,k.stubFalse=oi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Ec,k.nth=function(t,e){return t&&t.length?xn(t,No(e)):u},k.noConflict=function(){return We._===this&&(We._=Oi),this},k.noop=ei,k.now=ya,k.pad=function(t,e,n){t=Ko(t);var r=(e=No(e))?H(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return mr($i(o),n)+t+mr(Ki(o),n)},k.padEnd=function(t,e,n){t=Ko(t);var r=(e=No(e))?H(t):0;return e&&r<e?t+mr(e-r,n):t},k.padStart=function(t,e,n){t=Ko(t);var r=(e=No(e))?H(t):0;return e&&r<e?mr(e-r,n)+t:t},k.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Ji(Ko(t).replace(Vt,""),e||0)},k.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Kr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=Mo(t),e===u?(e=t,t=0):e=Mo(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=Qi();return Zi(t+o*(e-t+ze("1e-"+((o+"").length-1))),e)}return An(t,e)},k.reduce=function(t,e,n){var r=Pa(t)?g:A,o=arguments.length<3;return r(t,Dr(e,4),n,o,mu)},k.reduceRight=function(t,e,n){var r=Pa(t)?m:A,o=arguments.length<3;return r(t,Dr(e,4),n,o,bu)},k.repeat=function(t,e,n){return e=(n?Kr(t,e,n):e===u)?1:No(e),Cn(Ko(t),e)},k.replace=function(){var t=arguments,e=Ko(t[0]);return t.length<3?e:e.replace(t[1],t[2])},k.result=function(t,e,n){var r=-1,o=(e=Yn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[to(e[r])];i===u&&(r=o,i=n),t=jo(i)?i.call(t):i}return t},k.round=jc,k.runInContext=t,k.sample=function(t){return(Pa(t)?ge:Tn)(t)},k.size=function(t){if(null==t)return 0;if(xo(t))return Do(t)?H(t):t.length;var e=Mu(t);return e==lt||e==vt?t.size:mn(t).length},k.snakeCase=uc,k.some=function(t,e,n){var r=Pa(t)?b:Mn;return n&&Kr(t,e,n)&&(e=u),r(t,Dr(e,3))},k.sortedIndex=function(t,e){return Nn(t,e)},k.sortedIndexBy=function(t,e,n){return Bn(t,e,Dr(n,2))},k.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Nn(t,e);if(r<n&&So(t[r],e))return r}return-1},k.sortedLastIndex=function(t,e){return Nn(t,e,!0)},k.sortedLastIndexBy=function(t,e,n){return Bn(t,e,Dr(n,2),!0)},k.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Nn(t,e,!0)-1;if(So(t[n],e))return n}return-1},k.startCase=ac,k.startsWith=function(t,e,n){return t=Ko(t),n=null==n?0:ke(No(n),0,t.length),e=ku(e),t.slice(n,n+e.length)==e},k.subtract=kc,k.sum=function(t){return t&&t.length?C(t,Qo):0},k.sumBy=function(t,e){return t&&t.length?C(t,Dr(e,2)):0},k.template=function(t,e,n){var r=k.templateSettings;n&&Kr(t,e,n)&&(e=u),t=Ko(t),e=$a({},e,r,Er);var o,i,a=$a({},e.imports,r.imports,Er),c=Ho(a),s=D(a,c),l=0,f=e.interpolate||ae,h="__p += '",p=fi((e.escape||ae).source+"|"+f.source+"|"+(f===Ut?Xt:ae).source+"|"+(e.evaluate||ae).source+"|$","g"),d="//# sourceURL="+(bi.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ue+"]")+"\n";t.replace(p,(function(e,n,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(ce,B),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=bi.call(e,"variable")&&e.variable;if(v){if(Jt.test(v))throw new ai("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Pt,""):h).replace(Tt,"$1").replace(It,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=lc((function(){return ci(c,d+"return "+h).apply(u,s)}));if(y.source=h,Eo(y))throw y;return y},k.times=function(t,e){if((t=No(t))<1||t>X)return[];var n=et,r=Zi(t,et);e=Dr(e),t-=et;for(var o=P(r,e);++n<t;)e(n);return o},k.toFinite=Mo,k.toInteger=No,k.toLength=Bo,k.toLower=function(t){return Ko(t).toLowerCase()},k.toNumber=Uo,k.toSafeInteger=function(t){return t?ke(No(t),-9007199254740991,X):0===t?t:0},k.toString=Ko,k.toUpper=function(t){return Ko(t).toUpperCase()},k.trim=function(t,e,n){if((t=Ko(t))&&(n||e===u))return T(t);if(!t||!(e=ku(e)))return t;var r=V(t),o=V(e);return Jn(r,L(r,o),M(r,o)+1).join("")},k.trimEnd=function(t,e,n){if((t=Ko(t))&&(n||e===u))return t.slice(0,q(t)+1);if(!t||!(e=ku(e)))return t;var r=V(t);return Jn(r,0,M(r,V(e))+1).join("")},k.trimStart=function(t,e,n){if((t=Ko(t))&&(n||e===u))return t.replace(Vt,"");if(!t||!(e=ku(e)))return t;var r=V(t);return Jn(r,L(r,V(e))).join("")},k.truncate=function(t,e){var n=30,r="...";if(Co(e)){var o="separator"in e?e.separator:o;n="length"in e?No(e.length):n,r="omission"in e?ku(e.omission):r}var i=(t=Ko(t)).length;if(U(t)){var a=V(t);i=a.length}if(n>=i)return t;var c=n-H(r);if(c<1)return r;var s=a?Jn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),La(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=fi(o.source,Ko(te.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(ku(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},k.unescape=function(t){return(t=Ko(t))&&Lt.test(t)?t.replace(Dt,sn):t},k.uniqueId=function(t){var e=++wi;return Ko(t)+e},k.upperCase=cc,k.upperFirst=sc,k.each=vo,k.eachRight=yo,k.first=uo,ti(k,(Sa={},$e(k,(function(t,e){bi.call(k.prototype,e)||(Sa[e]=t)})),Sa),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){k[t].placeholder=k})),s(["drop","take"],(function(t,e){le.prototype[t]=function(n){n=n===u?1:Gi(No(n),0);var r=this.__filtered__&&!e?new le(this):this.clone();return r.__filtered__?r.__takeCount__=Zi(n,r.__takeCount__):r.__views__.push({size:Zi(n,et),type:t+(r.__dir__<0?"Right":"")}),r},le.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;le.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Dr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");le.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");le.prototype[t]=function(){return this.__filtered__?new le(this):this[n](1)}})),le.prototype.compact=function(){return this.filter(Qo)},le.prototype.find=function(t){return this.filter(t).head()},le.prototype.findLast=function(t){return this.reverse().find(t)},le.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new le(this):this.map((function(n){return pn(n,t,e)}))})),le.prototype.reject=function(t){return this.filter(_o(Dr(t)))},le.prototype.slice=function(t,e){t=No(t);var n=this;return n.__filtered__&&(t>0||e<0)?new le(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=No(e))<0?n.dropRight(-e):n.take(e-t)),n)},le.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},le.prototype.toArray=function(){return this.take(et)},$e(le.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),i=k[o?"take"+("last"==e?"Right":""):e],a=o||/^find/.test(e);i&&(k.prototype[e]=function(){var e=this.__wrapped__,c=o?[1]:arguments,s=r(e,le),l=c[0],f=s||Pa(e),h=function(t){var e=i.apply(k,y([t],c));return o&&p?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var p=this.__chain__,d=!!this.__actions__.length,v=a&&!p,g=s&&!d;if(!a&&f){e=g?e:new le(this);var m=t.apply(e,c);return m.__actions__.push({func:po,args:[h],thisArg:u}),new se(m,p)}return v&&g?t.apply(this,c):(m=this.thru(h),v?o?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=di[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);k.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Pa(o)?o:[],t)}return this[n]((function(n){return e.apply(Pa(n)?n:[],t)}))}})),$e(le.prototype,(function(t,e){var n=k[e];if(n){var r=n.name+"";bi.call(au,r)||(au[r]=[]),au[r].push({name:e,func:n})}})),au[Pu(u,2).name]=[{name:"wrapper",func:u}],le.prototype.clone=function(){var t=new le(this.__wrapped__);return t.__actions__=or(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=or(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=or(this.__views__),t},le.prototype.reverse=function(){if(this.__filtered__){var t=new le(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},le.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Pa(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=Zi(e,t+u);break;case"takeRight":t=Gi(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,p=Zi(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Vn(t,this.__actions__);var d=[];t:for(;c--&&h<p;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},k.prototype.at=aa,k.prototype.chain=function(){return ho(this)},k.prototype.commit=function(){return new se(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===u&&(this.__values__=Lo(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},k.prototype.plant=function(t){for(var e,n=this;r(n,qt);){var o=no(n);o.__index__=0,o.__values__=u,e?i.__wrapped__=o:e=o;var i=o;n=n.__wrapped__}return i.__wrapped__=t,e},k.prototype.reverse=function(){var t=this.__wrapped__;if(r(t,le)){var e=t;return this.__actions__.length&&(e=new le(this)),(e=e.reverse()).__actions__.push({func:po,args:[so],thisArg:u}),new se(e,this.__chain__)}return this.thru(so)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Vn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,Li&&(k.prototype[Li]=function(){return this}),k}();We._=ln,(i=function(){return ln}.call(e,n,e,t))===u||(t.exports=i)}.call(this)},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},766:function(t){"use strict";t.exports=d},824:function(t){"use strict";t.exports=c},45:function(t){"use strict";t.exports=s},728:function(t){"use strict";t.exports=l},688:function(t){"use strict";t.exports=v},64:function(t){"use strict";t.exports=h},954:function(t){"use strict";t.exports=a},493:function(t){"use strict";t.exports=f},281:function(t){"use strict";t.exports=p}},y={};function g(t){var e=y[t];if(void 0!==e)return e.exports;var n=y[t]={id:t,loaded:!1,exports:{}};return i[t].call(n.exports,n,n.exports,g),n.loaded=!0,n.exports}g.y=u,g.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return g.d(e,{a:e}),e},g.d=function(t,e){for(var n in e)g.o(e,n)&&!g.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},g.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),g.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},g.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},g.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;g.g.importScripts&&(t=g.g.location+"");var e=g.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),g.p=t}();var m={};return(0,g(968).s)(1),function(){"use strict";var i=function(t){var e=t.to,n=t.templateParams,r=t.children,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["to","templateParams","children"]);return Rt.default.createElement("a",Nt({onClick:function(t){return o=e,i=n,void((r=t).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Mt.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Mt.interpolateUrl)(e,n)},o),r)},u=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},a=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},c=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,Rt.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return u(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(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.")}(),o=r[0],i=r[1];(0,Rt.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var c={};return e&&(c=(0,Rt.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){a(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,c)}},s=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},l=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},f=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)(window.navigator.onLine))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return l(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,2):void 0}}(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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){return(0,Ft.subscribeConnectivityChanged)((function(t){var e=t.online;return r(e)}))}),[]),n},h=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},p=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return h(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(t,2):void 0}}(e)||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.")}(),r=n[0],o=n[1];return(0,Rt.useEffect)((function(){var e=function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];(0,Kt.isEqual)(u,r)||o(u)};return e((0,Bt.getExtensionStore)().getState()),(0,Bt.getExtensionStore)().subscribe(e)}),[t,r]),r},d=function(t){var e=f(),n=p(t);return(0,Rt.useMemo)((function(){return(0,Bt.getConnectedExtensions)(n,e)}),[n,e])},v=function(t){var e=(0,Rt.useContext)(Lt).moduleName;if(!e)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Rt.useEffect)((function(){(0,Bt.registerExtensionSlot)(e,t)}),[]),{extensions:d(t),extensionSlotName:t,extensionSlotModuleName:e}},y=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},b=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){y(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},w=function(t){return t},_=function(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n},S=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{};n%2?_(Object(r),!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))},r=1;r<arguments.length;r++)n(r);return t},x=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},O=function(t,e){var n;if("function"!=typeof(n=e.domElement?function(){return e.domElement}:e.domElementGetter?e.domElementGetter:t.domElementGetter?t.domElementGetter:function(t){var e=t.appName||t.name;if(!e)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(e);return function(){var t=document.getElementById(n);return t||((t=document.createElement("div")).id=n,document.body.appendChild(t)),t}}(e)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(e.name,"'. Expected a function, received ").concat(qt(n)));return function(){var t=n(e);if(!r(t,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(e.name,"'. Expected HTMLElement, received ").concat(qt(t)));return t}},E=function(t){if("object"!==Vt(t))throw new Error("single-spa-react requires a configuration object");var e=S(S({},Gt),t);if(!e.React)throw new Error("single-spa-react must be passed opts.React");if(!e.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!e.rootComponent&&!e.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(e.errorBoundary&&"function"!=typeof e.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!Wt&&e.React.createContext&&(Wt=e.React.createContext()),e.SingleSpaRoot=function(t){function e(t){e.displayName="SingleSpaRoot(".concat(t.name,")")}return e.prototype=Object.create(t.React.Component.prototype),e.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},e.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},e.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},e}(e);var n={bootstrap:j.bind(null,e),mount:k.bind(null,e),unmount:A.bind(null,e)};return e.parcelCanUpdate&&(n.update=C.bind(null,e)),n},j=function(t,e){return t.rootComponent?Promise.resolve():t.loadRootComponent(e).then((function(e){t.rootComponent=e}))},k=function(t,e){return new Promise((function(n,r){t.suppressComponentDidCatchWarning||!function(t){if(!(t&&"string"==typeof t.version&&t.version.indexOf(".")>=0))return!1;var e=t.version.slice(0,t.version.indexOf("."));try{return Number(e)>=16}catch(t){return!1}}(t.React)||t.errorBoundary||(t.rootComponent.prototype?t.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(e.name||e.appName||e.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=P(t,e,(function(){n(this)})),i=O(t,e)(),u=function(t){var e=t.opts,n=t.elementToRender,r=t.domElement,o="function"==typeof e.renderType?e.renderType():e.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=e.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?e.ReactDOM.hydrate(n,r):e.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:t});t.domElements[e.name]=i,t.renderResults[e.name]=u}))},A=function(t,e){return new Promise((function(n){t.unmountFinished=n;var r=t.renderResults[e.name];r&&r.unmount?r.unmount():t.ReactDOM.unmountComponentAtNode(t.domElements[e.name]),delete t.domElements[e.name],delete t.renderResults[e.name]}))},C=function(t,e){return new Promise((function(n){t.updateResolves[e.name]||(t.updateResolves[e.name]=[]),t.updateResolves[e.name].push(n);var r=P(t,e,null),o=t.renderResults[e.name];if(o&&o.render)o.render(r);else{var i=O(t,e)();t.ReactDOM.render(r,i)}}))},P=function(t,e,n){var r=t.React.createElement(t.rootComponent,e),o=Wt?t.React.createElement(Wt.Provider,{value:e},r):r;return(t.errorBoundary||e.errorBoundary||t.errorBoundaryClass||e.errorBoundaryClass)&&(t.errorBoundaryClass=t.errorBoundaryClass||e.errorBoundaryClass||function(t,e){function n(e){t.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(e.name,")")}return n.prototype=Object.create(t.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(t.errorBoundary||e.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(t,e){this.setState({caughtError:t,caughtErrorInfo:e})},n}(t,e),o=t.React.createElement(t.errorBoundaryClass,e,o)),t.React.createElement(t.SingleSpaRoot,S(S({},e),{},{mountFinished:n,updateFinished:function(){t.updateResolves[e.name]&&(t.updateResolves[e.name].forEach((function(t){return t()})),delete t.updateResolves[e.name])},unmountFinished:function(){setTimeout(t.unmountFinished)}}),o)},T=function(t,e){return!e||"object"!==te(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},I=function(t){if("object"!=typeof t||"string"!=typeof t.featureName||"string"!=typeof t.moduleName)throw new Error("Invalid options");var e=Object.assign({},ne,t);return function(t){var n;return(n=function(n){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Xt(t,e)}(a,n);var o,i,u=(o=a,i=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(t){return!1}}(),function(){var t,e=Qt(o);if(i){var n=Qt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return T(this,t)});function a(t){var n;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,a),(n=u.call(this,t)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:e.moduleName,extension:t._extensionContext}},n}var c=a.prototype;return c.componentDidCatch=function(t,n){n&&n.componentStack&&(t.extra=Object.assign(t.extra||{},{componentStack:n.componentStack})),e.throwErrorsToConsole&&setTimeout((function(){throw t})),this.setState({caughtError:t,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Rt.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Rt.default.createElement(Lt.Provider,{value:this.state.config},Rt.default.createElement(Rt.default.Suspense,{fallback:null},e.disableTranslations?Rt.default.createElement(t,Jt({},this.props)):Rt.default.createElement(re,{ns:e.moduleName,forceUpdate:function(){return n.forceUpdate()}},Rt.default.createElement(Yt.I18nextProvider,{i18n:ee,defaultNS:e.moduleName},Rt.default.createElement(t,Jt({},this.props))))));return e.strictMode||!Rt.default.StrictMode?r:Rt.default.createElement(Rt.default.StrictMode,null,r)},a}(Rt.default.Component)).displayName="OpenmrsReactComponent(".concat(e.featureName,")"),n}},D=function(t,e){return E({React:Rt.default,ReactDOM:Ht.default,rootComponent:I(e)(t)})},R=function(t,e){return function(){return t().then((function(t){return D(t.default,e)}))}},L=function(t,e){return function(){return Promise.resolve(D(t,e))}},M=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},N=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return M(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(t,2):void 0}}(e)||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.")}(),r=n[0],o=n[1];return(0,Rt.useEffect)((function(){return(0,Bt.getExtensionStore)().subscribe((function(e){var n,i,u=null!==(i=null===(n=e.slots[t])||void 0===n?void 0:n.assignedExtensions.map((function(t){return t.id})))&&void 0!==i?i:[];(0,Kt.isEqual)(u,r)||o(u)}))}),[]),r},B=function(t){(0,Rt.useEffect)((function(){if(t){var e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=e}}}),[t])},U=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},F=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},K=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},$=function(t){var e=this.__data__=new se(t);this.size=e.size},z=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fe;++e<n;)this.add(t[e])},H=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},V=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},q=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return H(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H(t,e):void 0}}(t,e)||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.")}()},W=function(){var t=(0,Rt.useContext)(Lt),e=t.moduleName,n=t.extension;if(!e&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(t){var e,n,r,o,i,u,a=(0,Rt.useMemo)((function(){return(0,Mt.getConfigStore)(t)}),[t]),c=t,s=(e=a,o=(r=q((0,Rt.useState)((n=e,function(){var t=n.getState();return t.loaded&&t.config?t.config:null})),2))[0],i=r[1],(0,Rt.useEffect)((function(){return null==e?void 0:e.subscribe((function(t){t.loaded&&t.config&&i(t.config)}))}),[e]),o);if(!s)throw tr[c]||(tr[c]=(u=a,new Promise((function(t){var e=u.subscribe((function(n){n.loaded&&n.config&&(t(n.config),e())}))})))),tr[c];return s}(e),o=function(t){var e,n,r,o,i,u,a,c=(0,Rt.useMemo)(Mt.getExtensionsConfigStore,[]),s=(e=c,n=t,i=q((0,Rt.useState)((r=e,(o=n)?function(){var t=r.getState(),e=(0,Mt.getExtensionConfigFromStore)(t,o.extensionSlotName,o.extensionId);if(e.loaded&&e.config)return e.config}:null)),2),u=i[0],a=i[1],(0,Rt.useEffect)((function(){if(n)return e.subscribe((function(t){var e=(0,Mt.getExtensionConfigFromStore)(t,n.extensionSlotName,n.extensionId);e.loaded&&e.config&&!Xn(e.config,u)&&a(e.config)}))}),[e,n,u]),u);if(!s&&t){var l="".concat(t.extensionSlotName,"-").concat(t.extensionId);throw!tr[l]&&c&&(tr[l]=function(t,e){return new Promise((function(n){var r=t.subscribe((function(t){var o=(0,Mt.getExtensionConfigFromStore)(t,e.extensionSlotName,e.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(c,t)),tr[l]}return s||{}}(n),i=(0,Rt.useMemo)((function(){return function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){V(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},r,o)}),[r,o]);return i},G=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},J=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},Q=function(t,e){switch(e.type){case qn.loadPatient:return Y({},t,{patientUuid:e.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case qn.newPatient:return Y({},t,{patient:e.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case qn.loadError:return Y({},t,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:e.err});default:return t}},X=function(t){var e,n=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useReducer)(Q,Y({},rr,{patientUuid:null!=t?t:null,isPendingUuid:!t,isLoadingPatient:!!t})))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return G(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(t,2):void 0}}(e)||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.")}(),r=n[0],o=n[1];return(0,Rt.useEffect)((function(){if(r.isPendingUuid){var t=J();o(t?{type:qn.loadPatient,patientUuid:t}:{type:qn.newPatient,patient:null})}var e=!0;return r.isLoadingPatient&&r.patientUuid&&(0,er.fetchCurrentPatient)(r.patientUuid).then((function(t){return e&&o({patient:t.data,type:qn.newPatient})}),(function(t){return e&&o({err:t,type:qn.loadError})})),function(){e=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Rt.useEffect)((function(){var t=function(t){var e=J();e!=r.patientUuid&&o({type:qn.loadPatient,patientUuid:e})};return window.addEventListener("single-spa:routing-event",t),function(){return window.removeEventListener("single-spa:routing-event",t)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=t?t:r.patientUuid,error:r.err}},tt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},et=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},nt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){et(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},rt=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tt(t,e):void 0}}(t,e)||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.")}()},ot=function(){var t=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return t&&t[1]},it=function(t,e){switch(e.type){case nr.loadPatient:return nt({},t,{patient:null,isLoadingPatient:!0,err:null});case nr.newPatient:return nt({},t,{patient:e.patient,isLoadingPatient:!1,err:null});case nr.loadError:return nt({},t,{patient:null,isLoadingPatient:!1,err:e.err});default:return t}},ut=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ot(),e=rt((0,Rt.useReducer)(it,ar),2),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var e=!0;return t?((0,er.fetchCurrentPatient)(t).then((function(t){return e&&r({patient:t.data,type:nr.newPatient})}),(function(t){return e&&r({err:t,type:nr.loadError})})),r({type:nr.loadPatient})):r({type:nr.newPatient,patient:null}),function(){e=!1}}),[t]),[n.isLoadingPatient,n.patient,t,n.err]},at=function(t){var e=d(t);return(0,Rt.useMemo)((function(){return Object.fromEntries(e.map((function(t){return[t.name,t.meta]})))}),[e])},ct=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},st=function(){var t,e=(t=(0,Rt.useState)(0),function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return ct(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ct(t,2):void 0}}(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.")}())[1];return(0,Rt.useCallback)((function(){e((function(t){return t+1}))}),[])},lt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},ft=function(){var t="tablet";return document.body.classList.forEach((function(e){switch(e){case"omrs-breakpoint-lt-tablet":t="phone";break;case"omrs-breakpoint-gt-tablet":t="desktop"}})),t},ht=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)(ft))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return lt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lt(t,2):void 0}}(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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var t=function(){r(ft())};return window.addEventListener("resize",t),function(){return window.removeEventListener("resize",t)}}),[]),n},pt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},dt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return pt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pt(t,2):void 0}}(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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var t=(0,er.getLocations)().subscribe((function(t){r(t)}),(function(t){console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},vt=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Rt.useRef)(null);return(0,Rt.useEffect)((function(){if(e){var r=function(e){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(e.target))||t(e)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[t,e]),n},yt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},gt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},mt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return gt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gt(t,2):void 0}}(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.")}(),n=e[0],r=e[1],o=null;if(!n){if(or){var i=(0,er.getSessionStore)().getState();i.loaded&&(o=i.session)}else or=new Promise((function(t){var e=function(e){var n=e.loaded,r=e.session;n&&(t(r),o=r,ir&&ir(),ir=void 0)};e((0,er.getSessionStore)().getState()),o||(ir=(0,er.getSessionStore)().subscribe(e))}));if(!o)throw or;r(o)}(0,Rt.useEffect)((function(){return ir||(ir=(0,er.getSessionStore)().subscribe((function(t){var e=t.loaded,n=t.session;e&&(o=n,r(n))}))),function(){ir&&ir(),ir=void 0}}),[]);var u=n||o;if(!u)throw or?(console.warn("useSession is in an unexpected state. Attempting to recover."),or):Error("useSession is in an invalid state.");return u},bt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},wt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},_t=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){wt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},St=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return bt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bt(t,e):void 0}}(t,e)||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.")}()},xt=function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n},Ot=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr,n=arguments.length>2?arguments[2]:void 0,r=St((0,Rt.useState)((function(){return e(t.getState())})),2),o=r[0],i=r[1];(0,Rt.useEffect)((function(){return(0,fr.subscribeTo)(t,e,i)}),[t,e]);var u={};return n&&(u=(0,Rt.useMemo)((function(){return xt(t,n)}),[t,n])),_t({},o,u)},Et=function(t,e){return Ot(t,hr,e)},jt=function(t,e,n,o){return new(n||(n=Promise))((function(i,u){function a(t){try{s(o.next(t))}catch(t){u(t)}}function c(t){try{s(o.throw(t))}catch(t){u(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,r(e,n)?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))},kt=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},At=function(t){var e,n=eo(t?"/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(er.defaultVisitCustomRepresentation,"&includeInactive=false"):null,er.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Rt.useMemo)((function(){return null!==(e=null==r?void 0:r.data.results.find((function(t){return null===t.stopDatetime&&(0,no.default)(t.startDatetime).isToday()})))&&void 0!==e?e:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ct=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Pt=function(){var t,e=function(t){if(Array.isArray(t))return t}(t=(0,Rt.useState)([]))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t)||function(t,e){if(t){if("string"==typeof t)return Ct(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(t,2):void 0}}(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.")}(),n=e[0],r=e[1];return(0,Rt.useEffect)((function(){var t=(0,er.getVisitTypes)().subscribe((function(t){r(t)}),(function(t){return console.error(t)}));return function(){return t.unsubscribe()}}),[]),n},Tt=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},It=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||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.")}()},Dt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=It((0,Rt.useState)(1),2),r=n[0],o=n[1],i=(0,Rt.useMemo)((function(){return Math.max(1,Math.ceil(t.length/e))}),[t.length,e]),u=(0,Rt.useMemo)((function(){var n=(r-1)*e,o=(r+0)*e;return t.slice(n,o)}),[t,r,e]);return{results:u,totalPages:i,currentPage:r,paginated:t.length>e,showNextButton:r<i,showPreviousButton:r>1,goTo:function(t){o(Math.max(1,Math.min(i,t)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};g.r(m),g.d(m,{ComponentContext:function(){return Lt},ConfigurableLink:function(){return i},Extension:function(){return Ut},ExtensionSlot:function(){return zt},UserHasAccess:function(){return lr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return oe},getAsyncLifecycle:function(){return R},getLifecycle:function(){return D},getSyncLifecycle:function(){return L},openmrsComponentDecorator:function(){return I},useAssignedExtensionIds:function(){return N},useAssignedExtensions:function(){return p},useBodyScrollLock:function(){return B},useConfig:function(){return W},useConnectedExtensions:function(){return d},useConnectivity:function(){return f},useCurrentPatient:function(){return ut},useExtensionInternalStore:function(){return cr},useExtensionSlot:function(){return v},useExtensionSlotMeta:function(){return at},useExtensionStore:function(){return sr},useForceUpdate:function(){return st},useLayoutType:function(){return ht},useLocations:function(){return dt},useOnClickOutside:function(){return vt},usePagination:function(){return Dt},usePatient:function(){return X},useSession:function(){return mt},useStore:function(){return Ot},useStoreWithActions:function(){return Et},useVisit:function(){return At},useVisitTypes:function(){return Pt}});var Rt=g(954),Lt=Rt.default.createContext({moduleName:""}),Mt=g(824);function Nt(){return Nt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nt.apply(this,arguments)}var Bt=g(45),Ut=function(t){var e,n=t.state,r=t.wrap,o=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)())||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return s(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,2):void 0}}(e)||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.")}(),i=o[0],u=o[1],a=(0,Rt.useContext)(Lt).extension,c=(0,Rt.useCallback)((function(t){u(t)}),[]);(0,Rt.useEffect)((function(){if(null!=i&&a)return(0,Bt.renderExtension)(i,a.extensionSlotName,a.extensionSlotModuleName,a.extensionId,void 0,n)}),[null==a?void 0:a.extensionSlotName,null==a?void 0:a.extensionId,null==a?void 0:a.extensionSlotModuleName,n,i]);var l=Rt.default.createElement("div",{ref:c,"data-extension-id":null==a?void 0:a.extensionId,style:{position:"relative"}});return a&&r?r(l,a):l},Ft=g(728),Kt=g(891);function $t(){return $t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$t.apply(this,arguments)}var zt=function(t){var e=t.name,n=t.extensionSlotName,r=t.select,o=void 0===r?w:r,i=t.children,u=t.state,a=t.style,c=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,["name","extensionSlotName","select","children","state","style"]),s=null!=e?e:n,l=(0,Rt.useRef)(null),f=v(s),h=f.extensions,p=f.extensionSlotModuleName,d=(0,Rt.useRef)(u);(function(t,e){if(t===e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;if("object"!=typeof t||"object"!=typeof e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!(i in e)||e[i]!==t[i])return!1}return!0})(d.current,u)||(d.current=u);var y=(0,Rt.useMemo)((function(){return s&&o(h).map((function(t){return Rt.default.createElement(Lt.Provider,{key:t.id,value:{moduleName:p,extension:{extensionId:t.id,extensionSlotName:s,extensionSlotModuleName:p}}},null!=i?i:Rt.default.createElement(Ut,{state:d.current}))}))}),[o,h,s,d.current]);return Rt.default.createElement("div",$t({ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":p,style:b({},a,{position:"relative"})},c),y)},Ht=g(493);function Vt(t){return(Vt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}function qt(t){return(qt="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":o(t)})(t)}var Wt=null;try{Wt=n(983).createContext()}catch(t){}var Gt={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Zt=g(64),Yt=g(281);function Jt(){return Jt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Jt.apply(this,arguments)}function Qt(t){return(Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Xt(t,e){return(Xt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var te=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)},ee=Zt.default.default||Zt.default,ne={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},re=function(t){(0,Rt.useEffect)((function(){return ee.on("languageChanged",t.forceUpdate),function(){return ee.off("languageChanged",t.forceUpdate)}}),[t.forceUpdate]);var e=(0,Rt.useRef)(null);if(e.current)throw e.current;if(!ee.hasLoadedNamespace(t.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(t.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw ee.loadNamespaces([t.ns]).then((function(){return clearTimeout(n)})).catch((function(t){clearTimeout(n),e.current=t}))}return Rt.default.createElement(Rt.default.Fragment,null,t.children)},oe=R,ie=function(t,e){return t===e||t!=t&&e!=e},ue=function(t,e){for(var n=t.length;n--;)if(ie(t[n][0],e))return n;return-1},ae=Array.prototype.splice;U.prototype.clear=function(){this.__data__=[],this.size=0},U.prototype.delete=function(t){var e=this.__data__,n=ue(e,t);return!(n<0||(n==e.length-1?e.pop():ae.call(e,n,1),--this.size,0))},U.prototype.get=function(t){var e=this.__data__,n=ue(e,t);return n<0?void 0:e[n][1]},U.prototype.has=function(t){return ue(this.__data__,t)>-1},U.prototype.set=function(t,e){var n=this.__data__,r=ue(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var ce,se=U,le="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fe="object"==typeof self&&self&&self.Object===Object&&self,he=le||fe||Function("return this")(),pe=he.Symbol,de=Object.prototype,ve=de.hasOwnProperty,ye=de.toString,ge=pe?pe.toStringTag:void 0,me=Object.prototype.toString,be=pe?pe.toStringTag:void 0,we=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":be&&be in Object(t)?function(t){var e=ve.call(t,ge),n=t[ge];try{t[ge]=void 0;var r=!0}catch(t){}var o=ye.call(t);return r&&(e?t[ge]=n:delete t[ge]),o}(t):(e=t,me.call(e));var e},_e=function(t){var e=void 0===t?"undefined":o(t);return null!=t&&("object"==e||"function"==e)},Se=function(t){if(!_e(t))return!1;var e=we(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},xe=he["__core-js_shared__"],Oe=(ce=/[^.]+$/.exec(xe&&xe.keys&&xe.keys.IE_PROTO||""))?"Symbol(src)_1."+ce:"",Ee=Function.prototype.toString,je=function(t){if(null!=t){try{return Ee.call(t)}catch(t){}try{return t+""}catch(t){}}return""},ke=/^\[object .+?Constructor\]$/,Ae=Function.prototype,Ce=Object.prototype,Pe=Ae.toString,Te=Ce.hasOwnProperty,Ie=RegExp("^"+Pe.call(Te).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),De=function(t,e){var n,r=null==(n=t)?void 0:n[e];return function(t){return!(!_e(t)||(e=t,Oe&&Oe in e))&&(Se(t)?Ie:ke).test(je(t));var e}(r)?r:void 0},Re=De(he,"Map"),Le=De(Object,"create"),Me=Object.prototype.hasOwnProperty,Ne=Object.prototype.hasOwnProperty;F.prototype.clear=function(){this.__data__=Le?Le(null):{},this.size=0},F.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},F.prototype.get=function(t){var e=this.__data__;if(Le){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Me.call(e,t)?e[t]:void 0},F.prototype.has=function(t){var e=this.__data__;return Le?void 0!==e[t]:Ne.call(e,t)},F.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Le&&void 0===e?"__lodash_hash_undefined__":e,this};var Be=F,Ue=function(t,e){var n,r,i=t.__data__;return("string"==(r=o(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};K.prototype.clear=function(){this.size=0,this.__data__={hash:new Be,map:new(Re||se),string:new Be}},K.prototype.delete=function(t){var e=Ue(this,t).delete(t);return this.size-=e?1:0,e},K.prototype.get=function(t){return Ue(this,t).get(t)},K.prototype.has=function(t){return Ue(this,t).has(t)},K.prototype.set=function(t,e){var n=Ue(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Fe=K;$.prototype.clear=function(){this.__data__=new se,this.size=0},$.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},$.prototype.get=function(t){return this.__data__.get(t)},$.prototype.has=function(t){return this.__data__.has(t)},$.prototype.set=function(t,e){var n=this.__data__;if(r(n,se)){var o=n.__data__;if(!Re||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fe(o)}return n.set(t,e),this.size=n.size,this};var Ke=$;z.prototype.add=z.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},z.prototype.has=function(t){return this.__data__.has(t)};var $e=z,ze=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},He=function(t,e){return t.has(e)},Ve=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,p=2&n?new $e:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],v=e[f];if(r)var y=u?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!ze(e,(function(t,e){if(!He(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},qe=he.Uint8Array,We=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},Ge=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Ze=pe?pe.prototype:void 0,Ye=Ze?Ze.valueOf:void 0,Je=Array.isArray,Qe=Object.prototype.propertyIsEnumerable,Xe=Object.getOwnPropertySymbols,tn=Xe?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Xe(t),(function(e){return Qe.call(t,e)})))}:function(){return[]},en=function(t){return null!=t&&"object"==typeof t},nn=function(t){return en(t)&&"[object Arguments]"==we(t)},rn=Object.prototype,on=rn.hasOwnProperty,un=rn.propertyIsEnumerable,an=nn(function(){return arguments}())?nn:function(t){return en(t)&&on.call(t,"callee")&&!un.call(t,"callee")},cn=an,sn=e&&!e.nodeType&&e,ln=sn&&t&&!t.nodeType&&t,fn=ln&&ln.exports===sn?he.Buffer:void 0,hn=(fn?fn.isBuffer:void 0)||function(){return!1},pn=/^(?:0|[1-9]\d*)$/,dn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},vn={};vn["[object Float32Array]"]=vn["[object Float64Array]"]=vn["[object Int8Array]"]=vn["[object Int16Array]"]=vn["[object Int32Array]"]=vn["[object Uint8Array]"]=vn["[object Uint8ClampedArray]"]=vn["[object Uint16Array]"]=vn["[object Uint32Array]"]=!0,vn["[object Arguments]"]=vn["[object Array]"]=vn["[object ArrayBuffer]"]=vn["[object Boolean]"]=vn["[object DataView]"]=vn["[object Date]"]=vn["[object Error]"]=vn["[object Function]"]=vn["[object Map]"]=vn["[object Number]"]=vn["[object Object]"]=vn["[object RegExp]"]=vn["[object Set]"]=vn["[object String]"]=vn["[object WeakMap]"]=!1;var yn,gn,mn,bn=e&&!e.nodeType&&e,wn=bn&&t&&!t.nodeType&&t,_n=wn&&wn.exports===bn&&le.process,Sn=function(){try{return wn&&wn.require&&wn.require("util").types||_n&&_n.binding&&_n.binding("util")}catch(t){}}(),xn=Sn&&Sn.isTypedArray,On=xn?(yn=xn,function(t){return yn(t)}):function(t){return en(t)&&dn(t.length)&&!!vn[we(t)]},En=Object.prototype.hasOwnProperty,jn=Object.prototype,kn=(gn=Object.keys,mn=Object,function(t){return gn(mn(t))}),An=Object.prototype.hasOwnProperty,Cn=function(t){return n=tn,r=function(t){return null!=(e=t)&&dn(e.length)&&!Se(e)?function(t,e){var n,r,i,u=Je(t),a=!u&&cn(t),c=!u&&!a&&hn(t),s=!u&&!a&&!c&&On(t),l=u||a||c||s,f=l?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(var p in t)!En.call(t,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=h,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&pn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||jn))return kn(t);var e,n,r=[];for(var o in Object(t))An.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Je(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Pn=Object.prototype.hasOwnProperty,Tn=De(he,"DataView"),In=De(he,"Promise"),Dn=De(he,"Set"),Rn=De(he,"WeakMap"),Ln="[object Map]",Mn="[object Promise]",Nn="[object Set]",Bn="[object WeakMap]",Un="[object DataView]",Fn=je(Tn),Kn=je(Re),$n=je(In),zn=je(Dn),Hn=je(Rn),Vn=we;(Tn&&Vn(new Tn(new ArrayBuffer(1)))!=Un||Re&&Vn(new Re)!=Ln||In&&Vn(In.resolve())!=Mn||Dn&&Vn(new Dn)!=Nn||Rn&&Vn(new Rn)!=Bn)&&(Vn=function(t){var e=we(t),n="[object Object]"==e?t.constructor:void 0,r=n?je(n):"";if(r)switch(r){case Fn:return Un;case Kn:return Ln;case $n:return Mn;case zn:return Nn;case Hn:return Bn}return e});var qn,Wn=Vn,Gn="[object Arguments]",Zn="[object Array]",Yn="[object Object]",Jn=Object.prototype.hasOwnProperty,Qn=function t(e,n,o,i,u){return e===n||(null==e||null==n||!en(e)&&!en(n)?e!=e&&n!=n:function(t,e,n,o,i,u){var a=Je(t),c=Je(e),s=a?Zn:Wn(t),l=c?Zn:Wn(e),f=(s=s==Gn?Yn:s)==Yn,h=(l=l==Gn?Yn:l)==Yn,p=s==l;if(p&&hn(t)){if(!hn(e))return!1;a=!0,f=!1}if(p&&!f)return u||(u=new Ke),a||On(t)?Ve(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new qe(t),new qe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ie(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=We;case"[object Set]":var c=1&r;if(a||(a=Ge),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ve(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Ye)return Ye.call(t)==Ye.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var d=f&&Jn.call(t,"__wrapped__"),v=h&&Jn.call(e,"__wrapped__");if(d||v){var y=d?t.value():t,g=v?e.value():e;return u||(u=new Ke),i(y,g,n,o,u)}}return!!p&&(u||(u=new Ke),function(t,e,n,o,i,u){var a=1&n,c=Cn(t),s=c.length;if(s!=Cn(e).length&&!a)return!1;for(var l=s;l--;){var f=c[l];if(!(a?f in e:Pn.call(e,f)))return!1}var h=u.get(t),p=u.get(e);if(h&&p)return h==e&&p==t;var d=!0;u.set(t,e),u.set(e,t);for(var v=a;++l<s;){var y=t[f=c[l]],g=e[f];if(o)var m=a?o(g,y,f,e,t,u):o(y,g,f,t,e,u);if(!(void 0===m?y===g||i(y,g,n,o,u):m)){d=!1;break}v||(v="constructor"==f)}if(d&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(d=!1)}return u.delete(t),u.delete(e),d}(t,e,n,o,i,u))}(e,n,o,i,t,u))},Xn=function(t,e){return Qn(t,e)},tr={},er=g(766);!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(qn||(qn={}));var nr,rr={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(nr||(nr={}));var or,ir,ur,ar={patient:null,isLoadingPatient:!0,err:null},cr=c((0,Bt.getExtensionInternalStore)()),sr=c((0,Bt.getExtensionStore)()),lr=function(t){var e,n=t.privilege,r=t.fallback,o=t.children,i=function(t){if(Array.isArray(t))return t}(e=(0,Rt.useState)(null))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e)||function(t,e){if(t){if("string"==typeof t)return yt(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yt(t,2):void 0}}(e)||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.")}(),u=i[0],a=i[1];return(0,Rt.useEffect)((function(){var t=(0,er.getCurrentUser)({includeAuthStatus:!1}).subscribe(a);return function(){return t.unsubscribe()}}),[]),u&&(0,er.userHasAccess)(n,u)?Rt.default.createElement(Rt.default.Fragment,null,o):r?Rt.default.createElement(Rt.default.Fragment,null,r):null},fr=g(385),hr=function(t){return t},pr=function(){},dr=void 0,vr=Object,yr=function(t){return t===dr},gr=function(t){return"function"==typeof t},mr=function(t,e){return vr.assign({},t,e)},br="undefined",wr=function(){return("undefined"==typeof window?"undefined":o(window))!=br},_r=new WeakMap,Sr=0,xr=function(t){var e,n,r=void 0===t?"undefined":o(t),i=t&&t.constructor,u=i==Date;if(vr(t)!==t||u||i==RegExp)e=u?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=_r.get(t))return e;if(e=++Sr+"~",_r.set(t,e),i==Array){for(e="@",n=0;n<t.length;n++)e+=xr(t[n])+",";_r.set(t,e)}if(i==vr){e="#";for(var a=vr.keys(t).sort();!yr(n=a.pop());)yr(t[n])||(e+=n+":"+xr(t[n])+",");_r.set(t,e)}}return e},Or=!0,Er=wr(),jr=("undefined"==typeof document?"undefined":o(document))!=br,kr=Er&&window.addEventListener?window.addEventListener.bind(window):pr,Ar=jr?document.addEventListener.bind(document):pr,Cr=Er&&window.removeEventListener?window.removeEventListener.bind(window):pr,Pr=jr?document.removeEventListener.bind(document):pr,Tr={isOnline:function(){return Or},isVisible:function(){var t=jr&&document.visibilityState;return yr(t)||"hidden"!==t}},Ir={initFocus:function(t){return Ar("visibilitychange",t),kr("focus",t),function(){Pr("visibilitychange",t),Cr("focus",t)}},initReconnect:function(t){var e=function(){Or=!0,t()},n=function(){Or=!1};return kr("online",e),kr("offline",n),function(){Cr("online",e),Cr("offline",n)}}},Dr=!wr()||"Deno"in window,Rr=Dr?Rt.useEffect:Rt.useLayoutEffect,Lr="undefined"!=typeof navigator&&navigator.connection,Mr=!Dr&&Lr&&(["slow-2g","2g"].includes(Lr.effectiveType)||Lr.saveData),Nr=function(t){if(gr(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?xr(t):"",e,t?"$swr$"+t:""]},Br=new WeakMap,Ur=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=Br.get(t),c=a[0],s=a[1],l=a[3],f=c[e],h=s[e];if(u&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Fr=0,Kr=function(){return++Fr},$r=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return jt(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,h,p,d,v,y,g,m,b,w;return kt(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!yr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Nr(n),f=l[0],h=l[2],!f)return[2];if(p=Br.get(e),d=p[2],t.length<3)return[2,Ur(e,f,e.get(f),dr,dr,a,!0)];if(v=r,g=Kr(),d[f]=[g,0],m=!yr(s),b=e.get(f),m&&(e.set(f,s),Ur(e,f,s)),gr(v))try{v=v(e.get(f))}catch(t){y=t}return v&&gr(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(gr(u)&&(v=u(v,b)),e.set(f,v)),e.set(h,mr(e.get(h),{error:y}))),d[f][1]=Kr(),[4,Ur(e,f,v,y,dr,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},zr=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Hr=function(t,e){if(!Br.has(t)){var n=mr(Ir,e),r={},o=$r.bind(dr,t),i=pr;if(Br.set(t,[r,{},{},{},o]),!Dr){var u=n.initFocus(setTimeout.bind(dr,zr.bind(dr,r,0))),a=n.initReconnect(setTimeout.bind(dr,zr.bind(dr,r,1)));i=function(){u&&u(),a&&a(),Br.delete(t)}}return[t,o,i]}return[t,Br.get(t)[4]]},Vr=Hr(new Map),qr=Vr[0],Wr=Vr[1],Gr=mr({onLoadingSlow:pr,onSuccess:pr,onError:pr,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!yr(i)&&u>i||setTimeout(r,a,o)},onDiscarded:pr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Mr?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Mr?5e3:3e3,compare:function(t,e){return xr(t)==xr(e)},isPaused:function(){return!1},cache:qr,mutate:Wr,fallback:{}},Tr),Zr=function(t,e){var n=mr(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=mr(o,u))}return n},Yr=(0,Rt.createContext)({}),Jr=function(t){return gr(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(null===t[1]?t[2]:t[1])||{}]},Qr=function(){return mr(Gr,(0,Rt.useContext)(Yr))},Xr=function(t,e,n){var r=e[t]||(e[t]=[]);return r.push(n),function(){var t=r.indexOf(n);t>=0&&(r[t]=r[r.length-1],r.pop())}},to={dedupe:!0},eo=(vr.defineProperty((function(t){var e=t.value,n=Zr((0,Rt.useContext)(Yr),e),r=e&&e.provider,o=(0,Rt.useState)((function(){return r?Hr(r(n.cache||qr),e):dr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Rr((function(){return o?o[2]:dr}),[]),(0,Rt.createElement)(Yr.Provider,mr(t,{value:n}))}),"default",{value:Gr}),ur=function(t,e,n){var r=n.cache,i=n.compare,u=n.fallbackData,a=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,h=Br.get(r),p=h[0],d=h[1],v=h[2],y=h[3],g=Nr(t),m=g[0],b=g[1],w=g[2],_=(0,Rt.useRef)(!1),S=(0,Rt.useRef)(!1),x=(0,Rt.useRef)(m),O=(0,Rt.useRef)(e),E=(0,Rt.useRef)(n),j=function(){return E.current},k=function(){return j().isVisible()&&j().isOnline()},A=function(t){return r.set(w,mr(r.get(w),t))},C=r.get(m),P=yr(u)?n.fallback[m]:u,T=yr(C)?P:C,I=r.get(w)||{},D=I.error,R=!_.current,L=function(){return R&&!yr(c)?c:!j().isPaused()&&(a?!yr(T):yr(T)||n.revalidateIfStale)},M=!(!m||!e)&&(!!I.isValidating||R&&L()),N=function(t,e){var n=(0,Rt.useState)({})[1],r=(0,Rt.useRef)(t),o=(0,Rt.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Rt.useCallback)((function(t){var i=!1,u=r.current;for(var a in t){var c=a;u[c]!==t[c]&&(u[c]=t[c],o.current[c]&&(i=!0))}i&&!e.current&&n({})}),[]);return Rr((function(){r.current=t})),[r,o.current,i]}({data:T,error:D,isValidating:M},S),B=N[0],U=N[1],F=N[2],K=(0,Rt.useCallback)((function(t){return jt(void 0,void 0,void 0,(function(){var e,o,u,a,c,s,l,f,h,p,d,g,w;return kt(this,(function(E){switch(E.label){case 0:if(e=O.current,!m||!e||S.current||j().isPaused())return[2,!1];a=!0,c=t||{},s=!y[m]||!c.dedupe,l=function(){return!S.current&&m===x.current&&_.current},f=function(){var t=y[m];t&&t[1]===u&&delete y[m]},h={isValidating:!1},p=function(){A({isValidating:!1}),l()&&F(h)},A({isValidating:!0}),F({isValidating:!0}),E.label=1;case 1:return E.trys.push([1,3,,4]),s&&(Ur(r,m,B.current.data,B.current.error,!0),n.loadingTimeout&&!r.get(m)&&setTimeout((function(){a&&l()&&j().onLoadingSlow(m,n)}),n.loadingTimeout),y[m]=[e.apply(void 0,b),Kr()]),w=y[m],o=w[0],u=w[1],[4,o];case 2:return o=E.sent(),s&&setTimeout(f,n.dedupingInterval),y[m]&&y[m][1]===u?(A({error:dr}),h.error=dr,d=v[m],!yr(d)&&(u<=d[0]||u<=d[1]||0===d[1])?(p(),s&&l()&&j().onDiscarded(m),[2,!1]):(i(B.current.data,o)?h.data=B.current.data:h.data=o,i(r.get(m),o)||r.set(m,o),s&&l()&&j().onSuccess(o,m,n),[3,4])):(s&&l()&&j().onDiscarded(m),[2,!1]);case 3:return g=E.sent(),f(),j().isPaused()||(A({error:g}),h.error=g,s&&l()&&(j().onError(g,m,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||gr(n.shouldRetryOnError)&&n.shouldRetryOnError(g))&&k()&&j().onErrorRetry(g,m,n,K,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return a=!1,p(),l()&&s&&Ur(r,m,h.data,h.error,!1),[2,!0]}}))}))}),[m]),$=(0,Rt.useCallback)($r.bind(dr,r,(function(){return x.current})),[]);if(Rr((function(){O.current=e,E.current=n})),Rr((function(){if(m){var t=m!==x.current,e=K.bind(dr,to),n=0,r=Xr(m,d,(function(t,e,n){F(mr({error:e,isValidating:n},i(B.current.data,t)?dr:{data:t}))})),u=Xr(m,p,(function(t){if(0==t){var r=Date.now();j().revalidateOnFocus&&r>n&&k()&&(n=r+j().focusThrottleInterval,e())}else if(1==t)j().revalidateOnReconnect&&k()&&e();else if(2==t)return K()}));return S.current=!1,x.current=m,_.current=!0,t&&F({data:T,error:D,isValidating:M}),L()&&(yr(T)||Dr?e():(a=e,wr()&&o(window.requestAnimationFrame)!=br?window.requestAnimationFrame(a):setTimeout(a,1))),function(){S.current=!0,r(),u()}}var a}),[m,K]),Rr((function(){var t,e=function(){var e=gr(s)?s(T):s;e&&-1!==t&&(t=setTimeout(n,e))},n=function(){B.current.error||!l&&!j().isVisible()||!f&&!j().isOnline()?e():K(to).then(e)};return e(),function(){t&&(clearTimeout(t),t=-1)}}),[s,l,f,K]),(0,Rt.useDebugValue)(T),a&&yr(T)&&m)throw O.current=e,E.current=n,S.current=!1,yr(D)?K(to):D;return{mutate:$,get data(){return U.data=!0,T},get error(){return U.error=!0,D},get isValidating(){return U.isValidating=!0,M}}},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Qr(),r=Jr(t),o=r[0],i=r[1],u=r[2],a=Zr(n,u),c=ur,s=a.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||a.fetcher,a)}),no=g(688),ro=g(332),oo=g.n(ro);no.default.extend(oo())}(),m}())}}}))},493:()=>{System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=[];function r(t){for(var e=[],r=0;r<n.length;r++)n[r]===t?t=null:e.push(n[r]);n=e}function o(r,o,i){e=o?r:t(t({},e),r);for(var u=n,a=0;a<u.length;a++)u[a](e,i)}return e=e||{},{action:function(t){function n(e){o(e,!1,t)}return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:o,subscribe:function(t){return n.push(t),function(){r(t)}},unsubscribe:r,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},390:(t,e,n)=>{function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){a(t,e,n[e])}))}return t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||p(t,e)||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 f(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||p(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t=n.nmd(t);var h=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t};function p(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","i18next","react","react-dom","react-i18next","rxjs"],(function(r,i){var p={},d={},v={},y={},g={},m={},b={},w={};return{setters:[function(t){p.getExtensionInternalStore=t.getExtensionInternalStore,p.getExtensionStore=t.getExtensionStore},function(){},function(t){v.createGlobalStore=t.createGlobalStore,v.getGlobalStore=t.getGlobalStore},function(t){y.default=t.default},function(t){g.createContext=t.createContext,g.createElement=t.createElement,g.default=t.default,g.useCallback=t.useCallback,g.useContext=t.useContext,g.useDebugValue=t.useDebugValue,g.useEffect=t.useEffect,g.useLayoutEffect=t.useLayoutEffect,g.useMemo=t.useMemo,g.useRef=t.useRef,g.useState=t.useState},function(){},function(){},function(t){w.BehaviorSubject=t.BehaviorSubject,w.Subject=t.Subject}],execute:function(){r(function(){var r={23:function(t){var e=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};t.exports=function(){"use strict";var t=6e4,n=36e5,r="millisecond",o="second",i="minute",u="hour",a="day",c="week",s="month",l="quarter",f="year",h="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|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,y={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(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},m={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,s),i=n-o<0,u=e.clone().add(r+(i?-1:1),s);return+(-(r+(n-o)/(i?o-u:u-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:s,y:f,w:c,d:a,D:h,h:u,m:i,s:o,ms:r,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",w={};w[b]=y;var _=function(t){return e(t,k)},S=function t(e,n,r){var o;if(!e)return b;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var u=e.split("-");if(!o&&u.length>1)return t(u[0])}else{var a=e.name;w[a]=e,o=a}return!r&&o&&(b=o),o||!r&&b},x=function(t,e){if(_(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new k(n)},O=m;O.l=S,O.i=_,O.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var E,j,k=((j=(E=function(t){this.$L=S(t.locale,null,!0),this.parse(t)}).prototype).parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(O.u(n))return new Date;if(e(n,Date))return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var o=n.match(d);if(o){var i=o[2]-1||0,u=(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,u)):new Date(o[1],i,o[3]||1,o[4]||0,o[5]||0,o[6]||0,u)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},j.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},j.$utils=function(){return O},j.isValid=function(){return!(this.$d.toString()===p)},j.isSame=function(t,e){var n=x(t);return this.startOf(e)<=n&&n<=this.endOf(e)},j.isAfter=function(t,e){return x(t)<this.startOf(e)},j.isBefore=function(t,e){return this.endOf(e)<x(t)},j.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},j.unix=function(){return Math.floor(this.valueOf()/1e3)},j.valueOf=function(){return this.$d.getTime()},j.startOf=function(t,e){var n=this,r=!!O.u(e)||e,l=O.p(t),p=function(t,e){var o=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(a)},d=function(t,e){return O.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},v=this.$W,y=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(l){case f:return r?p(1,0):p(31,11);case s:return r?p(1,y):p(0,y+1);case c:var b=this.$locale().weekStart||0,w=(v<b?v+7:v)-b;return p(r?g-w:g+(6-w),y);case a:case h:return d(m+"Hours",0);case u:return d(m+"Minutes",1);case i:return d(m+"Seconds",2);case o:return d(m+"Milliseconds",3);default:return this.clone()}},j.endOf=function(t){return this.startOf(t,!1)},j.$set=function(t,e){var n,c=O.p(t),l="set"+(this.$u?"UTC":""),p=(n={},n[a]=l+"Date",n[h]=l+"Date",n[s]=l+"Month",n[f]=l+"FullYear",n[u]=l+"Hours",n[i]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],d=c===a?this.$D+(e-this.$W):e;if(c===s||c===f){var v=this.clone().set(h,1);v.$d[p](d),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else p&&this.$d[p](d);return this.init(),this},j.set=function(t,e){return this.clone().$set(t,e)},j.get=function(t){return this[O.p(t)]()},j.add=function(e,r){var l,h=this;e=Number(e);var p=O.p(r),d=function(t){var n=x(h);return O.w(n.date(n.date()+Math.round(t*e)),h)};if(p===s)return this.set(s,this.$M+e);if(p===f)return this.set(f,this.$y+e);if(p===a)return d(1);if(p===c)return d(7);var v=(l={},l[i]=t,l[u]=n,l[o]=1e3,l)[p]||1,y=this.$d.getTime()+e*v;return O.w(y,this)},j.subtract=function(t,e){return this.add(-1*t,e)},j.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=O.z(this),i=this.$H,u=this.$m,a=this.$M,c=n.weekdays,s=n.months,l=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].substr(0,i)},f=function(t){return O.s(i%12||12,t,"0")},h=n.meridiem||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r},d={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:O.s(a+1,2,"0"),MMM:l(n.monthsShort,a,s,3),MMMM:l(s,a),D:this.$D,DD:O.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:O.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,u,!0),A:h(i,u,!1),m:String(u),mm:O.s(u,2,"0"),s:String(this.$s),ss:O.s(this.$s,2,"0"),SSS:O.s(this.$ms,3,"0"),Z:o};return r.replace(v,(function(t,e){return e||d[t]||o.replace(":","")}))},j.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},j.diff=function(e,r,h){var p,d=O.p(r),v=x(e),y=(v.utcOffset()-this.utcOffset())*t,g=this-v,m=O.m(this,v);return m=(p={},p[f]=m/12,p[s]=m,p[l]=m/3,p[c]=(g-y)/6048e5,p[a]=(g-y)/864e5,p[u]=g/n,p[i]=g/t,p[o]=g/1e3,p)[d]||g,h?m:O.a(m)},j.daysInMonth=function(){return this.endOf(s).$D},j.$locale=function(){return w[this.$L]},j.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},j.clone=function(){return O.w(this.$d,this)},j.toDate=function(){return new Date(this.valueOf())},j.toJSON=function(){return this.isValid()?this.toISOString():null},j.toISOString=function(){return this.$d.toISOString()},j.toString=function(){return this.$d.toUTCString()},E),A=k.prototype;return x.prototype=A,[["$ms",r],["$s",o],["$m",i],["$H",u],["$W",a],["$M",s],["$y",f],["$D",h]].forEach((function(t){A[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,k,x),t.$i=!0),x},x.locale=S,x.isDayjs=_,x.unix=function(t){return x(1e3*t)},x.en=w[b],x.Ls=w,x.p={},x}()},701:function(t){t.exports=function(){"use strict";return function(t,e,n){e.prototype.isToday=function(){var t="YYYY-MM-DD",e=n();return this.format(t)===e.format(t)}}}()},435:function(t,e,n){var r,o=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};t=n.nmd(t);var i=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};(function(){var u,a=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},c=function(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r},s=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},l=function(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t},f=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0},h=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i},p=function(t,e){return!(null==t||!t.length)&&S(t,e,0)>-1},d=function(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1},v=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},y=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},g=function(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n},m=function(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n},b=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},w=function(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r},_=function(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1},S=function(t,e,n){return e==e?H(t,e,n):_(t,O,n)},x=function(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1},O=function(t){return t!=t},E=function(t,e){var n=null==t?0:t.length;return n?C(t,e)/n:rt},j=function(t){return function(e){return null==e?u:e[t]}},k=function(t){return function(e){return null==t?u:t[e]}},A=function(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n},C=function(t,e){for(var n,r=-1,o=t.length;++r<o;){var i=e(t[r]);i!==u&&(n=n===u?i:n+i)}return n},P=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},T=function(t){return t?t.slice(0,W(t)+1).replace(Gt,""):t},I=function(t){return function(e){return t(e)}},D=function(t,e){return v(e,(function(e){return t[e]}))},R=function(t,e){return t.has(e)},L=function(t,e){for(var n=-1,r=t.length;++n<r&&S(e,t[n],0)>-1;);return n},M=function(t,e){for(var n=t.length;n--&&S(e,t[n],0)>-1;);return n},N=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r},B=function(t){return"\\"+He[t]},U=function(t){return Be.test(t)},F=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},K=function(t,e){return function(n){return t(e(n))}},$=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==Q||(t[n]=Q,i[o++]=n)}return i},z=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},H=function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1},V=function(t){return U(t)?G(t):cn(t)},q=function(t){return U(t)?Z(t):t.split("")},W=function(t){for(var e=t.length;e--&&Zt.test(t.charAt(e)););return e},G=function(t){for(var e=Me.lastIndex=0;Me.test(t);)++e;return e},Z=function(t){return t.match(Me)||[]},Y="Expected a function",J="__lodash_hash_undefined__",Q="__lodash_placeholder__",X=32,tt=128,et=1/0,nt=9007199254740991,rt=NaN,ot=4294967295,it=[["ary",tt],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",X],["partialRight",64],["rearg",256]],ut="[object Arguments]",at="[object Array]",ct="[object Boolean]",st="[object Date]",lt="[object Error]",ft="[object Function]",ht="[object GeneratorFunction]",pt="[object Map]",dt="[object Number]",vt="[object Object]",yt="[object Promise]",gt="[object RegExp]",mt="[object Set]",bt="[object String]",wt="[object Symbol]",_t="[object WeakMap]",St="[object ArrayBuffer]",xt="[object DataView]",Ot="[object Float32Array]",Et="[object Float64Array]",jt="[object Int8Array]",kt="[object Int16Array]",At="[object Int32Array]",Ct="[object Uint8Array]",Pt="[object Uint8ClampedArray]",Tt="[object Uint16Array]",It="[object Uint32Array]",Dt=/\b__p \+= '';/g,Rt=/\b(__p \+=) '' \+/g,Lt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mt=/&(?:amp|lt|gt|quot|#39);/g,Nt=/[&<>"']/g,Bt=RegExp(Mt.source),Ut=RegExp(Nt.source),Ft=/<%-([\s\S]+?)%>/g,Kt=/<%([\s\S]+?)%>/g,$t=/<%=([\s\S]+?)%>/g,zt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ht=/^\w*$/,Vt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qt=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(qt.source),Gt=/^\s+/,Zt=/\s/,Yt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Jt=/\{\n\/\* \[wrapped with (.+)\] \*/,Qt=/,? & /,Xt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/[()=,{}\[\]\/\s]/,ee=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ie=/^0b[01]+$/i,ue=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,se=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="a-z\\xdf-\\xf6\\xf8-\\xff",de="A-Z\\xc0-\\xd6\\xd8-\\xde",ve="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ye="["+ve+"]",ge="["+he+"]",me="\\d+",be="["+pe+"]",we="[^\ud800-\udfff"+ve+me+"\\u2700-\\u27bf"+pe+de+"]",_e="[^\ud800-\udfff]",Se="(?:\ud83c[\udde6-\uddff]){2}",xe="[\ud800-\udbff][\udc00-\udfff]",Oe="["+de+"]",Ee="(?:"+be+"|"+we+")",je="(?:"+Oe+"|"+we+")",ke="(?:['’](?:d|ll|m|re|s|t|ve))?",Ae="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ce="(?:"+ge+"|\ud83c[\udffb-\udfff])?",Pe="[\\ufe0e\\ufe0f]?",Te=Pe+Ce+"(?:\\u200d(?:"+[_e,Se,xe].join("|")+")"+Pe+Ce+")*",Ie="(?:"+["[\\u2700-\\u27bf]",Se,xe].join("|")+")"+Te,De="(?:"+[_e+ge+"?",ge,Se,xe,"[\ud800-\udfff]"].join("|")+")",Re=RegExp("['’]","g"),Le=RegExp(ge,"g"),Me=RegExp("\ud83c[\udffb-\udfff](?=\ud83c[\udffb-\udfff])|"+De+Te,"g"),Ne=RegExp([Oe+"?"+be+"+"+ke+"(?="+[ye,Oe,"$"].join("|")+")",je+"+"+Ae+"(?="+[ye,Oe+Ee,"$"].join("|")+")",Oe+"?"+Ee+"+"+ke,Oe+"+"+Ae,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",me,Ie].join("|"),"g"),Be=RegExp("[\\u200d\ud800-\udfff"+he+"\\ufe0e\\ufe0f]"),Ue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Fe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ke=-1,$e={};$e[Ot]=$e[Et]=$e[jt]=$e[kt]=$e[At]=$e[Ct]=$e[Pt]=$e[Tt]=$e[It]=!0,$e[ut]=$e[at]=$e[St]=$e[ct]=$e[xt]=$e[st]=$e[lt]=$e[ft]=$e[pt]=$e[dt]=$e[vt]=$e[gt]=$e[mt]=$e[bt]=$e[_t]=!1;var ze={};ze[ut]=ze[at]=ze[St]=ze[xt]=ze[ct]=ze[st]=ze[Ot]=ze[Et]=ze[jt]=ze[kt]=ze[At]=ze[pt]=ze[dt]=ze[vt]=ze[gt]=ze[mt]=ze[bt]=ze[wt]=ze[Ct]=ze[Pt]=ze[Tt]=ze[It]=!0,ze[lt]=ze[ft]=ze[_t]=!1;var He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ve=parseFloat,qe=parseInt,We="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ze=We||Ge||Function("return this")(),Ye=e&&!e.nodeType&&e,Je=Ye&&t&&!t.nodeType&&t,Qe=Je&&Je.exports===Ye,Xe=Qe&&We.process,tn=function(){try{return Je&&Je.require&&Je.require("util").types||Xe&&Xe.binding&&Xe.binding("util")}catch(t){}}(),en=tn&&tn.isArrayBuffer,nn=tn&&tn.isDate,rn=tn&&tn.isMap,on=tn&&tn.isRegExp,un=tn&&tn.isSet,an=tn&&tn.isTypedArray,cn=j("length"),sn=k({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),ln=k({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),fn=k({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),hn=function t(e){var n,r,k=function(t){if(No(t)&&!Ba(t)&&!o(t,Z)){if(o(t,G))return t;if(ji.call(t,"__wrapped__"))return so(t)}return new G(t)},H=function(){},G=function(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=u},Z=function(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]},Zt=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},he=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},pe=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},de=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new pe;++e<n;)this.add(t[e])},ve=function(t){var e=this.__data__=new he(t);this.size=e.size},ye=function(t,e){var n=Ba(t),r=!n&&Na(t),o=!n&&!r&&Fa(t),i=!n&&!r&&!o&&Va(t),u=n||r||o||i,a=u?P(t.length,bi):[],c=a.length;for(var s in t)!e&&!ji.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||$r(s,c))||a.push(s);return a},ge=function(t){var e=t.length;return e?t[An(0,e-1)]:u},me=function(t,e){return io(ir(t),ke(e,0,t.length))},be=function(t){return io(ir(t))},we=function(t,e,n){(n!==u&&!Co(t[e],n)||n===u&&!(e in t))&&Ee(t,e,n)},_e=function(t,e,n){var r=t[e];ji.call(t,e)&&Co(r,n)&&(n!==u||e in t)||Ee(t,e,n)},Se=function(t,e){for(var n=t.length;n--;)if(Co(t[n][0],e))return n;return-1},xe=function(t,e,n,r){return Eu(t,(function(t,o,i){e(r,t,n(t),i)})),r},Oe=function(t,e){return t&&ur(e,Jo(e),t)},Ee=function(t,e,n){"__proto__"==e&&Hi?Hi(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},je=function(t,e){for(var n=-1,r=e.length,o=hi(r),i=null==t;++n<r;)o[n]=i?u:Zo(t,e[n]);return o},ke=function(t,e,n){return t==t&&(n!==u&&(t=t<=n?t:n),e!==u&&(t=t>=e?t:e)),t},Ae=function(t,e,n){var r=n.length;if(null==t)return!r;for(t=gi(t);r--;){var o=n[r],i=e[o],a=t[o];if(a===u&&!(o in t)||!i(a))return!1}return!0},Ce=function(t,e,n){if("function"!=typeof t)throw new wi(Y);return Zu((function(){t.apply(u,n)}),e)},Pe=function(t,e,n,r){var o=-1,i=p,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=v(e,I(n))),r?(i=d,u=!1):e.length>=200&&(i=R,u=!1,e=new de(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var h=s;h--;)if(e[h]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c},Te=function(t,e){var n=!0;return Eu(t,(function(t,r,o){return n=!!e(t,r,o)})),n},Ie=function(t,e,n){for(var r=-1,o=t.length;++r<o;){var i=t[r],a=e(i);if(null!=a&&(c===u?a==a&&!Ko(a):n(a,c)))var c=a,s=i}return s},De=function(t,e){var n=[];return Eu(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n},Me=function(t,e){return t&&Au(t,e,Jo)},Be=function(t,e){return t&&Cu(t,e,Jo)},He=function(t,e){return h(e,(function(e){return Do(t[e])}))},We=function(t,e){for(var n=0,r=(e=Yn(e,t)).length;null!=t&&n<r;)t=t[uo(e[n++])];return n&&n==r?t:u},Ge=function(t,e,n){var r=e(t);return Ba(t)?r:y(r,n(t))},Ye=function(t){return null==t?t===u?"[object Undefined]":"[object Null]":zi&&zi in gi(t)?Br(t):Qr(t)},Je=function(t,e){return t>e},Xe=function(t,e){return null!=t&&ji.call(t,e)},tn=function(t,e){return null!=t&&e in gi(t)},cn=function(t,e,n){for(var r=n?d:p,o=t[0].length,i=t.length,a=i,c=hi(i),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=v(f,I(e))),s=nu(f.length,s),c[a]=!n&&(e||o>=120&&f.length>=120)?new de(a&&f):u}f=t[0];var h=-1,y=c[0];t:for(;++h<o&&l.length<s;){var g=f[h],m=e?e(g):g;if(g=n||0!==g?g:0,!(y?R(y,m):r(l,m,n))){for(a=i;--a;){var b=c[a];if(!(b?R(b,m):r(t[a],m,n)))continue t}y&&y.push(m),l.push(g)}}return l},pn=function(t,e,n){e=Yn(e,t);var r=null==(t=to(t,e))?t:t[uo(vo(e))];return null==r?u:a(r,t,n)},dn=function(t){return No(t)&&Ye(t)==ut},vn=function(t,e,n,r){var o=n.length,i=o,a=!r;if(null==t)return!i;for(t=gi(t);o--;){var c=n[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<i;){var s=(c=n[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===u&&!(s in t))return!1}else{var h=new ve;if(r)var p=r(l,f,s,t,e,h);if(!(p===u?Pu(f,l,3,r,h):p))return!1}}return!0},yn=function(t){return!(!Mo(t)||Wr(t))&&(Do(t)?Ii:ue).test(ao(t))},gn=function(t){return"function"==typeof t?t:null==t?ii:"object"==typeof t?Ba(t)?Sn(t[0],t[1]):_n(t):si(t)},mn=function(t){if(!Gr(t))return tu(t);var e=[];for(var n in gi(t))ji.call(t,n)&&"constructor"!=n&&e.push(n);return e},bn=function(t,e){return t<e},wn=function(t,e){var n=-1,r=Po(t)?hi(t.length):[];return Eu(t,(function(t,o,i){r[++n]=e(t,o,i)})),r},_n=function(t){var e=Mr(t);return 1==e.length&&e[0][2]?Yr(e[0][0],e[0][1]):function(n){return n===t||vn(n,t,e)}},Sn=function(t,e){return Hr(t)&&Zr(e)?Yr(uo(t),e):function(n){var r=Zo(n,t);return r===u&&r===e?Yo(n,t):Pu(e,r,3)}},xn=function(t,e){var n=t.length;if(n)return $r(e+=e<0?n:0,n)?t[e]:u},On=function(t,e,n){e=e.length?v(e,(function(t){return Ba(t)?function(e){return We(e,1===t.length?t[0]:t)}:t})):[ii];var r=-1;return e=v(e,I(Rr())),function(t,e){var r=t.length;for(t.sort((function(t,e){return nr(t,e,n)}));r--;)t[r]=t[r].value;return t}(wn(t,(function(t,n,o){return{criteria:v(e,(function(e){return e(t)})),index:++r,value:t}})))},En=function(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=We(t,u);n(a,u)&&Dn(i,Yn(u,t),a)}return i},jn=function(t,e,n,r){var o=r?x:S,i=-1,u=e.length,a=t;for(t===e&&(e=ir(e)),n&&(a=v(t,I(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Fi.call(a,c,1),Fi.call(t,c,1);return t},kn=function(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;$r(o)?Fi.call(t,o,1):$n(t,o)}}return t},An=function(t,e){return t+Zi(iu()*(e-t+1))},Cn=function(t,e){var n="";if(!t||e<1||e>nt)return n;do{e%2&&(n+=t),(e=Zi(e/2))&&(t+=t)}while(e);return n},Pn=function(t,e){return Yu(Xr(t,e,ii),t+"")},Tn=function(t){return ge(ti(t))},In=function(t,e){var n=ti(t);return io(n,ke(e,0,n.length))},Dn=function(t,e,n,r){if(!Mo(t))return t;for(var o=-1,i=(e=Yn(e,t)).length,a=i-1,c=t;null!=c&&++o<i;){var s=uo(e[o]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=r?r(f,s,c):u)===u&&(l=Mo(f)?f:$r(e[o+1])?[]:{})}_e(c,s,l),c=c[s]}return t},Rn=function(t){return io(ti(t))},Ln=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=hi(o);++r<o;)i[r]=t[r+e];return i},Mn=function(t,e){var n;return Eu(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n},Nn=function(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!Ko(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return Bn(t,e,ii,n)},Bn=function(t,e,n,r){var o=0,i=null==t?0:t.length;if(0===i)return 0;for(var a=(e=n(e))!=e,c=null===e,s=Ko(e),l=e===u;o<i;){var f=Zi((o+i)/2),h=n(t[f]),p=h!==u,d=null===h,v=h==h,y=Ko(h);if(a)var g=r||v;else g=l?v&&(r||p):c?v&&p&&(r||!d):s?v&&p&&!d&&(r||!y):!d&&!y&&(r?h<=e:h<e);g?o=f+1:i=f}return nu(i,4294967294)},Un=function(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Co(a,c)){var c=a;i[o++]=0===u?0:u}}return i},Fn=function(t){return"number"==typeof t?t:Ko(t)?rt:+t},Kn=function(t,e,n){var r=-1,o=p,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=d;else if(i>=200){var s=e?null:Bu(t);if(s)return z(s);u=!1,o=R,c=new de}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var h=c.length;h--;)if(c[h]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a},$n=function(t,e){return e=Yn(e,t),null==(t=to(t,e))||delete t[uo(vo(e))]},zn=function(t,e,n,r){return Dn(t,e,n(We(t,e)),r)},Hn=function(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?Ln(t,r?0:i,r?i+1:o):Ln(t,r?i+1:0,r?o:i)},Vn=function(t,e){var n=t;return o(n,Z)&&(n=n.value()),g(e,(function(t,e){return e.func.apply(e.thisArg,y([t],e.args))}),n)},qn=function(t,e,n){var r=t.length;if(r<2)return r?Kn(t[0]):[];for(var o=-1,i=hi(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=Pe(i[o]||u,t[a],e,n));return Kn(ku(i,1),e,n)},Wn=function(t,e,n){for(var r=-1,o=t.length,i=e.length,a={};++r<o;){var c=r<i?e[r]:u;n(a,t[r],c)}return a},Gn=function(t){return To(t)?t:[]},Zn=function(t){return"function"==typeof t?t:ii},Yn=function(t,e){return Ba(t)?t:Hr(t,e)?[t]:Ju(Go(t))},Jn=function(t,e,n){var r=t.length;return n=n===u?r:n,!e&&n>=r?t:Ln(t,e,n)},Qn=function(t,e){if(e)return t.slice();var n=t.length,r=Mi?Mi(n):new t.constructor(n);return t.copy(r),r},Xn=function(t){var e=new t.constructor(t.byteLength);return new Li(e).set(new Li(t)),e},tr=function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},er=function(t,e){if(t!==e){var n=t!==u,r=null===t,o=t==t,i=Ko(t),a=e!==u,c=null===e,s=e==e,l=Ko(e);if(!c&&!l&&!i&&t>e||i&&a&&s&&!c&&!l||r&&a&&s||!n&&s||!o)return 1;if(!r&&!i&&!l&&t<e||l&&n&&o&&!r&&!i||c&&n&&o||!a&&o||!s)return-1}return 0},nr=function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var c=er(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index},rr=function(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=eu(i-u,0),l=hi(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l},or=function(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=eu(i-a,0),f=hi(l+s),h=!r;++o<l;)f[o]=t[o];for(var p=o;++c<s;)f[p+c]=e[c];for(;++u<a;)(h||o<i)&&(f[p+n[u]]=t[o++]);return f},ir=function(t,e){var n=-1,r=t.length;for(e||(e=hi(r));++n<r;)e[n]=t[n];return e},ur=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var c=e[i],s=r?r(n[c],t[c],c,n,t):u;s===u&&(s=t[c]),o?Ee(n,c,s):_e(n,c,s)}return n},ar=function(t,e){return function(n,r){var o=Ba(n)?c:xe,i=e?e():{};return o(n,t,Rr(r,2),i)}},cr=function(t){return Pn((function(e,n){var r=-1,o=n.length,i=o>1?n[o-1]:u,a=o>2?n[2]:u;for(i=t.length>3&&"function"==typeof i?(o--,i):u,a&&zr(n[0],n[1],a)&&(i=o<3?u:i,o=1),e=gi(e);++r<o;){var c=n[r];c&&t(e,c,r,i)}return e}))},sr=function(t,e){return function(n,r){if(null==n)return n;if(!Po(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=gi(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}},lr=function(t){return function(e,n,r){for(var o=-1,i=gi(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}},fr=function(t){return function(e){e=Go(e);var n=U(e)?q(e):u,r=n?n[0]:e.charAt(0),o=n?Jn(n,1).join(""):e.slice(1);return r[t]()+o}},hr=function(t){return function(e){return g(ri(ni(e).replace(Re,"")),t,"")}},pr=function(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=xu(t.prototype),r=t.apply(n,e);return Mo(r)?r:n}},dr=function(t){return function(e,n,r){var o=gi(e);if(!Po(e)){var i=Rr(n,3);e=Jo(e),n=function(t){return i(o[t],t,o)}}var a=t(e,n,r);return a>-1?o[i?e[a]:a]:u}},vr=function(t){return Cr((function(e){var n=e.length,r=n,o=G.prototype.thru;for(t&&e.reverse();r--;){var i=e[r];if("function"!=typeof i)throw new wi(Y);if(o&&!a&&"wrapper"==Ir(i))var a=new G([],!0)}for(r=a?r:n;++r<n;){i=e[r];var c=Ir(i),s="wrapper"==c?Fu(i):u;a=s&&qr(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?a[Ir(s[0])].apply(a,s[3]):1==i.length&&qr(i)?a[c]():a.thru(i)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Ba(r))return a.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))},yr=function(t,e){return function(n,r){return o=n,i=t,u=e(r),a={},Me(o,(function(t,e,n){i(a,u(t),e,n)})),a;var o,i,u,a}},gr=function(t,e){return function(n,r){var o;if(n===u&&r===u)return e;if(n!==u&&(o=n),r!==u){if(o===u)return r;"string"==typeof n||"string"==typeof r?(n=Ru(n),r=Ru(r)):(n=Fn(n),r=Fn(r)),o=t(n,r)}return o}},mr=function(t){return Cr((function(e){return e=v(e,I(Rr())),Pn((function(n){var r=this;return t(e,(function(t){return a(t,r,n)}))}))}))},br=function(t,e){var n=(e=e===u?" ":Ru(e)).length;if(n<2)return n?Cn(e,t):e;var r=Cn(e,Gi(t/V(e)));return U(e)?Jn(q(r),0,t).join(""):r.slice(0,t)},wr=function(t){return function(e,n,r){return r&&"number"!=typeof r&&zr(e,n,r)&&(n=r=u),e=zo(e),n===u?(n=e,e=0):n=zo(n),function(t,e,n,r){for(var o=-1,i=eu(Gi((e-t)/(n||1)),0),u=hi(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,r=r===u?e<n?1:-1:zo(r),t)}},_r=function(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=qo(e),n=qo(n)),t(e,n)}},Sr=function(t,e,n,r,o,i,a,c,s,l){var f=8&e;e|=f?X:64,4&(e&=~(f?64:X))||(e&=-4);var h=[t,e,o,f?i:u,f?a:u,f?u:i,f?u:a,c,s,l],p=n.apply(u,h);return qr(t)&&Gu(p,h),p.placeholder=r,ro(p,t,e)},xr=function(t){var e=yi[t];return function(t,n){if(t=qo(t),(n=null==n?0:nu(Ho(n),292))&&Qi(t)){var r=(Go(t)+"e").split("e"),o=e(r[0]+"e"+(+r[1]+n));return+((r=(Go(o)+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}},Or=function(t){return function(e){var n,r,o=zu(e);return o==pt?F(e):o==mt?function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}(e):(n=e,r=t(e),v(r,(function(t){return[t,n[t]]})))}},Er=function(t,e,n,r,i,c,s,l){var f=2&e;if(!f&&"function"!=typeof t)throw new wi(Y);var h=r?r.length:0;if(h||(e&=-97,r=i=u),s=s===u?s:eu(Ho(s),0),l=l===u?l:Ho(l),h-=i?i.length:0,64&e){var p=r,d=i;r=i=u}var v,y,g,m,b=f?u:Fu(t),w=[t,e,n,r,i,p,d,c,s,l];if(b&&Jr(w,b),t=w[0],e=w[1],n=w[2],r=w[3],i=w[4],!(l=w[9]=w[9]===u?f?0:t.length:eu(w[9]-h,0))&&24&e&&(e&=-25),e&&1!=e)_=8==e||16==e?(y=e,g=l,m=pr(v=t),function t(){for(var e=arguments.length,n=hi(e),r=e,i=Dr(t);r--;)n[r]=arguments[r];var c=e<3&&n[0]!==i&&n[e-1]!==i?[]:$(n,i);if((e-=c.length)<g)return Sr(v,y,Nu,t.placeholder,u,n,c,u,u,g-e);var s=this&&this!==Ze&&o(this,t)?m:v;return a(s,this,n)}):e!=X&&33!=e||i.length?Nu.apply(u,w):function(t,e,n,r){var i=1&e,u=pr(t);return function e(){for(var c=-1,s=arguments.length,l=-1,f=r.length,h=hi(f+s),p=this&&this!==Ze&&o(this,e)?u:t;++l<f;)h[l]=r[l];for(;s--;)h[l++]=arguments[++c];return a(p,i?n:this,h)}}(t,e,n,r);else var _=function(t,e,n){var r=1&e,i=pr(t);return function e(){return(this&&this!==Ze&&o(this,e)?i:t).apply(r?n:this,arguments)}}(t,e,n);return ro((b?Iu:Gu)(_,w),t,e)},jr=function(t,e,n,r){return t===u||Co(t,xi[n])&&!ji.call(r,n)?e:t},kr=function(t){return Uo(t)?u:t},Ar=function(t,e,n,r,o,i){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=i.get(t),f=i.get(e);if(l&&f)return l==e&&f==t;var h=-1,p=!0,d=2&n?new de:u;for(i.set(t,e),i.set(e,t);++h<c;){var v=t[h],y=e[h];if(r)var g=a?r(y,v,h,e,t,i):r(v,y,h,t,e,i);if(g!==u){if(g)continue;p=!1;break}if(d){if(!b(e,(function(t,e){if(!R(d,e)&&(v===t||o(v,t,n,r,i)))return d.push(e)}))){p=!1;break}}else if(v!==y&&!o(v,y,n,r,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Cr=function(t){return Yu(Xr(t,u,ho),t+"")},Pr=function(t){return Ge(t,Jo,Ku)},Tr=function(t){return Ge(t,Qo,$u)},Ir=function(t){for(var e=t.name+"",n=du[e],r=ji.call(du,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e},Dr=function(t){return(ji.call(k,"placeholder")?k:t).placeholder},Rr=function(){var t=k.iteratee||ui;return t=t===ui?gn:t,arguments.length?t(arguments[0],arguments[1]):t},Lr=function(t,e){var n=t.__data__;return Vr(e)?n["string"==typeof e?"string":"hash"]:n.map},Mr=function(t){for(var e=Jo(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Zr(o)]}return e},Nr=function(t,e){var n,r=null==(n=t)?u:n[e];return yn(r)?r:u},Br=function(t){var e=ji.call(t,zi),n=t[zi];try{t[zi]=u;var r=!0}catch(t){}var o=Ci.call(t);return r&&(e?t[zi]=n:delete t[zi]),o},Ur=function(t,e,n){for(var r=-1,o=(e=Yn(e,t)).length,i=!1;++r<o;){var u=uo(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Lo(o)&&$r(u,o)&&(Ba(t)||Na(t))},Fr=function(t){return"function"!=typeof t.constructor||Gr(t)?{}:xu(Ni(t))},Kr=function(t){return Ba(t)||Na(t)||!!(Ki&&t&&t[Ki])},$r=function(t,e){var n=void 0===t?"undefined":i(t);return!!(e=null==e?nt:e)&&("number"==n||"symbol"!=n&&ce.test(t))&&t>-1&&t%1==0&&t<e},zr=function(t,e,n){if(!Mo(n))return!1;var r=void 0===e?"undefined":i(e);return!!("number"==r?Po(n)&&$r(e,n.length):"string"==r&&e in n)&&Co(n[e],t)},Hr=function(t,e){if(Ba(t))return!1;var n=void 0===t?"undefined":i(t);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ko(t))||Ht.test(t)||!zt.test(t)||null!=e&&t in gi(e)},Vr=function(t){var e=void 0===t?"undefined":i(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t},qr=function(t){var e=Ir(t),n=k[e];if("function"!=typeof n||!(e in Z.prototype))return!1;if(t===n)return!0;var r=Fu(n);return!!r&&t===r[0]},Wr=function(t){return!!Ai&&Ai in t},Gr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xi)},Zr=function(t){return t==t&&!Mo(t)},Yr=function(t,e){return function(n){return null!=n&&n[t]===e&&(e!==u||t in gi(n))}},Jr=function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==tt&&8==n||r==tt&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var a=e[3];if(a){var c=t[3];t[3]=c?rr(c,a,e[4]):a,t[4]=c?$(t[3],Q):e[4]}return(a=e[5])&&(c=t[5],t[5]=c?or(c,a,e[6]):a,t[6]=c?$(t[5],Q):e[6]),(a=e[7])&&(t[7]=a),r&tt&&(t[8]=null==t[8]?e[8]:nu(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o,t},Qr=function(t){return Ci.call(t)},Xr=function(t,e,n){return e=eu(e===u?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=eu(r.length-e,0),u=hi(i);++o<i;)u[o]=r[e+o];o=-1;for(var c=hi(e+1);++o<e;)c[o]=r[o];return c[e]=n(u),a(t,this,c)}},to=function(t,e){return e.length<2?t:We(t,Ln(e,0,-1))},eo=function(t,e){for(var n=t.length,r=nu(e.length,n),o=ir(t);r--;){var i=e[r];t[r]=$r(i,n)?o[i]:u}return t},no=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},ro=function(t,e,n){var r,o=e+"";return Yu(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Yt,"{\n/* [wrapped with "+e+"] */\n")}(o,co((r=o.match(Jt))?r[1].split(Qt):[],n)))},oo=function(t){var e=0,n=0;return function(){var r=ru(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(u,arguments)}},io=function(t,e){var n=-1,r=t.length,o=r-1;for(e=e===u?r:e;++n<e;){var i=An(n,o),a=t[i];t[i]=t[n],t[n]=a}return t.length=e,t},uo=function(t){if("string"==typeof t||Ko(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},ao=function(t){if(null!=t){try{return Ei.call(t)}catch(t){}try{return t+""}catch(t){}}return""},co=function(t,e){return s(it,(function(n){var r="_."+n[0];e&n[1]&&!p(t,r)&&t.push(r)})),t.sort()},so=function(t){if(o(t,Z))return t.clone();var e=new G(t.__wrapped__,t.__chain__);return e.__actions__=ir(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e},lo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Ho(n);return o<0&&(o=eu(r+o,0)),_(t,Rr(e,3),o)},fo=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r-1;return n!==u&&(o=Ho(n),o=n<0?eu(r+o,0):nu(o,r-1)),_(t,Rr(e,3),o,!0)},ho=function(t){return null!=t&&t.length?ku(t,1):[]},po=function(t){return t&&t.length?t[0]:u},vo=function(t){var e=null==t?0:t.length;return e?t[e-1]:u},yo=function(t,e){return t&&t.length&&e&&e.length?jn(t,e):t},go=function(t){return null==t?t:uu.call(t)},mo=function(t){if(!t||!t.length)return[];var e=0;return t=h(t,(function(t){if(To(t))return e=eu(t.length,e),!0})),P(e,(function(e){return v(t,j(e))}))},bo=function(t,e){if(!t||!t.length)return[];var n=mo(t);return null==e?n:v(n,(function(t){return a(e,u,t)}))},wo=function(t){var e=k(t);return e.__chain__=!0,e},_o=function(t,e){return e(t)},So=function(t,e){return(Ba(t)?s:Eu)(t,Rr(e,3))},xo=function(t,e){return(Ba(t)?l:ju)(t,Rr(e,3))},Oo=function(t,e){return(Ba(t)?v:wn)(t,Rr(e,3))},Eo=function(t,e,n){return e=n?u:e,e=t&&null==e?t.length:e,Er(t,tt,u,u,u,u,e)},jo=function(t,e){var n;if("function"!=typeof e)throw new wi(Y);return t=Ho(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=u),n}},ko=function(t,e,n){var r,o,i,a,c,s,l=function(e){var n=r,i=o;return r=o=u,v=e,a=t.apply(i,n)},f=function(t){return v=t,c=Zu(b,e),y?l(t):a},h=function(t){var n=t-s;return s===u||n>=e||n<0||g&&t-v>=i},p=function(t){return c=u,m&&r?l(t):(r=o=u,a)},d=function(){var t=Oa(),n=h(t);if(r=arguments,o=this,s=t,n){if(c===u)return f(s);if(g)return Mu(c),c=Zu(b,e),l(s)}return c===u&&(c=Zu(b,e)),a},v=0,y=!1,g=!1,m=!0;if("function"!=typeof t)throw new wi(Y);function b(){var t,n,r=Oa();if(h(r))return p(r);c=Zu(b,(n=e-((t=r)-s),g?nu(n,i-(t-v)):n))}return e=qo(e)||0,Mo(n)&&(y=!!n.leading,i=(g="maxWait"in n)?eu(qo(n.maxWait)||0,e):i,m="trailing"in n?!!n.trailing:m),d.cancel=function(){c!==u&&Mu(c),v=0,r=s=o=c=u},d.flush=function(){return c===u?a:p(Oa())},d},Ao=function(t){if("function"!=typeof t)throw new wi(Y);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}},Co=function(t,e){return t===e||t!=t&&e!=e},Po=function(t){return null!=t&&Lo(t.length)&&!Do(t)},To=function(t){return No(t)&&Po(t)},Io=function(t){if(!No(t))return!1;var e=Ye(t);return e==lt||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Uo(t)},Do=function(t){if(!Mo(t))return!1;var e=Ye(t);return e==ft||e==ht||"[object AsyncFunction]"==e||"[object Proxy]"==e},Ro=function(t){return"number"==typeof t&&t==Ho(t)},Lo=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=nt},Mo=function(t){var e=void 0===t?"undefined":i(t);return null!=t&&("object"==e||"function"==e)},No=function(t){return null!=t&&"object"==typeof t},Bo=function(t){return"number"==typeof t||No(t)&&Ye(t)==dt},Uo=function(t){if(!No(t)||Ye(t)!=vt)return!1;var e=Ni(t);if(null===e)return!0;var n=ji.call(e,"constructor")&&e.constructor;return"function"==typeof n&&o(n,n)&&Ei.call(n)==Pi},Fo=function(t){return"string"==typeof t||!Ba(t)&&No(t)&&Ye(t)==bt},Ko=function(t){return"symbol"==(void 0===t?"undefined":i(t))||No(t)&&Ye(t)==wt},$o=function(t){if(!t)return[];if(Po(t))return Fo(t)?q(t):ir(t);if($i&&t[$i])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[$i]());var e=zu(t);return(e==pt?F:e==mt?z:ti)(t)},zo=function(t){return t?(t=qo(t))===et||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0},Ho=function(t){var e=zo(t),n=e%1;return e==e?n?e-n:e:0},Vo=function(t){return t?ke(Ho(t),0,ot):0},qo=function(t){if("number"==typeof t)return t;if(Ko(t))return rt;if(Mo(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Mo(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=T(t);var n=ie.test(t);return n||ae.test(t)?qe(t.slice(2),n?2:8):oe.test(t)?rt:+t},Wo=function(t){return ur(t,Qo(t))},Go=function(t){return null==t?"":Ru(t)},Zo=function(t,e,n){var r=null==t?u:We(t,e);return r===u?n:r},Yo=function(t,e){return null!=t&&Ur(t,e,tn)},Jo=function(t){return Po(t)?ye(t):mn(t)},Qo=function(t){return Po(t)?ye(t,!0):function(t){if(!Mo(t))return function(t){var e=[];if(null!=t)for(var n in gi(t))e.push(n);return e}(t);var e=Gr(t),n=[];for(var r in t)("constructor"!=r||!e&&ji.call(t,r))&&n.push(r);return n}(t)},Xo=function(t,e){if(null==t)return{};var n=v(Tr(t),(function(t){return[t]}));return e=Rr(e),En(t,n,(function(t,n){return e(t,n[0])}))},ti=function(t){return null==t?[]:D(t,Jo(t))},ei=function(t){return gc(Go(t).toLowerCase())},ni=function(t){return(t=Go(t))&&t.replace(se,sn).replace(Le,"")},ri=function(t,e,n){return t=Go(t),(e=n?u:e)===u?(r=t,Ue.test(r)?function(t){return t.match(Ne)||[]}(t):function(t){return t.match(Xt)||[]}(t)):t.match(e)||[];var r},oi=function(t){return function(){return t}},ii=function(t){return t},ui=function(t){return gn("function"==typeof t?t:Ou(t,1))},ai=function(t,e,n){var r=Jo(e),o=He(e,r);null!=n||Mo(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=He(e,Jo(e)));var i=!(Mo(n)&&"chain"in n&&!n.chain),u=Do(t);return s(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=ir(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,y([this.value()],arguments))})})),t},ci=function(){},si=function(t){return Hr(t)?j(uo(t)):(e=t,function(t){return We(t,e)});var e},li=function(){return[]},fi=function(){return!1},hi=(e=null==e?Ze:hn.defaults(Ze.Object(),e,hn.pick(Ze,Fe))).Array,pi=e.Date,di=e.Error,vi=e.Function,yi=e.Math,gi=e.Object,mi=e.RegExp,bi=e.String,wi=e.TypeError,_i=hi.prototype,Si=vi.prototype,xi=gi.prototype,Oi=e["__core-js_shared__"],Ei=Si.toString,ji=xi.hasOwnProperty,ki=0,Ai=(n=/[^.]+$/.exec(Oi&&Oi.keys&&Oi.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Ci=xi.toString,Pi=Ei.call(gi),Ti=Ze._,Ii=mi("^"+Ei.call(ji).replace(qt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Di=Qe?e.Buffer:u,Ri=e.Symbol,Li=e.Uint8Array,Mi=Di?Di.allocUnsafe:u,Ni=K(gi.getPrototypeOf,gi),Bi=gi.create,Ui=xi.propertyIsEnumerable,Fi=_i.splice,Ki=Ri?Ri.isConcatSpreadable:u,$i=Ri?Ri.iterator:u,zi=Ri?Ri.toStringTag:u,Hi=function(){try{var t=Nr(gi,"defineProperty");return t({},"",{}),t}catch(t){}}(),Vi=e.clearTimeout!==Ze.clearTimeout&&e.clearTimeout,qi=pi&&pi.now!==Ze.Date.now&&pi.now,Wi=e.setTimeout!==Ze.setTimeout&&e.setTimeout,Gi=yi.ceil,Zi=yi.floor,Yi=gi.getOwnPropertySymbols,Ji=Di?Di.isBuffer:u,Qi=e.isFinite,Xi=_i.join,tu=K(gi.keys,gi),eu=yi.max,nu=yi.min,ru=pi.now,ou=e.parseInt,iu=yi.random,uu=_i.reverse,au=Nr(e,"DataView"),cu=Nr(e,"Map"),su=Nr(e,"Promise"),lu=Nr(e,"Set"),fu=Nr(e,"WeakMap"),hu=Nr(gi,"create"),pu=fu&&new fu,du={},vu=ao(au),yu=ao(cu),gu=ao(su),mu=ao(lu),bu=ao(fu),wu=Ri?Ri.prototype:u,_u=wu?wu.valueOf:u,Su=wu?wu.toString:u,xu=(r=function(){},function(t){if(!Mo(t))return{};if(Bi)return Bi(t);r.prototype=t;var e=new r;return r.prototype=u,e});function Ou(t,e,n,r,o,i){var a,c=1&e,l=2&e,f=4&e;if(n&&(a=o?n(t,r,o,i):n(t)),a!==u)return a;if(!Mo(t))return t;var h,p,d,v=Ba(t);if(v){if(p=(h=t).length,d=new h.constructor(p),p&&"string"==typeof h[0]&&ji.call(h,"index")&&(d.index=h.index,d.input=h.input),a=d,!c)return ir(t,a)}else{var y=zu(t),g=y==ft||y==ht;if(Fa(t))return Qn(t,c);if(y==vt||y==ut||g&&!o){if(a=l||g?{}:Fr(t),!c)return l?function(t,e){return ur(t,$u(t),e)}(t,function(t,e){return t&&ur(e,Qo(e),t)}(a,t)):function(t,e){return ur(t,Ku(t),e)}(t,Oe(a,t))}else{if(!ze[y])return o?t:{};a=function(t,e,n){var r,o,i,u=t.constructor;switch(e){case St:return Xn(t);case ct:case st:return new u(+t);case xt:return function(t,e){var n=e?Xn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case Ot:case Et:case jt:case kt:case At:case Ct:case Pt:case Tt:case It:return tr(t,n);case pt:return new u;case dt:case bt:return new u(t);case gt:return(i=new(o=t).constructor(o.source,re.exec(o))).lastIndex=o.lastIndex,i;case mt:return new u;case wt:return r=t,_u?gi(_u.call(r)):{}}}(t,y,c)}}i||(i=new ve);var m=i.get(t);if(m)return m;i.set(t,a),Ha(t)?t.forEach((function(r){a.add(Ou(r,e,n,r,t,i))})):$a(t)&&t.forEach((function(r,o){a.set(o,Ou(r,e,n,o,t,i))}));var b=v?u:(f?l?Tr:Pr:l?Qo:Jo)(t);return s(b||t,(function(r,o){b&&(r=t[o=r]),_e(a,o,Ou(r,e,n,o,t,i))})),a}k.templateSettings={escape:Ft,evaluate:Kt,interpolate:$t,variable:"",imports:{_:k}},(k.prototype=H.prototype).constructor=k,G.prototype=xu(H.prototype),G.prototype.constructor=G,Z.prototype=xu(H.prototype),Z.prototype.constructor=Z,Zt.prototype.clear=function(){this.__data__=hu?hu(null):{},this.size=0},Zt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Zt.prototype.get=function(t){var e=this.__data__;if(hu){var n=e[t];return n===J?u:n}return ji.call(e,t)?e[t]:u},Zt.prototype.has=function(t){var e=this.__data__;return hu?e[t]!==u:ji.call(e,t)},Zt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=hu&&e===u?J:e,this},he.prototype.clear=function(){this.__data__=[],this.size=0},he.prototype.delete=function(t){var e=this.__data__,n=Se(e,t);return!(n<0||(n==e.length-1?e.pop():Fi.call(e,n,1),--this.size,0))},he.prototype.get=function(t){var e=this.__data__,n=Se(e,t);return n<0?u:e[n][1]},he.prototype.has=function(t){return Se(this.__data__,t)>-1},he.prototype.set=function(t,e){var n=this.__data__,r=Se(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},pe.prototype.clear=function(){this.size=0,this.__data__={hash:new Zt,map:new(cu||he),string:new Zt}},pe.prototype.delete=function(t){var e=Lr(this,t).delete(t);return this.size-=e?1:0,e},pe.prototype.get=function(t){return Lr(this,t).get(t)},pe.prototype.has=function(t){return Lr(this,t).has(t)},pe.prototype.set=function(t,e){var n=Lr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},de.prototype.add=de.prototype.push=function(t){return this.__data__.set(t,J),this},de.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.clear=function(){this.__data__=new he,this.size=0},ve.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ve.prototype.get=function(t){return this.__data__.get(t)},ve.prototype.has=function(t){return this.__data__.has(t)},ve.prototype.set=function(t,e){var n=this.__data__;if(o(n,he)){var r=n.__data__;if(!cu||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new pe(r)}return n.set(t,e),this.size=n.size,this};var Eu=sr(Me),ju=sr(Be,!0);function ku(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=Kr),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?ku(a,e-1,n,r,o):y(o,a):r||(o[o.length]=a)}return o}var Au=lr(),Cu=lr(!0);function Pu(t,e,n,r,i){return t===e||(null==t||null==e||!No(t)&&!No(e)?t!=t&&e!=e:function(t,e,n,r,i,a){var c=Ba(t),s=Ba(e),l=c?at:zu(t),f=s?at:zu(e),h=(l=l==ut?vt:l)==vt,p=(f=f==ut?vt:f)==vt,d=l==f;if(d&&Fa(t)){if(!Fa(e))return!1;c=!0,h=!1}if(d&&!h)return a||(a=new ve),c||Va(t)?Ar(t,e,n,r,i,a):function(t,e,n,r,o,i,u){switch(n){case xt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case St:return!(t.byteLength!=e.byteLength||!i(new Li(t),new Li(e)));case ct:case st:case dt:return Co(+t,+e);case lt:return t.name==e.name&&t.message==e.message;case gt:case bt:return t==e+"";case pt:var a=F;case mt:var c=1&r;if(a||(a=z),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=Ar(a(t),a(e),r,o,i,u);return u.delete(t),l;case wt:if(_u)return _u.call(t)==_u.call(e)}return!1}(t,e,l,n,r,i,a);if(!(1&n)){var v=h&&ji.call(t,"__wrapped__"),y=p&&ji.call(e,"__wrapped__");if(v||y){var g=v?t.value():t,m=y?e.value():e;return a||(a=new ve),i(g,m,n,r,a)}}return!!d&&(a||(a=new ve),function(t,e,n,r,i,a){var c=1&n,s=Pr(t),l=s.length;if(l!=Pr(e).length&&!c)return!1;for(var f=l;f--;){var h=s[f];if(!(c?h in e:ji.call(e,h)))return!1}var p=a.get(t),d=a.get(e);if(p&&d)return p==e&&d==t;var v=!0;a.set(t,e),a.set(e,t);for(var y=c;++f<l;){var g=t[h=s[f]],m=e[h];if(r)var b=c?r(m,g,h,e,t,a):r(g,m,h,t,e,a);if(!(b===u?g===m||i(g,m,n,r,a):b)){v=!1;break}y||(y="constructor"==h)}if(v&&!y){var w=t.constructor,_=e.constructor;w==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof w&&o(w,w)&&"function"==typeof _&&o(_,_)||(v=!1)}return a.delete(t),a.delete(e),v}(t,e,n,r,i,a))}(t,e,n,r,Pu,i))}function Tu(t,e,n,r,o){t!==e&&Au(e,(function(i,a){if(o||(o=new ve),Mo(i))!function(t,e,n,r,o,i,a){var c=no(t,n),s=no(e,n),l=a.get(s);if(l)we(t,n,l);else{var f=i?i(c,s,n+"",t,e,a):u,h=f===u;if(h){var p=Ba(s),d=!p&&Fa(s),v=!p&&!d&&Va(s);f=s,p||d||v?Ba(c)?f=c:To(c)?f=ir(c):d?(h=!1,f=Qn(s,!0)):v?(h=!1,f=tr(s,!0)):f=[]:Uo(s)||Na(s)?(f=c,Na(c)?f=Wo(c):Mo(c)&&!Do(c)||(f=Fr(s))):h=!1}h&&(a.set(s,f),o(f,s,r,i,a),a.delete(s)),we(t,n,f)}}(t,e,a,n,Tu,r,o);else{var c=r?r(no(t,a),i,a+"",t,e,o):u;c===u&&(c=i),we(t,a,c)}}),Qo)}var Iu=pu?function(t,e){return pu.set(t,e),t}:ii,Du=Hi?function(t,e){return Hi(t,"toString",{configurable:!0,enumerable:!1,value:oi(e),writable:!0})}:ii;function Ru(t){if("string"==typeof t)return t;if(Ba(t))return v(t,Ru)+"";if(Ko(t))return Su?Su.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Lu=Pn,Mu=Vi||function(t){return Ze.clearTimeout(t)};function Nu(t,e,n,r,i,a,c,s,l,f){var h=e&tt,p=1&e,d=2&e,v=24&e,y=512&e,g=d?u:pr(t);return function u(){for(var m=arguments.length,b=hi(m),w=m;w--;)b[w]=arguments[w];if(v)var _=Dr(u),S=N(b,_);if(r&&(b=rr(b,r,i,v)),a&&(b=or(b,a,c,v)),m-=S,v&&m<f){var x=$(b,_);return Sr(t,e,Nu,u.placeholder,n,b,x,s,l,f-m)}var O=p?n:this,E=d?O[t]:t;return m=b.length,s?b=eo(b,s):y&&m>1&&b.reverse(),h&&l<m&&(b.length=l),this&&this!==Ze&&o(this,u)&&(E=g||pr(E)),E.apply(O,b)}}var Bu=lu&&1/z(new lu([,-0]))[1]==et?function(t){return new lu(t)}:ci;function Uu(t,e,n,r,o,i){return Mo(t)&&Mo(e)&&(i.set(e,t),Tu(t,e,u,Uu,i),i.delete(e)),t}var Fu=pu?function(t){return pu.get(t)}:ci,Ku=Yi?function(t){return null==t?[]:(t=gi(t),h(Yi(t),(function(e){return Ui.call(t,e)})))}:li,$u=Yi?function(t){for(var e=[];t;)y(e,Ku(t)),t=Ni(t);return e}:li,zu=Ye;(au&&zu(new au(new ArrayBuffer(1)))!=xt||cu&&zu(new cu)!=pt||su&&zu(su.resolve())!=yt||lu&&zu(new lu)!=mt||fu&&zu(new fu)!=_t)&&(zu=function(t){var e=Ye(t),n=e==vt?t.constructor:u,r=n?ao(n):"";if(r)switch(r){case vu:return xt;case yu:return pt;case gu:return yt;case mu:return mt;case bu:return _t}return e});var Hu,Vu,qu,Wu=Oi?Do:fi,Gu=oo(Iu),Zu=Wi||function(t,e){return Ze.setTimeout(t,e)},Yu=oo(Du),Ju=(Hu=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Vt,(function(t,n,r,o){e.push(r?o.replace(ee,"$1"):n||t)})),e},Vu=Ca(Hu,(function(t){return 500===qu.size&&qu.clear(),t})),qu=Vu.cache,Vu),Qu=Pn((function(t,e){return To(t)?Pe(t,ku(e,1,To,!0)):[]})),Xu=Pn((function(t,e){var n=vo(e);return To(n)&&(n=u),To(t)?Pe(t,ku(e,1,To,!0),Rr(n,2)):[]})),ta=Pn((function(t,e){var n=vo(e);return To(n)&&(n=u),To(t)?Pe(t,ku(e,1,To,!0),u,n):[]})),ea=Pn((function(t){var e=v(t,Gn);return e.length&&e[0]===t[0]?cn(e):[]})),na=Pn((function(t){var e=vo(t),n=v(t,Gn);return e===vo(n)?e=u:n.pop(),n.length&&n[0]===t[0]?cn(n,Rr(e,2)):[]})),ra=Pn((function(t){var e=vo(t),n=v(t,Gn);return(e="function"==typeof e?e:u)&&n.pop(),n.length&&n[0]===t[0]?cn(n,u,e):[]})),oa=Pn(yo),ia=Cr((function(t,e){var n=null==t?0:t.length,r=je(t,e);return kn(t,v(e,(function(t){return $r(t,n)?+t:t})).sort(er)),r})),ua=Pn((function(t){return Kn(ku(t,1,To,!0))})),aa=Pn((function(t){var e=vo(t);return To(e)&&(e=u),Kn(ku(t,1,To,!0),Rr(e,2))})),ca=Pn((function(t){var e=vo(t);return e="function"==typeof e?e:u,Kn(ku(t,1,To,!0),u,e)})),sa=Pn((function(t,e){return To(t)?Pe(t,e):[]})),la=Pn((function(t){return qn(h(t,To))})),fa=Pn((function(t){var e=vo(t);return To(e)&&(e=u),qn(h(t,To),Rr(e,2))})),ha=Pn((function(t){var e=vo(t);return e="function"==typeof e?e:u,qn(h(t,To),u,e)})),pa=Pn(mo),da=Pn((function(t){var e=t.length,n=e>1?t[e-1]:u;return n="function"==typeof n?(t.pop(),n):u,bo(t,n)})),va=Cr((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return je(e,t)};return e>1||this.__actions__.length||!o(r,Z)||!$r(n)?this.thru(i):((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:_o,args:[i],thisArg:u}),new G(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(u),t})))})),ya=ar((function(t,e,n){ji.call(t,n)?++t[n]:Ee(t,n,1)})),ga=dr(lo),ma=dr(fo),ba=ar((function(t,e,n){ji.call(t,n)?t[n].push(e):Ee(t,n,[e])})),wa=Pn((function(t,e,n){var r=-1,o="function"==typeof e,i=Po(t)?hi(t.length):[];return Eu(t,(function(t){i[++r]=o?a(e,t,n):pn(t,e,n)})),i})),_a=ar((function(t,e,n){Ee(t,n,e)})),Sa=ar((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]})),xa=Pn((function(t,e){if(null==t)return[];var n=e.length;return n>1&&zr(t,e[0],e[1])?e=[]:n>2&&zr(e[0],e[1],e[2])&&(e=[e[0]]),On(t,ku(e,1),[])})),Oa=qi||function(){return Ze.Date.now()},Ea=Pn((function(t,e,n){var r=1;if(n.length){var o=$(n,Dr(Ea));r|=X}return Er(t,r,e,n,o)})),ja=Pn((function(t,e,n){var r=3;if(n.length){var o=$(n,Dr(ja));r|=X}return Er(e,r,t,n,o)})),ka=Pn((function(t,e){return Ce(t,1,e)})),Aa=Pn((function(t,e,n){return Ce(t,qo(e)||0,n)}));function Ca(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new wi(Y);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Ca.Cache||pe),n}Ca.Cache=pe;var Pa,Ta=Lu((function(t,e){var n=(e=1==e.length&&Ba(e[0])?v(e[0],I(Rr())):v(ku(e,1),I(Rr()))).length;return Pn((function(r){for(var o=-1,i=nu(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return a(t,this,r)}))})),Ia=Pn((function(t,e){var n=$(e,Dr(Ia));return Er(t,X,u,e,n)})),Da=Pn((function(t,e){var n=$(e,Dr(Da));return Er(t,64,u,e,n)})),Ra=Cr((function(t,e){return Er(t,256,u,u,u,e)})),La=_r(Je),Ma=_r((function(t,e){return t>=e})),Na=dn(function(){return arguments}())?dn:function(t){return No(t)&&ji.call(t,"callee")&&!Ui.call(t,"callee")},Ba=hi.isArray,Ua=en?I(en):function(t){return No(t)&&Ye(t)==St},Fa=Ji||fi,Ka=nn?I(nn):function(t){return No(t)&&Ye(t)==st},$a=rn?I(rn):function(t){return No(t)&&zu(t)==pt},za=on?I(on):function(t){return No(t)&&Ye(t)==gt},Ha=un?I(un):function(t){return No(t)&&zu(t)==mt},Va=an?I(an):function(t){return No(t)&&Lo(t.length)&&!!$e[Ye(t)]},qa=_r(bn),Wa=_r((function(t,e){return t<=e})),Ga=cr((function(t,e){if(Gr(e)||Po(e))ur(e,Jo(e),t);else for(var n in e)ji.call(e,n)&&_e(t,n,e[n])})),Za=cr((function(t,e){ur(e,Qo(e),t)})),Ya=cr((function(t,e,n,r){ur(e,Qo(e),t,r)})),Ja=cr((function(t,e,n,r){ur(e,Jo(e),t,r)})),Qa=Cr(je),Xa=Pn((function(t,e){t=gi(t);var n=-1,r=e.length,o=r>2?e[2]:u;for(o&&zr(e[0],e[1],o)&&(r=1);++n<r;)for(var i=e[n],a=Qo(i),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===u||Co(f,xi[l])&&!ji.call(t,l))&&(t[l]=i[l])}return t})),tc=Pn((function(t){return t.push(u,Uu),a(ic,u,t)})),ec=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ci.call(e)),t[e]=n}),oi(ii)),nc=yr((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Ci.call(e)),ji.call(t,e)?t[e].push(n):t[e]=[n]}),Rr),rc=Pn(pn),oc=cr((function(t,e,n){Tu(t,e,n)})),ic=cr((function(t,e,n,r){Tu(t,e,n,r)})),uc=Cr((function(t,e){var n={};if(null==t)return n;var r=!1;e=v(e,(function(e){return e=Yn(e,t),r||(r=e.length>1),e})),ur(t,Tr(t),n),r&&(n=Ou(n,7,kr));for(var o=e.length;o--;)$n(n,e[o]);return n})),ac=Cr((function(t,e){return null==t?{}:En(n=t,e,(function(t,e){return Yo(n,e)}));var n})),cc=Or(Jo),sc=Or(Qo),lc=hr((function(t,e,n){return e=e.toLowerCase(),t+(n?ei(e):e)})),fc=hr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),hc=hr((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),pc=fr("toLowerCase"),dc=hr((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()})),vc=hr((function(t,e,n){return t+(n?" ":"")+gc(e)})),yc=hr((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),gc=fr("toUpperCase"),mc=Pn((function(t,e){try{return a(t,u,e)}catch(t){return Io(t)?t:new di(t)}})),bc=Cr((function(t,e){return s(e,(function(e){e=uo(e),Ee(t,e,Ea(t[e],t))})),t})),wc=vr(),_c=vr(!0),Sc=Pn((function(t,e){return function(n){return pn(n,t,e)}})),xc=Pn((function(t,e){return function(n){return pn(t,n,e)}})),Oc=mr(v),Ec=mr(f),jc=mr(b),kc=wr(),Ac=wr(!0),Cc=gr((function(t,e){return t+e}),0),Pc=xr("ceil"),Tc=gr((function(t,e){return t/e}),1),Ic=xr("floor"),Dc=gr((function(t,e){return t*e}),1),Rc=xr("round"),Lc=gr((function(t,e){return t-e}),0);return k.after=function(t,e){if("function"!=typeof e)throw new wi(Y);return t=Ho(t),function(){if(--t<1)return e.apply(this,arguments)}},k.ary=Eo,k.assign=Ga,k.assignIn=Za,k.assignInWith=Ya,k.assignWith=Ja,k.at=Qa,k.before=jo,k.bind=Ea,k.bindAll=bc,k.bindKey=ja,k.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ba(t)?t:[t]},k.chain=wo,k.chunk=function(t,e,n){e=(n?zr(t,e,n):e===u)?1:eu(Ho(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var o=0,i=0,a=hi(Gi(r/e));o<r;)a[i++]=Ln(t,o,o+=e);return a},k.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},k.concat=function(){var t=arguments.length;if(!t)return[];for(var e=hi(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return y(Ba(n)?ir(n):[n],ku(e,1))},k.cond=function(t){var e=null==t?0:t.length,n=Rr();return t=e?v(t,(function(t){if("function"!=typeof t[1])throw new wi(Y);return[n(t[0]),t[1]]})):[],Pn((function(n){for(var r=-1;++r<e;){var o=t[r];if(a(o[0],this,n))return a(o[1],this,n)}}))},k.conforms=function(t){return e=Ou(t,1),n=Jo(e),function(t){return Ae(t,e,n)};var e,n},k.constant=oi,k.countBy=ya,k.create=function(t,e){var n=xu(t);return null==e?n:Oe(n,e)},k.curry=function t(e,n,r){var o=Er(e,8,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.curryRight=function t(e,n,r){var o=Er(e,16,u,u,u,u,u,n=r?u:n);return o.placeholder=t.placeholder,o},k.debounce=ko,k.defaults=Xa,k.defaultsDeep=tc,k.defer=ka,k.delay=Aa,k.difference=Qu,k.differenceBy=Xu,k.differenceWith=ta,k.drop=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Ln(t,e<0?0:e,r)):[]},k.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Ln(t,0,(e=r-e)<0?0:e)):[]},k.dropRightWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!0,!0):[]},k.dropWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!0):[]},k.fill=function(t,e,n,r){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&zr(t,e,n)&&(n=0,r=o),function(t,e,n,r){var o=t.length;for((n=Ho(n))<0&&(n=-n>o?0:o+n),(r=r===u||r>o?o:Ho(r))<0&&(r+=o),r=n>r?0:Vo(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},k.filter=function(t,e){return(Ba(t)?h:De)(t,Rr(e,3))},k.flatMap=function(t,e){return ku(Oo(t,e),1)},k.flatMapDeep=function(t,e){return ku(Oo(t,e),et)},k.flatMapDepth=function(t,e,n){return n=n===u?1:Ho(n),ku(Oo(t,e),n)},k.flatten=ho,k.flattenDeep=function(t){return null!=t&&t.length?ku(t,et):[]},k.flattenDepth=function(t,e){return null!=t&&t.length?ku(t,e=e===u?1:Ho(e)):[]},k.flip=function(t){return Er(t,512)},k.flow=wc,k.flowRight=_c,k.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},k.functions=function(t){return null==t?[]:He(t,Jo(t))},k.functionsIn=function(t){return null==t?[]:He(t,Qo(t))},k.groupBy=ba,k.initial=function(t){return null!=t&&t.length?Ln(t,0,-1):[]},k.intersection=ea,k.intersectionBy=na,k.intersectionWith=ra,k.invert=ec,k.invertBy=nc,k.invokeMap=wa,k.iteratee=ui,k.keyBy=_a,k.keys=Jo,k.keysIn=Qo,k.map=Oo,k.mapKeys=function(t,e){var n={};return e=Rr(e,3),Me(t,(function(t,r,o){Ee(n,e(t,r,o),t)})),n},k.mapValues=function(t,e){var n={};return e=Rr(e,3),Me(t,(function(t,r,o){Ee(n,r,e(t,r,o))})),n},k.matches=function(t){return _n(Ou(t,1))},k.matchesProperty=function(t,e){return Sn(t,Ou(e,1))},k.memoize=Ca,k.merge=oc,k.mergeWith=ic,k.method=Sc,k.methodOf=xc,k.mixin=ai,k.negate=Ao,k.nthArg=function(t){return t=Ho(t),Pn((function(e){return xn(e,t)}))},k.omit=uc,k.omitBy=function(t,e){return Xo(t,Ao(Rr(e)))},k.once=function(t){return jo(2,t)},k.orderBy=function(t,e,n,r){return null==t?[]:(Ba(e)||(e=null==e?[]:[e]),Ba(n=r?u:n)||(n=null==n?[]:[n]),On(t,e,n))},k.over=Oc,k.overArgs=Ta,k.overEvery=Ec,k.overSome=jc,k.partial=Ia,k.partialRight=Da,k.partition=Sa,k.pick=ac,k.pickBy=Xo,k.property=si,k.propertyOf=function(t){return function(e){return null==t?u:We(t,e)}},k.pull=oa,k.pullAll=yo,k.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,Rr(n,2)):t},k.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?jn(t,e,u,n):t},k.pullAt=ia,k.range=kc,k.rangeRight=Ac,k.rearg=Ra,k.reject=function(t,e){return(Ba(t)?h:De)(t,Ao(Rr(e,3)))},k.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=Rr(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return kn(t,o),n},k.rest=function(t,e){if("function"!=typeof t)throw new wi(Y);return e=e===u?e:Ho(e),Pn(t,e)},k.reverse=go,k.sampleSize=function(t,e,n){return e=(n?zr(t,e,n):e===u)?1:Ho(e),(Ba(t)?me:In)(t,e)},k.set=function(t,e,n){return null==t?t:Dn(t,e,n)},k.setWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:Dn(t,e,n,r)},k.shuffle=function(t){return(Ba(t)?be:Rn)(t)},k.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&zr(t,e,n)?(e=0,n=r):(e=null==e?0:Ho(e),n=n===u?r:Ho(n)),Ln(t,e,n)):[]},k.sortBy=xa,k.sortedUniq=function(t){return t&&t.length?Un(t):[]},k.sortedUniqBy=function(t,e){return t&&t.length?Un(t,Rr(e,2)):[]},k.split=function(t,e,n){return n&&"number"!=typeof n&&zr(t,e,n)&&(e=n=u),(n=n===u?ot:n>>>0)?(t=Go(t))&&("string"==typeof e||null!=e&&!za(e))&&!(e=Ru(e))&&U(t)?Jn(q(t),0,n):t.split(e,n):[]},k.spread=function(t,e){if("function"!=typeof t)throw new wi(Y);return e=null==e?0:eu(Ho(e),0),Pn((function(n){var r=n[e],o=Jn(n,0,e);return r&&y(o,r),a(t,this,o)}))},k.tail=function(t){var e=null==t?0:t.length;return e?Ln(t,1,e):[]},k.take=function(t,e,n){return t&&t.length?(e=n||e===u?1:Ho(e),Ln(t,0,e<0?0:e)):[]},k.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?(e=n||e===u?1:Ho(e),Ln(t,(e=r-e)<0?0:e,r)):[]},k.takeRightWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3),!1,!0):[]},k.takeWhile=function(t,e){return t&&t.length?Hn(t,Rr(e,3)):[]},k.tap=function(t,e){return e(t),t},k.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new wi(Y);return Mo(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),ko(t,e,{leading:r,maxWait:e,trailing:o})},k.thru=_o,k.toArray=$o,k.toPairs=cc,k.toPairsIn=sc,k.toPath=function(t){return Ba(t)?v(t,uo):Ko(t)?[t]:ir(Ju(Go(t)))},k.toPlainObject=Wo,k.transform=function(t,e,n){var r=Ba(t),o=r||Fa(t)||Va(t);if(e=Rr(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Mo(t)&&Do(i)?xu(Ni(t)):{}}return(o?s:Me)(t,(function(t,r,o){return e(n,t,r,o)})),n},k.unary=function(t){return Eo(t,1)},k.union=ua,k.unionBy=aa,k.unionWith=ca,k.uniq=function(t){return t&&t.length?Kn(t):[]},k.uniqBy=function(t,e){return t&&t.length?Kn(t,Rr(e,2)):[]},k.uniqWith=function(t,e){return e="function"==typeof e?e:u,t&&t.length?Kn(t,u,e):[]},k.unset=function(t,e){return null==t||$n(t,e)},k.unzip=mo,k.unzipWith=bo,k.update=function(t,e,n){return null==t?t:zn(t,e,Zn(n))},k.updateWith=function(t,e,n,r){return r="function"==typeof r?r:u,null==t?t:zn(t,e,Zn(n),r)},k.values=ti,k.valuesIn=function(t){return null==t?[]:D(t,Qo(t))},k.without=sa,k.words=ri,k.wrap=function(t,e){return Ia(Zn(e),t)},k.xor=la,k.xorBy=fa,k.xorWith=ha,k.zip=pa,k.zipObject=function(t,e){return Wn(t||[],e||[],_e)},k.zipObjectDeep=function(t,e){return Wn(t||[],e||[],Dn)},k.zipWith=da,k.entries=cc,k.entriesIn=sc,k.extend=Za,k.extendWith=Ya,ai(k,k),k.add=Cc,k.attempt=mc,k.camelCase=lc,k.capitalize=ei,k.ceil=Pc,k.clamp=function(t,e,n){return n===u&&(n=e,e=u),n!==u&&(n=(n=qo(n))==n?n:0),e!==u&&(e=(e=qo(e))==e?e:0),ke(qo(t),e,n)},k.clone=function(t){return Ou(t,4)},k.cloneDeep=function(t){return Ou(t,5)},k.cloneDeepWith=function(t,e){return Ou(t,5,e="function"==typeof e?e:u)},k.cloneWith=function(t,e){return Ou(t,4,e="function"==typeof e?e:u)},k.conformsTo=function(t,e){return null==e||Ae(t,e,Jo(e))},k.deburr=ni,k.defaultTo=function(t,e){return null==t||t!=t?e:t},k.divide=Tc,k.endsWith=function(t,e,n){t=Go(t),e=Ru(e);var r=t.length,o=n=n===u?r:ke(Ho(n),0,r);return(n-=e.length)>=0&&t.slice(n,o)==e},k.eq=Co,k.escape=function(t){return(t=Go(t))&&Ut.test(t)?t.replace(Nt,ln):t},k.escapeRegExp=function(t){return(t=Go(t))&&Wt.test(t)?t.replace(qt,"\\$&"):t},k.every=function(t,e,n){var r=Ba(t)?f:Te;return n&&zr(t,e,n)&&(e=u),r(t,Rr(e,3))},k.find=ga,k.findIndex=lo,k.findKey=function(t,e){return w(t,Rr(e,3),Me)},k.findLast=ma,k.findLastIndex=fo,k.findLastKey=function(t,e){return w(t,Rr(e,3),Be)},k.floor=Ic,k.forEach=So,k.forEachRight=xo,k.forIn=function(t,e){return null==t?t:Au(t,Rr(e,3),Qo)},k.forInRight=function(t,e){return null==t?t:Cu(t,Rr(e,3),Qo)},k.forOwn=function(t,e){return t&&Me(t,Rr(e,3))},k.forOwnRight=function(t,e){return t&&Be(t,Rr(e,3))},k.get=Zo,k.gt=La,k.gte=Ma,k.has=function(t,e){return null!=t&&Ur(t,e,Xe)},k.hasIn=Yo,k.head=po,k.identity=ii,k.includes=function(t,e,n,r){t=Po(t)?t:ti(t),n=n&&!r?Ho(n):0;var o=t.length;return n<0&&(n=eu(o+n,0)),Fo(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&S(t,e,n)>-1},k.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:Ho(n);return o<0&&(o=eu(r+o,0)),S(t,e,o)},k.inRange=function(t,e,n){return e=zo(e),n===u?(n=e,e=0):n=zo(n),(r=t=qo(t))>=nu(o=e,i=n)&&r<eu(o,i);var r,o,i},k.invoke=rc,k.isArguments=Na,k.isArray=Ba,k.isArrayBuffer=Ua,k.isArrayLike=Po,k.isArrayLikeObject=To,k.isBoolean=function(t){return!0===t||!1===t||No(t)&&Ye(t)==ct},k.isBuffer=Fa,k.isDate=Ka,k.isElement=function(t){return No(t)&&1===t.nodeType&&!Uo(t)},k.isEmpty=function(t){if(null==t)return!0;if(Po(t)&&(Ba(t)||"string"==typeof t||"function"==typeof t.splice||Fa(t)||Va(t)||Na(t)))return!t.length;var e=zu(t);if(e==pt||e==mt)return!t.size;if(Gr(t))return!mn(t).length;for(var n in t)if(ji.call(t,n))return!1;return!0},k.isEqual=function(t,e){return Pu(t,e)},k.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:u)?n(t,e):u;return r===u?Pu(t,e,u,n):!!r},k.isError=Io,k.isFinite=function(t){return"number"==typeof t&&Qi(t)},k.isFunction=Do,k.isInteger=Ro,k.isLength=Lo,k.isMap=$a,k.isMatch=function(t,e){return t===e||vn(t,e,Mr(e))},k.isMatchWith=function(t,e,n){return n="function"==typeof n?n:u,vn(t,e,Mr(e),n)},k.isNaN=function(t){return Bo(t)&&t!=+t},k.isNative=function(t){if(Wu(t))throw new di("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return yn(t)},k.isNil=function(t){return null==t},k.isNull=function(t){return null===t},k.isNumber=Bo,k.isObject=Mo,k.isObjectLike=No,k.isPlainObject=Uo,k.isRegExp=za,k.isSafeInteger=function(t){return Ro(t)&&t>=-9007199254740991&&t<=nt},k.isSet=Ha,k.isString=Fo,k.isSymbol=Ko,k.isTypedArray=Va,k.isUndefined=function(t){return t===u},k.isWeakMap=function(t){return No(t)&&zu(t)==_t},k.isWeakSet=function(t){return No(t)&&"[object WeakSet]"==Ye(t)},k.join=function(t,e){return null==t?"":Xi.call(t,e)},k.kebabCase=fc,k.last=vo,k.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=r;return n!==u&&(o=(o=Ho(n))<0?eu(r+o,0):nu(o,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,o):_(t,O,o,!0)},k.lowerCase=hc,k.lowerFirst=pc,k.lt=qa,k.lte=Wa,k.max=function(t){return t&&t.length?Ie(t,ii,Je):u},k.maxBy=function(t,e){return t&&t.length?Ie(t,Rr(e,2),Je):u},k.mean=function(t){return E(t,ii)},k.meanBy=function(t,e){return E(t,Rr(e,2))},k.min=function(t){return t&&t.length?Ie(t,ii,bn):u},k.minBy=function(t,e){return t&&t.length?Ie(t,Rr(e,2),bn):u},k.stubArray=li,k.stubFalse=fi,k.stubObject=function(){return{}},k.stubString=function(){return""},k.stubTrue=function(){return!0},k.multiply=Dc,k.nth=function(t,e){return t&&t.length?xn(t,Ho(e)):u},k.noConflict=function(){return Ze._===this&&(Ze._=Ti),this},k.noop=ci,k.now=Oa,k.pad=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return br(Zi(o),n)+t+br(Gi(o),n)},k.padEnd=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;return e&&r<e?t+br(e-r,n):t},k.padStart=function(t,e,n){t=Go(t);var r=(e=Ho(e))?V(t):0;return e&&r<e?br(e-r,n)+t:t},k.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),ou(Go(t).replace(Gt,""),e||0)},k.random=function(t,e,n){if(n&&"boolean"!=typeof n&&zr(t,e,n)&&(e=n=u),n===u&&("boolean"==typeof e?(n=e,e=u):"boolean"==typeof t&&(n=t,t=u)),t===u&&e===u?(t=0,e=1):(t=zo(t),e===u?(e=t,t=0):e=zo(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var o=iu();return nu(t+o*(e-t+Ve("1e-"+((o+"").length-1))),e)}return An(t,e)},k.reduce=function(t,e,n){var r=Ba(t)?g:A,o=arguments.length<3;return r(t,Rr(e,4),n,o,Eu)},k.reduceRight=function(t,e,n){var r=Ba(t)?m:A,o=arguments.length<3;return r(t,Rr(e,4),n,o,ju)},k.repeat=function(t,e,n){return e=(n?zr(t,e,n):e===u)?1:Ho(e),Cn(Go(t),e)},k.replace=function(){var t=arguments,e=Go(t[0]);return t.length<3?e:e.replace(t[1],t[2])},k.result=function(t,e,n){var r=-1,o=(e=Yn(e,t)).length;for(o||(o=1,t=u);++r<o;){var i=null==t?u:t[uo(e[r])];i===u&&(r=o,i=n),t=Do(i)?i.call(t):i}return t},k.round=Rc,k.runInContext=t,k.sample=function(t){return(Ba(t)?ge:Tn)(t)},k.size=function(t){if(null==t)return 0;if(Po(t))return Fo(t)?V(t):t.length;var e=zu(t);return e==pt||e==mt?t.size:mn(t).length},k.snakeCase=dc,k.some=function(t,e,n){var r=Ba(t)?b:Mn;return n&&zr(t,e,n)&&(e=u),r(t,Rr(e,3))},k.sortedIndex=function(t,e){return Nn(t,e)},k.sortedIndexBy=function(t,e,n){return Bn(t,e,Rr(n,2))},k.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Nn(t,e);if(r<n&&Co(t[r],e))return r}return-1},k.sortedLastIndex=function(t,e){return Nn(t,e,!0)},k.sortedLastIndexBy=function(t,e,n){return Bn(t,e,Rr(n,2),!0)},k.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Nn(t,e,!0)-1;if(Co(t[n],e))return n}return-1},k.startCase=vc,k.startsWith=function(t,e,n){return t=Go(t),n=null==n?0:ke(Ho(n),0,t.length),e=Ru(e),t.slice(n,n+e.length)==e},k.subtract=Lc,k.sum=function(t){return t&&t.length?C(t,ii):0},k.sumBy=function(t,e){return t&&t.length?C(t,Rr(e,2)):0},k.template=function(t,e,n){var r=k.templateSettings;n&&zr(t,e,n)&&(e=u),t=Go(t),e=Ya({},e,r,jr);var o,i,a=Ya({},e.imports,r.imports,jr),c=Jo(a),s=D(a,c),l=0,f=e.interpolate||le,h="__p += '",p=mi((e.escape||le).source+"|"+f.source+"|"+(f===$t?ne:le).source+"|"+(e.evaluate||le).source+"|$","g"),d="//# sourceURL="+(ji.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";t.replace(p,(function(e,n,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(fe,B),n&&(o=!0,h+="' +\n__e("+n+") +\n'"),a&&(i=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),h+="';\n";var v=ji.call(e,"variable")&&e.variable;if(v){if(te.test(v))throw new di("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(i?h.replace(Dt,""):h).replace(Rt,"$1").replace(Lt,"$1;"),h="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var y=mc((function(){return vi(c,d+"return "+h).apply(u,s)}));if(y.source=h,Io(y))throw y;return y},k.times=function(t,e){if((t=Ho(t))<1||t>nt)return[];var n=ot,r=nu(t,ot);e=Rr(e),t-=ot;for(var o=P(r,e);++n<t;)e(n);return o},k.toFinite=zo,k.toInteger=Ho,k.toLength=Vo,k.toLower=function(t){return Go(t).toLowerCase()},k.toNumber=qo,k.toSafeInteger=function(t){return t?ke(Ho(t),-9007199254740991,nt):0===t?t:0},k.toString=Go,k.toUpper=function(t){return Go(t).toUpperCase()},k.trim=function(t,e,n){if((t=Go(t))&&(n||e===u))return T(t);if(!t||!(e=Ru(e)))return t;var r=q(t),o=q(e),i=L(r,o),a=M(r,o)+1;return Jn(r,i,a).join("")},k.trimEnd=function(t,e,n){if((t=Go(t))&&(n||e===u))return t.slice(0,W(t)+1);if(!t||!(e=Ru(e)))return t;var r=q(t),o=M(r,q(e))+1;return Jn(r,0,o).join("")},k.trimStart=function(t,e,n){if((t=Go(t))&&(n||e===u))return t.replace(Gt,"");if(!t||!(e=Ru(e)))return t;var r=q(t),o=L(r,q(e));return Jn(r,o).join("")},k.truncate=function(t,e){var n=30,r="...";if(Mo(e)){var o="separator"in e?e.separator:o;n="length"in e?Ho(e.length):n,r="omission"in e?Ru(e.omission):r}var i=(t=Go(t)).length;if(U(t)){var a=q(t);i=a.length}if(n>=i)return t;var c=n-V(r);if(c<1)return r;var s=a?Jn(a,0,c).join(""):t.slice(0,c);if(o===u)return s+r;if(a&&(c+=s.length-c),za(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=mi(o.source,Go(re.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var h=l.index;s=s.slice(0,h===u?c:h)}}else if(t.indexOf(Ru(o),c)!=c){var p=s.lastIndexOf(o);p>-1&&(s=s.slice(0,p))}return s+r},k.unescape=function(t){return(t=Go(t))&&Bt.test(t)?t.replace(Mt,fn):t},k.uniqueId=function(t){var e=++ki;return Go(t)+e},k.upperCase=yc,k.upperFirst=gc,k.each=So,k.eachRight=xo,k.first=po,ai(k,(Pa={},Me(k,(function(t,e){ji.call(k.prototype,e)||(Pa[e]=t)})),Pa),{chain:!1}),k.VERSION="4.17.21",s(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){k[t].placeholder=k})),s(["drop","take"],(function(t,e){Z.prototype[t]=function(n){n=n===u?1:eu(Ho(n),0);var r=this.__filtered__&&!e?new Z(this):this.clone();return r.__filtered__?r.__takeCount__=nu(n,r.__takeCount__):r.__views__.push({size:nu(n,ot),type:t+(r.__dir__<0?"Right":"")}),r},Z.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),s(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Z.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Rr(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),s(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Z.prototype[t]=function(){return this[n](1).value()[0]}})),s(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Z.prototype[t]=function(){return this.__filtered__?new Z(this):this[n](1)}})),Z.prototype.compact=function(){return this.filter(ii)},Z.prototype.find=function(t){return this.filter(t).head()},Z.prototype.findLast=function(t){return this.reverse().find(t)},Z.prototype.invokeMap=Pn((function(t,e){return"function"==typeof t?new Z(this):this.map((function(n){return pn(n,t,e)}))})),Z.prototype.reject=function(t){return this.filter(Ao(Rr(t)))},Z.prototype.slice=function(t,e){t=Ho(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Z(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==u&&(n=(e=Ho(e))<0?n.dropRight(-e):n.take(e-t)),n)},Z.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Z.prototype.toArray=function(){return this.take(ot)},Me(Z.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=k[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(k.prototype[e]=function(){var e=this.__wrapped__,c=r?[1]:arguments,s=o(e,Z),l=c[0],f=s||Ba(e),h=function(t){var e=i.apply(k,y([t],c));return r&&p?e[0]:e};f&&n&&"function"==typeof l&&1!=l.length&&(s=f=!1);var p=this.__chain__,d=!!this.__actions__.length,v=a&&!p,g=s&&!d;if(!a&&f){e=g?e:new Z(this);var m=t.apply(e,c);return m.__actions__.push({func:_o,args:[h],thisArg:u}),new G(m,p)}return v&&g?t.apply(this,c):(m=this.thru(h),v?r?m.value()[0]:m.value():m)})})),s(["pop","push","shift","sort","splice","unshift"],(function(t){var e=_i[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);k.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Ba(o)?o:[],t)}return this[n]((function(n){return e.apply(Ba(n)?n:[],t)}))}})),Me(Z.prototype,(function(t,e){var n=k[e];if(n){var r=n.name+"";ji.call(du,r)||(du[r]=[]),du[r].push({name:e,func:n})}})),du[Nu(u,2).name]=[{name:"wrapper",func:u}],Z.prototype.clone=function(){var t=new Z(this.__wrapped__);return t.__actions__=ir(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ir(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ir(this.__views__),t},Z.prototype.reverse=function(){if(this.__filtered__){var t=new Z(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Z.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ba(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=nu(e,t+u);break;case"takeRight":t=eu(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,h=0,p=nu(c,this.__takeCount__);if(!n||!r&&o==c&&p==c)return Vn(t,this.__actions__);var d=[];t:for(;c--&&h<p;){for(var v=-1,y=t[s+=e];++v<f;){var g=l[v],m=g.iteratee,b=g.type,w=m(y);if(2==b)y=w;else if(!w){if(1==b)continue t;break t}}d[h++]=y}return d},k.prototype.at=va,k.prototype.chain=function(){return wo(this)},k.prototype.commit=function(){return new G(this.value(),this.__chain__)},k.prototype.next=function(){this.__values__===u&&(this.__values__=$o(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?u:this.__values__[this.__index__++]}},k.prototype.plant=function(t){for(var e,n=this;o(n,H);){var r=so(n);r.__index__=0,r.__values__=u,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},k.prototype.reverse=function(){var t=this.__wrapped__;if(o(t,Z)){var e=t;return this.__actions__.length&&(e=new Z(this)),(e=e.reverse()).__actions__.push({func:_o,args:[go],thisArg:u}),new G(e,this.__chain__)}return this.thru(go)},k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=function(){return Vn(this.__wrapped__,this.__actions__)},k.prototype.first=k.prototype.head,$i&&(k.prototype[$i]=function(){return this}),k}();Ze._=hn,(r=function(){return hn}.call(e,n,e,t))===u||(t.exports=r)}).call(this)},980:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},r=function(t,e,n,r){var o,u,a=e&&(o=e.prototype,null!=(u=i)&&"undefined"!=typeof Symbol&&u[Symbol.hasInstance]?u[Symbol.hasInstance](o):c(o,u))?e:i,s=Object.create(a.prototype),l=new d(r||[]);return s._invoke=f(t,n,l),s},o=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},i=function(){},u=function(){},a=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,i,u,a){var c=o(t[r],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){var i=function(){return new e((function(e,r){n(t,o,e,r)}))};return r=r?r.then(i,i):i()}},f=function(t,e,n){var r=x;return function(i,u){if(r===E)throw new Error("Generator is already running");if(r===j){if("throw"===i)throw u;return y()}for(n.method=i,n.arg=u;;){var a=n.delegate;if(a){var c=I(a,n);if(c){if(c===k)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===x)throw r=j,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=E;var s=o(t,e,n);if("normal"===s.type){if(r=n.done?j:O,s.arg===k)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r=j,n.method="throw",n.arg=s.arg)}}},h=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},p=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},d=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(h,this),this.reset(!0)},v=function(t){if(t){var n=t[w];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(m.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:y}},y=function(){return{value:e,done:!0}},g=Object.prototype,m=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},w=b.iterator||"@@iterator",_=b.asyncIterator||"@@asyncIterator",S=b.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=r;var x="suspendedStart",O="suspendedYield",E="executing",j="completed",k={},A={};n(A,w,(function(){return this}));var C=Object.getPrototypeOf,P=C&&C(C(v([])));P&&P!==g&&m.call(P,w)&&(A=P);var T=a.prototype=i.prototype=Object.create(A);function I(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method))return k;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return k}var i=o(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,k;var u=i.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,k):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,k)}return u.prototype=a,n(T,"constructor",a),n(a,"constructor",u),u.displayName=n(a,S,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,a):(t.__proto__=a,n(t,S,"GeneratorFunction")),t.prototype=Object.create(T),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,_,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,o,i,u){void 0===u&&(u=Promise);var a=new l(r(e,n,o,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(T),n(T,S,"Generator"),n(T,w,(function(){return this})),n(T,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=v,d.prototype={constructor:d,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(p),!t)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,k):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),k},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),p(n),k}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:v(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),k}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},584:function(t,e,n){var r=n(518).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},518:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},641:function(t,e,n){var r=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)},o=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(t,e){var i={},u={};return{setters:[function(t){i.Type=t.Type,i.defineConfigSchema=t.defineConfigSchema,i.getConfig=t.getConfig,i.navigate=t.navigate,i.validators=t.validators},function(t){u.reportError=t.reportError}],execute:function(){t(function(){var t={602:function(t){var e=function(t){"use strict";var e,n=function(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]},o=function(t,e,n,o){var a,c,s,l,f=e&&r(e.prototype,u)?e:u,h=Object.create(f.prototype),d=new p(o||[]);return h._invoke=(a=t,c=n,s=d,l=S,function(t,e){if(l===O)throw new Error("Generator is already running");if(l===E){if("throw"===t)throw e;return v()}for(s.method=t,s.arg=e;;){var n=s.delegate;if(n){var r=T(n,s);if(r){if(r===j)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===S)throw l=E,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(a,c,s);if("normal"===o.type){if(l=s.done?E:x,o.arg===j)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=E,s.method="throw",s.arg=o.arg)}}),h},i=function(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}},u=function(){},a=function(){},c=function(){},s=function(t){["next","throw","return"].forEach((function(e){n(t,e,(function(t){return this._invoke(e,t)}))}))},l=function(t,e){function n(r,o,u,a){var c=i(t[r],t,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&g.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(l).then((function(t){s.value=t,u(s)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}var r;this._invoke=function(t,o){var i=function(){return new e((function(e,r){n(t,o,e,r)}))};return r=r?r.then(i,i):i()}},f=function(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)},h=function(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e},p=function(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(f,this),this.reset(!0)},d=function(t){if(t){var n=t[b];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function n(){for(;++r<t.length;)if(g.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:e,done:!0}},y=Object.prototype,g=y.hasOwnProperty,m="function"==typeof Symbol?Symbol:{},b=m.iterator||"@@iterator",w=m.asyncIterator||"@@asyncIterator",_=m.toStringTag||"@@toStringTag";try{n({},"")}catch(t){n=function(t,e,n){return t[e]=n}}t.wrap=o;var S="suspendedStart",x="suspendedYield",O="executing",E="completed",j={},k={};n(k,b,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(d([])));C&&C!==y&&g.call(C,b)&&(k=C);var P=c.prototype=u.prototype=Object.create(k);function T(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,T(t,n),"throw"===n.method))return j;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return j}var o=i(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,j;var u=o.arg;return u?u.done?(n[t.resultName]=u.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,j):u:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,j)}return a.prototype=c,n(P,"constructor",c),n(c,"constructor",a),a.displayName=n(c,_,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,n(t,_,"GeneratorFunction")),t.prototype=Object.create(P),t},t.awrap=function(t){return{__await:t}},s(l.prototype),n(l.prototype,w,(function(){return this})),t.AsyncIterator=l,t.async=function(e,n,r,i,u){void 0===u&&(u=Promise);var a=new l(o(e,n,r,i),u);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},s(P),n(P,_,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=d,p.prototype={constructor:p,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(h),!t)for(var n in this)"t"===n.charAt(0)&&g.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){var n=function(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o};if(this.done)throw t;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),c=g.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,j):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),j},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),h(n),j}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;h(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:d(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),j}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},385:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t,e){for(var n in e)t[n]=e[n];return t},e=function(e){var n=function(t){for(var e=[],n=0;n<o.length;n++)o[n]===t?t=null:e.push(o[n]);o=e},r=function(n,r,i){e=r?n:t(t({},e),n);for(var u=o,a=0;a<u.length;a++)u[a](e,i)},o=[];return e=e||{},{action:function(t){var n=function(e){r(e,!1,t)};return function(){for(var r=arguments,o=[e],i=0;i<arguments.length;i++)o.push(r[i]);var u=t.apply(this,o);if(null!=u)return u.then?u.then(n):n(u)}},setState:r,subscribe:function(t){return o.push(t),function(){n(t)}},unsubscribe:n,getState:function(){return e}}},n=function(t,n){var r=s[t];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=e(n);return s[t]={value:o,active:!0},o},i=function(t,n){var r=s[t];if(!r){var o=e(n);return s[t]={value:o,active:!1},o}return r.value},u=function(t){return n("app",t)},a=function(){return i("app",{})},c=function(t,e,n){var r=e(t.getState());return t.subscribe((function(t){var o=e(t);o!==r&&(r=o,n(o))}))};r.r(o),r.d(o,{createAppState:function(){return u},createGlobalStore:function(){return n},getAppState:function(){return a},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},824:function(t){"use strict";t.exports=i},254:function(t){"use strict";t.exports=u}},a={};function c(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}};return t[e](r,r.exports,c),r.exports}c.y=e,c.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return c.d(e,{a:e}),e},c.d=function(t,e){for(var n in e)c.o(e,n)&&!c.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),c.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},c.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;c.g.importScripts&&(t=c.g.location+"");var e=c.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=t}();var s={};return(0,c(968).s)(1),function(){"use strict";var t=function(t,e){var n=function(){this.constructor=t};Y(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},e=function(t){return"function"==typeof t},i=function(t){setTimeout((function(){throw t}),0)},u=function(t){return t.reduce((function(t,e){return t.concat(r(e,et)?e.errors:e)}),[])},a=function(t){return t},l=function(t){return 0===t.length?a:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}},f=function(t){if(t||(t=Q.Promise||Promise),!t)throw new Error("no Promise impl found");return t},h=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},p=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){h(i,r,o,u,a,"next",t)}function a(t){h(i,r,o,u,a,"throw",t)}u(void 0)}))}},d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}},v=function(t,e){return!e||"object"!==At(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},y=function(t){return window.openmrsBase+t},g=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof t)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof e)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(t);e.headers||(e.headers={}),xt(e.body)&&(e.body=JSON.stringify(e.body)),void 0===e.headers.Accept&&(e.headers.Accept="application/json"),null===e.headers.Accept&&delete e.headers.Accept;var r,o=Error();return window.fetch(n,e).then((r=p(Z().mark((function t(e){var r,i;return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(r=e).ok){t.next=10;break}if(204!==r.status){t.next=7;break}return r.data=null,t.abrupt("return",r);case 7:return t.abrupt("return",r.text().then((function(t){try{t&&(r.data=JSON.parse(t))}catch(t){}return r})));case 8:t.next=19;break;case 10:return t.next=12,(0,Ot.getConfig)("@openmrs/esm-api");case 12:if(i=t.sent.redirectAuthFailure,!(n===y(Pt)&&403===r.status||i.enabled&&i.errors.includes(r.status))){t.next=18;break}return(0,Ot.navigate)({to:i.url}),t.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return t.abrupt("return",r.text().then((function(t){var e=t;try{e=JSON.parse(t)}catch(t){}throw new Tt(n,r,e,o)}),(function(t){throw new Tt(n,r,null,o)})));case 19:case"end":return t.stop()}}),t)}))),function(t){return r.apply(this,arguments)}))},m=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("object"!=typeof e)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");var n=new AbortController;return e.signal=n.signal,new at((function(r){var o=!1;return g(t,e).then((function(t){o=!0,r.next(t),r.complete()}),(function(t){o=!0,r.error(t)})),function(){o||n.abort()}}))},b=function(t,e,n,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,o)},w=function(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){b(i,r,o,u,a,"next",t)}function a(t){b(i,r,o,u,a,"throw",t)}u(void 0)}))}},_=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Bt<Date.now()-6e4||!Nt.getState().loaded)&&x(),new at((function(e){var n=function(n){var r;n.loaded&&(t.includeAuthStatus?e.next(n.session):e.next(null===(r=n.session)||void 0===r?void 0:r.user))};return n(Nt.getState()),Nt.subscribe(n)}))},S=function(){return(Bt<Date.now()-6e4||!Nt.getState().loaded)&&x(),Nt},x=function(){return new Promise((function(t,e){Bt=Date.now(),g(Pt).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return e(),Promise.reject();var r,o,i,u,a;(a=null!==(u=null==(r=n.data)||null===(o=r.user)||void 0===o||null===(i=o.userProperties)||void 0===i?void 0:i.defaultLocale)&&void 0!==u?u:r.locale)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",a),t(n.data),Nt.setState({loaded:!0,session:n.data})})).catch((function(t){return(0,Rt.reportError)("Failed to fetch new session information: ".concat(t)),e(t),{sessionId:"",authenticated:!1}}))}))},O=function(){Nt.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},E=function(t,e){return r=e,("string"==typeof(n=t)?!Mt(r.privileges.find((function(t){return n===t.display}))):Array.isArray(n)?n.every((function(t){return!Mt(r.privileges.find((function(e){return t===e.display})))})):(console.error('Could not understand privileges "'.concat(n,'"')),!0))||!Mt(e.roles.find((function(t){return"System Developer"===t.display})));var n,r},j=function(){var t,e;return new Promise((function(n,r){var o=function(r){r.loaded&&r.session.user&&(t=r.session.user,n(r.session.user),e&&e())};o(Nt.getState()),t||(e=Nt.subscribe(o))}))},k=function(){return new Promise((function(t,e){var n=_().subscribe((function(e){t(e.sessionLocation),n.unsubscribe()}),e)}))},A=function(t,e){return Ut.apply(this,arguments)},C=function(){(0,Ot.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Ot.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Ot.Type.String,_default:"${openmrsSpaBase}/login",_validators:[Ot.validators.isUrl]},errors:{_type:Ot.Type.Array,_default:[401],_elements:{_type:Ot.Type.Number,_validators:[Ot.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Ot.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."}}}),x()},P=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},T=function(t,e){return t?Dt.read(function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){P(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({type:"Patient",patient:t},e)):Promise.resolve(null)},I=function(t){return function(e){return 0===t?Jt:e.lift(new Qt(t))}},D=function(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new te(t,e))}},R=function(t,e,n){var r=null!=n?n:ne;return m("/ws/rest/v1/visit?patient=".concat(t,"&v=").concat(r),{signal:e.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(I(1)).pipe(D((function(t){return t})))},L=function(t,e){return m("/ws/rest/v1/visit",{signal:e.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},M=function(t,e,n){return m("/ws/rest/v1/visit/".concat(t),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},N=function(t){return{uuid:t.uuid,display:t.display,name:t.name}},B=function(){return m("/ws/rest/v1/visittype").pipe(D((function(t){return t.data.results.map(N)}))).pipe(I(1))},U=function(t){return{uuid:t.uuid,display:t.display}},F=function(){return m("/ws/rest/v1/location").pipe(D((function(t){return t.data.results.map(U)}))).pipe(I(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Tt},VisitMode:function(){return Ft},VisitStatus:function(){return Kt},backendDependencies:function(){return oe},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return ne},fetchCurrentPatient:function(){return T},fhir:function(){return Dt},fhirBaseUrl:function(){return It},getCurrentUser:function(){return _},getLocations:function(){return F},getLoggedInUser:function(){return j},getSessionLocation:function(){return k},getSessionStore:function(){return S},getStartedVisit:function(){return re},getVisitTypes:function(){return B},getVisitsForPatient:function(){return R},makeUrl:function(){return y},openmrsFetch:function(){return g},openmrsObservableFetch:function(){return m},refetchCurrentUser:function(){return x},saveVisit:function(){return L},sessionEndpoint:function(){return Pt},setSessionLocation:function(){return A},setupApiModule:function(){return C},toLocationObject:function(){return U},toVisitTypeObject:function(){return N},updateVisit:function(){return M},userHasAccess:function(){return E}});var K,$,z,H,V,q,W,G=c(602),Z=c.n(G),Y=function(t,e){return(Y=Object.setPrototypeOf||r({__proto__:[]},Array)&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},J=!1,Q={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,J=t},get useDeprecatedSynchronousErrorHandling(){return J}},X={closed:!0,next:function(t){},error:function(t){if(Q.useDeprecatedSynchronousErrorHandling)throw t;i(t)},complete:function(){}},tt=Array.isArray||function(t){return t&&"number"==typeof t.length},et=(K=function(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this},K.prototype=Object.create(Error.prototype),K),nt=(W=function(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)},W.prototype.unsubscribe=function(){var t;if(!this.closed){var n,o=this,i=o._parentOrParents,a=o._ctorUnsubscribe,c=o._unsubscribe,s=o._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(i,W))i.remove(this);else if(null!==i)for(var l=0;l<i.length;++l)i[l].remove(this);if(e(c)){a&&(this._unsubscribe=void 0);try{c.call(this)}catch(e){t=r(e,et)?u(e.errors):[e]}}if(tt(s)){l=-1;for(var f=s.length;++l<f;){var h=s[l];if(null!==(n=h)&&"object"==typeof n)try{h.unsubscribe()}catch(e){t=t||[],r(e,et)?t=t.concat(u(e.errors)):t.push(e)}}}if(t)throw new et(t)}},W.prototype.add=function(t){var e=t;if(!t)return W.EMPTY;switch(void 0===t?"undefined":o(t)){case"function":e=new W(t);case"object":if(e===this||e.closed||"function"!=typeof e.unsubscribe)return e;if(this.closed)return e.unsubscribe(),e;if(!r(e,W)){var n=e;(e=new W)._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var i=e._parentOrParents;if(null===i)e._parentOrParents=this;else if(r(i,W)){if(i===this)return e;e._parentOrParents=[i,this]}else{if(-1!==i.indexOf(this))return e;i.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[e]:u.push(e),e},W.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},W.EMPTY=((q=new W).closed=!0,q),W),rt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),ot=function(e){function n(t,o,i){var u=e.call(this)||this;switch(u.syncErrorValue=null,u.syncErrorThrown=!1,u.syncErrorThrowable=!1,u.isStopped=!1,arguments.length){case 0:u.destination=X;break;case 1:if(!t){u.destination=X;break}if("object"==typeof t){r(t,n)?(u.syncErrorThrowable=t.syncErrorThrowable,u.destination=t,t.add(u)):(u.syncErrorThrowable=!0,u.destination=new it(u,t));break}default:u.syncErrorThrowable=!0,u.destination=new it(u,t,o,i)}return u}return t(n,e),n.prototype[rt]=function(){return this},n.create=function(t,e,r){var o=new n(t,e,r);return o.syncErrorThrowable=!1,o},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},n.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},n.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},n}(nt),it=(z=function(t,n,r,o){var i,u=$.call(this)||this;u._parentSubscriber=t;var a=u;return e(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==X&&(e((a=Object.create(n)).unsubscribe)&&u.add(a.unsubscribe.bind(a)),a.unsubscribe=u.unsubscribe.bind(u))),u._context=a,u._next=i,u._error=r,u._complete=o,u},t(z,$=ot),z.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;Q.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},z.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=Q.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):i(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;i(t)}}},z.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};Q.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},z.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),Q.useDeprecatedSynchronousErrorHandling)throw t;i(t)}},z.prototype.__tryOrSetError=function(t,e,n){if(!Q.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return Q.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(i(e),!0)}return!1},z.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},z),ut="function"==typeof Symbol&&Symbol.observable||"@@observable",at=function(){var t=function(t){this._isScalar=!1,t&&(this._subscribe=t)};return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var o=this.operator,i=function(t,e,n){if(t){if(r(t,ot))return t;if(t[rt])return t[rt]()}return t||e||n?new ot(t,e,n):new ot(X)}(t,e,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||Q.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),Q.useDeprecatedSynchronousErrorHandling&&i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){Q.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){var e=t,n=e.closed,o=e.destination,i=e.isStopped;if(n||i)return!1;t=o&&r(o,ot)?o:null}return!0}(t)?t.error(e):console.warn(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=f(e))((function(e,r){var o;o=n.subscribe((function(e){try{t(e)}catch(t){r(t),o&&o.unsubscribe()}}),r,e)}))},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[ut]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:l(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=f(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}(),ct="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,st="object"==typeof self&&self&&self.Object===Object&&self,lt=(ct||st||Function("return this")()).Symbol,ft=Object.prototype,ht=ft.hasOwnProperty,pt=ft.toString,dt=lt?lt.toStringTag:void 0,vt=Object.prototype.toString,yt=lt?lt.toStringTag:void 0,gt=(H=Object.getPrototypeOf,V=Object,function(t){return H(V(t))}),mt=Function.prototype,bt=Object.prototype,wt=mt.toString,_t=bt.hasOwnProperty,St=wt.call(Object),xt=function(t){if(null==(o=t)||"object"!=typeof o||"[object Object]"!=(null==(e=t)?void 0===e?"[object Undefined]":"[object Null]":yt&&yt in Object(e)?function(t){var e=ht.call(t,dt),n=t[dt];try{t[dt]=void 0;var r=!0}catch(t){}var o=pt.call(t);return r&&(e?t[dt]=n:delete t[dt]),o}(e):(n=e,vt.call(n))))return!1;var e,n,o,i=gt(t);if(null===i)return!0;var u=_t.call(i,"constructor")&&i.constructor;return"function"==typeof u&&r(u,u)&&wt.call(u)==St},Ot=c(824);function Et(t,e,n){return Et=d()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&kt(o,n.prototype),o},Et.apply(null,arguments)}function jt(t){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function kt(t,e){return(kt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var At=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":o(t)};function Ct(t){var e="function"==typeof Map?new Map:void 0;return Ct=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Et(t,arguments,jt(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),kt(r,t)},Ct(t)}var Pt="/ws/rest/v1/session",Tt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kt(t,e)}(i,t);var e,n,o=(e=i,n=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(t){return!1}}(),function(){var t,r=jt(e);if(n){var o=jt(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return v(this,t)});function i(t,e,n,u){var a;return function(t,e){if(!r(t,e))throw new TypeError("Cannot call a class as a function")}(this,i),(a=o.call(this)).message="Server responded with ".concat(e.status," (").concat(e.statusText,") for url ").concat(t,". Check err.responseBody or network tab in dev tools for more info"),u.message=a.message,a.responseBody=n,a.response=e,a.stack="Stacktrace for outgoing request:\n".concat(u.stack,"\nStacktrace for incoming response:\n").concat(a.stack),a}return i}(Ct(Error)),It="/ws/fhir2/R4",Dt={read:function(t){var e,n;return g((n={url:"".concat(It,"/").concat(t.type,"/").concat(t.patient),method:"GET",headers:null!==(e=t.headers)&&void 0!==e?e:{}}).url,{method:n.method,headers:n.headers}).then((function(t){return{status:t.status,headers:t.headers,data:t.data,config:n}}),(function(t){return{status:t.response.status,headers:t.response.headers,data:t.responseBody,config:n}}))}},Rt=c(254),Lt=c(385),Mt=function(t){return void 0===t},Nt=(0,Lt.createGlobalStore)("session",{loaded:!1,session:null}),Bt=0;function Ut(){return(Ut=w(Z().mark((function t(e,n){return Z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,g(Pt,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Ft,Kt,$t,zt,Ht=function(){var t=function(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this};return t.prototype=Object.create(Error.prototype),t}(),Vt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r};return t(n,e),n.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},n}(nt),qt=function(e){var n=function(t){var n=e.call(this,t)||this;return n.destination=t,n};return t(n,e),n}(ot),Wt=function(e){var n=function(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t};return t(n,e),n.prototype[rt]=function(){return new qt(this)},n.prototype.lift=function(t){var e=new Gt(this,this);return e.operator=t,e},n.prototype.next=function(t){if(this.closed)throw new Ht;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].next(t)},n.prototype.error=function(t){if(this.closed)throw new Ht;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),o=0;o<n;o++)r[o].error(t);this.observers.length=0},n.prototype.complete=function(){if(this.closed)throw new Ht;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;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(t){if(this.closed)throw new Ht;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(t){if(this.closed)throw new Ht;return this.hasError?(t.error(this.thrownError),nt.EMPTY):this.isStopped?(t.complete(),nt.EMPTY):(this.observers.push(t),new Vt(this,t))},n.prototype.asObservable=function(){var t=new at;return t.source=this,t},n.create=function(t,e){return new Gt(t,e)},n}(at),Gt=function(e){var n=function(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r};return t(n,e),n.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},n.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},n.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},n.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):nt.EMPTY},n}(Wt),Zt=function(e){var n=function(t){var n=e.call(this)||this;return n._value=t,n};return t(n,e),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),n.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},n.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new Ht;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(Wt),Yt=function(){var t=function(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this};return t.prototype=Object.create(Error.prototype),t}(),Jt=new at((function(t){return t.complete()})),Qt=function(){var t=function(t){if(this.total=t,this.total<0)throw new Yt};return t.prototype.call=function(t,e){return e.subscribe(new Xt(t,this.total))},t}(),Xt=function(e){var n=function(t,n){var r=e.call(this,t)||this;return r.total=n,r.count=0,r};return t(n,e),n.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},n}(ot),te=function(){var t=function(t,e){this.project=t,this.thisArg=e};return t.prototype.call=function(t,e){return e.subscribe(new ee(t,this.project,this.thisArg))},t}(),ee=function(e){var n=function(t,n,r){var o=e.call(this,t)||this;return o.project=n,o.count=0,o.thisArg=r||o,o};return t(n,e),n.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},n}(ot),ne="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,value),location:(uuid,name,display),startDatetime,stopDatetime)",re=new Zt(null);($t=Ft||(Ft={})).NEWVISIT="startVisit",$t.EDITVISIT="editVisit",$t.LOADING="loadingVisit",(zt=Kt||(Kt={})).NOTSTARTED="notStarted",zt.ONGOING="ongoing";var oe={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},66:function(){var t=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)};System.register(["@openmrs/esm-state"],(function(e,n){var r={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore}],execute:function(){e(function(){var e={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},685:function(t){"use strict";t.exports=r}},o={};function i(t){var n=o[t];if(void 0!==n)return n.exports;var r=o[t]={exports:{}};return e[t](r,r.exports,i),r.exports}i.y=n,i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}();var u={};return(0,i(968).s)(1),function(){"use strict";var e=function(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")},n=function(t){return t&&t.sensitive?"":"i"},r=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},o=function(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},a=function(e){return n=e.matcher,(null!=(r=RegExp)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):t(n,r))?e.matcher:"string"==typeof e.matcher?d(e.matcher):d(e.path);var n,r},c=function(t){return s([t])},s=function(t){var e=l(),n=t.map((function(t){return{matcher:a(t),settings:t}})),r=o(e).concat(o(n));v.setState(r,!0)},l=function(){return v.getState()},f=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},h=function(t,e){if(t.length>0){var n=y(t,e);if(n){for(var r=[n],o=y(t,n.settings.parent);void 0!==o;)r.push(o),o=y(t,o.settings.parent);return r.reverse()}}return[]},p=function(t){return h(l(),t)};function d(r,o,i){return t(r,RegExp)?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:"",suffix:"",modifier:"",pattern:""});return t}(r,o):Array.isArray(r)?(c=o,s=i,l=r.map((function(t){return d(t,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(u=o,function(t,r,o){void 0===o&&(o={});for(var i=o.strict,u=void 0!==i&&i,a=o.start,c=void 0===a||a,s=o.end,l=void 0===s||s,f=o.encode,h=void 0===f?function(t){return t}:f,p="["+e(o.endsWith||"")+"]|$",d="["+e(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,g=t;y<g.length;y++){var m=g[y];if("string"==typeof m)v+=e(h(m));else{var b=e(h(m.prefix)),w=e(h(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";v+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else v+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else v+="("+m.pattern+")"+m.modifier;else v+="(?:"+b+w+")"+m.modifier}}if(l)u||(v+=d+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var S=t[t.length-1],x="string"==typeof S?d.indexOf(S[S.length-1])>-1:void 0===S;u||(v+="(?:"+d+"(?="+p+"))?"),x||(v+="(?="+d+"|"+p+")")}return new RegExp(v,n(o))}(function(t,n){void 0===n&&(n={});for(var r=function(t){for(var e=[],n=0;n<t.length;){var r=t[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:n,value:t[n++]});else{var o=1,i="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--o){a++;break}}else if("("===t[a]&&(o++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=t[a++]}else i+=t[a++]+t[a++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);e.push({type:"PATTERN",index:n,value:i}),n=a}else{for(var u="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;u+=t[a++]}if(!u)throw new TypeError("Missing parameter name at "+n);e.push({type:"NAME",index:n,value:u}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),o=n.prefixes,i=void 0===o?"./":o,u="[^"+e(n.delimiter||"/#?")+"]+?",a=[],c=0,s=0,l="",f=function(t){if(s<r.length&&r[s].type===t)return r[s++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+t)},p=function(){for(var t,e="";t=f("CHAR")||f("ESCAPED_CHAR");)e+=t;return e};s<r.length;){var d=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var g=d||"";-1===i.indexOf(g)&&(l+=g,g=""),l&&(a.push(l),l=""),a.push({name:v||c++,prefix:g,suffix:"",pattern:y||u,modifier:f("MODIFIER")||""})}else{var m=d||f("ESCAPED_CHAR");if(m)l+=m;else if(l&&(a.push(l),l=""),f("OPEN")){g=p();var b=f("NAME")||"",w=f("PATTERN")||"",_=p();h("CLOSE"),a.push({name:b||(w?c++:""),pattern:b&&!w?u:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else h("END")}}return a}(r,a=i),u,a));var u,a,c,s,l}i.r(u),i.d(u,{filterBreadcrumbs:function(){return h},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(t,e){if(e)return n=e,(r=t.filter((function(t){return t.matcher.test(n)})),function(t){if(Array.isArray(t))return t}(r)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),1!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(r)||function(t,e){if(t){if("string"==typeof t)return f(t,1);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(t,1):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(t,e){for(var n=e.split("/");n.length>1;){n.pop();var r=y(t,n.join("/"));if(r)return r}}(t,e);var n,r}}(),u}())}}}))},78:function(){var t=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};System.register(["@openmrs/esm-state","single-spa"],(function(e,n){var r={},o={};return{setters:[function(t){r.createGlobalStore=t.createGlobalStore,r.getGlobalStore=t.getGlobalStore},function(t){o.navigateToUrl=t.navigateToUrl}],execute:function(){e(function(){"use strict";var e={685:function(t){t.exports=r},645:function(t){t.exports=o}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var u={};return function(){var e=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},n=function(t){return function n(r){return 0===arguments.length||e(r)?n:t.apply(this,arguments)}},r=function(t){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return e(o)?r:n((function(e){return t(o,e)}));default:return e(o)&&e(i)?r:e(o)?n((function(e){return t(e,i)})):e(i)?n((function(e){return t(o,e)})):t(o,i)}}},o=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},a=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},c=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},s=function(t,e,n,r){var i=function(t,e){return st(t,e,n.slice(),r.slice())},u=o(t);return!a((function(t,e){return!a(i,e,t)}),o(e),u)},l=function(t){return function o(i,u,a){switch(arguments.length){case 0:return o;case 1:return e(i)?o:r((function(e,n){return t(i,e,n)}));case 2:return e(i)&&e(u)?o:e(i)?r((function(e,n){return t(e,u,n)})):e(u)?r((function(e,n){return t(i,e,n)})):n((function(e){return t(i,u,e)}));default:return e(i)&&e(u)&&e(a)?o:e(i)&&e(u)?r((function(e,n){return t(e,n,a)})):e(i)&&e(a)?r((function(e,n){return t(e,u,n)})):e(u)&&e(a)?r((function(e,n){return t(i,e,n)})):e(i)?n((function(e){return t(e,u,a)})):e(u)?n((function(e){return t(i,e,a)})):e(a)?n((function(e){return t(i,u,e)})):t(i,u,a)}}},f=function(t){return"[object Object]"===Object.prototype.toString.call(t)},h=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},p=function(t,e,n,r){return t["@@transducer/result"](n[r](xt(t["@@transducer/step"],t),e))},d=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},y=function(t){return(0,It.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},g=function(){return(0,It.getGlobalStore)("config-extension-slots",{slots:{}})},m=function(t){return b(g().getState(),t)},b=function(t,e){var n=t.slots[e];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,It.getGlobalStore)("config-extensions",{configs:{}})},_=function(t,e){var n=Object.assign({},S(w().getState(),t,e));return n.config=dt(["Display conditions"],n.config),n},S=function(t,e,n){var r,o=null===(r=t.configs[e])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}},x=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},O=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},E=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){O(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},j=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||A(t,e)||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.")}()},k=function(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},A=function(t,e){if(t){if("string"==typeof t)return x(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(t,e):void 0}},C=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=K(a,t,e);y(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},P=function(t,e){var n,r,o=(n=z(F(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=j(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(c)[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var d=j(h.value,2),v=d[0];U(d[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return E({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=j(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=g(),a=u.getState(),c={slots:E({},a.slots,i)};lt(a,c)||u.setState(c)},T=function(t,e){var n=function(t,e){var n=Ut(mt(t.schemas)),r=k(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=j(a.value,2);n=z([n,Ft(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);Bt.setState({config:n})},I=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=B(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=E({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}w().setState({configs:r})},D=function(t,e){Kt(t,e);var n=pt(e,Vt),r=Rt.getState();Rt.setState({schemas:E({},r.schemas,O({},t,n))})},R=function(t,e){Kt(t,e);var n=pt(e,Vt),r=Rt.getState();r.schemas[t]&&console.warn("Config schema for extension ".concat(t," already exists. If there are multiple extensions with this same name, one will probably crash.")),Rt.setState({schemas:E({},r.schemas,O({},t,n))})},L=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Rt.getState();Rt.setState({providedConfigs:k(n.providedConfigs).concat([{source:e,config:t}])})},M=function(t){return new Promise((function(e){var n=function(t){if(t.loaded&&t.config){var n=dt(["Display conditions"],t.config);e(n),o&&o()}},r=y(t);n(r.getState());var o=r.subscribe(n)}))},N=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];H(t,e,n);var o=Ht(t,e,r);return zt(t,o,n),o},B=function(t,e,n,r,o,i){var u,a,c,s,l=j(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=F(o,i),d=$(t,p),v=null!==(s=null==d||null===(u=d.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=z([$(h,p),v]),g=null!=f?f:o.schemas[e];H(g,y,h);var m=Ht(g,y,o.devDefaultsAreOn);return zt(g,m,h),delete m.extensionSlots,m},U=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(G(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},F=function(t,e){return k(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},K=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=$(t,F(e,n));H(r,o,t);var i=Ht(r,o,e.devDefaultsAreOn);return zt(r,i,t),delete i.extensionSlots,i},$=function(t,e){return z(e.map((function(e){return e[t]})).filter((function(t){return!!t})))},z=function(t){return Et(pt)({},t)},H=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?$t(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},V=function(t,e,n){e&&q(t,[{Array:jt,Boolean:kt,ConceptUuid:Tt,Number:At,Object:Pt,String:Ct,UUID:Tt,PersonAttributeTypeUuid:Tt,PatientIdentifierTypeUuid:Tt}[e]],n)},q=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},W=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},G=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Z=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Y=function(t,e){var n=window.getOpenmrsSpaBase().replace(/\/$/,"");return J(t,function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Z(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},e)).replace(/^\/\//,"/")},J=function(t,e){return Object.keys(e).reduce((function(t,n){return t.split("${"+n+"}").join(e[n])}),t)},Q=function(t){var e=t.to,n=t.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=Y(e,n);o.startsWith(r)?(0,qt.navigateToUrl)(o):window.location.assign(o)};i.r(u),i.d(u,{Type:function(){return yt},configExtensionStore:function(){return Nt},configInternalStore:function(){return Rt},defineConfigSchema:function(){return D},defineExtensionConfigSchema:function(){return R},getConfig:function(){return M},getConfigStore:function(){return y},getExtensionConfig:function(){return _},getExtensionConfigFromStore:function(){return S},getExtensionSlotConfig:function(){return m},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return g},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Bt},inRange:function(){return Wt},interpolateString:function(){return J},interpolateUrl:function(){return Y},isUrl:function(){return Zt},isUrlWithTemplateParameters:function(){return Gt},navigate:function(){return Q},oneOf:function(){return Yt},processConfig:function(){return N},provide:function(){return L},temporaryConfigStore:function(){return Mt},validator:function(){return d},validators:function(){return Jt}});var X="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},tt=Object.prototype.toString,et=function(){return"[object Arguments]"===tt.call(arguments)?function(t){return"[object Arguments]"===tt.call(t)}:function(t){return c("callee",t)}}(),nt=et,rt=!{toString:null}.propertyIsEnumerable("toString"),ot=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],it=function(){return arguments.propertyIsEnumerable("length")}(),ut=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},at="function"!=typeof Object.keys||it?n((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=it&&nt(t);for(e in t)!c(e,t)||o&&"length"===e||(r[r.length]=e);if(rt)for(n=ot.length-1;n>=0;)c(e=ot[n],t)&&!ut(r,e)&&(r[r.length]=e),n-=1;return r})):n((function(t){return Object(t)!==t?[]:Object.keys(t)})),ct=n((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}));function st(e,n,r,o){if(X(e,n))return!0;var i,u,a=ct(e);if(a!==ct(n))return!1;if(null==e||null==n)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof n.equals)return"function"==typeof e.equals&&e.equals(n)&&"function"==typeof n.equals&&n.equals(e);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===(i=e.constructor,null==(u=String(i).match(/^function (\w*)/))?"":u[1]))return e===n;break;case"Boolean":case"Number":case"String":if((void 0===e?"undefined":t(e))!=(void 0===n?"undefined":t(n))||!X(e.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(e.valueOf(),n.valueOf()))return!1;break;case"Error":return e.name===n.name&&e.message===n.message;case"RegExp":if(e.source!==n.source||e.global!==n.global||e.ignoreCase!==n.ignoreCase||e.multiline!==n.multiline||e.sticky!==n.sticky||e.unicode!==n.unicode)return!1}for(var l=r.length-1;l>=0;){if(r[l]===e)return o[l]===n;l-=1}switch(a){case"Map":return e.size===n.size&&s(e.entries(),n.entries(),r.concat([e]),o.concat([n]));case"Set":return e.size===n.size&&s(e.values(),n.values(),r.concat([e]),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=at(e);if(f.length!==at(n).length)return!1;var h=r.concat([e]),p=o.concat([n]);for(l=f.length-1;l>=0;){var d=f[l];if(!c(d,n)||!st(n[d],e[d],h,p))return!1;l-=1}return!0}var lt=r((function(t,e){return st(t,e,[],[])})),ft=l((function(t,e,n){var r,o={};for(r in e)c(r,e)&&(o[r]=c(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),ht=l((function t(e,n,r){return ft((function(n,r,o){return f(r)&&f(o)?t(e,r,o):e(n,r,o)}),n,r)})),pt=r((function(t,e){return ht((function(t,e,n){return n}),t,e)})),dt=r((function(t,e){for(var n={},r={},o=0,i=t.length;o<i;)r[t[o]]=1,o+=1;for(var u in e)r.hasOwnProperty(u)||(n[u]=e[u]);return n}));function vt(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?vt(t[a],e,n,!0):t[a];return o};switch(ct(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var yt,gt,mt=n((function(t){return null!=t&&"function"==typeof t.clone?t.clone():vt(t,[],[],!0)})),bt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},wt=n((function(t){return!!bt(t)||!!t&&"object"==typeof t&&(e=t,!("[object String]"===Object.prototype.toString.call(e)))&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1));var e})),_t=function(){var t=function(t){this.f=t};return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),St=r((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),xt=St,Ot="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Et=l((function(t,e,n){if("function"==typeof t&&(t=new _t(t)),wt(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return p(t,e,n,"fantasy-land/reduce");if(null!=n[Ot])return h(t,e,n[Ot]());if("function"==typeof n.next)return h(t,e,n);if("function"==typeof n.reduce)return p(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));(gt=yt||(yt={})).Array="Array",gt.Boolean="Boolean",gt.ConceptUuid="ConceptUuid",gt.Number="Number",gt.Object="Object",gt.String="String",gt.UUID="UUID",gt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",gt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var jt=d((function(t){return Array.isArray(t)}),"must be an array"),kt=d((function(t){return"boolean"==typeof t}),"must be a boolean"),At=d((function(t){return"number"==typeof t}),"must be a number"),Ct=d((function(t){return"string"==typeof t}),"must be a string"),Pt=d((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),Tt=d((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),It=i(685),Dt={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Rt=(0,It.createGlobalStore)("config-internal",Dt),Lt=v();Rt.subscribe((function(t){var e;t.devDefaultsAreOn!=Lt&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),Lt=t.devDefaultsAreOn)}));var Mt=(0,It.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});Mt.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var Nt=(0,It.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Bt=(0,It.createGlobalStore)("config-implementer-tools",{config:{}});function Ut(t){return t.hasOwnProperty("_default")?E({},t,{_value:t._default,_source:"default"}):G(t)?Object.keys(t).reduce((function(e,n){return e[n]=Ut(t[n]),e}),{}):{}}function Ft(t,e){return G(t)?Object.keys(t).reduce((function(n,r){return n[r]=Ft(t[r],e),n}),{}):{_value:t,_source:e}}function Kt(t,e){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,u=void 0;try{for(var a,c=function(o,i){var u=i.value,a=n+(n&&".")+u,c=e[u];if("Display conditions"===a&&console.error("".concat(t,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),!G(c))return console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Kt(t,c,a);var s=c._elements;if(W(s)&&Kt(t,s,a+"._elements"),c._validators){var l=!0,f=!1,h=void 0;try{for(var p,d=c._validators[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(t," has invalid validator for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}}var y=c._type;y&&!Object.values(yt).includes(y)&&console.error("".concat(t," has invalid type for key '").concat(a,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(yt).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).every((function(t){return["_description","_validators","_elements","_type"].includes(t)}))&&!n.includes("._elements")&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![yt.Array,yt.Object].includes(y)&&console.error("".concat(t," has bad config schema definition for key '").concat(a,"'. ").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)))},s=Object.keys(e).filter((function(t){return!t.startsWith("_")}))[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(s,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}}function $t(t,e,n){V(n,t._type,e),G(e)?t._type===yt.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];H(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||H(t,e,n):t._type===yt.Array&&function(t,e,n){if(W(t._elements))for(var r=0;r<e.length;r++)$t(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;V("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function zt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&q(n,t._validators,e),G(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===yt.Object&&t._elements?zt(t._elements,s,l):zt(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)zt(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}C(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return C(t,Mt.getState())})),Mt.subscribe((function(t){return C(Rt.getState(),t)})),T(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return T(t,Mt.getState())})),Mt.subscribe((function(t){return T(Rt.getState(),t)})),P(Rt.getState(),Mt.getState()),Rt.subscribe((function(t){return P(t,Mt.getState())})),Mt.subscribe((function(t){return P(Rt.getState(),t)})),I(Rt.getState(),Nt.getState(),Mt.getState()),Rt.subscribe((function(t){I(t,Nt.getState(),Mt.getState())})),Nt.subscribe((function(t){I(Rt.getState(),t,Mt.getState())})),Mt.subscribe((function(t){I(Rt.getState(),Nt.getState(),t)}));var Ht=function(t,e,n){var r=mt(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&W(s))if(a._type===yt.Array&&Array.isArray(u)){var l=u.map((function(t){return Ht(s,t,n)}));r[i]=l}else if(a._type===yt.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(u)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;u[y]=Ht(s,u[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(G(a)){var g=r.hasOwnProperty(i)?u:{};G(g)&&(r[i]=Ht(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r},Vt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:yt.Array,_default:[]}}},qt=i(645),Wt=function(t,e){return d((function(n){return t<=n&&n<=e}),"must be between ".concat(t," and ").concat(e))},Gt=function(t){var e=t.concat(["openmrsBase","openmrsSpaBase"]);return d((function(t){if(!t||"string"!=typeof t)return!1;for(var n=/\${(.*?)}/g,r=n.exec(t);r;){if(!e.includes(r[1]))return!1;r=n.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+e.map((function(t){return"${"+t+"}"})).join(", "))},Zt=Gt([]),Yt=function(t){return d((function(e){return t.includes(e)}),"Must be one of the following: '".concat(t.join("', '"),"'."))},Jt={inRange:Wt,isUrl:Zt,isUrlWithTemplateParameters:Gt,oneOf:Yt}}(),u}())}}}))},674:function(){System.register(["@openmrs/esm-globals"],(function(t,e){var n={};return{setters:[function(t){n.dispatchNotificationShown=t.dispatchNotificationShown}],execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger},728:function(t){"use strict";t.exports=n}},r={};function o(e){var n=r[e];if(void 0!==n)return n.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.y=e,o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;o.g.importScripts&&(t=o.g.location+"");var e=o.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t}();var i={};return(0,o(968).s)(1),function(){"use strict";var t=function(t){var e=n(t);setTimeout((function(){throw e}))},e=function(){var e=Error();return function(r){n(r).stack+="\nAsync stacktrace:\n".concat(e.stack),t(r)}},n=function(t){var e,n,r,o,i;if(n=t,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):c(o,i)))return t;if(null===t)return Error("'null' was thrown as an error");if("object"==typeof t){try{e="Object thrown as error: ".concat(JSON.stringify(t))}catch(n){e="Object thrown as error with the following properties: ".concat(Object.keys(t))}return Error(e)}return void 0===t?Error("'undefined' was thrown as an error"):Error(t.toString())};o.r(i),o.d(i,{createErrorHandler:function(){return e},reportError:function(){return t}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},103:function(){System.register([],(function(t,e){return{execute:function(){t(function(){var t={968:function(t,e,n){var r=n(577).R;e.s=function(t){if(t||(t=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,t)}},577:function(t,e,n){e.R=function(t,e){var n=document.createElement("a");n.href=t;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==e&&i>=0;)"/"===r[--i]&&o++;if(o!==e)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+e+") is greater than the number of directories ("+o+") in the URL path "+t);var u=r.slice(0,i+1);return n.protocol+"//"+n.host+u},Number.isInteger}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.y=e,r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},function(){var t;r.g.importScripts&&(t=r.g.location+"");var e=r.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=t}();var o={};return(0,r(968).s)(1),function(){"use strict";var t=function(t){window.dispatchEvent(new CustomEvent(h,{detail:{online:t}}))},e=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(h,e),function(){return window.removeEventListener(h,e)}},n=function(t){return t({online:navigator.onLine}),e(t)},i=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:t}))},u=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(p,e),function(){return window.removeEventListener(p,e)}},a=function(t){window.dispatchEvent(new CustomEvent(d,{detail:t}))},c=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(d,e),function(){return window.removeEventListener(d,e)}},s=function(t){var e=function(e){return t(e.detail)};return window.addEventListener(v,e),function(){return window.removeEventListener(v,e)}},l=function(t){window.openmrsBase=t.apiUrl,window.spaBase=t.spaPath,window.spaEnv=t.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(t){var e=window.getSelection();if(e){var n=document.createRange();n.selectNode(t),e.removeAllRanges(),e.addRange(n),document.execCommand("copy"),e.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return t},dispatchNotificationShown:function(){return a},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return e},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return u},subscribeToastShown:function(){return s}});var h="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",d="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},991:function(t){"use strict";t.exports='<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>'},662:function(t){"use strict";t.exports='<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'},865:function(t){"use strict";t.exports='<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'},646:function(t){"use strict";t.exports='<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'},509:function(t){"use strict";t.exports='<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>'},250:function(t){"use strict";t.exports='<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'},142:function(t){"use strict";t.exports='<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>'},451:function(t){"use strict";t.exports='<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'},61:function(t){"use strict";t.exports='<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'},76:function(t){"use strict";t.exports='<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'},600:function(t){"use strict";t.exports='<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'},40:function(t){"use strict";t.exports='<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'},714:function(t){"use strict";t.exports='<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>'},752:function(t){"use strict";t.exports='<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>'},862:function(t){"use strict";t.exports='<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>'},601:function(t){"use strict";t.exports='<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'},879:function(t){"use strict";t.exports='<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>'},739:function(t){"use strict";t.exports='<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'},524:function(t){"use strict";t.exports='<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'},787:function(t){"use strict";t.exports='<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'},592:function(t){"use strict";t.exports='<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'},141:function(t){"use strict";t.exports='<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'},647:function(t){"use strict";t.exports='<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>'},885:function(t){"use strict";t.exports='<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'},575:function(t){"use strict";t.exports='<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'},93:function(t){"use strict";t.exports='<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'},839:function(t){"use strict";t.exports='<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'},45:function(t){"use strict";t.exports=p},740:function(t){"use strict";t.exports=d},685:function(t){"use strict";t.exports=v},64:function(t){"use strict";t.exports=y},954:function(t){"use strict";t.exports=g},493:function(t){"use strict";t.exports=m},281:function(t){"use strict";t.exports=b},792:function(t){"use strict";t.exports=w}},S={};function x(t){var e=S[t];if(void 0!==e)return e.exports;var n=S[t]={id:t,loaded:!1,exports:{}};return r[t].call(n.exports,n,n.exports,x),n.loaded=!0,n.exports}x.y=i,x.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return x.d(e,{a:e}),e},x.d=function(t,e){for(var n in e)x.o(e,n)&&!x.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},x.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),x.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},x.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},x.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;x.g.importScripts&&(t=x.g.location+"");var e=x.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");n.length&&(t=n[n.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),x.p=t}();var O={};return(0,x(584).s)(1),function(){"use strict";var r=function(t,e){var n=(new DOMParser).parseFromString(e,"text/html").querySelector("svg");n&&(n.id=t,Rr.appendChild(n))},i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}},p=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},d=function(t,e,n){var r=m(t,e,n);$o.length?$o.forEach((function(t){return t(r)})):setTimeout((function(){throw r}))},v=function(t){if("function"!=typeof t)throw Error(g(28,!1));$o.push(t)},y=function(t){if("function"!=typeof t)throw Error(g(29,!1));var e=!1;return $o=$o.filter((function(n){var r=n===t;return e=e||r,!r})),e},g=function(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(t,": ").concat(e?e+" ":"","See https://single-spa.js.org/error/?code=").concat(t).concat(r.length?"&arg=".concat(r.join("&arg=")):"")},m=function(t,e,n){var r,o,i,u="".concat(E(e)," '").concat(S(e),"' died in status ").concat(e.status,": ");if(o=t,null!=(i=Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](o):c(o,i)){try{t.message=u+t.message}catch(t){}r=t}else{console.warn(g(30,!1,e.status,S(e)));try{r=Error(u+JSON.stringify(t))}catch(e){r=t}}return r.appOrParcelName=S(e),e.status=n,r},b=function(t){return t.status===Zo},w=function(t){try{return t.activeWhen(window.location)}catch(e){return d(e,t,Xo),!1}},S=function(t){return t.name},O=function(t){return Boolean(t.unmountThisParcel)},E=function(t){return O(t)?"parcel":"application"},j=function(){for(var t=arguments.length-1;t>0;t--)for(var e in arguments[t])"__proto__"!==e&&(arguments[t-1][e]=arguments[t][e]);return arguments[0]},k=function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return t[n];return null},A=function(t){return t&&("function"==typeof t||(e=t,Array.isArray(e)&&!k(e,(function(t){return"function"!=typeof t}))));var e},C=function(t,e){var n=t[e]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=E(t),o=S(t);return function(t){return n.reduce((function(n,i,u){return n.then((function(){var n=i(t);return P(n)?n:Promise.reject(g(15,!1,r,o,e,u))}))}),Promise.resolve())}},P=function(t){return t&&"function"==typeof t.then&&"function"==typeof t.catch},T=function(t,e){var n=function(){return t.status=Wo,t};return Promise.resolve().then((function(){return t.status!==Vo?t:(t.status=qo,t.bootstrap?$(t,"bootstrap").then(n).catch((function(n){if(e)throw m(n,t,Xo);return d(n,t,Xo),t})):Promise.resolve().then(n))}))},I=function(t,e){return Promise.resolve().then((function(){var n=function(){return $(t,"unmount").then((function(){t.status=Wo})).catch((function(n){if(e)throw m(n,t,Xo);d(n,t,Xo)}))};if(t.status!==Zo)return t;t.status=Jo;var r=Object.keys(t.parcels).map((function(e){return t.parcels[e].unmountThisParcel()}));return Promise.all(r).then(n,(function(r){return n().then((function(){var n=Error(r.message);if(e)throw m(n,t,Xo);d(n,t,Xo)}))})).then((function(){return t}))}))},D=function(t,e){return Promise.resolve().then((function(){return t.status!==Wo?t:(ti||(window.dispatchEvent(new Ko("single-spa:before-first-mount")),ti=!0),$(t,"mount").then((function(){return t.status=Zo,ei||(window.dispatchEvent(new Ko("single-spa:first-mount")),ei=!0),t})).catch((function(n){var r=function(){if(e)throw m(n,t,Xo);return d(n,t,Xo),t};return t.status=Zo,I(t,!0).then(r,r)})))}))},R=function(){return L.apply(ri,arguments)},L=function(t,e){var n=this;if(!t||"object"!==Bo(t)&&"function"!=typeof t)throw Error(g(2,!1));if(t.name&&"string"!=typeof t.name)throw Error(g(3,!1,Bo(t.name)));if("object"!==Bo(e))throw Error(g(4,!1,name,Bo(e)));if(!e.domElement)throw Error(g(5,!1,name));var r,o=ni++,i="function"==typeof t,u=i?t:function(){return Promise.resolve(t)},a={id:o,parcels:{},status:i?Ho:Vo,customProps:e,parentName:S(n),unmountThisParcel:function(){return h.then((function(){if(a.status!==Zo)throw Error(g(6,!1,name,a.status));return I(a,!0)})).then((function(t){return a.parentName&&delete n.parcels[a.id],t})).then((function(t){return s(t),t})).catch((function(t){throw a.status=Xo,l(t),t}))}};n.parcels[o]=a;var c=u();if(!c||"function"!=typeof c.then)throw Error(g(7,!1));var s,l,f=(c=c.then((function(t){if(!t)throw Error(g(8,!1));var e=t.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!A(t.bootstrap))throw Error(g(9,!1,e));if(!A(t.mount))throw Error(g(10,!1,e));if(!A(t.unmount))throw Error(g(11,!1,e));if(t.update&&!A(t.update))throw Error(g(12,!1,e));var n=C(t,"bootstrap"),i=C(t,"mount"),u=C(t,"unmount");a.status=Vo,a.name=e,a.bootstrap=n,a.mount=i,a.unmount=u,a.timeouts=z(t.timeouts),t.update&&(a.update=C(t,"update"),r.update=function(t){return a.customProps=t,M((e=a,Promise.resolve().then((function(){if(e.status!==Zo)throw Error(g(32,!1,S(e)));return e.status=Yo,$(e,"update").then((function(){return e.status=Zo,e})).catch((function(t){throw m(t,e,Xo)}))}))));var e})}))).then((function(){return T(a,!0)})),h=f.then((function(){return D(a,!0)})),p=new Promise((function(t,e){s=t,l=e}));return r={mount:function(){return M(Promise.resolve().then((function(){if(a.status!==Wo)throw Error(g(13,!1,name,a.status));return n.parcels[o]=a,D(a)})))},unmount:function(){return M(a.unmountThisParcel())},getStatus:function(){return a.status},loadPromise:M(c),bootstrapPromise:M(f),mountPromise:M(h),unmountPromise:M(p)}},M=function(t){return t.then((function(){return null}))},N=function(t){var e=S(t),n="function"==typeof t.customProps?t.customProps(e,window.location):t.customProps;("object"!==Bo(n)||null===n||Array.isArray(n))&&(n={},console.warn(g(40,!1),e,n));var r=j({},n,{name:e,mountParcel:L.bind(t),singleSpa:No});return O(t)&&(r.unmountSelf=t.unmountThisParcel),r},B=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(16,!1));oi.bootstrap={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},U=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(17,!1));oi.mount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},F=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(18,!1));oi.unmount={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},K=function(t,e,n){if("number"!=typeof t||t<=0)throw Error(g(19,!1));oi.unload={millis:t,dieOnTimeout:e,warningMillis:n||1e3}},$=function(t,e){var n=t.timeouts[e],r=n.warningMillis,o=E(t);return new Promise((function(i,u){var a=!1,c=!1;t[e](N(t)).then((function(t){a=!0,i(t)})).catch((function(t){a=!0,u(t)})),setTimeout((function(){return l(1)}),r),setTimeout((function(){return l(!0)}),n.millis);var s=g(31,!1,e,o,S(t),n.millis);function l(t){if(!a)if(!0===t)c=!0,n.dieOnTimeout?u(Error(s)):console.error(s);else if(!c){var e=t,o=e*r;console.warn(s),o+r<n.millis&&setTimeout((function(){return l(e+1)}),r)}}}))},z=function(t){var e={};for(var n in oi)e[n]=j({},oi[n],t&&t[n]||{});return e},H=function(t){return Promise.resolve().then((function(){return t.loadPromise?t.loadPromise:t.status!==zo&&t.status!==Qo?t:(t.status=Ho,t.loadPromise=Promise.resolve().then((function(){var r=t.loadApp(N(t));if(!P(r))throw n=!0,Error(g(33,!1,S(t)));return r.then((function(n){var r;t.loadErrorTime=null,"object"!==Bo(e=n)&&(r=34),Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!A(e.bootstrap)&&(r=35),A(e.mount)||(r=36),A(e.unmount)||(r=37);var o=E(e);if(r){var i;try{i=JSON.stringify(e)}catch(t){}return console.error(g(r,!1,o,S(t),i),e),d(void 0,t,Xo),t}return e.devtools&&e.devtools.overlays&&(t.devtools.overlays=j({},t.devtools.overlays,e.devtools.overlays)),t.status=Vo,t.bootstrap=C(e,"bootstrap"),t.mount=C(e,"mount"),t.unmount=C(e,"unmount"),t.unload=C(e,"unload"),t.timeouts=z(e.timeouts),delete t.loadPromise,t}))})).catch((function(e){var r;return delete t.loadPromise,n?r=Xo:(r=Qo,t.loadErrorTime=(new Date).getTime()),d(e,t,r),t})));var e,n}))},V=function(t){var e;if("string"==typeof t)e=t;else if(this&&this.href)e=this.href;else{if(!(t&&t.currentTarget&&t.currentTarget.href&&t.preventDefault))throw Error(g(14,!1));e=t.currentTarget.href,t.preventDefault()}var n=Y(window.location.href),r=Y(e);0===e.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=e:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,e)},q=function(t){var e=this;if(t){var n=t[0].type;ai.indexOf(n)>=0&&ui[n].forEach((function(n){try{n.apply(e,t)}catch(t){setTimeout((function(){throw t}))}}))}},W=function(){yi([],arguments)},G=function(t,e){return function(){var n=window.location.href,r=t.apply(this,arguments),o=window.location.href;return Uo&&n===o||(gt()?window.dispatchEvent(Z(window.history.state,e)):yi([])),r}},Z=function(t,e){var n;try{n=new PopStateEvent("popstate",{state:t})}catch(e){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,t)}return n.singleSpa=!0,n.singleSpaTrigger=e,n},Y=function(t){var e=document.createElement("a");return e.href=t,e},J=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(t||window.$&&window.$.fn&&window.$.fn.jquery&&(t=window.$),t&&!li){var e=t.fn.on,n=t.fn.off;t.fn.on=function(t,n){return Q.call(this,e,window.addEventListener,t,n,arguments)},t.fn.off=function(t,e){return Q.call(this,n,window.removeEventListener,t,e,arguments)},li=!0}},Q=function(t,e,n,r,o){return"string"!=typeof n?t.apply(this,o):(n.split(/\s+/).forEach((function(t){ai.indexOf(t)>=0&&(e(t,r),n=n.replace(t,""))})),""===n.trim()?this:t.apply(this,o))},X=function(t){return Promise.resolve().then((function(){var e=fi[S(t)];if(!e)return t;if(t.status===zo)return tt(t,e),t;if("UNLOADING"===t.status)return e.promise.then((function(){return t}));if(t.status!==Wo&&t.status!==Qo)return t;var n=t.status===Qo?Promise.resolve():$(t,"unload");return t.status="UNLOADING",n.then((function(){return tt(t,e),t})).catch((function(n){return o=e,i=n,delete fi[S(r=t)],delete r.bootstrap,delete r.mount,delete r.unmount,delete r.unload,d(i,r,Xo),o.reject(i),t;var r,o,i}))}))},tt=function(t,e){delete fi[S(t)],delete t.bootstrap,delete t.mount,delete t.unmount,delete t.unload,t.status=zo,e.resolve()},et=function(t,e,n,r){fi[S(t)]={app:t,resolve:n,reject:r},Object.defineProperty(fi[S(t)],"promise",{get:e})},nt=function(t){return fi[t]},rt=function(){var t=[],e=[],n=[],r=[],o=(new Date).getTime();return hi.forEach((function(i){var u=i.status!==Xo&&w(i);switch(i.status){case Qo:u&&o-i.loadErrorTime>=200&&n.push(i);break;case zo:case Ho:u&&n.push(i);break;case Vo:case Wo:!u&&nt(S(i))?t.push(i):u&&r.push(i);break;case Zo:u||e.push(i)}})),{appsToUnload:t,appsToUnmount:e,appsToLoad:n,appsToMount:r}},ot=function(){return hi.filter(b).map(S)},it=function(){return hi.map(S)},ut=function(t){var e=k(hi,(function(e){return S(e)===t}));return e?e.status:null},at=function(t,e,n,r){var o=function(t,e,n,r){var o,i,u,a={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===Bo(t)?(function(t){if(Array.isArray(t)||null===t)throw Error(g(39,!1));var e=["name","app","activeWhen","customProps"],n=Object.keys(t).reduce((function(t,n){return e.indexOf(n)>=0?t:t.concat(n)}),[]);if(0!==n.length)throw Error(g(38,!1,e.join(", "),n.join(", ")));if("string"!=typeof t.name||0===t.name.length)throw Error(g(20,!1));if("object"!==Bo(t.app)&&"function"!=typeof t.app)throw Error(g(20,!1));var r=function(t){return"string"==typeof t||"function"==typeof t};if(!(r(t.activeWhen)||Array.isArray(t.activeWhen)&&t.activeWhen.every(r)))throw Error(g(24,!1));if(!ht(t.customProps))throw Error(g(22,!1))}(t),a.name=t.name,a.loadApp=t.app,a.activeWhen=t.activeWhen,a.customProps=t.customProps):(function(t,e,n,r){if("string"!=typeof t||0===t.length)throw Error(g(20,!1));if(!e)throw Error(g(23,!1));if("function"!=typeof n)throw Error(g(24,!1));if(!ht(r))throw Error(g(22,!1))}(t,e,n,r),a.name=t,a.loadApp=e,a.activeWhen=n,a.customProps=r),a.loadApp="function"!=typeof(o=a.loadApp)?function(){return Promise.resolve(o)}:o,a.customProps=a.customProps||{},a.activeWhen=(i=a.activeWhen,u=(u=Array.isArray(i)?i:[i]).map((function(t){return"function"==typeof t?t:pt(t)})),function(t){return u.some((function(e){return e(t)}))}),a}(t,e,n,r);if(-1!==it().indexOf(o.name))throw Error(g(21,!1,o.name));hi.push(j({loadErrorTime:null,status:zo,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),ii&&(J(),yi())},ct=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return hi.filter((function(e){return e.activeWhen(t)})).map(S)},st=function(t){if(0===hi.filter((function(e){return S(e)===t})).length)throw Error(g(25,!1,t));return lt(t).then((function(){var e=hi.map(S).indexOf(t);hi.splice(e,1)}))},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof t)throw Error(g(26,!1));var n=k(hi,(function(e){return S(e)===t}));if(!n)throw Error(g(27,!1,t));var r,o=nt(S(n));if(e&&e.waitForUnmount){if(o)return o.promise;var i=new Promise((function(t,e){et(n,(function(){return i}),t,e)}));return i}return o?(r=o.promise,ft(n,o.resolve,o.reject)):r=new Promise((function(t,e){et(n,(function(){return r}),t,e),ft(n,t,e)})),r},ft=function(t,e,n){I(t).then(X).then((function(){e(),setTimeout((function(){yi()}))})).catch(n)},ht=function(t){return!t||"function"==typeof t||"object"===Bo(t)&&null!==t&&!Array.isArray(t)},pt=function(t,e){var n=function(t,e){var n=function(n){var u=t.slice(r,n).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(i+=o?"[^/]+/?":u,n===t.length)if(o)e&&(i+="$");else{var a=e?"":".*";i="/"===i.charAt(i.length-1)?"".concat(i).concat(a,"$"):"".concat(i,"(/").concat(a,")?(#.*)?$")}o=!o,r=n},r=0,o=!1,i="^";"/"!==t[0]&&(t="/"+t);for(var u=0;u<t.length;u++){var a=t[u];(!o&&":"===a||o&&"/"===a)&&n(u)}return n(t.length),new RegExp(i,"i")}(t,e);return function(t){var e=t.origin;e||(e="".concat(t.protocol,"//").concat(t.host));var r=t.href.replace(e,"").replace(t.search,"").split("?")[0];return n.test(r)}},dt=function(){return yi()},vt=function(t,e){return w(t)?T(t).then((function(t){return e.then((function(){return w(t)?D(t):t}))})):e.then((function(){return t}))},yt=function(t){var e;gi=!0,t&&t.urlRerouteOnly&&(e=t.urlRerouteOnly,Uo=e),ii&&yi()},gt=function(){return gi},mt=function(t,e){return function(n){if(!t(n))return"function"==typeof e?e(n):e}},bt=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},wt=function(t){return function e(n){return 0===arguments.length||bt(n)?e:t.apply(this,arguments)}},_t=function(t){return function e(n,r){switch(arguments.length){case 0:return e;case 1:return bt(n)?e:wt((function(e){return t(n,e)}));default:return bt(n)&&bt(r)?e:bt(n)?wt((function(e){return t(e,r)})):bt(r)?wt((function(e){return t(n,e)})):t(n,r)}}},St=function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n},xt=function(t,e,n){for(var r=0,o=n.length;r<o;){if(t(e,n[r]))return!0;r+=1}return!1},Ot=function(t,e){return Object.prototype.hasOwnProperty.call(e,t)},Et=function(t,e,n,r){var o=function(t,e){return Ti(t,e,n.slice(),r.slice())},i=St(t);return!xt((function(t,e){return!xt(o,e,t)}),St(e),i)},jt=function(t){return function e(n,r,o){switch(arguments.length){case 0:return e;case 1:return bt(n)?e:_t((function(e,r){return t(n,e,r)}));case 2:return bt(n)&&bt(r)?e:bt(n)?_t((function(e,n){return t(e,r,n)})):bt(r)?_t((function(e,r){return t(n,e,r)})):wt((function(e){return t(n,r,e)}));default:return bt(n)&&bt(r)&&bt(o)?e:bt(n)&&bt(r)?_t((function(e,n){return t(e,n,o)})):bt(n)&&bt(o)?_t((function(e,n){return t(e,r,n)})):bt(r)&&bt(o)?_t((function(e,r){return t(n,e,r)})):bt(n)?wt((function(e){return t(e,r,o)})):bt(r)?wt((function(e){return t(n,e,o)})):bt(o)?wt((function(e){return t(n,r,e)})):t(n,r,o)}}},kt=function(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)},At=function(t,e,n,r){return t["@@transducer/result"](n[r]($i(t["@@transducer/step"],t),e))},Ct=function(t){return"[object Object]"===Object.prototype.toString.call(t)},Pt=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(t){return!1}},Tt=function(t){return(0,so.getGlobalStore)("config-module-".concat(t),{config:null,loaded:!1})},It=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},Dt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},Rt=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){Dt(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},Lt=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||Nt(t,e)||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.")}()},Mt=function(t){return function(t){if(Array.isArray(t))return It(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Nt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},Nt=function(t,e){if(t){if("string"==typeof t)return It(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?It(t,e):void 0}},Bt=function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,u=Object.keys(t.schemas)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=Vt(a,t,e);Tt(a).setState({loaded:!0,config:c})}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}},Ut=function(t,e){var n,r,o=(n=Wt(Ht(t,e)),function(t){var e=!0,n=!1,r=void 0;try{for(var o,i=Object.entries(t)[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var u=Lt(o.value,2),a=u[0],c=u[1],s=!0,l=!1,f=void 0;try{for(var h,p=Object.entries(c)[Symbol.iterator]();!(s=(h=p.next()).done);s=!0){var d=Lt(h.value,2),v=d[0];zt(d[1],a,v)}}catch(t){l=!0,f=t}finally{try{s||null==p.return||p.return()}finally{if(l)throw f}}}}catch(t){n=!0,r=t}finally{try{e||null==i.return||i.return()}finally{if(n)throw r}}}(r=Object.keys(n).reduce((function(t,e){var r,o;return(null===(r=n[e])||void 0===r?void 0:r.extensionSlots)&&(t[e]=null===(o=n[e])||void 0===o?void 0:o.extensionSlots),t}),{})),Object.keys(r).reduce((function(t,e){return Rt({},t,r[e])}),{})),i=Object.fromEntries(Object.entries(o).map((function(t){var e=Lt(t,2);return[e[0],{loaded:!0,config:e[1]}]}))),u=(0,so.getGlobalStore)("config-extension-slots",{slots:{}}),a=u.getState(),c={slots:Rt({},a.slots,i)};Di(a,c)||u.setState(c)},Ft=function(t,e){var n=function(t,e){var n=cu(Mi(t.schemas)),r=Mt(t.providedConfigs.map((function(t){return[t.config,t.source]}))).concat([[e.config,"temporary config"]]),o=!0,i=!1,u=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=Lt(a.value,2);n=Wt([n,su(s[0],s[1])])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return n}(t,e);au.setState({config:n})},Kt=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=e.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value,l=$t(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,t,n);r[s.slotName]=Rt({},r[s.slotName],Dt({},s.extensionId,{config:l,loaded:!0}))}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}(0,so.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})},$t=function(t,e,n,r,o,i){var u,a,c,s,l=Lt(r.split("#"),1)[0],f=o.schemas[l],h=f?l:e,p=Ht(o,i),d=qt(t,p),v=null!==(s=null==d||null===(u=d.extensionSlots)||void 0===u||null===(a=u[n])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=Wt([qt(h,p),v]),g=null!=f?f:o.schemas[e];Gt(g,y,h);var m=hu(g,y,o.devDefaultsAreOn);return fu(g,m,h),delete m.extensionSlots,m},zt=function(t,e,n){var r="Extension slot config '".concat(e,".extensionSlots.").concat(n),o=Object.keys(t).filter((function(t){return!["add","remove","order","configure"].includes(t)}));o.length&&console.error(r+"' contains invalid keys '".concat(o.join("', '"),"'")),t.add&&(Array.isArray(t.add)&&t.add.every((function(t){return"string"==typeof t}))||console.error(r+".add' is invalid. Must be an array of strings (extension IDs)")),t.remove&&(Array.isArray(t.remove)&&t.remove.every((function(t){return"string"==typeof t}))||console.error(r+".remove' is invalid. Must be an array of strings (extension IDs)")),t.order&&(Array.isArray(t.order)&&t.order.every((function(t){return"string"==typeof t}))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),t.configure&&(Qt(t.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},Ht=function(t,e){return Mt(t.providedConfigs.map((function(t){return t.config}))).concat([e.config])},Vt=function(t,e,n){if(!e.schemas.hasOwnProperty(t))throw Error("No config schema has been defined for "+t);var r=e.schemas[t],o=qt(t,Ht(e,n));Gt(r,o,t);var i=hu(r,o,e.devDefaultsAreOn);return fu(r,i,t),delete i.extensionSlots,i},qt=function(t,e){var n=e.map((function(e){return e[t]})).filter((function(t){return!!t}));return Wt(n)},Wt=function(t){return Hi(Zi)({},t)},Gt=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t.hasOwnProperty(c)?lu(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},Zt=function(t,e,n){e&&Yt(t,[{Array:Yi,Boolean:Ji,ConceptUuid:eu,Number:Qi,Object:tu,String:Xi,UUID:eu,PersonAttributeTypeUuid:eu,PatientIdentifierTypeUuid:eu}[e]],n)},Yt=function(t,e,n){if(e)try{var r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=(0,u.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(t,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(t,": ").concat(c)))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(e){console.error('Skipping invalid validator at "'.concat(t,'". Encountered error\n\t').concat(e))}},Jt=function(t){return!!t&&Object.keys(t).filter((function(t){return!["_default","_validators"].includes(t)})).length>0},Qt=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},Xt=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},te=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},ee=function(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}},ne=function(t){var e=this.__data__=new mu(t);this.size=e.size},re=function(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Bu;++e<n;)this.add(t[e])},oe=function(t,e){return null!=e&&"undefined"!=typeof Symbol&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):c(t,e)},ie=function(t){var e=[],n=!0,r=!1,o=void 0;try{for(var i,u=Object.values(t.extensions)[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var a=i.value,c=!0,s=!1,l=void 0;try{for(var f,h=a.instances[Symbol.iterator]();!(c=(f=h.next()).done);c=!0){var p=f.value;e.push({slotModuleName:p.slotModuleName,extensionModuleName:a.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(t){s=!0,l=t}finally{try{c||null==h.return||h.return()}finally{if(s)throw l}}}}catch(t){r=!0,o=t}finally{try{n||null==u.return||u.return()}finally{if(r)throw o}}Wa(io.configExtensionStore.getState().mountedExtensions,e)||io.configExtensionStore.setState({mountedExtensions:e})},ue=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},ae=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ce=function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){ae(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t},se=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(t,e)||fe(t,e)||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.")}()},le=function(t){return function(t){if(Array.isArray(t))return ue(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fe(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},fe=function(t,e){if(t){if("string"==typeof t)return ue(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(t,e):void 0}},he=function(t,e,n){var r={},o=!0,i=!1,u=void 0;try{for(var a,c=Object.entries(t.slots)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=se(a.value,2),l=s[0],f=s[1],h=ve(l,t,(0,io.getExtensionSlotConfigFromStore)(e,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:h}}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}Wa(Ja.getState().slots,r)||Ja.setState({slots:r})},pe=function(t){return se(t.split("#"),1)[0]},de=function(t,e,n,r){var o=e.indexOf(t);if(-1!==o)return o;if(void 0!==n)return 1e3+n;var i=r.indexOf(t);return-1!==i?2e3+i:-1},ve=function(t,e,n,r){var o,i,u,a,c,s,l=(o=n,i=e.slots[t].attachedIds,u=o.add||[],a=o.remove||[],c=o.order||[],s=Ya.getState().extensions,le(i).concat(le(u)).filter((function(t){return!a.includes(t)})).sort((function(t,e){var n,r,o=de(t,c,null===(n=s[pe(t)])||void 0===n?void 0:n.order,i),u=de(e,c,null===(r=s[pe(e)])||void 0===r?void 0:r.order,i);return-1===u?-1:-1===o?1:o-u}))),f=[],h=void 0,p=!0,d=!1,v=void 0;try{for(var y,g=l[Symbol.iterator]();!(p=(y=g.next()).done);p=!0){var m=y.value,b=(0,io.getExtensionConfigFromStore)(r,t,m).config,w=pe(m),_=e.extensions[w];if(_){var S,x,O=null!==(x=null==b||null===(S=b["Display conditions"])||void 0===S?void 0:S.privileges)&&void 0!==x?x:_.privileges;if(O&&("string"==typeof O||Array.isArray(O)&&O.length>0)){var E;if(void 0===h&&(h=null===(E=(0,pu.getSessionStore)().getState().session)||void 0===E?void 0:E.user),!h)continue;if(!(0,pu.userHasAccess)(O,h))continue}f.push({id:m,name:w,moduleName:_.moduleName,config:b,meta:_.meta,online:_.online,offline:_.offline})}}}catch(t){d=!0,v=t}finally{try{p||null==g.return||g.return()}finally{if(d)throw v}}return f},ye=function(t,e){return"object"!=typeof e||ec(e).forEach((function(n){t[n]=e[n]})),t},ge=function(t,e){return oc.call(t,e)},me=function(t,e){"function"==typeof e&&(e=e(rc(t))),("undefined"==typeof Reflect?ec:Reflect.ownKeys)(e).forEach((function(n){be(t,n,e[n])}))},be=function(t,e,n,r){ic(t,e,ye(n&&ge(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},we=function(t){return{from:function(e){return t.prototype=Object.create(e.prototype),be(t.prototype,"constructor",t),{extend:me.bind(null,t.prototype)}}}},_e=function(t,e,n){return cc.call(t,e,n)},Se=function(t,e){return e(t)},xe=function(t){if(!t)throw new Error("Assertion Failed")},Oe=function(t){tc.setImmediate?setImmediate(t):setTimeout(t,0)},Ee=function(t,e){return t.reduce((function(t,n,r){var o=e(n,r);return o&&(t[o[0]]=o[1]),t}),{})},je=function(t){var e={};for(var n in t)ge(t,n)&&(e[n]=t[n]);return e},ke=function(t){return fc.apply([],t)},Ae=function(t){dc="undefined"!=typeof WeakMap&&new WeakMap;var e=vc(t);return dc=null,e},Ce=function(t){return yc.call(t).slice(8,-1)},Pe=function(t){var e,n,r,o;if(1===arguments.length){if(nc(t))return t.slice();if(this===bc&&"string"==typeof t)return[t];if(o=mc(t)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==t)return[t];if("number"==typeof(e=t.length)){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n},Te=function(t,e){_c=t,Sc=e},Ie=function(t,e){var n=t.stack;return n?(e=e||0,0===n.indexOf(t.name)&&(e+=(t.name+t.message).split("\n").length),n.split("\n").slice(e).filter(Sc).map((function(t){return"\n"+t})).join("")):""},De=function(t,e){this._e=Oc(),this.name=t,this.message=e},Re=function(t,e){return t+". Errors: "+Object.keys(e).map((function(t){return e[t].toString()})).filter((function(t,e,n){return n.indexOf(t)===e})).join("\n")},Le=function(t,e,n,r){this._e=Oc(),this.failures=e,this.failedKeys=r,this.successCount=n,this.message=Re(t,e)},Me=function(t,e){this._e=Oc(),this.name="BulkError",this.failures=Object.keys(e).map((function(t){return e[t]})),this.failuresByPos=e,this.message=Re(t,e)},Ne=function(){},Be=function(t){return t},Ue=function(t,e){return null==t||t===Be?e:function(n){return e(t(n))}},Fe=function(t,e){return function(){t.apply(this,arguments),e.apply(this,arguments)}},Ke=function(t,e){return t===Ne?e:function(){var n=t.apply(this,arguments);void 0!==n&&(arguments[0]=n);var r=this.onsuccess,o=this.onerror;this.onsuccess=null,this.onerror=null;var i=e.apply(this,arguments);return r&&(this.onsuccess=this.onsuccess?Fe(r,this.onsuccess):r),o&&(this.onerror=this.onerror?Fe(o,this.onerror):o),void 0!==i?i:n}},$e=function(t,e){return t===Ne?e:function(){t.apply(this,arguments);var n=this.onsuccess,r=this.onerror;this.onsuccess=this.onerror=null,e.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Fe(n,this.onsuccess):n),r&&(this.onerror=this.onerror?Fe(r,this.onerror):r)}},ze=function(t,e){return t===Ne?e:function(n){var r=t.apply(this,arguments);ye(n,r);var o=this.onsuccess,i=this.onerror;this.onsuccess=null,this.onerror=null;var u=e.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?Fe(o,this.onsuccess):o),i&&(this.onerror=this.onerror?Fe(i,this.onerror):i),void 0===r?void 0===u?void 0:u:ye(r,u)}},He=function(t,e){return t===Ne?e:function(){return!1!==e.apply(this,arguments)&&t.apply(this,arguments)}},Ve=function(t,e){return t===Ne?e:function(){var n=t.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 e.apply(r,i)}))}return e.apply(this,arguments)}},qe=function(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Ne,this._lib=!1;var e=this._PSD=Jc;if(_c&&(this._stackHolder=Oc(),this._prev=null,this._numPrev=0),"function"!=typeof t){if(t!==Dc)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Ge(this,this._value))}this._state=null,this._value=null,++e.ref,ns(this,t)},We=function(t,e,n,r,o){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.resolve=n,this.reject=r,this.psd=o},Ge=function(t,e){if(Wc.push(e),null===t._state){var n=t._lib&&tn();e=Zc(e),t._state=!1,t._value=e,_c&&null!==e&&"object"==typeof e&&!e._promise&&function(n,r,o){try{(function(){var n=ac(e,"stack");e._promise=t,be(e,"stack",{get:function(){return Kc?n&&(n.get?n.get.apply(e):n.value):t.stack}})}).apply(null,void 0)}catch(t){}}(),r=t,qc.some((function(t){return t._value===r._value}))||qc.push(r),Ze(t),n&&en()}var r},Ze=function(t){var e=t._listeners;t._listeners=[];for(var n=0,r=e.length;n<r;++n)Ye(t,e[n]);var o=t._PSD;--o.ref||o.finalize(),0===Xc&&(++Xc,zc((function(){0==--Xc&&nn()}),[]))},Ye=function(t,e){if(null!==t._state){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return(t._state?e.resolve:e.reject)(t._value);++e.psd.ref,++Xc,zc(Je,[n,t,e])}else t._listeners.push(e)},Je=function(t,e,n){try{Gc=e;var r,o=e._value;e._state?r=t(o):(Wc.length&&(Wc=[]),r=t(o),-1===Wc.indexOf(o)&&function(t){for(var e=qc.length;e;)if(qc[--e]._value===t._value)return void qc.splice(e,1)}(e)),n.resolve(r)}catch(t){n.reject(t)}finally{Gc=null,0==--Xc&&nn(),--n.psd.ref||n.psd.finalize()}},Qe=function(t,e){var n=e?e._numPrev+1:0;n<100&&(t._prev=e,t._numPrev=n)},Xe=function(){tn()&&en()},tn=function(){var t=Hc;return Hc=!1,Vc=!1,t},en=function(){var t,e,n;do{for(;Qc.length>0;)for(t=Qc,Qc=[],n=t.length,e=0;e<n;++e){var r=t[e];r[0].apply(null,r[1])}}while(Qc.length>0);Hc=!0,Vc=!0},nn=function(){var t=qc;qc=[],t.forEach((function(t){t._PSD.onunhandled.call(null,t._value,t)}));for(var e=ts.slice(0),n=e.length;n;)e[--n]()},rn=function(t){return new qe(Dc,!1,t)},on=function(t,e){var n=Jc;return function(){var r=tn(),o=Jc;try{return hn(n,!0),t.apply(this,arguments)}catch(t){e&&e(t)}finally{hn(o,!1),r&&en()}}},un=function(t,e,n,r){var o=Jc,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++ss;var u=Yc.env;i.env=Fc?{Promise:qe,PromiseProp:{value:qe,configurable:!0,writable:!0},all:qe.all,race:qe.race,allSettled:qe.allSettled,any:qe.any,resolve:qe.resolve,reject:qe.reject,nthen:gn(u.nthen,i),gthen:gn(u.gthen,i)}:{},e&&ye(i,e),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var a=dn(i,t,n,r);return 0===i.ref&&i.finalize(),a},an=function(){return os.id||(os.id=++is),++os.awaits,os.echoes+=100,os.id},cn=function(){return!!os.awaits&&(0==--os.awaits&&(os.id=0),os.echoes=100*os.awaits,!0)},sn=function(t){return os.echoes&&t&&t.constructor===Uc?(an(),t.then((function(t){return cn(),t}),(function(t){return cn(),ls(t)}))):t},ln=function(t){++cs,os.echoes&&0!=--os.echoes||(os.echoes=os.id=0),us.push(Jc),hn(t,!0)},fn=function(){var t=us[us.length-1];us.pop(),hn(t,!1)},hn=function(t,e){var n=Jc;if((e?!os.echoes||as++&&t===Jc:!as||--as&&t===Jc)||vn(e?ln.bind(null,t):fn),t!==Jc&&(Jc=t,n===Yc&&(Yc.env=pn()),Fc)){var r=Yc.env.Promise,o=t.env;Mc.then=o.nthen,r.prototype.then=o.gthen,(n.global||t.global)&&(Object.defineProperty(tc,"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))}},pn=function(){var t=tc.Promise;return Fc?{Promise:t,PromiseProp:Object.getOwnPropertyDescriptor(tc,"Promise"),all:t.all,race:t.race,allSettled:t.allSettled,any:t.any,resolve:t.resolve,reject:t.reject,nthen:Mc.then,gthen:t.prototype.then}:{}},dn=function(t,e,n,r,o){var i=Jc;try{return hn(t,!0),e(n,r,o)}finally{hn(i,!1)}},vn=function(t){Bc.call(Lc,t)},yn=function(t,e,n,r){return"function"!=typeof t?t:function(){var o=Jc;n&&an(),hn(e,!0);try{return t.apply(this,arguments)}finally{hn(o,!1),r&&vn(cn)}}},gn=function(t,e){return function(n,r){return t.call(this,yn(n,e),yn(r,e))}},mn=function(t,e){var n;try{n=e.onuncatched(t)}catch(t){}if(!1!==n)try{var r,o={promise:e,reason:t};if(tc.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),ye(r,o)):tc.CustomEvent&&ye(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&tc.dispatchEvent&&(dispatchEvent(r),!tc.PromiseRejectionEvent&&tc.onunhandledrejection))try{tc.onunhandledrejection(r)}catch(t){}_c&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(t.stack||t))}catch(t){}},bn=function(t,e){return t?e?function(){return t.apply(this,arguments)&&e.apply(this,arguments)}:t:e},wn=function(t){return"string"!=typeof t||/\./.test(t)?function(t){return t}:function(e){return void 0===e[t]&&t in e&&delete(e=Ae(e))[t],e}},_n=function(t){var e={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return e[n].subscribe.apply(null,i),t}if("string"==typeof n)return e[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(t,r,o){if("object"==typeof t)return u(t);r||(r=He),o||(o=Ne);var i={subscribers:[],fire:o,subscribe:function(t){-1===i.subscribers.indexOf(t)&&(i.subscribers.push(t),i.fire=r(i.fire,t))},unsubscribe:function(t){i.subscribers=i.subscribers.filter((function(e){return e!==t})),i.fire=i.subscribers.reduce(r,o)}};return e[t]=n[t]=i,i}function u(t){ec(t).forEach((function(e){var n=t[e];if(nc(n))i(e,t[e][0],t[e][1]);else{if("asap"!==n)throw new Pc.InvalidArgument("Invalid event config");var r=i(e,Be,(function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];r.subscribers.forEach((function(t){Oe((function(){t.apply(null,e)}))}))}))}}))}},Sn=function(t,e){return we(e).from({prototype:t}),e},xn=function(t,e){return!(t.filter||t.algorithm||t.or)&&(e?t.justLimit:!t.replayFilter)},On=function(t,e){t.filter=bn(t.filter,e)},En=function(t,e,n){var r=t.replayFilter;t.replayFilter=r?function(){return bn(r(),e())}:e,t.justLimit=n&&!r},jn=function(t,e){if(t.isPrimKey)return e.primaryKey;var n=e.getIndexByKeyPath(t.index);if(!n)throw new Pc.Schema("KeyPath "+t.index+" on object store "+e.name+" is not indexed");return n},kn=function(t,e,n){var r=jn(t,e.schema);return e.openCursor({trans:n,values:!t.keysOnly,reverse:"prev"===t.dir,unique:!!t.unique,query:{index:r,range:t.range}})},An=function(t,e,n,r){var o=t.replayFilter?bn(t.filter,t.replayFilter()):t.filter;if(t.or){var i={},u=function(t,n,r){if(!o||o(n,r,(function(t){return n.stop(t)}),(function(t){return n.fail(t)}))){var u=n.primaryKey,a=""+u;"[object ArrayBuffer]"===a&&(a=""+new Uint8Array(u)),ge(i,a)||(i[a]=!0,e(t,n,r))}};return Promise.all([t.or._iterate(u,n),Cn(kn(t,r,n),t.algorithm,u,!t.keysOnly&&t.valueMapper)])}return Cn(kn(t,r,n),bn(t.algorithm,o),e,!t.keysOnly&&t.valueMapper)},Cn=function(t,e,n,r){var o=on(r?function(t,e,o){return n(r(t),e,o)}:n);return t.then((function(t){if(t)return t.start((function(){var n=function(){return t.continue()};e&&!e(t,(function(t){return n=t}),(function(e){t.stop(e),n=Ne}),(function(e){t.fail(e),n=Ne}))||o(t.value,t,(function(t){return n=t})),n()}))}))},Pn=function(t){var e=void 0===t?"undefined":h(t);if("object"!==e)return e;if(ArrayBuffer.isView(t))return"binary";var n=Ce(t);return"ArrayBuffer"===n?"binary":n},Tn=function(t){return c(t,Uint8Array)?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},In=function(t,e){return t<e?-1:t===e?0:1},Dn=function(t,e){return t>e?-1:t===e?0:1},Rn=function(t,e,n){var r=c(t,Os)?new t.Collection(t):t;return r._ctx.error=n?new n(e):new TypeError(e),r},Ln=function(t){return new t.Collection(t,(function(){return Un("")})).limit(0)},Mn=function(t,e,n,r,o,i){for(var u=Math.min(t.length,r.length),a=-1,c=0;c<u;++c){var s=e[c];if(s!==r[c])return o(t[c],n[c])<0?t.substr(0,c)+n[c]+n.substr(c+1):o(t[c],r[c])<0?t.substr(0,c)+r[c]+n.substr(c+1):a>=0?t.substr(0,a)+e[a]+n.substr(a+1):null;o(t[c],s)<0&&(a=c)}return u<r.length&&"next"===i?t+n.substr(t.length):u<t.length&&"prev"===i?t.substr(0,n.length):a<0?null:t.substr(0,a)+r[a]+n.substr(a+1)},Nn=function(t,e,n,r){var o,i,u,a,c,s,l,f=n.length;if(!n.every((function(t){return"string"==typeof t})))return Rn(t,"String expected.");function h(t){o="next"===t?function(t){return t.toUpperCase()}:function(t){return t.toLowerCase()},i="next"===t?function(t){return t.toLowerCase()}:function(t){return t.toUpperCase()},u="next"===t?In:Dn;var e=n.map((function(t){return{lower:i(t),upper:o(t)}})).sort((function(t,e){return u(t.lower,e.lower)}));a=e.map((function(t){return t.upper})),c=e.map((function(t){return t.lower})),s=t,l="next"===t?"":r}h("next");var p=new t.Collection(t,(function(){return Bn(a[0],c[f-1]+r)}));p._ondirectionchange=function(t){h(t)};var d=0;return p._addAlgorithm((function(t,n,r){var o=t.key;if("string"!=typeof o)return!1;var h=i(o);if(e(h,c,d))return!0;for(var p=null,v=d;v<f;++v){var y=Mn(o,h,a[v],c[v],u,s);null===y&&null===p?d=v+1:(null===p||u(p,y)>0)&&(p=y)}return n(null!==p?function(){t.continue(p+l)}:r),!1})),p},Bn=function(t,e,n,r){return{type:2,lower:t,upper:e,lowerOpen:n,upperOpen:r}},Un=function(t){return{type:1,lower:t,upper:t}},Fn=function(t){return on((function(e){return Kn(e),t(e.target.error),!1}))},Kn=function(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()},$n=function(t,e,n,r,o,i,u){return{name:t,keyPath:e,unique:n,multi:r,auto:o,compound:i,src:(n&&!u?"&":"")+(r?"*":"")+(o?"++":"")+zn(e)}},zn=function(t){return"string"==typeof t?t:t?"["+[].join.call(t,"+")+"]":""},Hn=function(t,e,n){return{name:t,primKey:e,indexes:n,mappedClass:null,idxByName:Ee(n,(function(t){return[t.name,t]}))}},Vn=function(t){return null==t?function(){}:"string"==typeof t?1===(e=t).split(".").length?function(t){return t[e]}:function(t){return sc(t,e)}:function(e){return sc(e,t)};var e},qn=function(t){return[].slice.call(t)},Wn=function(t){return null==t?":id":"string"==typeof t?t:"[".concat(t.join("+"),"]")},Gn=function(t,e){var n,r,o,i,u,a,f=t._novip,h=e.db,p=(n=f._middlewares,r=h,i=e,a=(o=f._deps).IDBKeyRange,o.indexedDB,u=function(t,e,n){function r(t){if(3===t.type)return null;if(4===t.type)throw new Error("Cannot convert never type to IDBKeyRange");var n=t.lower,r=t.upper,o=t.lowerOpen,i=t.upperOpen;return void 0===n?void 0===r?null:e.upperBound(r,!!i):void 0===r?e.lowerBound(n,!!o):e.bound(n,r,!!o,!!i)}var o,i,u,a=(i=n,u=qn((o=t).objectStoreNames),{schema:{name:o.name,tables:u.map((function(t){return i.objectStore(t)})).map((function(t){var e=t.keyPath,n=t.autoIncrement,r=nc(e),o=null==e,i={},u={name:t.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:o,compound:r,keyPath:e,autoIncrement:n,unique:!0,extractKey:Vn(e)},indexes:qn(t.indexNames).map((function(e){return t.index(e)})).map((function(t){var e=t.name,n=t.unique,r=t.multiEntry,o=t.keyPath,u={name:e,compound:nc(o),keyPath:o,unique:n,multiEntry:r,extractKey:Vn(o)};return i[Wn(o)]=u,u})),getIndexByKeyPath:function(t){return i[Wn(t)]}};return i[":id"]=u.primaryKey,null!=e&&(i[Wn(e)]=u.primaryKey),u}))},hasGetAll:u.length>0&&"getAll"in i.objectStore(u[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=a.schema,s=a.hasGetAll,f=c.tables.map((function(t){return{name:o=(e=t).name,schema:e,mutate:function(t){var e=t.trans,n=t.type,i=t.keys,u=t.values,a=t.range;return new Promise((function(t,c){t=on(t);var s=e.objectStore(o),f=null==s.keyPath,h="put"===n||"add"===n;if(!h&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var p,d=(i||u||{length:1}).length;if(i&&u&&i.length!==u.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return t({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],g=0,m=function(t){++g,Kn(t)};if("deleteRange"===n){if(4===a.type)return t({numFailures:g,failures:y,results:[],lastResult:void 0});3===a.type?v.push(p=s.clear()):v.push(p=s.delete(r(a)))}else{var b=l(h?f?[u,i]:[u,null]:[i,null],2),w=b[0],_=b[1];if(h)for(var S=0;S<d;++S)v.push(p=_&&void 0!==_[S]?s[n](w[S],_[S]):s[n](w[S])),p.onerror=m;else for(var x=0;x<d;++x)v.push(p=s[n](w[x])),p.onerror=m}var O=function(e){var r=e.target.result;v.forEach((function(t,e){return null!=t.error&&(y[e]=t.error)})),t({numFailures:g,failures:y,results:"delete"===n?i:v.map((function(t){return t.result})),lastResult:r})};p.onerror=function(t){m(t),O(t)},p.onsuccess=O}))},getMany:function(t){var e=t.trans,n=t.keys;return new Promise((function(t,r){t=on(t);for(var i,u=e.objectStore(o),a=n.length,c=new Array(a),s=0,l=0,f=function(e){var n=e.target;c[n._pos]=n.result,++l===s&&t(c)},h=Fn(r),p=0;p<a;++p)null!=n[p]&&((i=u.get(n[p]))._pos=p,i.onsuccess=f,i.onerror=h,++s);0===s&&t(c)}))},get:function(t){var e=t.trans,n=t.key;return new Promise((function(t,r){t=on(t);var i=e.objectStore(o).get(n);i.onsuccess=function(e){return t(e.target.result)},i.onerror=Fn(r)}))},query:(n=s,function(t){return new Promise((function(e,i){e=on(e);var u=t.trans,a=t.values,c=t.limit,s=t.query,l=c===1/0?void 0:c,f=s.index,h=s.range,p=u.objectStore(o),d=f.isPrimaryKey?p:p.index(f.name),v=r(h);if(0===c)return e({result:[]});if(n){var y=a?d.getAll(v,l):d.getAllKeys(v,l);y.onsuccess=function(t){return e({result:t.target.result})},y.onerror=Fn(i)}else{var g=0,m=a||!("openKeyCursor"in d)?d.openCursor(v):d.openKeyCursor(v),b=[];m.onsuccess=function(t){var n=m.result;return n?(b.push(a?n.value:n.primaryKey),++g===c?e({result:b}):void n.continue()):e({result:b})},m.onerror=Fn(i)}}))}),openCursor:function(t){var e=t.trans,n=t.values,i=t.query,u=t.reverse,a=t.unique;return new Promise((function(t,c){t=on(t);var s=i.index,l=i.range,f=e.objectStore(o),h=s.isPrimaryKey?f:f.index(s.name),p=u?a?"prevunique":"prev":a?"nextunique":"next",d=n||!("openKeyCursor"in h)?h.openCursor(r(l),p):h.openKeyCursor(r(l),p);d.onerror=Fn(c),d.onsuccess=on((function(n){var r=d.result;if(r){r.___id=++As,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var u=r.advance.bind(r),a=function(){throw new Error("Cursor not stopped")};r.trans=e,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=on(c),r.next=function(){var t=this,e=1;return this.start((function(){return e--?t.continue():t.stop()})).then((function(){return t}))},r.start=function(t){var e=new Promise((function(t,e){t=on(t),d.onerror=Fn(e),r.fail=e,r.stop=function(e){r.stop=r.continue=r.continuePrimaryKey=r.advance=a,t(e)}})),n=function(){if(d.result)try{t()}catch(t){r.fail(t)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return d.onsuccess=on((function(t){d.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=u,n(),e},t(r)}else t(null)}),c)}))},count:function(t){var e=t.query,n=t.trans,i=e.index,u=e.range;return new Promise((function(t,e){var a=n.objectStore(o),c=i.isPrimaryKey?a:a.index(i.name),s=r(u),l=s?c.count(s):c.count();l.onsuccess=on((function(e){return t(e.target.result)})),l.onerror=Fn(e)}))}};var e,n,o})),h={};return f.forEach((function(t){return h[t.name]=t})),{stack:"dbcore",transaction:t.transaction.bind(t),table:function(t){if(!h[t])throw new Error("Table '".concat(t,"' not found"));return h[t]},MIN_KEY:-1/0,MAX_KEY:ks(e),schema:c}}(r,a,i),{dbcore:n.dbcore.reduce((function(t,e){return s({},t,(0,e.create)(t))}),u)});f.core=p.dbcore,f.tables.forEach((function(t){var e=t.name;f.core.schema.tables.some((function(t){return t.name===e}))&&(t.core=f.core.table(e),c(f[e],f.Table)&&(f[e].core=t.core))}))},Zn=function(t,e,n,r){var o=t._novip;n.forEach((function(t){var n=r[t];e.forEach((function(e){var r=ac(e,t);(!r||"value"in r&&void 0===r.value)&&(e===o.Transaction.prototype||c(e,o.Transaction)?be(e,t,{get:function(){return this.table(t)},set:function(e){ic(this,t,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):e[t]=new o.Table(t,n))}))}))},Yn=function(t,e){var n=t._novip;e.forEach((function(t){for(var e in t)c(t[e],n.Table)&&delete t[e]}))},Jn=function(t,e){return t._cfg.version-e._cfg.version},Qn=function(t,e){var n,r={del:[],add:[],change:[]};for(n in t)e[n]||r.del.push(n);for(n in e){var o=t[n],i=e[n];if(o){var u={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!vs)u.recreate=!0,r.change.push(u);else{var a=o.idxByName,c=i.idxByName,s=void 0;for(s in a)c[s]||u.del.push(s);for(s in c){var l=a[s],f=c[s];l?l.src!==f.src&&u.change.push(f):u.add.push(f)}(u.del.length>0||u.add.length>0||u.change.length>0)&&r.change.push(u)}}else r.add.push([n,i])}return r},Xn=function(t,e,n,r){var o=t.db.createObjectStore(e,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(t){return tr(o,t)})),o},tr=function(t,e){t.createIndex(e.name,e.keyPath,{unique:e.unique,multiEntry:e.multi})},er=function(t,e,n){var r={};return _e(e.objectStoreNames,0).forEach((function(t){for(var e=n.objectStore(t),o=e.keyPath,i=$n(zn(o),o||"",!1,!1,!!e.autoIncrement,o&&"string"!=typeof o,!0),u=[],a=0;a<e.indexNames.length;++a){var c=e.index(e.indexNames[a]);o=c.keyPath;var s=$n(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);u.push(s)}r[t]=Hn(t,i,u)})),r},nr=function(t,e,n){for(var r=t._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var u=o[i],a=n.objectStore(u);r._hasGetAll="getAll"in a;for(var s=0;s<a.indexNames.length;++s){var l=a.indexNames[s],f=a.index(l).keyPath,h="string"==typeof f?f:"["+_e(f).join("+")+"]";if(e[u]){var p=e[u].idxByName[h];p&&(p.name=l,delete e[u].idxByName[h],e[u].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&tc.WorkerGlobalScope&&c(tc,tc.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},rr=function(t,e){var n=t._dbNamesDB;return n||(n=t._dbNamesDB=new Us("__dbnames",{addons:[],indexedDB:t,IDBKeyRange:e})).version(1).stores({dbnames:"name"}),n.table("dbnames")},or=function(t){return t&&"function"==typeof t.databases},ir=function(t){return un((function(){return Jc.letThrough=!0,t()}))},ur=function(){var t;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(e){var n=function(){return indexedDB.databases().finally(e)};t=setInterval(n,100),n()})).finally((function(){return clearInterval(t)})):Promise.resolve()},ar=function(t){var e=function(e){return t.next(e)},n=o(e),r=o((function(e){return t.throw(e)}));function o(t){return function(e){var o=t(e),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):nc(i)?Promise.all(i).then(n,r):n(i)}}return o(e)()},cr=function(t,e,n){var r=arguments.length;if(r<2)throw new Pc.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=ke(o);return[t,i,n]},sr=function(t,e,n){for(var r=nc(t)?t.slice():[t],o=0;o<n;++o)r.push(e);return r},lr=function(t,e,n){try{if(!e)return null;if(e.keys.length<t.length)return null;for(var r=[],o=0,i=0;o<e.keys.length&&i<t.length;++o)0===_s(e.keys[o],t[i])&&(r.push(n?Ae(e.values[o]):e.values[o]),++i);return r.length===t.length?r:null}catch(t){return null}},fr=function(t){return!("from"in t)},hr=function(t,e){fr(e)||function t(e,n){var r=n.from,o=n.to,i=n.l,u=n.r;Ms(e,r,o),i&&t(e,i),u&&t(e,u)}(t,e)},pr=function(t){var e=fr(t)?null:{s:0,n:t};return{next:function(t){for(var n=arguments.length>0;e;)switch(e.s){case 0:if(e.s=1,n)for(;e.n.l&&_s(t,e.n.from)<0;)e={up:e,n:e.n.l,s:1};else for(;e.n.l;)e={up:e,n:e.n.l,s:1};case 1:if(e.s=2,!n||_s(t,e.n.to)<=0)return{value:e.n,done:!1};case 2:if(e.n.r){e.s=3,e={up:e,n:e.n.r,s:0};continue}case 3:e=e.up}return{done:!0}}}},dr=function(t){var e,n,r=((null===(e=t.r)||void 0===e?void 0:e.d)||0)-((null===(n=t.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){var i="r"===o?"l":"r",u=s({},t),a=t[o];t.from=a.from,t.to=a.to,t[o]=a[o],u[o]=a[i],t[i]=u,u.d=vr(u)}t.d=vr(t)},vr=function(t){var e=t.r,n=t.l;return(e?n?Math.max(e.d,n.d):e.d:n?n.d:0)+1},yr=function(t,e){return ec(e).forEach((function(n){hr(t[n]||(t[n]=new Ls),e[n])})),t},gr=function(t){var e=zs;try{zs=!0,Es.storagemutated.fire(t)}finally{zs=e}},mr=function(t,e){return!e||"object"!==Gs(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e},br=function(t,e){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(t){n(t.data)},t.postMessage(e,[r.port2])}))},wr=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},_r=function(t,e){var n=location.href;return new URL(t,n).href===new URL(e,n).href},Sr=function(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)},xr=function(){},Or=function(t,e){if(!e)return t&&t.then?t.then(xr):Promise.resolve()},Er=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},jr=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},kr=function(t){return function(e){var n,r=function(t){if(Array.isArray(t))return t}(n=(0,uo.useState)(t.getState()))||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],u=!0,a=!1;try{for(n=n.call(t);!(u=(r=n.next()).done)&&(i.push(r.value),2!==i.length);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==n.return||n.return()}finally{if(a)throw o}}return i}}(n)||function(t,e){if(t){if("string"==typeof t)return Er(t,2);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Er(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.")}(),o=r[0],i=r[1];(0,uo.useEffect)((function(){return t.subscribe((function(t){return i(t)}))}),[]);var u={};return e&&(u=(0,uo.useMemo)((function(){return function(t,e){"function"==typeof e&&(e=e(t));var n={};for(var r in e)n[r]=t.action(e[r]);return n}(t,e)}),[t,e])),function(t){for(var e=arguments,n=function(n){var r=null!=e[n]?e[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),o.forEach((function(e){jr(t,e,r[e])}))},r=1;r<arguments.length;r++)n(r);return t}({},o,u)}},Ar=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{s(r.next(t))}catch(t){i(t)}}function a(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,c(e,n)?e:new n((function(t){t(e)}))).then(u,a)}s((r=r.apply(t,e||[])).next())}))},Cr=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)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 u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!((o=(o=u.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Pr=x(885),Tr=x(93),Ir=x(575),Dr=x(839),Rr=document.createElement("div"),Lr=function(){document.body.appendChild(Rr)};Rr.id="omrs-svgs-container",Rr.style.display="none","complete"===document.readyState?Lr():window.addEventListener("load",Lr);var Mr=x(141),Nr=x(739),Br=x(787),Ur=x(865),Fr=x(509),Kr=x(646),$r=x(250),zr=x(76),Hr=x(600),Vr=x(40),qr=x(61),Wr=x(592),Gr=x(862),Zr=x(714),Yr=x(601),Jr=x(142),Qr=x(991),Xr=x(662),to=x(524),eo=x(451),no=x(647),ro=x(879),oo=x(752),io=x(78),uo=x(954),ao=(x(493),x(792));new ao.Subject,new ao.Subject;var co=x(45),so=x(685);(0,so.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,x(740),(0,so.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),x(281),x(980);var lo="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,fo="object"==typeof self&&self&&self.Object===Object&&self,ho=lo||fo||Function("return this")(),po=ho.Symbol,vo=Object.prototype,yo=vo.hasOwnProperty,go=vo.toString,mo=po?po.toStringTag:void 0,bo=Object.prototype.toString,wo=po?po.toStringTag:void 0,_o=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":wo&&wo in Object(t)?function(t){var e=yo.call(t,mo),n=t[mo];try{t[mo]=void 0;var r=!0}catch(t){}var o=go.call(t);return r&&(e?t[mo]=n:delete t[mo]),o}(t):(e=t,bo.call(e));var e},So=function(t,e){return function(n){return t(e(n))}};So(Object.getPrototypeOf,Object);var xo,Oo,Eo,jo,ko,Ao=function(t){return null!=t&&"object"==typeof t},Co=Function.prototype,Po=Object.prototype,To=Co.toString;function Io(t,e,n){return(Io=i()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Ro(o,n.prototype),o}).apply(null,arguments)}function Do(t){return(Do=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Ro(t,e){return(Ro=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Lo(t){var e="function"==typeof Map?new Map:void 0;return Lo=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Io(t,arguments,Do(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ro(r,t)},Lo(t)}Po.hasOwnProperty,To.call(Object),Lo(Error),x(674),(0,so.createGlobalStore)("session",{loaded:!1,session:null}),new ao.BehaviorSubject(null),(ko=xo||(xo={})).NEWVISIT="startVisit",ko.EDITVISIT="editVisit",ko.LOADING="loadingVisit",function(t){t.NOTSTARTED="notStarted",t.ONGOING="ongoing"}(Oo||(Oo={})),x(66),(jo=Eo||(Eo={})).Array="Array",jo.Boolean="Boolean",jo.ConceptUuid="ConceptUuid",jo.Number="Number",jo.Object="Object",jo.String="String",jo.UUID="UUID",jo.PersonAttributeTypeUuid="PersonAttributeTypeUuid",jo.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Mo=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},No=Object.freeze({__proto__:null,get start(){return yt},get ensureJQuerySupport(){return J},get setBootstrapMaxTime(){return B},get setMountMaxTime(){return U},get setUnmountMaxTime(){return F},get setUnloadMaxTime(){return K},get registerApplication(){return at},get unregisterApplication(){return st},get getMountedApps(){return ot},get getAppStatus(){return ut},get unloadApplication(){return lt},get checkActivityFunctions(){return ct},get getAppNames(){return it},get pathToActiveWhen(){return pt},get navigateToUrl(){return V},get triggerAppChange(){return dt},get addErrorHandler(){return v},get removeErrorHandler(){return y},get mountRootParcel(){return R},get NOT_LOADED(){return zo},get LOADING_SOURCE_CODE(){return Ho},get NOT_BOOTSTRAPPED(){return Vo},get BOOTSTRAPPING(){return qo},get NOT_MOUNTED(){return Wo},get MOUNTING(){return Go},get UPDATING(){return Yo},get LOAD_ERROR(){return Qo},get MOUNTED(){return Zo},get UNMOUNTING(){return Jo},get SKIP_BECAUSE_BROKEN(){return Xo}});function Bo(t){return(Bo="function"==typeof Symbol&&"symbol"==Mo(Symbol.iterator)?function(t){return void 0===t?"undefined":Mo(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":void 0===t?"undefined":Mo(t)})(t)}var Uo,Fo=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==x.g?x.g:"undefined"!=typeof self?self:{}).CustomEvent,Ko=function(){try{var t=new Fo("cat",{detail:{foo:"bar"}});return"cat"===t.type&&"bar"===t.detail.foo}catch(t){}return!1}()?Fo:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(t,e){var n=document.createEvent("CustomEvent");return e?n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail):n.initCustomEvent(t,!1,!1,void 0),n}:function(t,e){var n=document.createEventObject();return n.type=t,e?(n.bubbles=Boolean(e.bubbles),n.cancelable=Boolean(e.cancelable),n.detail=e.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},$o=[],zo="NOT_LOADED",Ho="LOADING_SOURCE_CODE",Vo="NOT_BOOTSTRAPPED",qo="BOOTSTRAPPING",Wo="NOT_MOUNTED",Go="MOUNTING",Zo="MOUNTED",Yo="UPDATING",Jo="UNMOUNTING",Qo="LOAD_ERROR",Xo="SKIP_BECAUSE_BROKEN",ti=!1,ei=!1,ni=0,ri={parcels:{}},oi={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}},ii="undefined"!=typeof window,ui={hashchange:[],popstate:[]},ai=["hashchange","popstate"];if(ii){window.addEventListener("hashchange",W),window.addEventListener("popstate",W);var ci=window.addEventListener,si=window.removeEventListener;window.addEventListener=function(t,e){if(!("function"==typeof e&&ai.indexOf(t)>=0)||k(ui[t],(function(t){return t===e})))return ci.apply(this,arguments);ui[t].push(e)},window.removeEventListener=function(t,e){if(!("function"==typeof e&&ai.indexOf(t)>=0))return si.apply(this,arguments);ui[t]=ui[t].filter((function(t){return t!==e}))},window.history.pushState=G(window.history.pushState,"pushState"),window.history.replaceState=G(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(g(41,!1)):window.singleSpaNavigate=V}var li=!1,fi={},hi=[],pi=!1,di=[],vi=ii&&window.location.href;function yi(){var t=function(){v=!0},e=function(){return Promise.resolve().then((function(){var t=h.map(H);return Promise.all(t).then(o).then((function(){return[]})).catch((function(t){throw o(),t}))}))},n=function(){return Promise.resolve().then((function(){if(window.dispatchEvent(new Ko(0===c.length?"single-spa:before-no-app-change":"single-spa:before-app-change",i(!0))),window.dispatchEvent(new Ko("single-spa:before-routing-event",i(!0,{cancelNavigation:t}))),v)return window.dispatchEvent(new Ko("single-spa:before-mount-routing-event",i(!0))),r(),void V(y);var e=l.map(X),n=f.map(I).map((function(t){return t.then(X)})).concat(e),a=Promise.all(n);a.then((function(){window.dispatchEvent(new Ko("single-spa:before-mount-routing-event",i(!0)))}));var s=h.map((function(t){return H(t).then((function(t){return vt(t,a)}))})),p=d.filter((function(t){return h.indexOf(t)<0})).map((function(t){return vt(t,a)}));return a.catch((function(t){throw o(),t})).then((function(){return o(),Promise.all(s.concat(p)).catch((function(t){throw u.forEach((function(e){return e.reject(t)})),t})).then(r)}))}))},r=function(){var t=ot();u.forEach((function(e){return e.resolve(t)}));try{var e=0===c.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new Ko(e,i())),window.dispatchEvent(new Ko("single-spa:routing-event",i()))}catch(t){setTimeout((function(){throw t}))}if(pi=!1,di.length>0){var n=di;di=[],yi(n)}return t},o=function(){u.forEach((function(t){q(t.eventArguments)})),q(a)},i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1?arguments[1]:void 0,r={},o=(p(t={},Zo,[]),p(t,Wo,[]),p(t,zo,[]),p(t,Xo,[]),t);e?(h.concat(d).forEach((function(t,e){u(t,Zo)})),l.forEach((function(t){u(t,zo)})),f.forEach((function(t){u(t,Wo)}))):c.forEach((function(t){u(t)}));var i={detail:{newAppStatuses:r,appsByNewStatus:o,totalAppChanges:c.length,originalEvent:null==a?void 0:a[0],oldUrl:y,newUrl:g,navigationIsCanceled:v}};return n&&j(i.detail,n),i;function u(t,e){var n=S(t);e=e||ut(n),r[n]=e,(o[e]=o[e]||[]).push(n)}},u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],a=arguments.length>1?arguments[1]:void 0;if(pi)return new Promise((function(t,e){di.push({resolve:t,reject:e,eventArguments:a})}));var c,s=rt(),l=s.appsToUnload,f=s.appsToUnmount,h=s.appsToLoad,d=s.appsToMount,v=!1,y=vi,g=vi=window.location.href;return gt()?(pi=!0,c=l.concat(h,f,d),n()):(c=h,e())}var gi=!1;ii&&setTimeout((function(){gi||console.warn(g(1,!1))}),5e3);var mi,bi={getRawAppData:function(){return[].concat(hi)},reroute:yi,NOT_LOADED:zo,toLoadPromise:H,toBootstrapPromise:T,unregisterApplication:st};ii&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=bi),mt((function(t){if(!t||"string"!=typeof t)return!1;for(var e=/\${(.*?)}/g,n=e.exec(t);n;){if(!mi.includes(n[1]))return!1;n=e.exec(t)}return!0}),"Should be a URL or path. The allowed template parameters are "+(mi=[].concat(["openmrsBase","openmrsSpaBase"])).map((function(t){return"${"+t+"}"})).join(", "));var wi="function"==typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e},_i=Object.prototype.toString,Si=function(){return"[object Arguments]"===_i.call(arguments)?function(t){return"[object Arguments]"===_i.call(t)}:function(t){return Ot("callee",t)}}(),xi=Si,Oi=!{toString:null}.propertyIsEnumerable("toString"),Ei=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ji=function(){return arguments.propertyIsEnumerable("length")}(),ki=function(t,e){for(var n=0;n<t.length;){if(t[n]===e)return!0;n+=1}return!1},Ai="function"!=typeof Object.keys||ji?wt((function(t){if(Object(t)!==t)return[];var e,n,r=[],o=ji&&xi(t);for(e in t)!Ot(e,t)||o&&"length"===e||(r[r.length]=e);if(Oi)for(n=Ei.length-1;n>=0;)Ot(e=Ei[n],t)&&!ki(r,e)&&(r[r.length]=e),n-=1;return r})):wt((function(t){return Object(t)!==t?[]:Object.keys(t)})),Ci=wt((function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)})),Pi=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)};function Ti(t,e,n,r){if(wi(t,e))return!0;var o=Ci(t);if(o!==Ci(e))return!1;if(null==t||null==e)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof e["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof e.equals)return"function"==typeof t.equals&&t.equals(e)&&"function"==typeof e.equals&&e.equals(t);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===function(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if((void 0===t?"undefined":Pi(t))!==(void 0===e?"undefined":Pi(e))||!wi(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!wi(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===t)return r[i]===e;i-=1}switch(o){case"Map":return t.size===e.size&&Et(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&Et(t.values(),e.values(),n.concat([t]),r.concat([e]));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 u=Ai(t);if(u.length!==Ai(e).length)return!1;var a=n.concat([t]),c=r.concat([e]);for(i=u.length-1;i>=0;){var s=u[i];if(!Ot(s,e)||!Ti(e[s],t[s],a,c))return!1;i-=1}return!0}var Ii=_t((function(t,e){return Ti(t,e,[],[])})),Di=Ii;function Ri(t,e,n,r){var o,i=function(o){for(var i=e.length,u=0;u<i;){if(t===e[u])return n[u];u+=1}for(var a in e[u+1]=t,n[u+1]=o,t)o[a]=r?Ri(t[a],e,n,!0):t[a];return o};switch(Ci(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return o=t,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return t}}var Li,Mi=wt((function(t){return null!=t&&"function"==typeof t.clone?t.clone():Ri(t,[],[],!0)})),Ni=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},Bi=wt((function(t){return!!Ni(t)||!!t&&"object"==typeof t&&!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),Ui=Bi,Fi=(Li=function(t){this.f=t},Li.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},Li.prototype["@@transducer/result"]=function(t){return t},Li.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},Li),Ki=_t((function(t,e){return function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,o){return e.apply(this,arguments)};case 5:return function(t,n,r,o,i){return e.apply(this,arguments)};case 6:return function(t,n,r,o,i,u){return e.apply(this,arguments)};case 7:return function(t,n,r,o,i,u,a){return e.apply(this,arguments)};case 8:return function(t,n,r,o,i,u,a,c){return e.apply(this,arguments)};case 9:return function(t,n,r,o,i,u,a,c,s){return e.apply(this,arguments)};case 10:return function(t,n,r,o,i,u,a,c,s,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(t.length,(function(){return t.apply(e,arguments)}))})),$i=Ki,zi="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Hi=jt((function(t,e,n){if("function"==typeof t&&(t=new Fi(t)),Ui(n))return function(t,e,n){for(var r=0,o=n.length;r<o;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return At(t,e,n,"fantasy-land/reduce");if(null!=n[zi])return kt(t,e,n[zi]());if("function"==typeof n.next)return kt(t,e,n);if("function"==typeof n.reduce)return At(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")})),Vi=jt((function(t,e,n){var r,o={};for(r in e)Ot(r,e)&&(o[r]=Ot(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)Ot(r,n)&&!Ot(r,o)&&(o[r]=n[r]);return o})),qi=Vi,Wi=jt((function t(e,n,r){return qi((function(n,r,o){return Ct(r)&&Ct(o)?t(e,r,o):e(n,r,o)}),n,r)})),Gi=Wi,Zi=_t((function(t,e){return Gi((function(t,e,n){return n}),t,e)})),Yi=mt((function(t){return Array.isArray(t)}),"must be an array"),Ji=mt((function(t){return"boolean"==typeof t}),"must be a boolean"),Qi=mt((function(t){return"number"==typeof t}),"must be a number"),Xi=mt((function(t){return"string"==typeof t}),"must be a string"),tu=mt((function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t}),"must be an object (not an array or null)"),eu=mt((function(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t)||/^[0-9a-f]{36}$/i.test(t)}),"must be a valid UUID or a 36-character hexadecimal string"),nu={providedConfigs:[],schemas:{},devDefaultsAreOn:Pt()},ru=(0,so.createGlobalStore)("config-internal",nu),ou=Pt();ru.subscribe((function(t){var e;t.devDefaultsAreOn!=ou&&(e=t.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(e)),ou=t.devDefaultsAreOn)}));var iu=(0,so.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(t){return{}}}()});iu.subscribe((function(t){var e;e=t.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(e))}));var uu=(0,so.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),au=(0,so.createGlobalStore)("config-implementer-tools",{config:{}});function cu(t){return t.hasOwnProperty("_default")?Rt({},t,{_value:t._default,_source:"default"}):Qt(t)?Object.keys(t).reduce((function(e,n){return e[n]=cu(t[n]),e}),{}):{}}function su(t,e){return Qt(t)?Object.keys(t).reduce((function(n,r){return n[r]=su(t[r],e),n}),{}):{_value:t,_source:e}}function lu(t,e,n){Zt(n,t._type,e),Qt(e)?t._type===Eo.Object?function(t,e,n){if(t._elements){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c];Gt(t._elements,s,"".concat(n,".").concat(c))}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(t,e,n):t.hasOwnProperty("_default")||Gt(t,e,n):t._type===Eo.Array&&function(t,e,n){if(Jt(t._elements))for(var r=0;r<e.length;r++)lu(t._elements,e[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<e.length;o++){var i;Zt("".concat(n,"[").concat(o,"]"),null===(i=t._elements)||void 0===i?void 0:i._type,e[o])}}(t,e,n)}function fu(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(t)if(e!==t._default&&Yt(n,t._validators,e),Qt(e)){var r=!0,o=!1,i=void 0;try{for(var u,a=Object.keys(e)[Symbol.iterator]();!(r=(u=a.next()).done);r=!0){var c=u.value,s=e[c],l=n+"."+c,f=t[c];t._type===Eo.Object&&t._elements?fu(t._elements,s,l):fu(f,s,l)}}catch(t){o=!0,i=t}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(e)&&t._elements)for(var h=0;h<e.length;h++)fu(t._elements,e[h],"".concat(n,"[").concat(h,"]"))}Bt(ru.getState(),iu.getState()),ru.subscribe((function(t){return Bt(t,iu.getState())})),iu.subscribe((function(t){return Bt(ru.getState(),t)})),Ft(ru.getState(),iu.getState()),ru.subscribe((function(t){return Ft(t,iu.getState())})),iu.subscribe((function(t){return Ft(ru.getState(),t)})),Ut(ru.getState(),iu.getState()),ru.subscribe((function(t){return Ut(t,iu.getState())})),iu.subscribe((function(t){return Ut(ru.getState(),t)})),Kt(ru.getState(),uu.getState(),iu.getState()),ru.subscribe((function(t){Kt(t,uu.getState(),iu.getState())})),uu.subscribe((function(t){Kt(ru.getState(),t,iu.getState())})),iu.subscribe((function(t){Kt(ru.getState(),uu.getState(),t)}));var hu=function(t,e,n){var r=Mi(e);if(!t)return r;var o=!0,i=!1,u=void 0;try{for(var a,c=function(e,o){var i=o.value,u=r[i],a=t[i];if(a&&a.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=a._devDefault||a._default;r[i]=n?c:a._default}var s=a._elements;if(u&&Jt(s))if(a._type===Eo.Array&&Array.isArray(u)){var l=u.map((function(t){return hu(s,t,n)}));r[i]=l}else if(a._type===Eo.Object){var f=!0,h=!1,p=void 0;try{for(var d,v=Object.keys(u)[Symbol.iterator]();!(f=(d=v.next()).done);f=!0){var y=d.value;u[y]=hu(s,u[y],n)}}catch(t){h=!0,p=t}finally{try{f||null==v.return||v.return()}finally{if(h)throw p}}}}else if(Qt(a)){var g=r.hasOwnProperty(i)?u:{};Qt(g)&&(r[i]=hu(a,g,n))}},s=Object.keys(t)[Symbol.iterator]();!(o=(a=s.next()).done);o=!0)c(0,a)}catch(t){i=!0,u=t}finally{try{o||null==s.return||s.return()}finally{if(i)throw u}}return r};Eo.Array;var pu=x(641),du=function(t,e){return t===e||t!=t&&e!=e},vu=function(t,e){for(var n=t.length;n--;)if(du(t[n][0],e))return n;return-1},yu=Array.prototype.splice;Xt.prototype.clear=function(){this.__data__=[],this.size=0},Xt.prototype.delete=function(t){var e=this.__data__,n=vu(e,t);return!(n<0||(n==e.length-1?e.pop():yu.call(e,n,1),--this.size,0))},Xt.prototype.get=function(t){var e=this.__data__,n=vu(e,t);return n<0?void 0:e[n][1]},Xt.prototype.has=function(t){return vu(this.__data__,t)>-1},Xt.prototype.set=function(t,e){var n=this.__data__,r=vu(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var gu,mu=Xt,bu=function(t){var e,n=void 0===t?"undefined":(e=t)&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":h(e);return null!=t&&("object"==n||"function"==n)},wu=function(t){if(!bu(t))return!1;var e=_o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},_u=ho["__core-js_shared__"],Su=(gu=/[^.]+$/.exec(_u&&_u.keys&&_u.keys.IE_PROTO||""))?"Symbol(src)_1."+gu:"",xu=Function.prototype.toString,Ou=function(t){if(null!=t){try{return xu.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Eu=/^\[object .+?Constructor\]$/,ju=Function.prototype,ku=Object.prototype,Au=ju.toString,Cu=ku.hasOwnProperty,Pu=RegExp("^"+Au.call(Cu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tu=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!bu(t)||(e=t,Su&&Su in e))&&(wu(t)?Pu:Eu).test(Ou(t));var e}(n)?n:void 0},Iu=Tu(ho,"Map"),Du=Tu(Object,"create"),Ru=Object.prototype.hasOwnProperty,Lu=Object.prototype.hasOwnProperty;te.prototype.clear=function(){this.__data__=Du?Du(null):{},this.size=0},te.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},te.prototype.get=function(t){var e=this.__data__;if(Du){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Ru.call(e,t)?e[t]:void 0},te.prototype.has=function(t){var e=this.__data__;return Du?void 0!==e[t]:Lu.call(e,t)},te.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Du&&void 0===e?"__lodash_hash_undefined__":e,this};var Mu=te,Nu=function(t,e){var n,r,o,i=t.__data__;return("string"==(o=void 0===(n=e)?"undefined":(r=n)&&"undefined"!=typeof Symbol&&r.constructor===Symbol?"symbol":void 0===r?"undefined":h(r))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map};ee.prototype.clear=function(){this.size=0,this.__data__={hash:new Mu,map:new(Iu||mu),string:new Mu}},ee.prototype.delete=function(t){var e=Nu(this,t).delete(t);return this.size-=e?1:0,e},ee.prototype.get=function(t){return Nu(this,t).get(t)},ee.prototype.has=function(t){return Nu(this,t).has(t)},ee.prototype.set=function(t,e){var n=Nu(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var Bu=ee;ne.prototype.clear=function(){this.__data__=new mu,this.size=0},ne.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ne.prototype.get=function(t){return this.__data__.get(t)},ne.prototype.has=function(t){return this.__data__.has(t)},ne.prototype.set=function(t,e){var n,r,o=this.__data__;if(n=o,null!=(r=mu)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):c(n,r)){var i=o.__data__;if(!Iu||i.length<199)return i.push([t,e]),this.size=++o.size,this;o=this.__data__=new Bu(i)}return o.set(t,e),this.size=o.size,this};var Uu=ne;re.prototype.add=re.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},re.prototype.has=function(t){return this.__data__.has(t)};var Fu=re,Ku=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},$u=function(t,e){return t.has(e)},zu=function(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,h=!0,p=2&n?new Fu:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],v=e[f];if(r)var y=u?r(v,d,f,e,t,i):r(d,v,f,t,e,i);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!Ku(e,(function(t,e){if(!$u(p,e)&&(d===t||o(d,t,n,r,i)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!o(d,v,n,r,i)){h=!1;break}}return i.delete(t),i.delete(e),h},Hu=ho.Uint8Array,Vu=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n},qu=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Wu=po?po.prototype:void 0,Gu=Wu?Wu.valueOf:void 0,Zu=Array.isArray,Yu=Object.prototype.propertyIsEnumerable,Ju=Object.getOwnPropertySymbols,Qu=Ju?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u)&&(i[o++]=u)}return i}(Ju(t),(function(e){return Yu.call(t,e)})))}:function(){return[]},Xu=function(t){return Ao(t)&&"[object Arguments]"==_o(t)},ta=Object.prototype,ea=ta.hasOwnProperty,na=ta.propertyIsEnumerable,ra=Xu(function(){return arguments}())?Xu:function(t){return Ao(t)&&ea.call(t,"callee")&&!na.call(t,"callee")},oa=ra,ia=e&&!e.nodeType&&e,ua=ia&&t&&!t.nodeType&&t,aa=ua&&ua.exports===ia?ho.Buffer:void 0,ca=(aa?aa.isBuffer:void 0)||function(){return!1},sa=/^(?:0|[1-9]\d*)$/,la=function(t,e){var n,r=void 0===t?"undefined":(n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":void 0===n?"undefined":h(n);return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&sa.test(t))&&t>-1&&t%1==0&&t<e},fa=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},ha={};ha["[object Float32Array]"]=ha["[object Float64Array]"]=ha["[object Int8Array]"]=ha["[object Int16Array]"]=ha["[object Int32Array]"]=ha["[object Uint8Array]"]=ha["[object Uint8ClampedArray]"]=ha["[object Uint16Array]"]=ha["[object Uint32Array]"]=!0,ha["[object Arguments]"]=ha["[object Array]"]=ha["[object ArrayBuffer]"]=ha["[object Boolean]"]=ha["[object DataView]"]=ha["[object Date]"]=ha["[object Error]"]=ha["[object Function]"]=ha["[object Map]"]=ha["[object Number]"]=ha["[object Object]"]=ha["[object RegExp]"]=ha["[object Set]"]=ha["[object String]"]=ha["[object WeakMap]"]=!1;var pa,da=e&&!e.nodeType&&e,va=da&&t&&!t.nodeType&&t,ya=va&&va.exports===da&&lo.process,ga=function(){try{return va&&va.require&&va.require("util").types||ya&&ya.binding&&ya.binding("util")}catch(t){}}(),ma=ga&&ga.isTypedArray,ba=ma?(pa=ma,function(t){return pa(t)}):function(t){return Ao(t)&&fa(t.length)&&!!ha[_o(t)]},wa=Object.prototype.hasOwnProperty,_a=Object.prototype,Sa=So(Object.keys,Object),xa=Object.prototype.hasOwnProperty,Oa=function(t){return n=Qu,r=function(t){return null!=(e=t)&&fa(e.length)&&!wu(e)?function(t,e){var n=Zu(t),r=!n&&oa(t),o=!n&&!r&&ca(t),i=!n&&!r&&!o&&ba(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!wa.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||la(s,c))||a.push(s);return a}(t):function(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||_a))return Sa(t);var e,n,r=[];for(var o in Object(t))xa.call(t,o)&&"constructor"!=o&&r.push(o);return r}(t);var e}(e=t),Zu(e)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(e));var e,n,r},Ea=Object.prototype.hasOwnProperty,ja=Tu(ho,"DataView"),ka=Tu(ho,"Promise"),Aa=Tu(ho,"Set"),Ca=Tu(ho,"WeakMap"),Pa="[object Map]",Ta="[object Promise]",Ia="[object Set]",Da="[object WeakMap]",Ra="[object DataView]",La=Ou(ja),Ma=Ou(Iu),Na=Ou(ka),Ba=Ou(Aa),Ua=Ou(Ca),Fa=_o;(ja&&Fa(new ja(new ArrayBuffer(1)))!=Ra||Iu&&Fa(new Iu)!=Pa||ka&&Fa(ka.resolve())!=Ta||Aa&&Fa(new Aa)!=Ia||Ca&&Fa(new Ca)!=Da)&&(Fa=function(t){var e=_o(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ou(n):"";if(r)switch(r){case La:return Ra;case Ma:return Pa;case Na:return Ta;case Ba:return Ia;case Ua:return Da}return e});var Ka=Fa,$a="[object Arguments]",za="[object Array]",Ha="[object Object]",Va=Object.prototype.hasOwnProperty,qa=function t(e,n,r,o,i){return e===n||(null==e||null==n||!Ao(e)&&!Ao(n)?e!=e&&n!=n:function(t,e,n,r,o,i){var u=Zu(t),a=Zu(e),c=u?za:Ka(t),s=a?za:Ka(e),l=(c=c==$a?Ha:c)==Ha,f=(s=s==$a?Ha:s)==Ha,h=c==s;if(h&&ca(t)){if(!ca(e))return!1;u=!0,l=!1}if(h&&!l)return i||(i=new Uu),u||ba(t)?zu(t,e,n,r,o,i):function(t,e,n,r,o,i,u){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Hu(t),new Hu(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return du(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Vu;case"[object Set]":var c=1&r;if(a||(a=qu),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=zu(a(t),a(e),r,o,i,u);return u.delete(t),l;case"[object Symbol]":if(Gu)return Gu.call(t)==Gu.call(e)}return!1}(t,e,c,n,r,o,i);if(!(1&n)){var p=l&&Va.call(t,"__wrapped__"),d=f&&Va.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return i||(i=new Uu),o(v,y,n,r,i)}}return!!h&&(i||(i=new Uu),function(t,e,n,r,o,i){var u=1&n,a=Oa(t),c=a.length;if(c!=Oa(e).length&&!u)return!1;for(var s=c;s--;){var l=a[s];if(!(u?l in e:Ea.call(e,l)))return!1}var f=i.get(t),h=i.get(e);if(f&&h)return f==e&&h==t;var p=!0;i.set(t,e),i.set(e,t);for(var d=u;++s<c;){var v=t[l=a[s]],y=e[l];if(r)var g=u?r(y,v,l,e,t,i):r(v,y,l,t,e,i);if(!(void 0===g?v===y||o(v,y,n,r,i):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&oe(m,m)&&"function"==typeof b&&oe(b,b)||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,r,o,i))}(e,n,r,o,t,i))},Wa=function(t,e){return qa(t,e)},Ga=(0,so.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Za=function(){return(0,so.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})};ie(Ga.getState()),Ga.subscribe(ie),Za();var Ya=Za(),Ja=(0,so.getGlobalStore)("extensions",{slots:{}}),Qa=(0,io.getExtensionSlotsConfigStore)(),Xa=(0,io.getExtensionsConfigStore)();Ya.subscribe((function(t){he(t,Qa.getState(),Xa.getState())})),Qa.subscribe((function(t){he(Ya.getState(),t,Xa.getState())})),Xa.subscribe((function(t){he(Ya.getState(),Qa.getState(),t)})),Ya.action((function(t,e){t.extensions[e.name]=ce({},e,{instances:[]})})),Ya.action((function(t,e,n){var r,o=null===(r=t.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),t;if(o&&o==e)return t;if(t.slots[n])return ce({},t,{slots:ce({},t.slots,ae({},n,ce({},t.slots[n],{moduleName:e})))});var i=function(t,e){return{moduleName:e,name:t,attachedIds:[],config:null}}(n,e);return ce({},t,{slots:ce({},t.slots,ae({},n,i))})})),Ja.action((function(){return{slots:{},extensions:{}}}));var tc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,ec=Object.keys,nc=Array.isArray;"undefined"==typeof Promise||tc.Promise||(tc.Promise=Promise);var rc=Object.getPrototypeOf,oc={}.hasOwnProperty,ic=Object.defineProperty,uc=Object.getOwnPropertyDescriptor;function ac(t,e){var n;return uc(t,e)||(n=rc(t))&&ac(n,e)}var cc=[].slice;function sc(t,e){if(ge(t,e))return t[e];if(!e)return t;if("string"!=typeof e){for(var n=[],r=0,o=e.length;r<o;++r){var i=sc(t,e[r]);n.push(i)}return n}var u=e.indexOf(".");if(-1!==u){var a=t[e.substr(0,u)];return void 0===a?void 0:sc(a,e.substr(u+1))}}function lc(t,e,n){if(t&&void 0!==e&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if("string"!=typeof e&&"length"in e){xe("string"!=typeof n&&"length"in n);for(var r=0,o=e.length;r<o;++r)lc(t,e[r],n[r])}else{var i=e.indexOf(".");if(-1!==i){var u=e.substr(0,i),a=e.substr(i+1);if(""===a)void 0===n?nc(t)&&!isNaN(parseInt(u))?t.splice(u,1):delete t[u]:t[u]=n;else{var c=t[u];c||(c=t[u]={}),lc(c,a,n)}}else void 0===n?nc(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}var fc=[].concat,hc="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ke([8,16,32,64].map((function(t){return["Int","Uint","Float"].map((function(e){return e+t+"Array"}))})))).filter((function(t){return tc[t]})),pc=hc.map((function(t){return tc[t]}));Ee(hc,(function(t){return[t,!0]}));var dc=null;function vc(t){if(!t||"object"!=typeof t)return t;var e=dc&&dc.get(t);if(e)return e;if(nc(t)){e=[],dc&&dc.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(vc(t[n]))}else if(pc.indexOf(t.constructor)>=0)e=t;else{var o=rc(t);for(var i in e=o===Object.prototype?{}:Object.create(o),dc&&dc.set(t,e),t)ge(t,i)&&(e[i]=vc(t[i]))}return e}var yc={}.toString,gc="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",mc="symbol"==(void 0===gc?"undefined":h(gc))?function(t){var e;return null!=t&&(e=t[gc])&&e.apply(t)}:function(){return null},bc={},wc="undefined"!=typeof Symbol?function(t){return"AsyncFunction"===t[Symbol.toStringTag]}:function(){return!1},_c="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),Sc=function(){return!0},xc=!new Error("").stack;function Oc(){if(xc)try{throw Oc.arguments,new Error}catch(t){return t}return new Error}var Ec=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],jc=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Ec),kc={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"};we(De).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Ie(this._e,2))}},toString:function(){return this.name+": "+this.message}}),we(Le).from(De),we(Me).from(De);var Ac=jc.reduce((function(t,e){return t[e]=e+"Error",t}),{}),Cc=De,Pc=jc.reduce((function(t,e){var n=function(t,n){this._e=Oc(),this.name=r,t?"string"==typeof t?(this.message="".concat(t).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof t&&(this.message="".concat(t.name," ").concat(t.message),this.inner=t):(this.message=kc[e]||r,this.inner=null)},r=e+"Error";return we(n).from(Cc),t[e]=n,t}),{});Pc.Syntax=SyntaxError,Pc.Type=TypeError,Pc.Range=RangeError;var Tc=Ec.reduce((function(t,e){return t[e+"Error"]=Pc[e],t}),{}),Ic=jc.reduce((function(t,e){return-1===["Syntax","Type","Range"].indexOf(e)&&(t[e+"Error"]=Pc[e]),t}),{});Ic.ModifyError=Le,Ic.DexieError=De,Ic.BulkError=Me;var Dc={},Rc=l("undefined"==typeof Promise?[]:function(){var t=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[t,rc(t),t];var e=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[e,rc(e),t]}(),3),Lc=Rc[0],Mc=Rc[1],Nc=Rc[2],Bc=Mc&&Mc.then,Uc=Lc&&Lc.constructor,Fc=!!Nc,Kc=!1,$c=Nc?function(){Nc.then(Xe)}:tc.setImmediate?setImmediate.bind(null,Xe):tc.MutationObserver?function(){var t=document.createElement("div");new MutationObserver((function(){Xe(),t=null})).observe(t,{attributes:!0}),t.setAttribute("i","1")}:function(){setTimeout(Xe,0)},zc=function(t,e){Qc.push([t,e]),Vc&&($c(),Vc=!1)},Hc=!0,Vc=!0,qc=[],Wc=[],Gc=null,Zc=Be,Yc={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:mn,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(t){try{mn(t[0],t[1])}catch(t){}}))}},Jc=Yc,Qc=[],Xc=0,ts=[],es={get:function(){var t=function(t,r){var o=this,i=!e.global&&(e!==Jc||n!==cs),u=i&&!cn(),a=new qe((function(n,a){Ye(o,new We(yn(t,e,i,u),yn(r,e,i,u),n,a,e))}));return _c&&Qe(a,this),a},e=Jc,n=cs;return t.prototype=Dc,t},set:function(t){be(this,"then",t&&t.prototype===Dc?es:{get:function(){return t},set:es.set})}};function ns(t,e){try{e((function(e){if(null===t._state){if(e===t)throw new TypeError("A promise cannot be resolved with itself.");var n=t._lib&&tn();e&&"function"==typeof e.then?ns(t,(function(t,n){c(e,qe)?e._then(t,n):e.then(t,n)})):(t._state=!0,t._value=e,Ze(t)),n&&en()}}),Ge.bind(null,t))}catch(e){Ge(t,e)}}function rs(t,e,n){if(e.length===n)return e;var r="";if(!1===t._state){var o,i,u=t._value;null!=u?(o=u.name||"Error",i=u.message||u,r=Ie(u,0)):(o=u,i=""),e.push(o+(i?": "+i:"")+r)}return _c&&((r=Ie(t._stackHolder,2))&&-1===e.indexOf(r)&&e.push(r),t._prev&&rs(t._prev,e,n)),e}me(qe.prototype,{then:es,_then:function(t,e){Ye(this,new We(null,null,t,e,Jc))},catch:function(t){if(1===arguments.length)return this.then(null,t);var e=arguments[0],n=arguments[1];return"function"==typeof e?this.then(null,(function(t){return c(t,e)?n(t):rn(t)})):this.then(null,(function(t){return t&&t.name===e?n(t):rn(t)}))},finally:function(t){return this.then((function(e){return t(),e}),(function(e){return t(),rn(e)}))},stack:{get:function(){if(this._stack)return this._stack;try{Kc=!0;var t=rs(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=t),t}finally{Kc=!1}}},timeout:function(t,e){var n=this;return t<1/0?new qe((function(r,o){var i=setTimeout((function(){return o(new Pc.Timeout(e))}),t);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&be(qe.prototype,Symbol.toStringTag,"Dexie.Promise"),Yc.env=pn(),me(qe,{all:function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e,n){0===t.length&&e([]);var r=t.length;t.forEach((function(o,i){return qe.resolve(o).then((function(n){t[i]=n,--r||e(t)}),n)}))}))},resolve:function(t){if(c(t,qe))return t;if(t&&"function"==typeof t.then)return new qe((function(e,n){t.then(e,n)}));var e=new qe(Dc,!0,t);return Qe(e,Gc),e},reject:rn,race:function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e,n){t.map((function(t){return qe.resolve(t).then(e,n)}))}))},PSD:{get:function(){return Jc},set:function(t){return Jc=t}},totalEchoes:{get:function(){return cs}},newPSD:un,usePSD:dn,scheduler:{get:function(){return zc},set:function(t){zc=t}},rejectionMapper:{get:function(){return Zc},set:function(t){Zc=t}},follow:function(t,e){return new qe((function(n,r){return un((function(e,n){var r=Jc;r.unhandleds=[],r.onunhandled=n,r.finalize=Fe((function(){var t=this;ts.push((function r(){0===t.unhandleds.length?e():n(t.unhandleds[0]),ts.splice(ts.indexOf(r),1)})),++Xc,zc((function(){0==--Xc&&nn()}),[])}),r.finalize),t()}),e,n,r)}))}}),Uc&&(Uc.allSettled&&be(qe,"allSettled",(function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e){0===t.length&&e([]);var n=t.length,r=new Array(n);t.forEach((function(t,o){return qe.resolve(t).then((function(t){return r[o]={status:"fulfilled",value:t}}),(function(t){return r[o]={status:"rejected",reason:t}})).then((function(){return--n||e(r)}))}))}))})),Uc.any&&"undefined"!=typeof AggregateError&&be(qe,"any",(function(){var t=Pe.apply(null,arguments).map(sn);return new qe((function(e,n){0===t.length&&n(new AggregateError([]));var r=t.length,o=new Array(r);t.forEach((function(t,i){return qe.resolve(t).then((function(t){return e(t)}),(function(t){o[i]=t,--r||n(new AggregateError(o))}))}))}))})));var os={awaits:0,echoes:0,id:0},is=0,us=[],as=0,cs=0,ss=0;-1===(""+Bc).indexOf("[native code]")&&(an=cn=Ne);var ls=qe.reject;function fs(t,e,n,r){if(t.idbdb&&(t._state.openComplete||Jc.letThrough||t._vip)){var o=t._createTransaction(e,n,t._dbSchema);try{o.create(),t._state.PR1398_maxLoop=3}catch(o){return o.name===Ac.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return fs(t,e,n,r)}))):ls(o)}return o._promise(e,(function(t,e){return un((function(){return Jc.trans=o,r(t,e,o)}))})).then((function(t){return o._completion.then((function(){return t}))}))}if(t._state.openComplete)return ls(new Pc.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return ls(new Pc.DatabaseClosed);t.open().catch(Ne)}return t._state.dbReadyPromise.then((function(){return fs(t,e,n,r)}))}var hs=String.fromCharCode(65535),ps="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ds=[],vs="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),ys=vs,gs=vs,ms=function(t){return!/(dexie\.js|dexie\.min\.js)/.test(t)},bs={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},ws=function(){function t(){o(this,t)}return u(t,[{key:"_trans",value:function(t,e,n){var r=function(t,n,r){if(!r.schema[i])throw new Pc.NotFound("Table "+i+" not part of transaction");return e(r.idbtrans,r)},o=this._tx||Jc.trans,i=this.name,u=tn();try{return o&&o.db===this.db?o===Jc.trans?o._promise(t,r,n):un((function(){return o._promise(t,r,n)}),{trans:o,transless:Jc.transless||Jc}):fs(this.db,t,[this.name],r)}finally{u&&en()}}},{key:"get",value:function(t,e){var n=this;return t&&t.constructor===Object?this.where(t).first(e):this._trans("readonly",(function(e){return n.core.get({trans:e,key:t}).then((function(t){return n.hook.reading.fire(t)}))})).then(e)}},{key:"where",value:function(t){var e=function(t,e){try{return 0===i.cmp(t,e)}catch(t){return!1}};if("string"==typeof t)return new this.db.WhereClause(this,t);if(nc(t))return new this.db.WhereClause(this,"[".concat(t.join("+"),"]"));var n=ec(t);if(1===n.length)return this.where(n[0]).equals(t[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(t){return t.compound&&n.every((function(e){return t.keyPath.indexOf(e)>=0}))&&t.keyPath.every((function(t){return n.indexOf(t)>=0}))}))[0];if(r&&this.db._maxKey!==hs)return this.where(r.name).equals(r.keyPath.map((function(e){return t[e]})));!r&&_c&&console.warn("The query ".concat(JSON.stringify(t)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,u=l(n.reduce((function(n,r){var i=l(n,2),u=i[0],a=i[1],c=o[r],s=t[r];return[u||c,u||!c?bn(a,c&&c.multi?function(t){var n=sc(t,r);return nc(n)&&n.some((function(t){return e(s,t)}))}:function(t){return e(s,sc(t,r))}):a]}),[null,null]),2),a=u[0],c=u[1];return a?this.where(a.name).equals(t[a.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(t){return this.toCollection().and(t)}},{key:"count",value:function(t){return this.toCollection().count(t)}},{key:"offset",value:function(t){return this.toCollection().offset(t)}},{key:"limit",value:function(t){return this.toCollection().limit(t)}},{key:"each",value:function(t){return this.toCollection().each(t)}},{key:"toArray",value:function(t){return this.toCollection().toArray(t)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(t){return new this.db.Collection(new this.db.WhereClause(this,nc(t)?"[".concat(t.join("+"),"]"):t))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(t){this.schema.mappedClass=t;var e=function(e){if(!e)return e;var n=Object.create(t.prototype);for(var r in e)if(ge(e,r))try{n[r]=e[r]}catch(t){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=e,this.hook("reading",e),t}},{key:"defineClass",value:function(){return this.mapToClass((function(t){ye(this,t)}))}},{key:"add",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=wn(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"add",keys:null!=e?[e]:null,values:[u]})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{lc(t,i,e)}catch(t){}return e}))}},{key:"update",value:function(t,e){if("object"!=typeof t||nc(t))return this.where(":id").equals(t).modify(e);var n=sc(t,this.schema.primKey.keyPath);if(void 0===n)return ls(new Pc.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof e?ec(e).forEach((function(n){lc(t,n,e[n])})):e(t,{value:t,primKey:n})}catch(t){}return this.where(":id").equals(n).modify(e)}},{key:"put",value:function(t,e){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,u=t;return i&&o&&(u=wn(i)(t)),this._trans("readwrite",(function(t){return n.core.mutate({trans:t,type:"put",values:[u],keys:null!=e?[e]:null})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):t.lastResult})).then((function(e){if(i)try{lc(t,i,e)}catch(t){}return e}))}},{key:"delete",value:function(t){var e=this;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:[t]})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):void 0}))}},{key:"clear",value:function(){var t=this;return this._trans("readwrite",(function(e){return t.core.mutate({trans:e,type:"deleteRange",range:bs})})).then((function(t){return t.numFailures?qe.reject(t.failures[0]):void 0}))}},{key:"bulkGet",value:function(t){var e=this;return this._trans("readonly",(function(n){return e.core.getMany({keys:t,trans:n}).then((function(t){return t.map((function(t){return e.hook.reading.fire(t)}))}))}))}},{key:"bulkAdd",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Pc.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Pc.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(wn(c)):t;return r.core.mutate({trans:e,type:"add",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new Me("".concat(n.name,".bulkAdd(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkPut",value:function(t,e,n){var r=this,o=Array.isArray(e)?e:void 0,i=(n=n||(o?void 0:e))?n.allKeys:void 0;return this._trans("readwrite",(function(e){var n=r,u=r.schema.primKey,a=u.auto,c=u.keyPath;if(c&&o)throw new Pc.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==t.length)throw new Pc.InvalidArgument("Arguments objects and keys must have the same length");var s=t.length,l=c&&a?t.map(wn(c)):t;return r.core.mutate({trans:e,type:"put",keys:o,values:l,wantResults:i}).then((function(t){var e=t.numFailures,r=t.results,o=t.lastResult,u=t.failures;if(0===e)return i?r:o;throw new Me("".concat(n.name,".bulkPut(): ").concat(e," of ").concat(s," operations failed"),u)}))}))}},{key:"bulkDelete",value:function(t){var e=this,n=t.length;return this._trans("readwrite",(function(n){return e.core.mutate({trans:n,type:"delete",keys:t})})).then((function(t){var r=t.numFailures,o=t.lastResult,i=t.failures;if(0===r)return o;throw new Me("".concat(e.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),t}();function _s(t,e){try{var n=Pn(t),r=Pn(e);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 t>e?1:t<e?-1:0;case"binary":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i)if(t[i]!==e[i])return t[i]<e[i]?-1:1;return n===r?0:n<r?-1:1}(Tn(t),Tn(e));case"Array":return function(t,e){for(var n=t.length,r=e.length,o=n<r?n:r,i=0;i<o;++i){var u=_s(t[i],e[i]);if(0!==u)return u}return n===r?0:n<r?-1:1}(t,e)}}catch(t){}return NaN}var Ss=function(){function t(){o(this,t)}return u(t,[{key:"_read",value:function(t,e){var n=this._ctx;return n.error?n.table._trans(null,ls.bind(null,n.error)):n.table._trans("readonly",t).then(e)}},{key:"_write",value:function(t){var e=this._ctx;return e.error?e.table._trans(null,ls.bind(null,e.error)):e.table._trans("readwrite",t,"locked")}},{key:"_addAlgorithm",value:function(t){var e=this._ctx;e.algorithm=bn(e.algorithm,t)}},{key:"_iterate",value:function(t,e){return An(this._ctx,t,e,this._ctx.table.core)}},{key:"clone",value:function(t){var e=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return t&&ye(n,t),e._ctx=n,e}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(t){var e=this._ctx;return this._read((function(n){return An(e,t,n,e.table.core)}))}},{key:"count",value:function(t){var e=this;return this._read((function(t){var n=e._ctx,r=n.table.core;if(xn(n,!0))return r.count({trans:t,query:{index:jn(n,r.schema),range:n.range}}).then((function(t){return Math.min(t,n.limit)}));var o=0;return An(n,(function(){return++o,!1}),t,r).then((function(){return o}))})).then(t)}},{key:"sortBy",value:function(t,e){var n=function(t,e){var n=u(t,i),r=u(e,i);return n<r?-a:n>r?a:0},r=t.split(".").reverse(),o=r[0],i=r.length-1;function u(t,e){return e?u(t[r[e]],e-1):t[o]}var a="next"===this._ctx.dir?1:-1;return this.toArray((function(t){return t.sort(n)})).then(e)}},{key:"toArray",value:function(t){var e=this;return this._read((function(t){var n=e._ctx;if("next"===n.dir&&xn(n,!0)&&n.limit>0){var r=n.valueMapper,o=jn(n,n.table.core.schema);return n.table.core.query({trans:t,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(t){var e=t.result;return r?e.map(r):e}))}var i=[];return An(n,(function(t){return i.push(t)}),t,n.table.core).then((function(){return i}))}),t)}},{key:"offset",value:function(t){var e=this._ctx;return t<=0||(e.offset+=t,xn(e)?En(e,(function(){var e=t;return function(t,n){return 0===e||(1===e?(--e,!1):(n((function(){t.advance(e),e=0})),!1))}})):En(e,(function(){var e=t;return function(){return--e<0}}))),this}},{key:"limit",value:function(t){return this._ctx.limit=Math.min(this._ctx.limit,t),En(this._ctx,(function(){var e=t;return function(t,n,r){return--e<=0&&n(r),e>=0}}),!0),this}},{key:"until",value:function(t,e){return On(this._ctx,(function(n,r,o){return!t(n.value)||(r(o),e)})),this}},{key:"first",value:function(t){return this.limit(1).toArray((function(t){return t[0]})).then(t)}},{key:"last",value:function(t){return this.reverse().first(t)}},{key:"filter",value:function(t){var e,n;return On(this._ctx,(function(e){return t(e.value)})),e=this._ctx,n=t,e.isMatch=bn(e.isMatch,n),this}},{key:"and",value:function(t){return this.filter(t)}},{key:"or",value:function(t){return new this.db.WhereClause(this._ctx.table,t,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.key,n)}))}},{key:"eachUniqueKey",value:function(t){return this._ctx.unique="unique",this.eachKey(t)}},{key:"eachPrimaryKey",value:function(t){var e=this._ctx;return e.keysOnly=!e.isMatch,this.each((function(e,n){t(n.primaryKey,n)}))}},{key:"keys",value:function(t){var e=this._ctx;e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.key)})).then((function(){return n})).then(t)}},{key:"primaryKeys",value:function(t){var e=this._ctx;if("next"===e.dir&&xn(e,!0)&&e.limit>0)return this._read((function(t){var n=jn(e,e.table.core.schema);return e.table.core.query({trans:t,values:!1,limit:e.limit,query:{index:n,range:e.range}})})).then((function(t){return t.result})).then(t);e.keysOnly=!e.isMatch;var n=[];return this.each((function(t,e){n.push(e.primaryKey)})).then((function(){return n})).then(t)}},{key:"uniqueKeys",value:function(t){return this._ctx.unique="unique",this.keys(t)}},{key:"firstKey",value:function(t){return this.limit(1).keys((function(t){return t[0]})).then(t)}},{key:"lastKey",value:function(t){return this.reverse().firstKey(t)}},{key:"distinct",value:function(){var t=this._ctx,e=t.index&&t.table.schema.idxByName[t.index];if(!e||!e.multi)return this;var n={};return On(this._ctx,(function(t){var e=t.primaryKey.toString(),r=ge(n,e);return n[e]=!0,!r})),this}},{key:"modify",value:function(t){var e=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof t)o=t;else{var i=ec(t),u=i.length;o=function(e){for(var n=!1,r=0;r<u;++r){var o=i[r],a=t[o];sc(e,o)!==a&&(lc(e,o,a),n=!0)}return n}}var a=n.table.core,c=a.schema.primaryKey,s=c.outbound,l=c.extractKey,f=e.db._options.modifyChunkSize||200,h=[],p=0,d=[],v=function(t,e){var n=e.failures,r=e.numFailures;p+=t-r;var o=!0,i=!1,u=void 0;try{for(var a,c=ec(n)[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var s=a.value;h.push(n[s])}}catch(t){i=!0,u=t}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}};return e.clone().primaryKeys().then((function(e){var i=function(u){var c=Math.min(f,e.length-u);return a.getMany({trans:r,keys:e.slice(u,u+c),cache:"immutable"}).then((function(h){for(var p=[],d=[],y=s?[]:null,g=[],m=0;m<c;++m){var b=h[m],w={value:Ae(b),primKey:e[u+m]};!1!==o.call(w,w.value,w)&&(null==w.value?g.push(e[u+m]):s||0===_s(l(b),l(w.value))?(d.push(w.value),s&&y.push(e[u+m])):(g.push(e[u+m]),p.push(w.value)))}var _=xn(n)&&n.limit===1/0&&("function"!=typeof t||t===xs)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&a.mutate({trans:r,type:"add",values:p}).then((function(t){for(var e in t.failures)g.splice(parseInt(e),1);v(p.length,t)}))).then((function(){return(d.length>0||_&&"object"==typeof t)&&a.mutate({trans:r,type:"put",keys:y,values:d,criteria:_,changeSpec:"function"!=typeof t&&t}).then((function(t){return v(d.length,t)}))})).then((function(){return(g.length>0||_&&t===xs)&&a.mutate({trans:r,type:"delete",keys:g,criteria:_}).then((function(t){return v(g.length,t)}))})).then((function(){return e.length>u+c&&i(u+f)}))}))};return i(0).then((function(){if(h.length>0)throw new Le("Error modifying one or more objects",h,p,d);return e.length}))}))}))}},{key:"delete",value:function(){var t=this._ctx,e=t.range;return xn(t)&&(t.isPrimKey&&!gs||3===e.type)?this._write((function(n){var r=t.table.core.schema.primaryKey,o=e;return t.table.core.count({trans:n,query:{index:r,range:o}}).then((function(e){return t.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(t){var n=t.failures,r=(t.lastResult,t.results,t.numFailures);if(r)throw new Le("Could not delete some values",Object.keys(n).map((function(t){return n[t]})),e-r);return e-r}))}))})):this.modify(xs)}}]),t}(),xs=function(t,e){return e.value=null},Os=function(){function t(){o(this,t)}return u(t,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(t,e,n,r){n=!1!==n,r=!0===r;try{return this._cmp(t,e)>0||0===this._cmp(t,e)&&(n||r)&&(!n||!r)?Ln(this):new this.Collection(this,(function(){return Bn(t,e,!n,!r)}))}catch(t){return Rn(this,ps)}}},{key:"equals",value:function(t){return null==t?Rn(this,ps):new this.Collection(this,(function(){return Un(t)}))}},{key:"above",value:function(t){return null==t?Rn(this,ps):new this.Collection(this,(function(){return Bn(t,void 0,!0)}))}},{key:"aboveOrEqual",value:function(t){return null==t?Rn(this,ps):new this.Collection(this,(function(){return Bn(t,void 0,!1)}))}},{key:"below",value:function(t){return null==t?Rn(this,ps):new this.Collection(this,(function(){return Bn(void 0,t,!1,!0)}))}},{key:"belowOrEqual",value:function(t){return null==t?Rn(this,ps):new this.Collection(this,(function(){return Bn(void 0,t)}))}},{key:"startsWith",value:function(t){return"string"!=typeof t?Rn(this,"String expected."):this.between(t,t+hs,!0,!0)}},{key:"startsWithIgnoreCase",value:function(t){return""===t?this.startsWith(t):Nn(this,(function(t,e){return 0===t.indexOf(e[0])}),[t],hs)}},{key:"equalsIgnoreCase",value:function(t){return Nn(this,(function(t,e){return t===e[0]}),[t],"")}},{key:"anyOfIgnoreCase",value:function(){var t=Pe.apply(bc,arguments);return 0===t.length?Ln(this):Nn(this,(function(t,e){return-1!==e.indexOf(t)}),t,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var t=Pe.apply(bc,arguments);return 0===t.length?Ln(this):Nn(this,(function(t,e){return e.some((function(e){return 0===t.indexOf(e)}))}),t,hs)}},{key:"anyOf",value:function(){var t=this,e=Pe.apply(bc,arguments),n=this._cmp;try{e.sort(n)}catch(t){return Rn(this,ps)}if(0===e.length)return Ln(this);var r=new this.Collection(this,(function(){return Bn(e[0],e[e.length-1])}));r._ondirectionchange=function(r){n="next"===r?t._ascending:t._descending,e.sort(n)};var o=0;return r._addAlgorithm((function(t,r,i){for(var u=t.key;n(u,e[o])>0;)if(++o===e.length)return r(i),!1;return 0===n(u,e[o])||(r((function(){t.continue(e[o])})),!1)})),r}},{key:"notEqual",value:function(t){return this.inAnyRange([[-1/0,t],[t,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var t=Pe.apply(bc,arguments);if(0===t.length)return new this.Collection(this);try{t.sort(this._ascending)}catch(t){return Rn(this,ps)}var e=t.reduce((function(t,e){return t?t.concat([[t[t.length-1][1],e]]):[[-1/0,e]]}),null);return e.push([t[t.length-1],this.db._maxKey]),this.inAnyRange(e,{includeLowers:!1,includeUppers:!1})}},{key:"inAnyRange",value:function(t,e){var n=this,r=function(t,e){return h(t[0],e[0])},o=this._cmp,i=this._ascending,u=this._descending,a=this._min,c=this._max;if(0===t.length)return Ln(this);if(!t.every((function(t){return void 0!==t[0]&&void 0!==t[1]&&i(t[0],t[1])<=0})))return Rn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Pc.InvalidArgument);var s,l=!e||!1!==e.includeLowers,f=e&&!0===e.includeUppers,h=i;try{s=t.reduce((function(t,e){for(var n=0,r=t.length;n<r;++n){var i=t[n];if(o(e[0],i[1])<0&&o(e[1],i[0])>0){i[0]=a(i[0],e[0]),i[1]=c(i[1],e[1]);break}}return n===r&&t.push(e),t}),[]),s.sort(r)}catch(t){return Rn(this,ps)}var p=0,d=f?function(t){return i(t,s[p][1])>0}:function(t){return i(t,s[p][1])>=0},v=l?function(t){return u(t,s[p][0])>0}:function(t){return u(t,s[p][0])>=0},y=d,g=new this.Collection(this,(function(){return Bn(s[0][0],s[s.length-1][1],!l,!f)}));return g._ondirectionchange=function(t){"next"===t?(y=d,h=i):(y=v,h=u),s.sort(r)},g._addAlgorithm((function(t,e,r){for(var o=t.key;y(o);)if(++p===s.length)return e(r),!1;return!!function(t){return!d(t)&&!v(t)}(o)||(0===n._cmp(o,s[p][1])||0===n._cmp(o,s[p][0])||e((function(){h===i?t.continue(s[p][0]):t.continue(s[p][1])})),!1)})),g}},{key:"startsWithAnyOf",value:function(){var t=Pe.apply(bc,arguments);return t.every((function(t){return"string"==typeof t}))?0===t.length?Ln(this):this.inAnyRange(t.map((function(t){return[t,t+hs]}))):Rn(this,"startsWithAnyOf() only works with strings")}}]),t}(),Es=_n(null,"storagemutated"),js=function(){function t(){o(this,t)}return u(t,[{key:"_lock",value:function(){return xe(!Jc.global),++this._reculock,1!==this._reculock||Jc.global||(Jc.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(xe(!Jc.global),0==--this._reculock)for(Jc.global||(Jc.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var t=this._blockedFuncs.shift();try{dn(t[1],t[0])}catch(t){}}return this}},{key:"_locked",value:function(){return this._reculock&&Jc.lockOwnerFor!==this}},{key:"create",value:function(t){var e=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(xe(!this.idbtrans),!t&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new Pc.DatabaseClosed(r);case"MissingAPIError":throw new Pc.MissingAPI(r.message,r);default:throw new Pc.OpenFailed(r)}if(!this.active)throw new Pc.TransactionInactive;return xe(null===this._completion._state),(t=this.idbtrans=t||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=on((function(n){Kn(n),e._reject(t.error)})),t.onabort=on((function(n){Kn(n),e.active&&e._reject(new Pc.Abort(t.error)),e.active=!1,e.on("abort").fire(n)})),t.oncomplete=on((function(){e.active=!1,e._resolve(),"mutatedParts"in t&&Es.storagemutated.fire(t.mutatedParts)})),this}},{key:"_promise",value:function(t,e,n){var r=this;if("readwrite"===t&&"readwrite"!==this.mode)return ls(new Pc.ReadOnly("Transaction is readonly"));if(!this.active)return ls(new Pc.TransactionInactive);if(this._locked())return new qe((function(o,i){var u=r;r._blockedFuncs.push([function(){u._promise(t,e,n).then(o,i)},Jc])}));if(n)return un((function(){var t=r,n=new qe((function(n,r){t._lock();var o=e(n,r,t);o&&o.then&&o.then(n,r)}));return n.finally((function(){return t._unlock()})),n._lib=!0,n}));var o=new qe((function(t,n){var o=e(t,n,r);o&&o.then&&o.then(t,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(t){var e=this._root(),n=qe.resolve(t);if(e._waitingFor)e._waitingFor=e._waitingFor.then((function(){return n}));else{e._waitingFor=n,e._waitingQueue=[];var r=e.idbtrans.objectStore(e.storeNames[0]);!function t(){for(++e._spinCount;e._waitingQueue.length;)e._waitingQueue.shift()();e._waitingFor&&(r.get(-1/0).onsuccess=t)}()}var o=e._waitingFor;return new qe((function(t,r){n.then((function(n){return e._waitingQueue.push(on(t.bind(null,n)))}),(function(t){return e._waitingQueue.push(on(r.bind(null,t)))})).finally((function(){e._waitingFor===o&&(e._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Pc.Abort))}},{key:"table",value:function(t){var e=this._memoizedTables||(this._memoizedTables={});if(ge(e,t))return e[t];var n=this.schema[t];if(!n)throw new Pc.NotFound("Table "+t+" not part of transaction");var r=new this.db.Table(t,n,this);return r.core=this.db.core.table(t),e[t]=r,r}}]),t}(),ks=function(t){try{return t.only([[]]),ks=function(){return[[]]},[[]]}catch(t){return ks=function(){return hs},hs}},As=0,Cs=function(){function t(){o(this,t)}return u(t,[{key:"_parseStoresSpec",value:function(t,e){ec(t).forEach((function(n){if(null!==t[n]){var r=t[n].split(",").map((function(t,e){var n=(t=t.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return $n(n,r||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),nc(r),0===e)})),o=r.shift();if(o.multi)throw new Pc.Schema("Primary key cannot be multi-valued");r.forEach((function(t){if(t.auto)throw new Pc.Schema("Only primary key can be marked as autoIncrement (++)");if(!t.keyPath)throw new Pc.Schema("Index must have a name and cannot be an empty string")})),e[n]=Hn(n,o,r)}}))}},{key:"stores",value:function(t){var e=this.db;this._cfg.storesSource=this._cfg.storesSource?ye(this._cfg.storesSource,t):t;var n=e._versions,r={},o={};return n.forEach((function(t){ye(r,t._cfg.storesSource),o=t._cfg.dbschema={},t._parseStoresSpec(r,o)})),e._dbSchema=o,Yn(e,[e._allTables,e,e.Transaction.prototype]),Zn(e,[e._allTables,e,e.Transaction.prototype,this._cfg.tables],ec(o),o),e._storeNames=ec(o),this}},{key:"upgrade",value:function(t){return this._cfg.contentUpgrade=Ve(this._cfg.contentUpgrade||Ne,t),this}}]),t}();function Ps(t,e,n,r,o){return qe.resolve().then((function(){var i=Jc.transless||Jc,u=t._createTransaction(e,n,t._dbSchema,r),a={trans:u,transless:i};if(r)u.idbtrans=r.idbtrans;else try{u.create(),t._state.PR1398_maxLoop=3}catch(r){return r.name===Ac.InvalidState&&t.isOpen()&&--t._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),t._close(),t.open().then((function(){return Ps(t,e,n,null,o)}))):ls(r)}var c,s=wc(o);s&&an();var l=qe.follow((function(){if(c=o.call(u,u))if(s){var t=cn.bind(null,null);c.then(t,t)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=ar(c))}),a);return(c&&"function"==typeof c.then?qe.resolve(c).then((function(t){return u.active?t:ls(new Pc.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(t){return r&&u._resolve(),u._completion.then((function(){return t}))})).catch((function(t){return u._reject(t),ls(t)}))}))}var Ts={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(t){return s({},t,{table:function(e){var n=function(e){var n,r,o=e.query.index;return o.isVirtual?s({},e,{query:{index:o,range:(n=e.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:sr(n.lower,n.lowerOpen?t.MAX_KEY:t.MIN_KEY,r),lowerOpen:!0,upper:sr(n.upper,n.upperOpen?t.MIN_KEY:t.MAX_KEY,r),upperOpen:!0})}}):e},r=t.table(e),o=r.schema,i={},u=[];function a(t,e,n){var r=Wn(t),o=i[r]=i[r]||[],c=null==t?0:"string"==typeof t?1:t.length,l=e>0,f=s({},n,{isVirtual:l,keyTail:e,keyLength:c,extractKey:Vn(t),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||u.push(f),c>1&&a(2===c?t[0]:t.slice(0,c-1),e+1,n),o.sort((function(t,e){return t.keyTail-e.keyTail})),f}var c=a(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,h=void 0;try{for(var p,d=o.indexes[Symbol.iterator]();!(l=(p=d.next()).done);l=!0){var v=p.value;a(v.keyPath,0,v)}}catch(t){f=!0,h=t}finally{try{l||null==d.return||d.return()}finally{if(f)throw h}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:u,getIndexByKeyPath:function(t){var e=i[Wn(t)];return e&&e[0]}}),count:function(t){return r.count(n(t))},query:function(t){return r.query(n(t))},openCursor:function(e){var o=e.query.index,i=o.keyTail,u=o.isVirtual,a=o.keyLength;return u?r.openCursor(n(e)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(sr(n,e.reverse?t.MAX_KEY:t.MIN_KEY,i)):e.unique?r.continue(r.key.slice(0,a).concat(e.reverse?t.MIN_KEY:t.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(e,n){r.continuePrimaryKey(sr(e,t.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var t=r.key;return 1===a?t[0]:t.slice(0,a)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(e)}});return y}})}};function Is(t,e,n,r){return n=n||{},r=r||"",ec(t).forEach((function(o){if(ge(e,o)){var i=t[o],u=e[o];if("object"==typeof i&&"object"==typeof u&&i&&u){var a=Ce(i);a!==Ce(u)?n[r+o]=e[o]:"Object"===a?Is(i,u,n,r+o+"."):i!==u&&(n[r+o]=e[o])}else i!==u&&(n[r+o]=e[o])}else n[r+o]=void 0})),ec(e).forEach((function(o){ge(t,o)||(n[r+o]=e[o])})),n}var Ds={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(t){return s({},t,{table:function(e){var n=t.table(e),r=n.schema.primaryKey,o=s({},n,{mutate:function(t){var o=function(t){var e=Jc.trans,o=t.keys||function(t,e){return"delete"===e.type?e.keys:e.keys||e.values.map(t.extractKey)}(r,t);if(!o)throw new Error("Keys missing");return"delete"!==(t="add"===t.type||"put"===t.type?s({},t,{keys:o}):s({},t)).type&&(t.values=f(t.values)),t.keys&&(t.keys=f(t.keys)),function(t,e,n){return"add"===e.type?Promise.resolve([]):t.getMany({trans:e.trans,keys:n,cache:"immutable"})}(n,t,o).then((function(i){var u=o.map((function(n,o){var u=i[o],s={onerror:null,onsuccess:null};if("delete"===t.type)a.fire.call(s,n,u,e);else if("add"===t.type||void 0===u){var f=c.fire.call(s,n,t.values[o],e);null==n&&null!=f&&(n=f,t.keys[o]=n,r.outbound||lc(t.values[o],r.keyPath,n))}else{var h=Is(u,t.values[o]),p=l.fire.call(s,h,n,u,e);if(p){var d=t.values[o];Object.keys(p).forEach((function(t){ge(d,t)?d[t]=p[t]:lc(d,t,p[t])}))}}return s}));return n.mutate(t).then((function(e){for(var n=e.failures,r=e.results,a=e.numFailures,c=e.lastResult,s=0;s<o.length;++s){var l=r?r[s]:o[s],f=u[s];null==l?f.onerror&&f.onerror(n[s]):f.onsuccess&&f.onsuccess("put"===t.type&&i[s]?t.values[s]:l)}return{failures:n,results:r,numFailures:a,lastResult:c}})).catch((function(t){return u.forEach((function(e){return e.onerror&&e.onerror(t)})),Promise.reject(t)}))}))},i=Jc.trans,u=i.table(e).hook,a=u.deleting,c=u.creating,l=u.updating;switch(t.type){case"add":if(c.fire===Ne)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"put":if(c.fire===Ne&&l.fire===Ne)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"delete":if(a.fire===Ne)break;return i._promise("readwrite",(function(){return o(t)}),!0);case"deleteRange":if(a.fire===Ne)break;return i._promise("readwrite",(function(){return function(t){return h(t.trans,t.range,1e4)}(t)}),!0)}return n.mutate(t);function h(t,e,i){return n.query({trans:t,values:!1,query:{index:r,range:e},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:t}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:h(t,s({},e,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Rs={stack:"dbcore",level:-1,create:function(t){return{table:function(e){var n=t.table(e);return s({},n,{getMany:function(t){if(!t.cache)return n.getMany(t);var e=lr(t.keys,t.trans._cache,"clone"===t.cache);return e?qe.resolve(e):n.getMany(t).then((function(e){return t.trans._cache={keys:t.keys,values:"clone"===t.cache?Ae(e):e},e}))},mutate:function(t){return"add"!==t.type&&(t.trans._cache=null),n.mutate(t)}})}}}},Ls=function(t,e){if(!this){var n=new Ls;return t&&"d"in t&&ye(n,t),n}ye(this,arguments.length?{d:1,from:t,to:arguments.length>1?e:t}:{d:0})};function Ms(t,e,n){var r=_s(e,n);if(!isNaN(r)){if(r>0)throw RangeError();if(fr(t))return ye(t,{from:e,to:n,d:1});var o=t.l,i=t.r;if(_s(n,t.from)<0)return o?Ms(o,e,n):t.l={from:e,to:n,d:1,l:null,r:null},dr(t);if(_s(e,t.to)>0)return i?Ms(i,e,n):t.r={from:e,to:n,d:1,l:null,r:null},dr(t);_s(e,t.from)<0&&(t.from=e,t.l=null,t.d=i?i.d+1:1),_s(n,t.to)>0&&(t.to=n,t.r=null,t.d=t.l?t.l.d+1:1);var u=!t.r;o&&!t.l&&hr(t,o),i&&u&&hr(t,i)}}me(Ls.prototype,a({add:function(t){return hr(this,t),this},addKey:function(t){return Ms(this,t,t),this},addKeys:function(t){var e=this;return t.forEach((function(t){return Ms(e,t,t)})),this}},gc,(function(){return pr(this)})));var Ns,Bs={stack:"dbcore",level:0,create:function(t){var e=t.schema.name,n=new Ls(t.MIN_KEY,t.MAX_KEY);return s({},t,{table:function(r){var o=t.table(r),i=o.schema,u=i.primaryKey,a=u.extractKey,c=u.outbound,f=s({},o,{mutate:function(t){var u=t.trans,a=u.mutatedParts||(u.mutatedParts={}),c=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return a[n]||(a[n]=new Ls)},s=c(""),f=c(":dels"),h=t.type,p=l("deleteRange"===t.type?[t.range]:"delete"===t.type?[t.keys]:t.values.length<50?[[],t.values]:[],2),d=p[0],v=p[1],y=t.trans._cache;return o.mutate(t).then((function(t){if(nc(d)){"delete"!==h&&(d=t.results),s.addKeys(d);var e=lr(d,y);e||"add"===h||f.addKeys(d),(e||v)&&(o=c,u=e,a=v,i.indexes.forEach((function(t){var e=function(e){return null!=e?t.extractKey(e):null},n=o(t.name||""),r=function(e){return t.multiEntry&&nc(e)?e.forEach((function(t){return n.addKey(t)})):n.addKey(e)};(u||a).forEach((function(t,n){var o=u&&e(u[n]),i=a&&e(a[n]);0!==_s(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(d){var r={from:d.lower,to:d.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(t){return c(t.name).add(n)}));var o,u,a;return t}))}}),h=function(e){var n,r,o=e.query,i=o.index,u=o.range;return[i,new Ls(null!==(n=u.lower)&&void 0!==n?n:t.MIN_KEY,null!==(r=u.upper)&&void 0!==r?r:t.MAX_KEY)]},p={get:function(t){return[u,new Ls(t.key)]},getMany:function(t){return[u,(new Ls).addKeys(t.keys)]},count:h,query:h,openCursor:h};return ec(p).forEach((function(t){f[t]=function(i){var u=Jc.subscr;if(u){var f=function(t){var n="idb://".concat(e,"/").concat(r,"/").concat(t);return u[n]||(u[n]=new Ls)},h=f(""),d=f(":dels"),v=l(p[t](i),2),y=v[0],g=v[1];if(f(y.name||"").add(g),!y.isPrimaryKey){if("count"!==t){var m="query"===t&&c&&i.values&&o.query(s({},i,{values:!1}));return o[t].apply(this,arguments).then((function(e){if("query"===t){if(c&&i.values)return m.then((function(t){var n=t.result;return h.addKeys(n),e}));var n=i.values?e.result.map(a):e.result;i.values?h.addKeys(n):d.addKeys(n)}else if("openCursor"===t){var r=e,o=i.values;return r&&Object.create(r,{key:{get:function(){return d.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var t=r.primaryKey;return d.addKey(t),t}},value:{get:function(){return o&&h.addKey(r.primaryKey),r.value}}})}return e}))}d.add(n)}}return o[t].apply(this,arguments)}})),f}})}},Us=function(){function t(e,n){var r=this;o(this,t),this._middlewares={},this.verno=0;var i=t.dependencies;this._options=n=s({addons:t.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var u=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a,c,l,f={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Ne,dbReadyPromise:null,cancelOpen:Ne,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};f.dbReadyPromise=new qe((function(t){f.dbReadyResolve=t})),f.openCanceller=new qe((function(t,e){f.cancelOpen=e})),this._state=f,this.name=e,this.on=_n(this,"populate","blocked","versionchange","close",{ready:[Ve,Ne]}),this.on.ready.subscribe=Se(this.on.ready.subscribe,(function(e){return function(n,o){var i=r;t.vip((function(){var t=i._state;if(t.openComplete)t.dbOpenError||qe.resolve().then(n),o&&e(n);else if(t.onReadyBeingFired)t.onReadyBeingFired.push(n),o&&e(n);else{e(n);var r=i;o||e((function t(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(t)}))}}))}})),this.Collection=(a=this,Sn(Ss.prototype,(function(t,e){this.db=a;var n=bs,r=null;if(e)try{n=e()}catch(t){r=t}var o=t._ctx,i=o.table,u=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.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:u!==Be?u:null}}))),this.Table=function(t){return Sn(ws.prototype,(function(e,n,r){this.db=t,this._tx=r,this.name=e,this.schema=n,this.hook=t._allTables[e]?t._allTables[e].hook:_n(null,{creating:[Ke,Ne],reading:[Ue,Be],updating:[ze,Ne],deleting:[$e,Ne]})}))}(this),this.Transaction=(l=this,Sn(js.prototype,(function(t,e,n,r,o){var i=this;this.db=l,this.mode=t,this.storeNames=e,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=_n(this,"complete","error","abort"),this.parent=o||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 qe((function(t,e){i._resolve=t,i._reject=e})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(t){var e=i.active;return i.active=!1,i.on.error.fire(t),i.parent?i.parent._reject(t):e&&i.idbtrans&&i.idbtrans.abort(),ls(t)}))}))),this.Version=function(t){return Sn(Cs.prototype,(function(e){this.db=t,this._cfg={version:e,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Sn(Os.prototype,(function(t,e,n){this.db=c,this._ctx={table:t,index:":id"===e?null:e,or:n};var r=c._deps.indexedDB;if(!r)throw new Pc.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(t,e){return r.cmp(e,t)},this._max=function(t,e){return r.cmp(t,e)>0?t:e},this._min=function(t,e){return r.cmp(t,e)<0?t:e},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(t){t.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(t){!t.newVersion||t.newVersion<t.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(t.oldVersion/10))})),this._maxKey=ks(n.IDBKeyRange),this._createTransaction=function(t,e,n,o){return new r.Transaction(t,e,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(t){var e=r;r.on("blocked").fire(t),ds.filter((function(t){return t.name===e.name&&t!==e&&!t._state.vcFired})).map((function(e){return e.on("versionchange").fire(t)}))},this.use(Ts),this.use(Ds),this.use(Bs),this.use(Rs),this.vip=Object.create(this,{_vip:{value:!0}}),u.forEach((function(t){return t(r)}))}return u(t,[{key:"version",value:function(t){if(isNaN(t)||t<.1)throw new Pc.Type("Given version is not a positive number");if(t=Math.round(10*t)/10,this.idbdb||this._state.isBeingOpened)throw new Pc.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t);var e=this._versions,n=e.filter((function(e){return e._cfg.version===t}))[0];return n||(n=new this.Version(t),e.push(n),e.sort(Jn),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(t){var e=this;return this.idbdb&&(this._state.openComplete||Jc.letThrough||this._vip)?t():new qe((function(t,n){if(e._state.openComplete)return n(new Pc.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return void n(new Pc.DatabaseClosed);e.open().catch(Ne)}e._state.dbReadyPromise.then(t,n)})).then(t)}},{key:"use",value:function(t){var e=t.stack,n=t.create,r=t.level,o=t.name;o&&this.unuse({stack:e,name:o});var i=this._middlewares[e]||(this._middlewares[e]=[]);return i.push({stack:e,create:n,level:null==r?10:r,name:o}),i.sort((function(t,e){return t.level-e.level})),this}},{key:"unuse",value:function(t){var e=t.stack,n=t.name,r=t.create;return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((function(t){return r?t.create!==r:!!n&&t.name!==n}))),this}},{key:"open",value:function(){return function(t){var e=function(){if(n.openCanceller!==o)throw new Pc.DatabaseClosed("db.open() was cancelled")},n=t._state,r=t._deps.indexedDB;if(n.isBeingOpened||t.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?ls(n.dbOpenError):t}));_c&&(n.openCanceller._stackHolder=Oc()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,u=null,a=!1;return qe.race([o,("undefined"==typeof navigator?qe.resolve():ur()).then((function(){return new qe((function(o,i){if(e(),!r)throw new Pc.MissingAPI;var c=t.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*t.verno));if(!s)throw new Pc.MissingAPI;s.onerror=Fn(i),s.onblocked=on(t._fireOnBlocked),s.onupgradeneeded=on((function(e){if(u=s.transaction,n.autoSchema&&!t._options.allowEmptyDB){s.onerror=Kn,u.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=on((function(){i(new Pc.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{u.onerror=Fn(i);var l=e.oldVersion>Math.pow(2,62)?0:e.oldVersion;a=l<1,t._novip.idbdb=s.result,function(t,e,n,r){var o=t._dbSchema,i=t._createTransaction("readwrite",t._storeNames,o);i.create(n),i._completion.catch(r);var u=i._reject.bind(i),a=Jc.transless||Jc;un((function(){Jc.trans=i,Jc.transless=a,0===e?(ec(o).forEach((function(t){Xn(n,t,o[t].primKey,o[t].indexes)})),Gn(t,n),qe.follow((function(){return t.on.populate.fire(i)})).catch(u)):function(t,e,n,r){var o=t._novip,i=[],u=o._versions,a=o._dbSchema=er(0,o.idbdb,r),c=!1;return u.filter((function(t){return t._cfg.version>=e})).forEach((function(t){i.push((function(){var i=a,u=t._cfg.dbschema;nr(o,i,r),nr(o,u,r),a=o._dbSchema=u;var s=Qn(i,u);s.add.forEach((function(t){Xn(r,t[0],t[1].primKey,t[1].indexes)})),s.change.forEach((function(t){if(t.recreate)throw new Pc.Upgrade("Not yet support for changing primary key");var e=r.objectStore(t.name);t.add.forEach((function(t){return tr(e,t)})),t.change.forEach((function(t){e.deleteIndex(t.name),tr(e,t)})),t.del.forEach((function(t){return e.deleteIndex(t)}))}));var l=t._cfg.contentUpgrade;if(l&&t._cfg.version>e){Gn(o,r),n._memoizedTables={},c=!0;var f=je(u);s.del.forEach((function(t){f[t]=i[t]})),Yn(o,[o.Transaction.prototype]),Zn(o,[o.Transaction.prototype],ec(f),f),n.schema=f;var h,p=wc(l);p&&an();var d=qe.follow((function(){if((h=l(n))&&p){var t=cn.bind(null,null);h.then(t,t)}}));return h&&"function"==typeof h.then?qe.resolve(h):d.then((function(){return h}))}})),i.push((function(e){c&&ys||function(t,e){[].slice.call(e.db.objectStoreNames).forEach((function(n){return null==t[n]&&e.db.deleteObjectStore(n)}))}(t._cfg.dbschema,e),Yn(o,[o.Transaction.prototype]),Zn(o,[o.Transaction.prototype],o._storeNames,o._dbSchema),n.schema=o._dbSchema}))})),function t(){return i.length?qe.resolve(i.shift()(n.idbtrans)).then(t):qe.resolve()}().then((function(){var t,e;e=r,ec(t=a).forEach((function(n){e.db.objectStoreNames.contains(n)||Xn(e,n,t[n].primKey,t[n].indexes)}))}))}(t,e,i,n).catch(u)}))}(t,l/10,u,i)}}),i),s.onsuccess=on((function(){u=null;var e,r,i,l,f=t._novip.idbdb=s.result,h=_e(f.objectStoreNames);if(h.length>0)try{var p=f.transaction(1===(l=h).length?l[0]:l,"readonly");n.autoSchema?function(t,e,n){var r=t._novip;r.verno=e.version/10;var o=r._dbSchema=er(0,e,n);r._storeNames=_e(e.objectStoreNames,0),Zn(r,[r._allTables],ec(o),o)}(t,f,p):(nr(t,t._dbSchema,p),r=p,!((i=Qn(er(0,(e=t).idbdb,r),e._dbSchema)).add.length||i.change.some((function(t){return t.add.length||t.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Gn(t,p)}catch(t){}ds.push(t),f.onversionchange=on((function(e){n.vcFired=!0,t.on("versionchange").fire(e)})),f.onclose=on((function(e){t.on("close").fire(e)})),a&&function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!or(n)&&"__dbnames"!==e&&rr(n,r).put({name:e}).catch(Ne)}(t._deps,c),o()}),i)}))}))]).then((function(){return e(),n.onReadyBeingFired=[],qe.resolve(ir((function(){return t.on.ready.fire(t.vip)}))).then((function e(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(Ve,Ne);return n.onReadyBeingFired=[],qe.resolve(ir((function(){return r(t.vip)}))).then(e)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return t})).catch((function(e){n.dbOpenError=e;try{u&&u.abort()}catch(t){}return o===n.openCanceller&&t._close(),ls(e)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var t=this._state,e=ds.indexOf(this);if(e>=0&&ds.splice(e,1),this.idbdb){try{this.idbdb.close()}catch(t){}this._novip.idbdb=null}t.dbReadyPromise=new qe((function(e){t.dbReadyResolve=e})),t.openCanceller=new qe((function(e,n){t.cancelOpen=n}))}},{key:"close",value:function(){this._close();var t=this._state;this._options.autoOpen=!1,t.dbOpenError=new Pc.DatabaseClosed,t.isBeingOpened&&t.cancelOpen(t.dbOpenError)}},{key:"delete",value:function(){var t=this,e=arguments.length>0,n=this._state;return new qe((function(r,o){var i=t,u=function(){var t=i;i.close();var e=i._deps.indexedDB.deleteDatabase(i.name);e.onsuccess=on((function(){!function(t,e){var n=t.indexedDB,r=t.IDBKeyRange;!or(n)&&"__dbnames"!==e&&rr(n,r).delete(e).catch(Ne)}(t._deps,t.name),r()})),e.onerror=Fn(o),e.onblocked=i._fireOnBlocked};if(e)throw new Pc.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(u):u()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var t=this._state.dbOpenError;return t&&"DatabaseClosed"===t.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var t=this;return ec(this._allTables).map((function(e){return t._allTables[e]}))}},{key:"transaction",value:function(){var t=cr.apply(this,arguments);return this._transaction.apply(this,t)}},{key:"_transaction",value:function(t,e,n){var r=this,o=Jc.trans;o&&o.db===this&&-1===t.indexOf("!")||(o=null);var i,u,a=-1!==t.indexOf("?");t=t.replace("!","").replace("?","");try{var s=this;if(u=e.map((function(t){var e=c(t,s.Table)?t.name:t;if("string"!=typeof e)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e})),"r"==t||"readonly"===t)i="readonly";else{if("rw"!=t&&"readwrite"!=t)throw new Pc.InvalidArgument("Invalid transaction mode: "+t);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!a)throw new Pc.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&u.forEach((function(t){if(o&&-1===o.storeNames.indexOf(t)){if(!a)throw new Pc.SubTransaction("Table "+t+" not included in parent transaction.");o=null}})),a&&o&&!o.active&&(o=null)}}catch(t){return o?o._promise(null,(function(e,n){n(t)})):ls(t)}var l=Ps.bind(null,this,i,u,o,n);return o?o._promise(i,l,"lock"):Jc.trans?dn(Jc.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(t){if(!ge(this._allTables,t))throw new Pc.InvalidTable("Table ".concat(t," does not exist"));return this._allTables[t]}}]),t}(),Fs="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Ks=function(){function t(e){o(this,t),this._subscribe=e}return u(t,[{key:"subscribe",value:function(t,e,n){return this._subscribe(t&&"function"!=typeof t?t:{next:t,error:e,complete:n})}},{key:Fs,value:function(){return this}}]),t}();try{Ns={indexedDB:tc.indexedDB||tc.mozIndexedDB||tc.webkitIndexedDB||tc.msIndexedDB,IDBKeyRange:tc.IDBKeyRange||tc.webkitIDBKeyRange}}catch(t){Ns={indexedDB:null,IDBKeyRange:null}}var $s=Us;me($s,s({},Ic,{delete:function(t){return new $s(t,{addons:[]}).delete()},exists:function(t){return new $s(t,{addons:[]}).open().then((function(t){return t.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(t){try{return function(t){var e=t.indexedDB,n=t.IDBKeyRange;return or(e)?Promise.resolve(e.databases()).then((function(t){return t.map((function(t){return t.name})).filter((function(t){return"__dbnames"!==t}))})):rr(e,n).toCollection().primaryKeys()}($s.dependencies).then(t)}catch(t){return ls(new Pc.MissingAPI)}},defineClass:function(){return function(t){ye(this,t)}},ignoreTransaction:function(t){return Jc.trans?dn(Jc.transless,t):t()},vip:ir,async:function(t){return function(){try{var e=ar(t.apply(this,arguments));return e&&"function"==typeof e.then?e:qe.resolve(e)}catch(t){return ls(t)}}},spawn:function(t,e,n){try{var r=ar(t.apply(n,e||[]));return r&&"function"==typeof r.then?r:qe.resolve(r)}catch(t){return ls(t)}},currentTransaction:{get:function(){return Jc.trans||null}},waitFor:function(t,e){var n=qe.resolve("function"==typeof t?$s.ignoreTransaction(t):t).timeout(e||6e4);return Jc.trans?Jc.trans.waitFor(n):n},Promise:qe,debug:{get:function(){return _c},set:function(t){Te(t,"dexie"===t?function(){return!0}:ms)}},derive:we,extend:ye,props:me,override:Se,Events:_n,on:Es,liveQuery:function(t){return new Ks((function(e){var n=function(){return ec(u).some((function(t){return i[t]&&function(t,e){var n=pr(e),r=n.next();if(r.done)return!1;for(var o=r.value,i=pr(t),u=i.next(o.from),a=u.value;!r.done&&!u.done;){if(_s(a.from,o.to)<=0&&_s(a.to,o.from)>=0)return!0;_s(o.from,a.from)<0?o=(r=n.next(a.from)).value:a=(u=i.next(o.from)).value}return!1}(i[t],u[t])}))},r=wc(t),o=!1,i={},u={},a={get closed(){return o},unsubscribe:function(){o=!0,Es.storagemutated.unsubscribe(l)}};e.start&&e.start(a);var c=!1,s=!1,l=function(t){yr(i,t),n()&&f()},f=function(){if(!c&&!o){i={};var h={},p=function(e){r&&an();var n=function(){return un(t,{subscr:e,trans:null})},o=Jc.trans?dn(Jc.transless,n):n();return r&&o.then(cn,cn),o}(h);s||(Es("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(t){c=!1,o||(n()?f():(i={},u=h,e.next&&e.next(t)))}),(function(t){c=!1,e.error&&e.error(t),a.unsubscribe()}))}};return f(),a}))},extendObservabilitySet:yr,getByKeyPath:sc,setByKeyPath:lc,delByKeyPath:function(t,e){"string"==typeof e?lc(t,e,void 0):"length"in e&&[].map.call(e,(function(e){lc(t,e,void 0)}))},shallowClone:je,deepClone:Ae,getObjectDiff:Is,cmp:_s,asap:Oe,minKey:-1/0,addons:[],connections:ds,errnames:Ac,dependencies:Ns,semVer:"3.2.1",version:"3.2.1".split(".").map((function(t){return parseInt(t)})).reduce((function(t,e,n){return t+e/Math.pow(10,2*n)}))})),$s.maxKey=ks($s.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Es("storagemutated",(function(t){var e;zs||(vs?(e=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,t):e=new CustomEvent("x-storagemutated-1",{detail:t}),zs=!0,dispatchEvent(e),zs=!1)})),addEventListener("x-storagemutated-1",(function(t){var e=t.detail;zs||gr(e)})));var zs=!1;if("undefined"!=typeof BroadcastChannel){var Hs=new BroadcastChannel("x-storagemutated-1");Es("storagemutated",(function(t){zs||Hs.postMessage(t)})),Hs.onmessage=function(t){t.data&&gr(t.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Es("storagemutated",(function(t){try{zs||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:t})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(e){return e.postMessage({type:"x-storagemutated-1",changedParts:t})})))}catch(t){}})),addEventListener("storage",(function(t){if("x-storagemutated-1"===t.key){var e=JSON.parse(t.newValue);e&&gr(e.changedParts)}}));var Vs=self.document&&navigator.serviceWorker;Vs&&Vs.addEventListener("message",(function(t){var e=t.data;e&&"x-storagemutated-1"===e.type&&gr(e.changedParts)}))}function qs(t){return qs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(t)}function Ws(t,e){return Ws=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ws(t,e)}qe.rejectionMapper=function(t,e){if(!t||c(t,De)||c(t,TypeError)||c(t,SyntaxError)||!t.name||!Tc[t.name])return t;var n=new Tc[t.name](e||t.message,t);return"stack"in t&&be(n,"stack",{get:function(){return this.inner.stack}}),n},Te(_c,ms);var Gs=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":h(t)},Zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ws(t,e)}(o,t);var e,n,r=(e=o,n=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(t){return!1}}(),function(){var t,r=qs(e);if(n){var o=qs(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return mr(this,t)});function o(){var t;return function(t,e){if(!c(t,e))throw new TypeError("Cannot call a class as a function")}(this,o),(t=r.call(this,"EsmOffline")).version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),t.syncQueue=t.table("syncQueue"),t.dynamicOfflineData=t.table("dynamicOfflineData"),t}return o}(Us);(0,so.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});try{self["workbox:window:6.5.1"]&&_()}catch(Bo){}try{self["workbox:core:6.5.1"]&&_()}catch(t){}var Ys=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))},Js=function(t,e){this.type=t,Object.assign(this,e)},Qs={type:"SKIP_WAITING"};!function(t){var e,n,r=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new Ys,r.en=new Ys,r.on=new Ys,r.un=0,r.an=new Set,r.cn=function(){var t=r.fn,e=t.installing;r.tn>0||!_r(e.scriptURL,r.sn.toString())||performance.now()>r.un+6e4?(r.vn=e,t.removeEventListener("updatefound",r.cn)):(r.hn=e,r.an.add(e),r.rn.resolve(e)),++r.tn,e.addEventListener("statechange",r.ln)},r.ln=function(t){var e=r.fn,n=t.target,o=n.state,i=n===r.vn,u={sw:n,isExternal:i,originalEvent:t};!i&&r.mn&&(u.isUpdate=!0),r.dispatchEvent(new Js(o,u)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&e.waiting===n&&r.dispatchEvent(new Js("waiting",u))}),200):"activating"===o&&(clearTimeout(r.wn),i||r.en.resolve(n))},r.dn=function(t){var e=r.hn,n=e!==navigator.serviceWorker.controller;r.dispatchEvent(new Js("controlling",{isExternal:n,originalEvent:t,sw:e,isUpdate:r.mn})),n||r.on.resolve(e)},r.gn=(o=function(t){var e=t.data,n=t.ports,o=t.source;return Sr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Js("message",{data:e,originalEvent:t,ports:n,sw:o}))}))},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(o.apply(this,t))}catch(t){return Promise.reject(t)}}),r.sn=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n;var o,i=r.prototype;i.register=function(t){var e,n,r=(void 0===t?{}:t).immediate,o=void 0!==r&&r;try{var i=this;return e=function(){return i.mn=Boolean(navigator.serviceWorker.controller),i.yn=i.pn(),Sr(i.bn(),(function(t){i.fn=t,i.yn&&(i.hn=i.yn,i.en.resolve(i.yn),i.on.resolve(i.yn),i.yn.addEventListener("statechange",i.ln,{once:!0}));var e=i.fn.waiting;return e&&_r(e.scriptURL,i.sn.toString())&&(i.hn=e,Promise.resolve().then((function(){i.dispatchEvent(new Js("waiting",{sw:e,wasWaitingBeforeRegister:!0}))})).then((function(){}))),i.hn&&(i.rn.resolve(i.hn),i.an.add(i.hn)),i.fn.addEventListener("updatefound",i.cn),navigator.serviceWorker.addEventListener("controllerchange",i.dn),i.fn}))},n=function(){if(!o&&"complete"!==document.readyState)return Or(new Promise((function(t){return window.addEventListener("load",t)})))}(),n&&n.then?n.then(e):e()}catch(t){return Promise.reject(t)}},i.update=function(){try{return this.fn?Or(this.fn.update()):void 0}catch(t){return Promise.reject(t)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(t){try{return Sr(this.getSW(),(function(e){return br(e,t)}))}catch(t){return Promise.reject(t)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&br(this.fn.waiting,Qs)},i.pn=function(){var t=navigator.serviceWorker.controller;return t&&_r(t.scriptURL,this.sn.toString())?t:void 0},i.bn=function(){try{var t=this;return function(e,n){try{var r=Sr(navigator.serviceWorker.register(t.sn,t.nn),(function(e){return t.un=performance.now(),e}))}catch(t){return n(t)}return r&&r.then?r.then(void 0,n):r}(0,(function(t){throw t}))}catch(t){return Promise.reject(t)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(r.prototype,o)}(function(){var t=function(){this.Pn=new Map},e=t.prototype;return e.addEventListener=function(t,e){this.Sn(t).add(e)},e.removeEventListener=function(t,e){this.Sn(t).delete(e)},e.dispatchEvent=function(t){t.target=this;for(var e,n=function(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return wr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(t,e):void 0}}(t))){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[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=t[Symbol.iterator]()).next.bind(n)}(this.Sn(t.type));!(e=n()).done;)(0,e.value)(t)},e.Sn=function(t){return this.Pn.has(t)||this.Pn.set(t,new Set),this.Pn.get(t)},t}()),new Zs,(0,so.createGlobalStore)("offline-synchronization",{}),uo.default.createContext({moduleName:""}),x(103),x(435);try{n(983).createContext()}catch(t){}var Xs,tl,el=x(64);el.default.default||el.default,function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLoadError"}(Xs||(Xs={})),function(t){t.loadPatient="loadPatient",t.newPatient="newPatient",t.loadError="patientLloadErroroadError"}(tl||(tl={})),kr((0,co.getExtensionInternalStore)()),kr((0,co.getExtensionStore)());var nl,rl=function(){},ol=void 0,il=Object,ul=function(t){return t===ol},al=function(t){return"function"==typeof t},cl=function(t,e){return il.assign({},t,e)},sl="undefined",ll=function(){return("undefined"==typeof window?"undefined":h(window))!=sl},fl=new WeakMap,hl=0,pl=function(t){var e,n,r=void 0===t?"undefined":h(t),o=t&&t.constructor,i=o==Date;if(il(t)!==t||i||o==RegExp)e=i?t.toJSON():"symbol"==r?t.toString():"string"==r?JSON.stringify(t):""+t;else{if(e=fl.get(t))return e;if(e=++hl+"~",fl.set(t,e),o==Array){for(e="@",n=0;n<t.length;n++)e+=pl(t[n])+",";fl.set(t,e)}if(o==il){e="#";for(var u=il.keys(t).sort();!ul(n=u.pop());)ul(t[n])||(e+=n+":"+pl(t[n])+",");fl.set(t,e)}}return e},dl=!0,vl=ll(),yl=("undefined"==typeof document?"undefined":h(document))!=sl,gl=vl&&window.addEventListener?window.addEventListener.bind(window):rl,ml=yl?document.addEventListener.bind(document):rl,bl=vl&&window.removeEventListener?window.removeEventListener.bind(window):rl,wl=yl?document.removeEventListener.bind(document):rl,_l={isOnline:function(){return dl},isVisible:function(){var t=yl&&document.visibilityState;return ul(t)||"hidden"!==t}},Sl={initFocus:function(t){return ml("visibilitychange",t),gl("focus",t),function(){wl("visibilitychange",t),bl("focus",t)}},initReconnect:function(t){var e=function(){dl=!0,t()},n=function(){dl=!1};return gl("online",e),gl("offline",n),function(){bl("online",e),bl("offline",n)}}},xl=!ll()||"Deno"in window,Ol=xl?uo.useEffect:uo.useLayoutEffect,El="undefined"!=typeof navigator&&navigator.connection,jl=!xl&&El&&(["slow-2g","2g"].includes(El.effectiveType)||El.saveData),kl=function(t){if(al(t))try{t=t()}catch(e){t=""}var e=[].concat(t);return[t="string"==typeof t?t:(Array.isArray(t)?t.length:t)?pl(t):"",e,t?"$swr$"+t:""]},Al=new WeakMap,Cl=function(t,e,n,r,o,i,u){void 0===u&&(u=!0);var a=Al.get(t),c=a[0],s=a[1],l=a[3],f=c[e],h=s[e];if(u&&h)for(var p=0;p<h.length;++p)h[p](n,r,o);return i&&(delete l[e],f&&f[0])?f[0](2).then((function(){return t.get(e)})):t.get(e)},Pl=0,Tl=function(){return++Pl},Il=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ar(void 0,void 0,void 0,(function(){var e,n,r,o,i,u,a,c,s,l,f,h,p,d,v,y,g,m,b,w;return Cr(this,(function(_){switch(_.label){case 0:if(e=t[0],n=t[1],r=t[2],o=t[3],u=!!ul((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,a=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=kl(n),f=l[0],h=l[2],!f)return[2];if(p=Al.get(e),d=p[2],t.length<3)return[2,Cl(e,f,e.get(f),ol,ol,a,!0)];if(v=r,g=Tl(),d[f]=[g,0],m=!ul(s),b=e.get(f),m&&(e.set(f,s),Cl(e,f,s)),al(v))try{v=v(e.get(f))}catch(t){y=t}return v&&al(v.then)?[4,v.catch((function(t){y=t}))]:[3,2];case 1:if(v=_.sent(),g!==d[f][0]){if(y)throw y;return[2,v]}y&&m&&c&&(u=!0,v=b,e.set(f,b)),_.label=2;case 2:return u&&(y||(al(u)&&(v=u(v,b)),e.set(f,v)),e.set(h,cl(e.get(h),{error:y}))),d[f][1]=Tl(),[4,Cl(e,f,v,y,ol,a,!!u)];case 3:if(w=_.sent(),y)throw y;return[2,u?w:v]}}))}))},Dl=function(t,e){for(var n in t)t[n][0]&&t[n][0](e)},Rl=function(t,e){if(!Al.has(t)){var n=cl(Sl,e),r={},o=Il.bind(ol,t),i=rl;if(Al.set(t,[r,{},{},{},o]),!xl){var u=n.initFocus(setTimeout.bind(ol,Dl.bind(ol,r,0))),a=n.initReconnect(setTimeout.bind(ol,Dl.bind(ol,r,1)));i=function(){u&&u(),a&&a(),Al.delete(t)}}return[t,o,i]}return[t,Al.get(t)[4]]},Ll=Rl(new Map),Ml=Ll[0],Nl=Ll[1],Bl=cl({onLoadingSlow:rl,onSuccess:rl,onError:rl,onErrorRetry:function(t,e,n,r,o){var i=n.errorRetryCount,u=o.retryCount,a=~~((Math.random()+.5)*(1<<(u<8?u:8)))*n.errorRetryInterval;!ul(i)&&u>i||setTimeout(r,a,o)},onDiscarded:rl,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:jl?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:jl?5e3:3e3,compare:function(t,e){return pl(t)==pl(e)},isPaused:function(){return!1},cache:Ml,mutate:Nl,fallback:{}},_l),Ul=(0,uo.createContext)({}),Fl=(il.defineProperty((function(t){var e=t.value,n=function(t,e){var n=cl(t,e);if(e){var r=t.use,o=t.fallback,i=e.use,u=e.fallback;r&&i&&(n.use=r.concat(i)),o&&u&&(n.fallback=cl(o,u))}return n}((0,uo.useContext)(Ul),e),r=e&&e.provider,o=(0,uo.useState)((function(){return r?Rl(r(n.cache||Ml),e):ol}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Ol((function(){return o?o[2]:ol}),[]),(0,uo.createElement)(Ul.Provider,cl(t,{value:n}))}),"default",{value:Bl}),x(23)),Kl=x.n(Fl),$l=x(701),zl=x.n($l);Kl().extend(zl()),nl=function(t,e){document.documentElement.style.setProperty(t,e)},(0,io.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:io.Type.String},"Brand color #2":{_default:"#004144",_type:io.Type.String},"Brand color #3":{_default:"#007d79",_type:io.Type.String}}),(0,io.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(t){t.loaded&&t.config&&(nl("--brand-01",t.config["Brand color #1"]),nl("--brand-02",t.config["Brand color #2"]),nl("--brand-03",t.config["Brand color #3"]))})),r("omrs-logo-full-color",Pr),r("omrs-logo-full-mono",Pr),r("omrs-logo-full-grey",Pr),r("omrs-logo-partial-color",Tr),r("omrs-logo-partial-mono",Tr),r("omrs-logo-partial-grey",Tr),r("omrs-logo-icon-color",Ir),r("omrs-logo-icon-mono",Ir),r("omrs-logo-icon-grey",Ir),r("omrs-logo-white",Dr),r("omrs-icon-visibility",Mr),r("omrs-icon-menu",Nr),r("omrs-icon-search",Br),r("omrs-icon-arrow-back",Ur),r("omrs-icon-arrow-forward",Fr),r("omrs-icon-arrow-downward",Kr),r("omrs-icon-arrow-upward",$r),r("omrs-icon-chevron-left",zr),r("omrs-icon-chevron-right",Hr),r("omrs-icon-chevron-up",Vr),r("omrs-icon-chevron-down",qr),r("omrs-icon-supervised-user-circle",Wr),r("omrs-icon-home",Gr),r("omrs-icon-close",Zr),r("omrs-icon-important-notification",Yr),r("omrs-icon-calendar",Jr),r("omrs-icon-access-time",Qr),r("omrs-icon-add",Xr),r("omrs-icon-remove",to),r("omrs-icon-check-circle",eo),r("omrs-icon-zoomoutmap",no),r("omrs-icon-location",ro),r("omrs-icon-download",oo)}(),function(){"use strict";x.r(O)}(),O}())}}}))}}]);
2
+ (self.webpackChunk_openmrs_esm_devtools_app=self.webpackChunk_openmrs_esm_devtools_app||[]).push([[889],{159:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-config","@openmrs/esm-error-handling"],(function(e,t){var i={},a={};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}],execute:function(){e(function(){var e={602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},o=function(e,t,n,o){var u,c,s,l,f=t&&r(t.prototype,a)?t:a,d=Object.create(f.prototype),h=new p(o||[]);return d._invoke=(u=e,c=n,s=h,l=_,function(e,t){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=I(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===_)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var o=i(u,c,s);if("normal"===o.type){if(l=s.done?j:x,o.arg===E)continue;return{value:o.arg,done:s.done}}"throw"===o.type&&(l=j,s.method="throw",s.arg=o.arg)}}),d},i=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},a=function(){},u=function(){},c=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,o,a,u){var c=i(e[r],e,o);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},d=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},p=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",S=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=o;var _="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},C={};n(C,b,(function(){return this}));var k=Object.getPrototypeOf,A=k&&k(k(h([])));A&&A!==y&&m.call(A,b)&&(C=A);var P=c.prototype=a.prototype=Object.create(C);function I(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var o=i(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,E;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,E):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return u.prototype=c,n(P,"constructor",c),n(c,"constructor",u),u.displayName=n(c,S,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,n(e,S,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var u=new l(o(t,n,r,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(P),n(P,S,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,p.prototype={constructor:p,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(d),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),E}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=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.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},824:function(e){"use strict";e.exports=i},254:function(e){"use strict";e.exports=a}},u={};function c(t){var n=u[t];if(void 0!==n)return n.exports;var r=u[t]={exports:{}};return e[t](r,r.exports,c),r.exports}c.y=t,c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var n in t)c.o(t,n)&&!c.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;c.g.importScripts&&(e=c.g.location+"");var t=c.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=e}();var s={};return(0,c(968).s)(1),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)}),[])},u=function(e){return e},l=function(e){return 0===e.length?u:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}},f=function(e){if(e||(e=J.Promise||Promise),!e)throw new Error("no Promise impl found");return e},d=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},p=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){d(i,r,o,a,u,"next",e)}function u(e){d(i,r,o,a,u,"throw",e)}a(void 0)}))}},h=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}},v=function(e,t){return!t||"object"!==Ee(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},y=function(e){return window.openmrsBase+e},m=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);t.headers||(t.headers={}),Se(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;var r,o=Error();return window.fetch(n,t).then((r=p(Z().mark((function e(t){var r,i;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=t).ok){e.next=10;break}if(204!==r.status){e.next=7;break}return r.data=null,e.abrupt("return",r);case 7:return e.abrupt("return",r.text().then((function(e){try{e&&(r.data=JSON.parse(e))}catch(e){}return r})));case 8:e.next=19;break;case 10:return e.next=12,(0,_e.getConfig)("@openmrs/esm-api");case 12:if(i=e.sent.redirectAuthFailure,!(n===y(ke)&&403===r.status||i.enabled&&i.errors.includes(r.status))){e.next=18;break}return(0,_e.navigate)({to:i.url}),e.abrupt("return",i.resolvePromise?Promise.resolve():new Promise((function(){})));case 18:return e.abrupt("return",r.text().then((function(e){var t=e;try{t=JSON.parse(e)}catch(e){}throw new Ae(n,r,t,o)}),(function(e){throw new Ae(n,r,null,o)})));case 19:case"end":return e.stop()}}),e)}))),function(e){return r.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 m(e,t).then((function(e){o=!0,r.next(e),r.complete()}),(function(e){o=!0,r.error(e)})),function(){o||n.abort()}}))},b=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},w=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){b(i,r,o,a,u,"next",e)}function u(e){b(i,r,o,a,u,"throw",e)}a(void 0)}))}},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{includeAuthStatus:!0};return(Re<Date.now()-6e4||!De.getState().loaded)&&x(),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)}))},_=function(){return(Re<Date.now()-6e4||!De.getState().loaded)&&x(),De},x=function(){return new Promise((function(e,t){Re=Date.now(),m(ke).then((function(n){if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();var r,o,i,a,u;(u=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)!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",u),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}}))}))},O=function(){De.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})},j=function(e,t){return r=t,("string"==typeof(n=e)?!Le(r.privileges.find((function(e){return n===e.display}))):Array.isArray(n)?n.every((function(e){return!Le(r.privileges.find((function(t){return e===t.display})))})):(console.error('Could not understand privileges "'.concat(n,'"')),!0))||!Le(t.roles.find((function(e){return"System Developer"===e.display})));var n,r},E=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))}))},C=function(){return new Promise((function(e,t){var n=S().subscribe((function(t){e(t.sessionLocation),n.unsubscribe()}),t)}))},k=function(e,t){return Ne.apply(this,arguments)},A=function(){(0,_e.defineConfigSchema)("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:_e.Type.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:_e.Type.String,_default:"${openmrsSpaBase}/login",_validators:[_e.validators.isUrl]},errors:{_type:_e.Type.Array,_default:[401],_elements:{_type:_e.Type.Number,_validators:[_e.validators.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:_e.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."}}}),x()},P=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},I=function(e,t){return e?Ie.read(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){P(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({type:"Patient",patient:e},t)):Promise.resolve(null)},T=function(e){return function(t){return 0===e?Ge:t.lift(new We(e))}},M=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))}},L=function(e,t,n){var r=null!=n?n:Xe;return g("/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(r),{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(T(1)).pipe(M((function(e){return e})))},D=function(e,t){return g("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})},R=function(e,t,n){return g("/ws/rest/v1/visit/".concat(e),{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})},N=function(e){return{uuid:e.uuid,display:e.display,name:e.name}},B=function(){return g("/ws/rest/v1/visittype").pipe(M((function(e){return e.data.results.map(N)}))).pipe(T(1))},U=function(e){return{uuid:e.uuid,display:e.display}},H=function(){return g("/ws/rest/v1/location").pipe(M((function(e){return e.data.results.map(U)}))).pipe(T(1))};c.r(s),c.d(s,{OpenmrsFetchError:function(){return Ae},VisitMode:function(){return Be},VisitStatus:function(){return Ue},backendDependencies:function(){return tt},clearCurrentUser:function(){return O},defaultVisitCustomRepresentation:function(){return Xe},fetchCurrentPatient:function(){return I},fhir:function(){return Ie},fhirBaseUrl:function(){return Pe},getCurrentUser:function(){return S},getLocations:function(){return H},getLoggedInUser:function(){return E},getSessionLocation:function(){return C},getSessionStore:function(){return _},getStartedVisit:function(){return et},getVisitTypes:function(){return B},getVisitsForPatient:function(){return L},makeUrl:function(){return y},openmrsFetch:function(){return m},openmrsObservableFetch:function(){return g},refetchCurrentUser:function(){return x},saveVisit:function(){return D},sessionEndpoint:function(){return ke},setSessionLocation:function(){return k},setupApiModule:function(){return A},toLocationObject:function(){return U},toVisitTypeObject:function(){return N},updateVisit:function(){return R},userHasAccess:function(){return j}});var V,F,K,z,$,q=c(602),Z=c.n(q),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])})(e,t)},W=!1,J={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,W=e},get useDeprecatedSynchronousErrorHandling(){return W}},Y={closed:!0,next:function(e){},error:function(e){if(J.useDeprecatedSynchronousErrorHandling)throw e;i(e)},complete:function(){}},Q=Array.isArray||function(e){return e&&"number"==typeof e.length},X=(V=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},V.prototype=Object.create(Error.prototype),V),ee=function(){var e,n=function(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)};return n.prototype.unsubscribe=function(){var e;if(!this.closed){var o,i=this,u=i._parentOrParents,c=i._ctorUnsubscribe,s=i._unsubscribe,l=i._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r(u,n))u.remove(this);else if(null!==u)for(var f=0;f<u.length;++f)u[f].remove(this);if(t(s)){c&&(this._unsubscribe=void 0);try{s.call(this)}catch(t){e=r(t,X)?a(t.errors):[t]}}if(Q(l)){f=-1;for(var d=l.length;++f<d;){var p=l[f];if(null!==(o=p)&&"object"==typeof o)try{p.unsubscribe()}catch(t){e=e||[],r(t,X)?e=e.concat(a(t.errors)):e.push(t)}}}if(e)throw new X(e)}},n.prototype.add=function(e){var t=e;if(!e)return n.EMPTY;switch(void 0===e?"undefined":o(e)){case"function":t=new n(e);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!r(t,n)){var i=t;(t=new n)._subscriptions=[i]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var a=t._parentOrParents;if(null===a)t._parentOrParents=this;else if(r(a,n)){if(a===this)return t;t._parentOrParents=[a,this]}else{if(-1!==a.indexOf(this))return t;a.push(this)}var u=this._subscriptions;return null===u?this._subscriptions=[t]:u.push(t),t},n.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},n.EMPTY=((e=new n).closed=!0,e),n}(),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=Y;break;case 1:if(!e){a.destination=Y;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=(K=function(e,n,r,o){var i,a=F.call(this)||this;a._parentSubscriber=e;var u=a;return t(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==Y&&(t((u=Object.create(n)).unsubscribe)&&a.add(u.unsubscribe.bind(u)),u.unsubscribe=a.unsubscribe.bind(a))),a._context=u,a._next=i,a._error=r,a._complete=o,a},e(K,F=ne),K.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;J.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},K.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=J.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)}}},K.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)};J.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},K.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),J.useDeprecatedSynchronousErrorHandling)throw e;i(e)}},K.prototype.__tryOrSetError=function(e,t,n){if(!J.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return J.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(i(t),!0)}return!1},K.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},K),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(Y)}(e,t,n);if(o?i.add(o.call(i,this.source)):i.add(this.source||J.useDeprecatedSynchronousErrorHandling&&!i.syncErrorThrowable?this._subscribe(i):this._trySubscribe(i)),J.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){J.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=f(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:l(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(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,ue="object"==typeof self&&self&&self.Object===Object&&self,ce=(ae||ue||Function("return this")()).Symbol,se=Object.prototype,le=se.hasOwnProperty,fe=se.toString,de=ce?ce.toStringTag:void 0,pe=Object.prototype.toString,he=ce?ce.toStringTag:void 0,ve=(z=Object.getPrototypeOf,$=Object,function(e){return z($(e))}),ye=Function.prototype,me=Object.prototype,ge=ye.toString,be=me.hasOwnProperty,we=ge.call(Object),Se=function(e){if(null==(t=e)||"object"!=typeof t||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":he&&he 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):(t=e,pe.call(t));var t}(e))return!1;var t,n=ve(e);if(null===n)return!0;var o=be.call(n,"constructor")&&n.constructor;return"function"==typeof o&&r(o,o)&&ge.call(o)==we},_e=c(824);function xe(e,t,n){return xe=h()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&je(o,n.prototype),o},xe.apply(null,arguments)}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function je(e,t){return(je=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ee=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)};function Ce(e){var t="function"==typeof Map?new Map:void 0;return Ce=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 xe(e,arguments,Oe(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),je(r,e)},Ce(e)}var ke="/ws/rest/v1/session",Ae=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&&je(e,t)}(i,e);var t,n,o=(t=i,n=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}}(),function(){var e,r=Oe(t);if(n){var o=Oe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return v(this,e)});function i(e,t,n,a){var u;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,i),(u=o.call(this)).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"),a.message=u.message,u.responseBody=n,u.response=t,u.stack="Stacktrace for outgoing request:\n".concat(a.stack,"\nStacktrace for incoming response:\n").concat(u.stack),u}return i}(Ce(Error)),Pe="/ws/fhir2/R4",Ie={read:function(e){var t,n;return m((n={url:"".concat(Pe,"/").concat(e.type,"/").concat(e.patient),method:"GET",headers:null!==(t=e.headers)&&void 0!==t?t:{}}).url,{method:n.method,headers:n.headers}).then((function(e){return{status:e.status,headers:e.headers,data:e.data,config:n}}),(function(e){return{status:e.response.status,headers:e.response.headers,data:e.responseBody,config:n}}))}},Te=c(254),Me=c(385),Le=function(e){return void 0===e},De=(0,Me.createGlobalStore)("session",{loaded:!1,session:null}),Re=0;function Ne(){return(Ne=w(Z().mark((function e(t,n){return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(ke,{method:"POST",body:{sessionLocation:t},headers:{"Content-Type":"application/json"},signal:n.signal});case 2:x();case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Be,Ue,He,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}(),Fe=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),Ke=function(t){var n=function(e){var n=t.call(this,e)||this;return n.destination=e,n};return e(n,t),n}(ne),ze=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 Ke(this)},n.prototype.lift=function(e){var t=new $e(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 Fe(this,e))},n.prototype.asObservable=function(){var e=new ie;return e.source=this,e},n.create=function(e,t){return new $e(e,t)},n}(ie),$e=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}(ze),qe=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}(ze),Ze=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}(),Ge=new ie((function(e){return e.complete()})),We=function(){var e=function(e){if(this.total=e,this.total<0)throw new Ze};return e.prototype.call=function(e,t){return t.subscribe(new Je(e,this.total))},e}(),Je=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 Qe(e,this.project,this.thisArg))},e}(),Qe=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),Xe="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,value),location:(uuid,name,display),startDatetime,stopDatetime)",et=new qe(null);(He=Be||(Be={})).NEWVISIT="startVisit",He.EDITVISIT="editVisit",He.LOADING="loadingVisit",function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(Ue||(Ue={}));var tt={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}}(),s}())}}}))},810:()=>{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(){var t={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},685:function(e){"use strict";e.exports=r}},o={};function i(e){var n=o[e];if(void 0!==n)return n.exports;var r=o[e]={exports:{}};return t[e](r,r.exports,i),r.exports}i.y=n,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})},function(){var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e}();var a={};return(0,i(968).s)(1),function(){"use strict";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},o=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.")}()},u=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?h(t.matcher):h(t.path);var n,r},c=function(e){return s([e])},s=function(e){var t=l(),n=e.map((function(e){return{matcher:u(e),settings:e}})),r=o(t).concat(o(n));v.setState(r,!0)},l=function(){return v.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=y(e,t);if(n){for(var r=[n],o=y(e,n.settings.parent);void 0!==o;)r.push(o),o=y(e,o.settings.parent);return r.reverse()}}return[]},p=function(e){return d(l(),e)};function h(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)?(c=o,s=i,l=r.map((function(e){return h(e,c,s).source})),new RegExp("(?:"+l.join("|")+")",n(s))):(a=o,function(e,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,u=o.start,c=void 0===u||u,s=o.end,l=void 0===s||s,f=o.encode,d=void 0===f?function(e){return e}:f,p="["+t(o.endsWith||"")+"]|$",h="["+t(o.delimiter||"/#?")+"]",v=c?"^":"",y=0,m=e;y<m.length;y++){var g=m[y];if("string"==typeof g)v+=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 S="*"===g.modifier?"?":"";v+="(?:"+b+"((?:"+g.pattern+")(?:"+w+b+"(?:"+g.pattern+"))*)"+w+")"+S}else v+="(?:"+b+"("+g.pattern+")"+w+")"+g.modifier;else v+="("+g.pattern+")"+g.modifier;else v+="(?:"+b+w+")"+g.modifier}}if(l)a||(v+=h+"?"),v+=o.endsWith?"(?="+p+")":"$";else{var _=e[e.length-1],x="string"==typeof _?h.indexOf(_[_.length-1])>-1:void 0===_;a||(v+="(?:"+h+"(?="+p+"))?"),x||(v+="(?="+h+"|"+p+")")}return new RegExp(v,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[u=n+1])throw new TypeError('Pattern cannot start with "?" at '+u);for(;u<e.length;)if("\\"!==e[u]){if(")"===e[u]){if(0==--o){u++;break}}else if("("===e[u]&&(o++,"?"!==e[u+1]))throw new TypeError("Capturing groups are not allowed at "+u);i+=e[u++]}else i+=e[u++]+e[u++];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=u}else{for(var a="",u=n+1;u<e.length;){var c=e.charCodeAt(u);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;a+=e[u++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=u}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||"/#?")+"]+?",u=[],c=0,s=0,l="",f=function(e){if(s<r.length&&r[s].type===e)return r[s++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[s],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};s<r.length;){var h=f("CHAR"),v=f("NAME"),y=f("PATTERN");if(v||y){var m=h||"";-1===i.indexOf(m)&&(l+=m,m=""),l&&(u.push(l),l=""),u.push({name:v||c++,prefix:m,suffix:"",pattern:y||a,modifier:f("MODIFIER")||""})}else{var g=h||f("ESCAPED_CHAR");if(g)l+=g;else if(l&&(u.push(l),l=""),f("OPEN")){m=p();var b=f("NAME")||"",w=f("PATTERN")||"",S=p();d("CLOSE"),u.push({name:b||(w?c++:""),pattern:b&&!w?a:w,prefix:m,suffix:S,modifier:f("MODIFIER")||""})}else d("END")}}return u}(r,u=i),a,u));var a,u,c,s,l}i.r(a),i.d(a,{filterBreadcrumbs:function(){return d},getBreadcrumbs:function(){return l},getBreadcrumbsFor:function(){return p},registerBreadcrumb:function(){return c},registerBreadcrumbs:function(){return s}});var v=(0,i(685).createGlobalStore)("breadcrumbs",[]);function y(e,t){if(t)return n=t,(r=e.filter((function(e){return e.matcher.test(n)})),function(e){if(Array.isArray(e))return e}(r)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),1!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(r)||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}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0]||function(e,t){for(var n=t.split("/");n.length>1;){n.pop();var r=y(e,n.join("/"));if(r)return r}}(e,t);var n,r}}(),a}())}}}))},347:()=>{var e=function(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},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=o(e);function a(e,t){return se(e,t,n.slice(),r.slice())}return!u((function(e,t){return!u(a,t,e)}),o(t),i)},l=function(e){return function o(i,a,u){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(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},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)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](xe(e["@@transducer/step"],e),t))},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Te.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Te.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Te.getGlobalStore)("config-extensions",{configs:{}})},S=function(e,t){var n=Object.assign({},_(w().getState(),e,t));return n.config=he(["Display conditions"],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}},x=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},j=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){O(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return 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,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||k(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.")}()},C=function(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(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.")}()},k=function(e,t){if(e){if("string"==typeof e)return x(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)?x(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 u=i.value,c=V(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=K(H(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),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var d,p=Object.entries(c)[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=E(d.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==p.return||p.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 j({},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=m(),u=a.getState(),c={slots:j({},u.slots,i)};le(u,c)||a.setState(c)},I=function(e,t){var n=function(e,t){var n=Ue(ge(e.schemas)),r=C(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 u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=E(u.value,2);n=K([n,He(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Be.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=B(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},M=function(e,t){Ve(e,t);var n=pe(t,$e),r=Le.getState();Le.setState({schemas:j({},r.schemas,O({},e,n))})},L=function(e,t){Ve(e,t);var n=pe(t,$e),r=Le.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.")),Le.setState({schemas:j({},r.schemas,O({},e,n))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Le.getState();Le.setState({providedConfigs:C(n.providedConfigs).concat([{source:t,config:e}])})},R=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=he(["Display conditions"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},N=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];z(e,t,n);var o=ze(e,t,r);return Ke(e,o,n),o},B=function(e,t,n,r,o,i){var a,u,c,s,l=E(r.split("#"),1)[0],f=o.schemas[l],d=f?l:t,p=H(o,i),h=F(e,p),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=K([F(d,p),v]),m=null!=f?f:o.schemas[t];z(m,y,d);var g=ze(m,y,o.devDefaultsAreOn);return Ke(m,g,d),delete g.extensionSlots,g},U=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&&(G(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},H=function(e,t){return C(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},V=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=F(e,H(t,n));z(r,o,e);var i=ze(r,o,t.devDefaultsAreOn);return Ke(r,i,e),delete i.extensionSlots,i},F=function(e,t){return K(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},K=function(e){return je(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,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Fe(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},$=function(e,t,n){t&&q(e,[{Array:Ee,Boolean:Ce,ConceptUuid:Ie,Number:ke,Object:Pe,String:Ae,UUID:Ie,PersonAttributeTypeUuid:Ie,PatientIdentifierTypeUuid:Ie}[t]],n)},q=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},Z=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},G=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},W=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 Y(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){W(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Y=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},Q=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(t,n);o.startsWith(r)?(0,qe.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return ye},configExtensionStore:function(){return Ne},configInternalStore:function(){return Le},defineConfigSchema:function(){return M},defineExtensionConfigSchema:function(){return L},getConfig:function(){return R},getConfigStore:function(){return y},getExtensionConfig:function(){return S},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Be},inRange:function(){return Ze},interpolateString:function(){return Y},interpolateUrl:function(){return J},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return Ge},navigate:function(){return Q},oneOf:function(){return Je},processConfig:function(){return N},provide:function(){return D},temporaryConfigStore:function(){return Re},validator:function(){return h},validators:function(){return Ye}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=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||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(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 se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==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(u){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))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(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(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(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]),p=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],d,p))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])})),fe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),de=l((function e(t,n,r){return fe((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 de((function(e,t,n){return n}),e,t)})),he=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 u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ve(e[u],t,n,!0):e[u];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 ye,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&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),Se=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}(),_e=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,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,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)}))})),xe=_e,Oe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",je=l((function(e,t,n){if("function"==typeof e&&(e=new Se(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 p(e,t,n,"fantasy-land/reduce");if(null!=n[Oe])return d(e,t,n[Oe]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));(me=ye||(ye={})).Array="Array",me.Boolean="Boolean",me.ConceptUuid="ConceptUuid",me.Number="Number",me.Object="Object",me.String="String",me.UUID="UUID",me.PersonAttributeTypeUuid="PersonAttributeTypeUuid",me.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ee=h((function(e){return Array.isArray(e)}),"must be an array"),Ce=h((function(e){return"boolean"==typeof e}),"must be a boolean"),ke=h((function(e){return"number"==typeof e}),"must be a number"),Ae=h((function(e){return"string"==typeof e}),"must be a string"),Pe=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ie=h((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"),Te=i(685),Me={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Le=(0,Te.createGlobalStore)("config-internal",Me),De=v();Le.subscribe((function(e){var t;e.devDefaultsAreOn!=De&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),De=e.devDefaultsAreOn)}));var Re=(0,Te.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Re.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Ne=(0,Te.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Be=(0,Te.createGlobalStore)("config-implementer-tools",{config:{}});function Ue(e){return e.hasOwnProperty("_default")?j({},e,{_value:e._default,_source:"default"}):G(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ue(e[n]),t}),{}):{}}function He(e,t){return G(e)?Object.keys(e).reduce((function(n,r){return n[r]=He(e[r],t),n}),{}):{_value:e,_source:t}}function Ve(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 u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if("Display conditions"===u&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),!G(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ve(e,c,u);var s=c._elements;if(Z(s)&&Ve(e,s,u+"._elements"),c._validators){var l=!0,f=!1,d=void 0;try{for(var p,h=c._validators[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,d=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}}var y=c._type;y&&!Object.values(ye).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ye).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).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(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ye.Array,ye.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").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)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function Fe(e,t,n){$(n,e._type,t),G(t)?e._type===ye.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];z(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||z(e,t,n):e._type===ye.Array&&function(e,t,n){if(Z(e._elements))for(var r=0;r<t.length;r++)Fe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;$("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&q(n,e._validators,t),G(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===ye.Object&&e._elements?Ke(e._elements,s,l):Ke(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ke(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}A(Le.getState(),Re.getState()),Le.subscribe((function(e){return A(e,Re.getState())})),Re.subscribe((function(e){return A(Le.getState(),e)})),I(Le.getState(),Re.getState()),Le.subscribe((function(e){return I(e,Re.getState())})),Re.subscribe((function(e){return I(Le.getState(),e)})),P(Le.getState(),Re.getState()),Le.subscribe((function(e){return P(e,Re.getState())})),Re.subscribe((function(e){return P(Le.getState(),e)})),T(Le.getState(),Ne.getState(),Re.getState()),Le.subscribe((function(e){T(e,Ne.getState(),Re.getState())})),Ne.subscribe((function(e){T(Le.getState(),e,Re.getState())})),Re.subscribe((function(e){T(Le.getState(),Ne.getState(),e)}));var ze=function(e,t,n){var r=ge(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&Z(s))if(u._type===ye.Array&&Array.isArray(a)){var l=a.map((function(e){return ze(s,e,n)}));r[i]=l}else if(u._type===ye.Object){var f=!0,d=!1,p=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=ze(s,a[y],n)}}catch(e){d=!0,p=e}finally{try{f||null==v.return||v.return()}finally{if(d)throw p}}}}else if(G(u)){var m=r.hasOwnProperty(i)?a:{};G(m)&&(r[i]=ze(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},$e={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:ye.Array,_default:[]}}},qe=i(645),Ze=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ge=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((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=Ge([]),Je=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ye={inRange:Ze,isUrl:We,isUrlWithTemplateParameters:Ge,oneOf:Je}}(),a}())}}}))},708:()=>{System.register(["@openmrs/esm-globals"],(function(e,t){var n={};return{setters:[function(e){n.dispatchNotificationShown=e.dispatchNotificationShown}],execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},728:function(e){"use strict";e.exports=n}},r={};function o(t){var n=r[t];if(void 0!==n)return n.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,o),i.exports}o.y=t,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})},function(){var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e}();var i={};return(0,o(968).s)(1),function(){"use strict";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())};o.r(i),o.d(i,{createErrorHandler:function(){return t},reportError:function(){return e}});var r=o(728);window.onerror=function(){return(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."}),!1},window.onunhandledrejection=function(){(0,r.dispatchNotificationShown)({description:"Oops! An unexpected error occurred."})}}(),i}())}}}))},547:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-config","@openmrs/esm-state","@openmrs/esm-api","single-spa"],(function(i,a){var u={},c={},s={},l={};return{setters:[function(e){u.configExtensionStore=e.configExtensionStore,u.getExtensionConfigFromStore=e.getExtensionConfigFromStore,u.getExtensionSlotConfig=e.getExtensionSlotConfig,u.getExtensionSlotConfigFromStore=e.getExtensionSlotConfigFromStore,u.getExtensionSlotsConfigStore=e.getExtensionSlotsConfigStore,u.getExtensionsConfigStore=e.getExtensionsConfigStore},function(e){c.createGlobalStore=e.createGlobalStore,c.getGlobalStore=e.getGlobalStore},function(e){s.getSessionStore=e.getSessionStore,s.userHasAccess=e.userHasAccess},function(e){l.mountRootParcel=e.mountRootParcel}],execute:function(){i(function(){var i={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=s},824:function(e){"use strict";e.exports=u},685:function(e){"use strict";e.exports=c},645:function(e){"use strict";e.exports=l}},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var n=f[e]={exports:{}};return i[e](n,n.exports,d),n.exports}d.y=a,d.d=function(e,t){for(var n in t)d.o(t,n)&&!d.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},d.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;d.g.importScripts&&(e=d.g.location+"");var t=d.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),d.p=e}();var p={};return(0,d(968).s)(1),function(){"use strict";var i=function(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])}},a=function(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])}},u=function(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])}},c=function(e){var t=this.__data__=new $(e);this.size=t.size},s=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new _e;++t<n;)this.add(e[t])},l=function(e){var t=Dt.getState(),n=e(t);n!==t&&Dt.setState(n)},f=function(e){var t=[],n=!0,r=!1,o=void 0;try{for(var i,a=Object.values(e.extensions)[Symbol.iterator]();!(n=(i=a.next()).done);n=!0){var u=i.value,c=!0,s=!1,l=void 0;try{for(var f,d=u.instances[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var p=f.value;t.push({slotModuleName:p.slotModuleName,extensionModuleName:u.moduleName,slotName:p.slotName,extensionId:p.id})}}catch(e){s=!0,l=e}finally{try{c||null==d.return||d.return()}finally{if(s)throw l}}}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}Tt(Mt.configExtensionStore.getState().mountedExtensions,t)||Mt.configExtensionStore.setState({mountedExtensions:t})},h=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},v=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},y=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){v(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||b(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.")}()},g=function(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(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.")}()},b=function(e,t){if(e){if("string"==typeof e)return h(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)?h(e,t):void 0}},w=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=Object.entries(e.slots)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=m(u.value,2),l=s[0],f=s[1],d=P(l,e,(0,Mt.getExtensionSlotConfigFromStore)(t,f.name).config,n);r[l]={moduleName:f.moduleName,assignedExtensions:d}}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}Tt(Ht.getState().slots,r)||Ht.setState({slots:r})},S=function(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}},_=function(e){return m(e.split("#"),1)[0]},x=function(e,t){var n=_(t);return e.extensions[n]},O=function(e){return x(Ut.getState(),e)},j=function(e,t){l((function(n){var r=n.slots[e];return y({},n,r?{slots:y({},n.slots,v({},e,y({},r,{attachedIds:g(r.attachedIds).concat([t])})))}:{slots:y({},n.slots,v({},e,y({},S(e),{attachedIds:[t]})))})}))},E=function(e,t){l((function(n){var r=n.slots[e];return r&&r.attachedIds.includes(t)?y({},n,{slots:y({},n.slots,v({},e,y({},r,{attachedIds:r.attachedIds.filter((function(e){return e!==t}))})))}):n}))},C=function(e){l((function(t){var n=t.slots[e];return n?y({},t,{slots:y({},t.slots,v({},e,y({},n,{attachedIds:[]})))}):t}))},k=function(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},A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null!=t?t:navigator.onLine;return e.filter((function(e){return M(n,e.online,e.offline)}))},P=function(e,t,n,r){var o,i,a,u,c,s,l=(o=n,i=t.slots[e].attachedIds,a=o.add||[],u=o.remove||[],c=o.order||[],s=Ut.getState().extensions,g(i).concat(g(a)).filter((function(e){return!u.includes(e)})).sort((function(e,t){var n,r,o=k(e,c,null===(n=s[_(e)])||void 0===n?void 0:n.order,i),a=k(t,c,null===(r=s[_(t)])||void 0===r?void 0:r.order,i);return-1===a?-1:-1===o?1:o-a}))),f=[],d=void 0,p=!0,h=!1,v=void 0;try{for(var y,m=l[Symbol.iterator]();!(p=(y=m.next()).done);p=!0){var b=y.value,w=(0,Mt.getExtensionConfigFromStore)(r,e,b).config,S=_(b),x=t.extensions[S];if(x){var O,j,E=null!==(j=null==w||null===(O=w["Display conditions"])||void 0===O?void 0:O.privileges)&&void 0!==j?j:x.privileges;if(E&&("string"==typeof E||Array.isArray(E)&&E.length>0)){var C;if(void 0===d&&(d=null===(C=(0,Bt.getSessionStore)().getState().session)||void 0===C?void 0:C.user),!d)continue;if(!(0,Bt.userHasAccess)(E,d))continue}f.push({id:b,name:S,moduleName:x.moduleName,config:w,meta:x.meta,online:x.online,offline:x.offline})}}}catch(e){h=!0,v=e}finally{try{p||null==m.return||m.return()}finally{if(h)throw v}}return f},I=function(e){return P(e,Ut.getState(),(0,Mt.getExtensionSlotConfig)(e).config,Ft.getState())},T=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=navigator.onLine;return M(n,e,t)},M=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Boolean(e?t:n)},L=function(e,t){var n=navigator.onLine?e:t;return"object"==typeof n?n:{}},D=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},R=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 t=arguments,n=function(n){var r=null!=t[n]?t[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(t){R(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},B=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},U=function(e){return function(e){if(Array.isArray(e))return D(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 D(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)?D(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.")}()},H=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(e){return e},i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=_(r),u=O(r),c=null;if(e){if(!u)throw Error("Couldn't find extension '".concat(a,"' to attach to '").concat(t,"'"));var s=u.load,f=u.online,d=u.offline,p=u.meta,h=u.moduleName;T(f,d)&&(s().then((function(a){var u=a.default,s=B(a,["default"]);c=(0,qt.mountRootParcel)(o(null!=u?u:s),N({},L(f,d),i,{_meta:p,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:h},domElement:e}))})),l((function(o){var i={domElement:e,id:r,slotName:t,slotModuleName:n};return N({},o,{extensions:N({},o.extensions,R({},a,N({},o.extensions[a],{instances:U(o.extensions[a].instances).concat([i])})))})})))}else console.warn("Tried to render ".concat(r," into ").concat(t," but no DOM element was available."));return c};d.r(p),d.d(p,{attach:function(){return j},checkStatus:function(){return T},checkStatusFor:function(){return M},detach:function(){return E},detachAll:function(){return C},extensionStore:function(){return Zt},getAssignedExtensions:function(){return I},getConnectedExtensions:function(){return A},getCustomProps:function(){return L},getExtensionInternalStore:function(){return Rt},getExtensionNameFromId:function(){return _},getExtensionRegistration:function(){return O},getExtensionRegistrationFrom:function(){return x},getExtensionStore:function(){return Nt},registerExtension:function(){return Kt},registerExtensionSlot:function(){return zt},renderExtension:function(){return H},reset:function(){return $t},updateInternalExtensionStore:function(){return l}});var V=function(e,t){return e===t||e!=e&&t!=t},F=function(e,t){for(var n=e.length;n--;)if(V(e[n][0],t))return n;return-1},K=Array.prototype.splice;i.prototype.clear=function(){this.__data__=[],this.size=0},i.prototype.delete=function(e){var t=this.__data__,n=F(t,e);return!(n<0||(n==t.length-1?t.pop():K.call(t,n,1),--this.size,0))},i.prototype.get=function(e){var t=this.__data__,n=F(t,e);return n<0?void 0:t[n][1]},i.prototype.has=function(e){return F(this.__data__,e)>-1},i.prototype.set=function(e,t){var n=this.__data__,r=F(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var z,$=i,q="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Z="object"==typeof self&&self&&self.Object===Object&&self,G=q||Z||Function("return this")(),W=G.Symbol,J=Object.prototype,Y=J.hasOwnProperty,Q=J.toString,X=W?W.toStringTag:void 0,ee=Object.prototype.toString,te=W?W.toStringTag:void 0,ne=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":te&&te in Object(e)?function(e){var t=Y.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=Q.call(e);return r&&(t?e[X]=n:delete e[X]),o}(e):(t=e,ee.call(t));var t},re=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},oe=function(e){if(!re(e))return!1;var t=ne(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},ie=G["__core-js_shared__"],ae=(z=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"",ue=Function.prototype.toString,ce=function(e){if(null!=e){try{return ue.call(e)}catch(e){}try{return e+""}catch(e){}}return""},se=/^\[object .+?Constructor\]$/,le=Function.prototype,fe=Object.prototype,de=le.toString,pe=fe.hasOwnProperty,he=RegExp("^"+de.call(pe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ve=function(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!re(e)||(t=e,ae&&ae in t))&&(oe(e)?he:se).test(ce(e));var t}(r)?r:void 0},ye=ve(G,"Map"),me=ve(Object,"create"),ge=Object.prototype.hasOwnProperty,be=Object.prototype.hasOwnProperty;a.prototype.clear=function(){this.__data__=me?me(null):{},this.size=0},a.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},a.prototype.get=function(e){var t=this.__data__;if(me){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ge.call(t,e)?t[e]:void 0},a.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:be.call(t,e)},a.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=me&&void 0===t?"__lodash_hash_undefined__":t,this};var we=a,Se=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};u.prototype.clear=function(){this.size=0,this.__data__={hash:new we,map:new(ye||$),string:new we}},u.prototype.delete=function(e){var t=Se(this,e).delete(e);return this.size-=t?1:0,t},u.prototype.get=function(e){return Se(this,e).get(e)},u.prototype.has=function(e){return Se(this,e).has(e)},u.prototype.set=function(e,t){var n=Se(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var _e=u;c.prototype.clear=function(){this.__data__=new $,this.size=0},c.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},c.prototype.get=function(e){return this.__data__.get(e)},c.prototype.has=function(e){return this.__data__.has(e)},c.prototype.set=function(e,t){var n=this.__data__;if(r(n,$)){var o=n.__data__;if(!ye||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new _e(o)}return n.set(e,t),this.size=n.size,this};var xe=c;s.prototype.add=s.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},s.prototype.has=function(e){return this.__data__.has(e)};var Oe=s,je=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},Ee=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,d=!0,p=2&n?new Oe:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!je(t,(function(e,t){if(a=t,!p.has(a)&&(h===e||o(h,e,n,r,i)))return p.push(t);var a}))){d=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Ce=G.Uint8Array,ke=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Ae=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Pe=W?W.prototype:void 0,Ie=Pe?Pe.valueOf:void 0,Te=Array.isArray,Me=Object.prototype.propertyIsEnumerable,Le=Object.getOwnPropertySymbols,De=Le?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)&&(i[o++]=a)}return i}(Le(e),(function(t){return Me.call(e,t)})))}:function(){return[]},Re=function(e){return null!=e&&"object"==typeof e},Ne=function(e){return Re(e)&&"[object Arguments]"==ne(e)},Be=Object.prototype,Ue=Be.hasOwnProperty,He=Be.propertyIsEnumerable,Ve=Ne(function(){return arguments}())?Ne:function(e){return Re(e)&&Ue.call(e,"callee")&&!He.call(e,"callee")},Fe=Ve,Ke=t&&!t.nodeType&&t,ze=Ke&&e&&!e.nodeType&&e,$e=ze&&ze.exports===Ke?G.Buffer:void 0,qe=($e?$e.isBuffer:void 0)||function(){return!1},Ze=/^(?:0|[1-9]\d*)$/,Ge=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},We={};We["[object Float32Array]"]=We["[object Float64Array]"]=We["[object Int8Array]"]=We["[object Int16Array]"]=We["[object Int32Array]"]=We["[object Uint8Array]"]=We["[object Uint8ClampedArray]"]=We["[object Uint16Array]"]=We["[object Uint32Array]"]=!0,We["[object Arguments]"]=We["[object Array]"]=We["[object ArrayBuffer]"]=We["[object Boolean]"]=We["[object DataView]"]=We["[object Date]"]=We["[object Error]"]=We["[object Function]"]=We["[object Map]"]=We["[object Number]"]=We["[object Object]"]=We["[object RegExp]"]=We["[object Set]"]=We["[object String]"]=We["[object WeakMap]"]=!1;var Je,Ye,Qe,Xe=t&&!t.nodeType&&t,et=Xe&&e&&!e.nodeType&&e,tt=et&&et.exports===Xe&&q.process,nt=function(){try{return et&&et.require&&et.require("util").types||tt&&tt.binding&&tt.binding("util")}catch(e){}}(),rt=nt&&nt.isTypedArray,ot=rt?(Je=rt,function(e){return Je(e)}):function(e){return Re(e)&&Ge(e.length)&&!!We[ne(e)]},it=Object.prototype.hasOwnProperty,at=Object.prototype,ut=(Ye=Object.keys,Qe=Object,function(e){return Ye(Qe(e))}),ct=Object.prototype.hasOwnProperty,st=function(e){return n=De,r=function(e){return null!=(t=e)&&Ge(t.length)&&!oe(t)?function(e,t){var n,r,i,a=Te(e),u=!a&&Fe(e),c=!a&&!u&&qe(e),s=!a&&!u&&!c&&ot(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],d=f.length;for(var p in e)!it.call(e,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=d,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&Ze.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||at))return ut(e);var t,n,r=[];for(var o in Object(e))ct.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}(t=e),Te(t)?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(t));var t,n,r},lt=Object.prototype.hasOwnProperty,ft=ve(G,"DataView"),dt=ve(G,"Promise"),pt=ve(G,"Set"),ht=ve(G,"WeakMap"),vt="[object Map]",yt="[object Promise]",mt="[object Set]",gt="[object WeakMap]",bt="[object DataView]",wt=ce(ft),St=ce(ye),_t=ce(dt),xt=ce(pt),Ot=ce(ht),jt=ne;(ft&&jt(new ft(new ArrayBuffer(1)))!=bt||ye&&jt(new ye)!=vt||dt&&jt(dt.resolve())!=yt||pt&&jt(new pt)!=mt||ht&&jt(new ht)!=gt)&&(jt=function(e){var t=ne(e),n="[object Object]"==t?e.constructor:void 0,r=n?ce(n):"";if(r)switch(r){case wt:return bt;case St:return vt;case _t:return yt;case xt:return mt;case Ot:return gt}return t});var Et=jt,Ct="[object Arguments]",kt="[object Array]",At="[object Object]",Pt=Object.prototype.hasOwnProperty,It=function e(t,n,o,i,a){return t===n||(null==t||null==n||!Re(t)&&!Re(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Te(e),c=Te(t),s=u?kt:Et(e),l=c?kt:Et(t),f=(s=s==Ct?At:s)==At,d=(l=l==Ct?At:l)==At,p=s==l;if(p&&qe(e)){if(!qe(t))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new xe),u||ot(e)?Ee(e,t,n,o,i,a):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 Ce(e),new Ce(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return V(+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 u=ke;case"[object Set]":var c=1&r;if(u||(u=Ae),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Ee(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Ie)return Ie.call(e)==Ie.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Pt.call(e,"__wrapped__"),v=d&&Pt.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new xe),i(y,m,n,o,a)}}return!!p&&(a||(a=new xe),function(e,t,n,o,i,a){var u=1&n,c=st(e),s=c.length;if(s!=st(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:lt.call(t,f)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},Tt=function(e,t){return It(e,t)},Mt=d(824),Lt=d(685),Dt=(0,Lt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),Rt=function(){return(0,Lt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}})},Nt=function(){return(0,Lt.getGlobalStore)("extensions",{slots:{}})};f(Dt.getState()),Dt.subscribe(f);var Bt=d(766),Ut=Rt(),Ht=Nt(),Vt=(0,Mt.getExtensionSlotsConfigStore)(),Ft=(0,Mt.getExtensionsConfigStore)();Ut.subscribe((function(e){w(e,Vt.getState(),Ft.getState())})),Vt.subscribe((function(e){w(Ut.getState(),e,Ft.getState())})),Ft.subscribe((function(e){w(Ut.getState(),Vt.getState(),e)}));var Kt=Ut.action((function(e,t){e.extensions[t.name]=y({},t,{instances:[]})})),zt=Ut.action((function(e,t,n){var r,o=null===(r=e.slots[n])||void 0===r?void 0:r.moduleName;if(o&&o!=t)return console.warn("An extension slot with the name '".concat(n,'\' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ').concat(o,".")),e;if(o&&o==t)return e;if(e.slots[n])return y({},e,{slots:y({},e.slots,v({},n,y({},e.slots[n],{moduleName:t})))});var i=S(n,t);return y({},e,{slots:y({},e.slots,v({},n,i))})})),$t=Ht.action((function(){return{slots:{},extensions:{}}})),qt=d(645),Zt=Rt()}(),p}())}}}))},889:(e,t,n)=>{"use strict";n.r(t);var r=n(159),o={};for(const e in r)"default"!==e&&(o[e]=()=>r[e]);n.d(t,o);var i=n(810);o={};for(const e in i)"default"!==e&&(o[e]=()=>i[e]);n.d(t,o);var a=n(347);o={};for(const e in a)"default"!==e&&(o[e]=()=>a[e]);n.d(t,o);var u=n(708);o={};for(const e in u)"default"!==e&&(o[e]=()=>u[e]);n.d(t,o);var c=n(547);o={};for(const e in c)"default"!==e&&(o[e]=()=>c[e]);n.d(t,o);var s=n(473);o={};for(const e in s)"default"!==e&&(o[e]=()=>s[e]);n.d(t,o);var l=n(630);o={};for(const e in l)"default"!==e&&(o[e]=()=>l[e]);n.d(t,o);var f=n(336);o={};for(const e in f)"default"!==e&&(o[e]=()=>f[e]);n.d(t,o);var d=n(493);o={};for(const e in d)"default"!==e&&(o[e]=()=>d[e]);n.d(t,o);var p=n(390);o={};for(const e in p)"default"!==e&&(o[e]=()=>p[e]);n.d(t,o)},473:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),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)},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.dispatchEvent(new CustomEvent(p,{detail:e}))},a=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(p,t),function(){return window.removeEventListener(p,t)}},u=function(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))},c=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(h,t),function(){return window.removeEventListener(h,t)}},s=function(e){var t=function(t){return e(t.detail)};return window.addEventListener(v,t),function(){return window.removeEventListener(v,t)}},l=function(e){window.openmrsBase=e.apiUrl,window.spaBase=e.spaPath,window.spaEnv=e.env||"production",window.spaVersion=process.env.BUILD_VERSION,window.getOpenmrsSpaBase=function(){return"".concat(window.spaBase,"/")}},f=function(){window.copyText=function(e){var t=window.getSelection();if(t){var n=document.createRange();n.selectNode(e),t.removeAllRanges(),t.addRange(n),document.execCommand("copy"),t.removeAllRanges()}}};r.r(o),r.d(o,{dispatchConnectivityChanged:function(){return e},dispatchNotificationShown:function(){return u},dispatchPrecacheStaticDependencies:function(){return i},setupPaths:function(){return l},setupUtils:function(){return f},subscribeConnectivity:function(){return n},subscribeConnectivityChanged:function(){return t},subscribeNotificationShown:function(){return c},subscribePrecacheStaticDependencies:function(){return a},subscribeToastShown:function(){return s}});var d="openmrs:connectivity-changed",p="openmrs:precache-static-dependencies",h="openmrs:notification-shown",v="openmrs:toast-shown"}(),o}())}}}))},630:(e,t,n)=>{function r(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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function s(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){u(e,t,n[t])}))}return e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||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.")}()}function f(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)||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.")}()}var d=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};function p(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}}System.register(["@openmrs/esm-api","@openmrs/esm-state"],(function(e,t){var r={},i={};return{setters:[function(e){r.getLoggedInUser=e.getLoggedInUser},function(e){i.createGlobalStore=e.createGlobalStore}],execute:function(){e(function(){var e={602:function(e){var t=function(e){"use strict";var t,n=function(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]},r=function(e,t,n,r){var a,u,s,l,f=t&&c(t.prototype,i)?t:i,d=Object.create(f.prototype),h=new p(r||[]);return d._invoke=(a=e,u=n,s=h,l=_,function(e,t){if(l===O)throw new Error("Generator is already running");if(l===j){if("throw"===e)throw t;return v()}for(s.method=e,s.arg=t;;){var n=s.delegate;if(n){var r=I(n,s);if(r){if(r===E)continue;return r}}if("next"===s.method)s.sent=s._sent=s.arg;else if("throw"===s.method){if(l===_)throw l=j,s.arg;s.dispatchException(s.arg)}else"return"===s.method&&s.abrupt("return",s.arg);l=O;var i=o(a,u,s);if("normal"===i.type){if(l=s.done?j:x,i.arg===E)continue;return{value:i.arg,done:s.done}}"throw"===i.type&&(l=j,s.method="throw",s.arg=i.arg)}}),d},o=function(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}},i=function(){},a=function(){},u=function(){},s=function(e){["next","throw","return"].forEach((function(t){n(e,t,(function(e){return this._invoke(t,e)}))}))},l=function(e,t){function n(r,i,a,u){var c=o(e[r],e,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&m.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(l).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(c.arg)}var r;this._invoke=function(e,o){function i(){return new t((function(t,r){n(e,o,t,r)}))}return r=r?r.then(i,i):i()}},f=function(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)},d=function(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t},p=function(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)},h=function(e){if(e){var n=e[b];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(m.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:v}},v=function(){return{value:t,done:!0}},y=Object.prototype,m=y.hasOwnProperty,g="function"==typeof Symbol?Symbol:{},b=g.iterator||"@@iterator",w=g.asyncIterator||"@@asyncIterator",S=g.toStringTag||"@@toStringTag";try{n({},"")}catch(e){n=function(e,t,n){return e[t]=n}}e.wrap=r;var _="suspendedStart",x="suspendedYield",O="executing",j="completed",E={},C={};n(C,b,(function(){return this}));var k=Object.getPrototypeOf,A=k&&k(k(h([])));A&&A!==y&&m.call(A,b)&&(C=A);var P=u.prototype=i.prototype=Object.create(C);function I(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method))return E;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return E}var i=o(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,E;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,E):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,E)}return a.prototype=u,n(P,"constructor",u),n(u,"constructor",a),a.displayName=n(u,S,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===a||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,n(e,S,"GeneratorFunction")),e.prototype=Object.create(P),e},e.awrap=function(e){return{__await:e}},s(l.prototype),n(l.prototype,w,(function(){return this})),e.AsyncIterator=l,e.async=function(t,n,o,i,a){void 0===a&&(a=Promise);var u=new l(r(t,n,o,i),a);return e.isGeneratorFunction(n)?u:u.next().then((function(e){return e.done?e.value:u.next()}))},s(P),n(P,S,"Generator"),n(P,b,(function(){return this})),n(P,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=h,p.prototype={constructor:p,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(d),!e)for(var n in this)"t"===n.charAt(0)&&m.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){var n=function(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o};if(this.done)throw e;for(var r=this,o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=m.call(i,"catchLoc"),c=m.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&m.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,E):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),d(n),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;d(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:h(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),E}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=r},685:function(e){"use strict";e.exports=i}},p={};function h(t){var n=p[t];if(void 0!==n)return n.exports;var r=p[t]={exports:{}};return e[t](r,r.exports,h),r.exports}h.y=t,h.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return h.d(t,{a:t}),t},h.d=function(e,t){for(var n in t)h.o(t,n)&&!h.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},h.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),h.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},h.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;h.g.importScripts&&(e=h.g.location+"");var t=h.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),h.p=e}();var v={};return(0,h(968).s)(1),function(){"use strict";var e=function(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))},t=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},r=function(e,n){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return t(e,n);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[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.")}return(r=e[Symbol.iterator]()).next.bind(r)},i=function(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href},p=function(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)},y=function(){},m=function(e,t){if(!t)return e&&e.then?e.then(y):Promise.resolve()},g=function(e,t){if(void 0!==Tn)return console.warn("The application's Service Worker has already been registered. The new service worker at ".concat(e," will not be registered.")),Tn;if(!("serviceWorker"in navigator))throw new Error("Registering the Service Worker is not possible due to missing browser capabilities.");var n=new In(e,t);return Tn=n.register().then((function(){return n.controlling.then((function(){return n}))}))},b=function(){return null!=Tn?Tn:Promise.resolve(void 0)},w=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},S=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){w(i,r,o,a,u,"next",e)}function u(e){w(i,r,o,a,u,"throw",e)}a(void 0)}))}},x=function(e){return Bn.apply(this,arguments)},O=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},j=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){O(i,r,o,a,u,"next",e)}function u(e){O(i,r,o,a,u,"throw",e)}a(void 0)}))}},E=function(){return Un.apply(this,arguments)},C=function(){return Hn.apply(this,arguments)},k=function(){return Vn.apply(this,arguments)},A=function(){return Fn.apply(this,arguments)},P=function(){return{current:zn,notAvailable:"unavailable"===zn,active:"on"===zn}},I=function(e){"unavailable"!==zn&&"unavailable"!==e&&(localStorage.setItem(Kn,"on"===e?"active":"disabled"),zn=e)},T=function(){return $n.apply(this,arguments)},M=function(e,t){return"object"!=typeof t||Zn(t).forEach((function(n){e[n]=t[n]})),e},L=function(e,t){return Jn.call(e,t)},D=function(e,t){"function"==typeof t&&(t=t(Wn(e))),("undefined"==typeof Reflect?Zn:Reflect.ownKeys)(t).forEach((function(n){R(e,n,t[n])}))},R=function(e,t,n,r){Yn(e,t,M(n&&L(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))},N=function(e){return{from:function(t){return e.prototype=Object.create(t.prototype),R(e.prototype,"constructor",e),{extend:D.bind(null,e.prototype)}}}},B=function(e,t,n){return er.call(e,t,n)},U=function(e,t){return t(e)},H=function(e){if(!e)throw new Error("Assertion Failed")},V=function(e){qn.setImmediate?setImmediate(e):setTimeout(e,0)},F=function(e,t){return e.reduce((function(e,n,r){var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})},K=function(e){var t={};for(var n in e)L(e,n)&&(t[n]=e[n]);return t},z=function(e){return rr.apply([],e)},$=function(e){ar="undefined"!=typeof WeakMap&&new WeakMap;var t=ur(e);return ar=null,t},q=function(e){return cr.call(e).slice(8,-1)},Z=function(e){var t,n,r,o;if(1===arguments.length){if(Gn(e))return e.slice();if(this===fr&&"string"==typeof e)return[e];if(o=lr(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},G=function(e,t){pr=e,hr=t},W=function(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(hr).map((function(e){return"\n"+e})).join("")):""},J=function(e,t){this._e=yr(),this.name=e,this.message=t},Y=function(e,t){return e+". Errors: "+Object.keys(t).map((function(e){return t[e].toString()})).filter((function(e,t,n){return n.indexOf(e)===t})).join("\n")},Q=function(e,t,n,r){this._e=yr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=Y(e,t)},X=function(e,t){this._e=yr(),this.name="BulkError",this.failures=Object.keys(t).map((function(e){return t[e]})),this.failuresByPos=t,this.message=Y(e,t)},ee=function(){},te=function(e){return e},ne=function(e,t){return null==e||e===te?t:function(n){return t(e(n))}},re=function(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}},oe=function(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?re(r,this.onsuccess):r),o&&(this.onerror=this.onerror?re(o,this.onerror):o),void 0!==i?i:n}},ie=function(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?re(n,this.onsuccess):n),r&&(this.onerror=this.onerror?re(r,this.onerror):r)}},ae=function(e,t){return e===ee?t:function(n){var r=e.apply(this,arguments);M(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?re(o,this.onsuccess):o),i&&(this.onerror=this.onerror?re(i,this.onerror):i),void 0===r?void 0===a?void 0:a:M(r,a)}},ue=function(e,t){return e===ee?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}},ce=function(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)}},se=function(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=Kr;if(pr&&(this._stackHolder=yr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==jr)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&fe(this,this._value))}this._state=null,this._value=null,++t.ref,Gr(this,e)},le=function(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},fe=function(e,t){if(Ur.push(t),null===e._state){var n=e._lib&&me();t=Vr(t),e._state=!1,e._value=t,pr&&null!==t&&"object"==typeof t&&!t._promise&&function(n,r,o){try{(function(){var n=Xn(t,"stack");t._promise=e,R(t,"stack",{get:function(){return Mr?n&&(n.get?n.get.apply(t):n.value):e.stack}})}).apply(null,void 0)}catch(e){}}(),r=e,Br.some((function(e){return e._value===r._value}))||Br.push(r),de(e),n&&ge()}var r},de=function(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)pe(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===$r&&(++$r,Dr((function(){0==--$r&&be()}),[]))},pe=function(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,++$r,Dr(he,[n,e,t])}else e._listeners.push(t)},he=function(e,t,n){try{Hr=t;var r,o=t._value;t._state?r=e(o):(Ur.length&&(Ur=[]),r=e(o),-1===Ur.indexOf(o)&&function(e){for(var t=Br.length;t;)if(Br[--t]._value===e._value)return void Br.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Hr=null,0==--$r&&be(),--n.psd.ref||n.psd.finalize()}},ve=function(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)},ye=function(){me()&&ge()},me=function(){var e=Rr;return Rr=!1,Nr=!1,e},ge=function(){var e,t,n;do{for(;zr.length>0;)for(e=zr,zr=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(zr.length>0);Rr=!0,Nr=!0},be=function(){var e=Br;Br=[],e.forEach((function(e){e._PSD.onunhandled.call(null,e._value,e)}));for(var t=qr.slice(0),n=t.length;n;)t[--n]()},we=function(e){return new se(jr,!1,e)},Se=function(e,t){var n=Kr;return function(){var r=me(),o=Kr;try{return ke(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{ke(o,!1),r&&ge()}}},_e=function(e,t,n,r){var o=Kr,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++to;var a=Fr.env;i.env=Tr?{Promise:se,PromiseProp:{value:se,configurable:!0,writable:!0},all:se.all,race:se.race,allSettled:se.allSettled,any:se.any,resolve:se.resolve,reject:se.reject,nthen:Me(a.nthen,i),gthen:Me(a.gthen,i)}:{},t&&M(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var u=Pe(i,e,n,r);return 0===i.ref&&i.finalize(),u},xe=function(){return Jr.id||(Jr.id=++Yr),++Jr.awaits,Jr.echoes+=100,Jr.id},Oe=function(){return!!Jr.awaits&&(0==--Jr.awaits&&(Jr.id=0),Jr.echoes=100*Jr.awaits,!0)},je=function(e){return Jr.echoes&&e&&e.constructor===Ir?(xe(),e.then((function(e){return Oe(),e}),(function(e){return Oe(),no(e)}))):e},Ee=function(e){++eo,Jr.echoes&&0!=--Jr.echoes||(Jr.echoes=Jr.id=0),Qr.push(Kr),ke(e,!0)},Ce=function(){var e=Qr[Qr.length-1];Qr.pop(),ke(e,!1)},ke=function(e,t){var n=Kr;if((t?!Jr.echoes||Xr++&&e===Kr:!Xr||--Xr&&e===Kr)||Ie(t?Ee.bind(null,e):Ce),e!==Kr&&(Kr=e,n===Fr&&(Fr.env=Ae()),Tr)){var r=Fr.env.Promise,o=e.env;kr.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(qn,"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))}},Ae=function(){var e=qn.Promise;return Tr?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(qn,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:kr.then,gthen:e.prototype.then}:{}},Pe=function(e,t,n,r,o){var i=Kr;try{return ke(e,!0),t(n,r,o)}finally{ke(i,!1)}},Ie=function(e){Pr.call(Cr,e)},Te=function(e,t,n,r){return"function"!=typeof e?e:function(){var o=Kr;n&&xe(),ke(t,!0);try{return e.apply(this,arguments)}finally{ke(o,!1),r&&Ie(Oe)}}},Me=function(e,t){return function(n,r){return e.call(this,Te(n,t),Te(r,t))}},Le=function(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(qn.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),M(r,o)):qn.CustomEvent&&M(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&qn.dispatchEvent&&(dispatchEvent(r),!qn.PromiseRejectionEvent&&qn.onunhandledrejection))try{qn.onunhandledrejection(r)}catch(e){}pr&&r&&!r.defaultPrevented&&console.warn("Unhandled rejection: ".concat(e.stack||e))}catch(e){}},De=function(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t},Re=function(e){return"string"!=typeof e||/\./.test(e)?function(e){return e}:function(t){return void 0===t[e]&&e in t&&delete(t=$(t))[e],t}},Ne=function(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 a(e);r||(r=ue),o||(o=ee);var i={subscribers:[],fire:o,subscribe:function(e){-1===i.subscribers.indexOf(e)&&(i.subscribers.push(e),i.fire=r(i.fire,e))},unsubscribe:function(e){i.subscribers=i.subscribers.filter((function(t){return t!==e})),i.fire=i.subscribers.reduce(r,o)}};return t[e]=n[e]=i,i}function a(e){Zn(e).forEach((function(t){var n=e[t];if(Gn(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new _r.InvalidArgument("Invalid event config");var r=i(t,te,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){V((function(){e.apply(null,t)}))}))}))}}))}},Be=function(e,t){return N(t).from({prototype:e}),t},Ue=function(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)},He=function(e,t){e.filter=De(e.filter,t)},Ve=function(e,t,n){var r=e.replayFilter;e.replayFilter=r?function(){return De(r(),t())}:t,e.justLimit=n&&!r},Fe=function(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new _r.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n},Ke=function(e,t,n){var r=Fe(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})},ze=function(e,t,n,r){var o=e.replayFilter?De(e.filter,e.replayFilter()):e.filter;if(e.or){var i={},a=function(e,n,r){if(!o||o(n,r,(function(e){return n.stop(e)}),(function(e){return n.fail(e)}))){var a=n.primaryKey,u=""+a;"[object ArrayBuffer]"===u&&(u=""+new Uint8Array(a)),L(i,u)||(i[u]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),$e(Ke(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return $e(Ke(e,r,n),De(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)},$e=function(e,t,n,r){var o=Se(r?function(e,t,o){return n(r(e),t,o)}:n);return e.then((function(e){if(e)return e.start((function(){var n=function(){return e.continue()};t&&!t(e,(function(e){return n=e}),(function(t){e.stop(t),n=ee}),(function(t){e.fail(t),n=ee}))||o(e.value,e,(function(e){return n=e})),n()}))}))},qe=function(e){var t=void 0===e?"undefined":d(e);if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";var n=q(e);return"ArrayBuffer"===n?"binary":n},Ze=function(e){return c(e,Uint8Array)?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)},Ge=function(e,t){return e<t?-1:e===t?0:1},We=function(e,t){return e>t?-1:e===t?0:1},Je=function(e,t,n){var r=c(e,mo)?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r},Ye=function(e){return new e.Collection(e,(function(){return tt("")})).limit(0)},Qe=function(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),u=-1,c=0;c<a;++c){var s=t[c];if(s!==r[c])return o(e[c],n[c])<0?e.substr(0,c)+n[c]+n.substr(c+1):o(e[c],r[c])<0?e.substr(0,c)+r[c]+n.substr(c+1):u>=0?e.substr(0,u)+t[u]+n.substr(u+1):null;o(e[c],s)<0&&(u=c)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):u<0?null:e.substr(0,u)+r[u]+n.substr(u+1)},Xe=function(e,t,n,r){var o,i,a,u,c,s,l,f=n.length;if(!n.every((function(e){return"string"==typeof e})))return Je(e,"String expected.");function d(e){o="next"===e?function(e){return e.toUpperCase()}:function(e){return e.toLowerCase()},i="next"===e?function(e){return e.toLowerCase()}:function(e){return e.toUpperCase()},a="next"===e?Ge:We;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));u=t.map((function(e){return e.upper})),c=t.map((function(e){return e.lower})),s=e,l="next"===e?"":r}d("next");var p=new e.Collection(e,(function(){return et(u[0],c[f-1]+r)}));p._ondirectionchange=function(e){d(e)};var h=0;return p._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,c,h))return!0;for(var p=null,v=h;v<f;++v){var y=Qe(o,d,u[v],c[v],a,s);null===y&&null===p?h=v+1:(null===p||a(p,y)>0)&&(p=y)}return n(null!==p?function(){e.continue(p+l)}:r),!1})),p},et=function(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}},tt=function(e){return{type:1,lower:e,upper:e}},nt=function(e){return Se((function(t){return rt(t),e(t.target.error),!1}))},rt=function(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()},ot=function(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?"++":"")+it(t)}},it=function(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""},at=function(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:F(n,(function(e){return[e.name,e]}))}},ut=function(e){return null==e?function(){}:"string"==typeof e?1===(t=e).split(".").length?function(e){return e[t]}:function(e){return tr(e,t)}:function(t){return tr(t,e)};var t},ct=function(e){return[].slice.call(e)},st=function(e){return null==e?":id":"string"==typeof e?e:"[".concat(e.join("+"),"]")},lt=function(e,t){var n,r,o,i,a,u,f=e._novip,d=t.db,p=(n=f._middlewares,r=d,i=t,u=(o=f._deps).IDBKeyRange,o.indexedDB,a=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");var n=e.lower,r=e.upper,o=e.lowerOpen,i=e.upperOpen;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)}var o,i,a,u=(i=n,a=ct((o=e).objectStoreNames),{schema:{name:o.name,tables:a.map((function(e){return i.objectStore(e)})).map((function(e){var t=e.keyPath,n=e.autoIncrement,r=Gn(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:ut(t)},indexes:ct(e.indexNames).map((function(t){return e.index(t)})).map((function(e){var t=e.name,n=e.unique,r=e.multiEntry,o=e.keyPath,a={name:t,compound:Gn(o),keyPath:o,unique:n,multiEntry:r,extractKey:ut(o)};return i[st(o)]=a,a})),getIndexByKeyPath:function(e){return i[st(e)]}};return i[":id"]=a.primaryKey,null!=t&&(i[st(t)]=a.primaryKey),a}))},hasGetAll:a.length>0&&"getAll"in i.objectStore(a[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),c=u.schema,s=u.hasGetAll,f=c.tables.map((function(e){return{name:o=(t=e).name,schema:t,mutate:function(e){var t=e.trans,n=e.type,i=e.keys,a=e.values,u=e.range;return new Promise((function(e,c){e=Se(e);var s=t.objectStore(o),f=null==s.keyPath,d="put"===n||"add"===n;if(!d&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);var p,h=(i||a||{length:1}).length;if(i&&a&&i.length!==a.length)throw new Error("Given keys array must have same length as given values array.");if(0===h)return e({numFailures:0,failures:{},results:[],lastResult:void 0});var v=[],y=[],m=0,g=function(e){++m,rt(e)};if("deleteRange"===n){if(4===u.type)return e({numFailures:m,failures:y,results:[],lastResult:void 0});3===u.type?v.push(p=s.clear()):v.push(p=s.delete(r(u)))}else{var b=l(d?f?[a,i]:[a,null]:[i,null],2),w=b[0],S=b[1];if(d)for(var _=0;_<h;++_)v.push(p=S&&void 0!==S[_]?s[n](w[_],S[_]):s[n](w[_])),p.onerror=g;else for(var x=0;x<h;++x)v.push(p=s[n](w[x])),p.onerror=g}var O=function(t){var r=t.target.result;v.forEach((function(e,t){return null!=e.error&&(y[t]=e.error)})),e({numFailures:m,failures:y,results:"delete"===n?i:v.map((function(e){return e.result})),lastResult:r})};p.onerror=function(e){g(e),O(e)},p.onsuccess=O}))},getMany:function(e){var t=e.trans,n=e.keys;return new Promise((function(e,r){e=Se(e);for(var i,a=t.objectStore(o),u=n.length,c=new Array(u),s=0,l=0,f=function(t){var n=t.target;c[n._pos]=n.result,++l===s&&e(c)},d=nt(r),p=0;p<u;++p)null!=n[p]&&((i=a.get(n[p]))._pos=p,i.onsuccess=f,i.onerror=d,++s);0===s&&e(c)}))},get:function(e){var t=e.trans,n=e.key;return new Promise((function(e,r){e=Se(e);var i=t.objectStore(o).get(n);i.onsuccess=function(t){return e(t.target.result)},i.onerror=nt(r)}))},query:(n=s,function(e){return new Promise((function(t,i){t=Se(t);var a=e.trans,u=e.values,c=e.limit,s=e.query,l=c===1/0?void 0:c,f=s.index,d=s.range,p=a.objectStore(o),h=f.isPrimaryKey?p:p.index(f.name),v=r(d);if(0===c)return t({result:[]});if(n){var y=u?h.getAll(v,l):h.getAllKeys(v,l);y.onsuccess=function(e){return t({result:e.target.result})},y.onerror=nt(i)}else{var m=0,g=u||!("openKeyCursor"in h)?h.openCursor(v):h.openKeyCursor(v),b=[];g.onsuccess=function(e){var n=g.result;return n?(b.push(u?n.value:n.primaryKey),++m===c?t({result:b}):void n.continue()):t({result:b})},g.onerror=nt(i)}}))}),openCursor:function(e){var t=e.trans,n=e.values,i=e.query,a=e.reverse,u=e.unique;return new Promise((function(e,c){e=Se(e);var s=i.index,l=i.range,f=t.objectStore(o),d=s.isPrimaryKey?f:f.index(s.name),p=a?u?"prevunique":"prev":u?"nextunique":"next",h=n||!("openKeyCursor"in d)?d.openCursor(r(l),p):d.openKeyCursor(r(l),p);h.onerror=nt(c),h.onsuccess=Se((function(n){var r=h.result;if(r){r.___id=++So,r.done=!1;var o=r.continue.bind(r),i=r.continuePrimaryKey;i&&(i=i.bind(r));var a=r.advance.bind(r),u=function(){throw new Error("Cursor not stopped")};r.trans=t,r.stop=r.continue=r.continuePrimaryKey=r.advance=function(){throw new Error("Cursor not started")},r.fail=Se(c),r.next=function(){var e=this,t=1;return this.start((function(){return t--?e.continue():e.stop()})).then((function(){return e}))},r.start=function(e){var t=new Promise((function(e,t){e=Se(e),h.onerror=nt(t),r.fail=t,r.stop=function(t){r.stop=r.continue=r.continuePrimaryKey=r.advance=u,e(t)}})),n=function(){if(h.result)try{e()}catch(e){r.fail(e)}else r.done=!0,r.start=function(){throw new Error("Cursor behind last entry")},r.stop()};return h.onsuccess=Se((function(e){h.onsuccess=n,n()})),r.continue=o,r.continuePrimaryKey=i,r.advance=a,n(),t},e(r)}else e(null)}),c)}))},count:function(e){var t=e.query,n=e.trans,i=t.index,a=t.range;return new Promise((function(e,t){var u=n.objectStore(o),c=i.isPrimaryKey?u:u.index(i.name),s=r(a),l=s?c.count(s):c.count();l.onsuccess=Se((function(t){return e(t.target.result)})),l.onerror=nt(t)}))}};var t,n,o})),d={};return f.forEach((function(e){return d[e.name]=e})),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(e){if(!d[e])throw new Error("Table '".concat(e,"' not found"));return d[e]},MIN_KEY:-1/0,MAX_KEY:wo(t),schema:c}}(r,u,i),{dbcore:n.dbcore.reduce((function(e,t){return s({},e,(0,t.create)(e))}),a)});f.core=p.dbcore,f.tables.forEach((function(e){var t=e.name;f.core.schema.tables.some((function(e){return e.name===t}))&&(e.core=f.core.table(t),c(f[t],f.Table)&&(f[t].core=e.core))}))},ft=function(e,t,n,r){var o=e._novip;n.forEach((function(e){var n=r[e];t.forEach((function(t){var r=Xn(t,e);(!r||"value"in r&&void 0===r.value)&&(t===o.Transaction.prototype||c(t,o.Transaction)?R(t,e,{get:function(){return this.table(e)},set:function(t){Yn(this,e,{value:t,writable:!0,configurable:!0,enumerable:!0})}}):t[e]=new o.Table(e,n))}))}))},dt=function(e,t){var n=e._novip;t.forEach((function(e){for(var t in e)c(e[t],n.Table)&&delete e[t]}))},pt=function(e,t){return e._cfg.version-t._cfg.version},ht=function(e,t){var n,r={del:[],add:[],change:[]};for(n in e)t[n]||r.del.push(n);for(n in t){var o=e[n],i=t[n];if(o){var a={name:n,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!uo)a.recreate=!0,r.change.push(a);else{var u=o.idxByName,c=i.idxByName,s=void 0;for(s in u)c[s]||a.del.push(s);for(s in c){var l=u[s],f=c[s];l?l.src!==f.src&&a.change.push(f):a.add.push(f)}(a.del.length>0||a.add.length>0||a.change.length>0)&&r.change.push(a)}}else r.add.push([n,i])}return r},vt=function(e,t,n,r){var o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((function(e){return yt(o,e)})),o},yt=function(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})},mt=function(e,t,n){var r={};return B(t.objectStoreNames,0).forEach((function(e){for(var t=n.objectStore(e),o=t.keyPath,i=ot(it(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[],u=0;u<t.indexNames.length;++u){var c=t.index(t.indexNames[u]);o=c.keyPath;var s=ot(c.name,o,!!c.unique,!!c.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=at(e,i,a)})),r},gt=function(e,t,n){for(var r=e._novip,o=n.db.objectStoreNames,i=0;i<o.length;++i){var a=o[i],u=n.objectStore(a);r._hasGetAll="getAll"in u;for(var s=0;s<u.indexNames.length;++s){var l=u.indexNames[s],f=u.index(l).keyPath,d="string"==typeof f?f:"["+B(f).join("+")+"]";if(t[a]){var p=t[a].idxByName[d];p&&(p.name=l,delete t[a].idxByName[d],t[a].idxByName[l]=p)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&qn.WorkerGlobalScope&&c(qn,qn.WorkerGlobalScope)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(r._hasGetAll=!1)},bt=function(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new To("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")},wt=function(e){return e&&"function"==typeof e.databases},St=function(e){return _e((function(){return Kr.letThrough=!0,e()}))},_t=function(){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()},xt=function(e){var t=function(t){return e.next(t)},n=o(t),r=o((function(t){return e.throw(t)}));function o(e){return function(t){var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Gn(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()},Ot=function(e,t,n){var r=arguments.length;if(r<2)throw new _r.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];n=o.pop();var i=z(o);return[e,i,n]},jt=function(e,t,n){for(var r=Gn(e)?e.slice():[e],o=0;o<n;++o)r.push(t);return r},Et=function(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;for(var r=[],o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ho(t.keys[o],e[i])&&(r.push(n?$(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}},Ct=function(e){return!("from"in e)},kt=function(e,t){Ct(t)||function e(t,n){var r=n.from,o=n.to,i=n.l,a=n.r;Ao(t,r,o),i&&e(t,i),a&&e(t,a)}(e,t)},At=function(e){var t=Ct(e)?null:{s:0,n:e};return{next:function(e){for(var n=arguments.length>0;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ho(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||ho(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}}}},Pt=function(e){var t,n,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){var i="r"===o?"l":"r",a=s({},e),u=e[o];e.from=u.from,e.to=u.to,e[o]=u[o],a[o]=u[i],e[i]=a,a.d=It(a)}e.d=It(e)},It=function(e){var t=e.r,n=e.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1},Tt=function(e,t){return Zn(t).forEach((function(n){kt(e[n]||(e[n]=new ko),t[n])})),e},Mt=function(e){var t=Ro;try{Ro=!0,go.storagemutated.fire(e)}finally{Ro=t}},Lt=function(e,t){return!t||"object"!==zo(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},Dt=function(){return new $o},Rt=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},Nt=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},Bt=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Nt(i,r,o,a,u,"next",e)}function u(e){Nt(i,r,o,a,u,"throw",e)}a(void 0)}))}},Ut=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},Ht=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){Ut(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},Vt=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Rt(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)?Rt(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.")}()},Ft=function(){return Go},Kt=function(){return Wo.apply(this,arguments)},zt=function(e,t,n,r){return Jo.apply(this,arguments)},$t=function(){return Yo.apply(this,arguments)},qt=function(e,t,n,r){return Qo.apply(this,arguments)},Zt=function(e,t,n){return Xo.apply(this,arguments)},Gt=function(e,t){return ei.apply(this,arguments)},Wt=function(e,t){return ti.apply(this,arguments)},Jt=function(e){return ni.apply(this,arguments)},Yt=function(e){return ri.apply(this,arguments)},Qt=function(e){return oi.apply(this,arguments)},Xt=function(e){var t;return!!(null===(t=Zo[e])||void 0===t?void 0:t.options.onBeginEditSyncItem)},en=function(e){return ii.apply(this,arguments)},tn=function(e){return ai.apply(this,arguments)},nn=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};Zo[e]={type:e,dependsOn:t,process:n,options:r}},rn=function(){if(!Ko&&!(Ko="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ko(ui)},on=function(){return pi+di()},an=function(e){return e.startsWith(pi)},un=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},cn=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},sn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){cn(i,r,o,a,u,"next",e)}function u(e){cn(i,r,o,a,u,"throw",e)}a(void 0)}))}},ln=function(e){return function(e){if(Array.isArray(e))return un(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 un(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)?un(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.")}()},fn=function(){return Object.values(hi)},dn=function(e){hi[e.id]&&console.warn('[setupDynamicOfflineDataHandler] Another second handler with the ID "'.concat(e.id,'" was registered. This handler will override the previous one. This could be unintended as the previous handler might run different flows than the newly registered one. If this is the case, ensure that you are setting up the handlers with different IDs.')),hi[e.id]=e},pn=function(e){return vi.apply(this,arguments)},hn=function(e,t){return yi.apply(this,arguments)},vn=function(e,t){return mi.apply(this,arguments)},yn=function(e,t,n){return gi.apply(this,arguments)},mn=function(e,t){return bi.apply(this,arguments)},gn=function(e,t,n){return wi.apply(this,arguments)},bn=function(e,t){return Si.apply(this,arguments)},wn=function(e,t,n){return _i.apply(this,arguments)},Sn=function(){return xi.apply(this,arguments)},_n=function(e,t,n,r,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void n(e)}u.done?t(c):Promise.resolve(c).then(r,o)},xn=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){_n(i,r,o,a,u,"next",e)}function u(e){_n(i,r,o,a,u,"throw",e)}a(void 0)}))}},On=function(){return Cn(),Oi},jn=function(e,t){Cn(),dn({type:"patient",displayName:t.displayName,id:e,isSynced:function(){return Promise.resolve(!0)},sync:function(e,n){return t.onOfflinePatientAdded({patientUuid:e,signal:null!=n?n:(new AbortController).signal})}})},En=function(e){return ji.apply(this,arguments)},Cn=function(){console.warn("The offline patient API has been deprecated and will be removed in a future release. To prevent future crashes, the functions remain available for the moment, but any invocations should be migrated ASAP.")};h.r(v),h.d(v,{activateOfflineCapability:function(){return T},beginEditSynchronizationItem:function(){return en},canBeginEditSynchronizationItemsOfType:function(){return Xt},deleteSynchronizationItem:function(){return tn},generateOfflineUuid:function(){return on},getCurrentOfflineMode:function(){return P},getDynamicOfflineDataEntries:function(){return pn},getDynamicOfflineDataEntriesFor:function(){return hn},getDynamicOfflineDataHandlers:function(){return fn},getFullSynchronizationItems:function(){return Yt},getFullSynchronizationItemsFor:function(){return Wt},getOfflineDb:function(){return Dt},getOfflinePatientDataStore:function(){return On},getOfflineSynchronizationStore:function(){return Ft},getOmrsServiceWorker:function(){return b},getSynchronizationItem:function(){return Qt},getSynchronizationItems:function(){return Jt},getSynchronizationItemsFor:function(){return Gt},isOfflineUuid:function(){return an},messageOmrsServiceWorker:function(){return x},offlineUuidPrefix:function(){return pi},omrsOfflineCachingStrategyHttpHeaderName:function(){return Dn},omrsOfflineResponseBodyHttpHeaderName:function(){return Mn},omrsOfflineResponseStatusHttpHeaderName:function(){return Ln},putDynamicOfflineData:function(){return vn},putDynamicOfflineDataFor:function(){return yn},queueSynchronizationItem:function(){return Zt},queueSynchronizationItemFor:function(){return qt},registerOfflinePatientHandler:function(){return jn},registerOmrsServiceWorker:function(){return g},removeDynamicOfflineData:function(){return mn},removeDynamicOfflineDataFor:function(){return gn},runSynchronization:function(){return Kt},setCurrentOfflineMode:function(){return I},setupDynamicOfflineDataHandler:function(){return dn},setupOfflineSync:function(){return nn},syncAllDynamicOfflineData:function(){return bn},syncDynamicOfflineData:function(){return wn},syncOfflinePatientData:function(){return En}});try{self["workbox:window:6.5.1"]&&_()}catch(e){}try{self["workbox:core:6.5.1"]&&_()}catch(e){}var kn=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))},An=function(e,t){this.type=e,Object.assign(this,t)},Pn={type:"SKIP_WAITING"},In=function(t){var n,r,o=function(e,n){var r,o;return void 0===n&&(n={}),(r=t.call(this)||this).nn={},r.tn=0,r.rn=new kn,r.en=new kn,r.on=new kn,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!i(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 An(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new An("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 An("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 p(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new An("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=e,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r};r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,u=o.prototype;return u.register=function(e){var t,n,r=(void 0===e?{}:e).immediate,o=void 0!==r&&r;try{var a=this;return t=function(){return a.mn=Boolean(navigator.serviceWorker.controller),a.yn=a.pn(),p(a.bn(),(function(e){a.fn=e,a.yn&&(a.hn=a.yn,a.en.resolve(a.yn),a.on.resolve(a.yn),a.yn.addEventListener("statechange",a.ln,{once:!0}));var t=a.fn.waiting;return t&&i(t.scriptURL,a.sn.toString())&&(a.hn=t,Promise.resolve().then((function(){a.dispatchEvent(new An("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),a.hn&&(a.rn.resolve(a.hn),a.an.add(a.hn)),a.fn.addEventListener("updatefound",a.cn),navigator.serviceWorker.addEventListener("controllerchange",a.dn),a.fn}))},(n=function(){if(!o&&"complete"!==document.readyState)return m(new Promise((function(e){return window.addEventListener("load",e)})))}())&&n.then?n.then(t):t()}catch(e){return Promise.reject(e)}},u.update=function(){try{return this.fn?m(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},u.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},u.messageSW=function(t){try{return p(this.getSW(),(function(n){return e(n,t)}))}catch(e){return Promise.reject(e)}},u.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&e(this.fn.waiting,Pn)},u.pn=function(){var e=navigator.serviceWorker.controller;return e&&i(e.scriptURL,this.sn.toString())?e:void 0},u.bn=function(){try{var e=this;return function(t,n){try{var r=p(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}catch(e){return n(e)}return r&&r.then?r.then(void 0,n):r}(0,(function(e){throw e}))}catch(e){return Promise.reject(e)}},(a=[{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)}}(o.prototype,a),o}(function(){var e=function(){this.Pn=new Map},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=r(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}()),Tn=void 0,Mn="x-omrs-offline-response-body",Ln="x-omrs-offline-response-status",Dn="x-omrs-offline-caching-strategy",Rn=h(602),Nn=h.n(Rn);function Bn(){return(Bn=S(Nn().mark((function e(t){var n;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b();case 2:if(!(n=e.sent)){e.next=9;break}return e.next=6,n.messageSW(t);case 6:e.t0=e.sent,e.next=10;break;case 9:e.t0={success:!1,result:void 0,error:"No service worker has been registered. This is typically the case when the application has been built without offline-related features."};case 10:return e.abrupt("return",e.t0);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Un(){return(Un=j(Nn().mark((function e(){var t;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=window.sessionStorage,e.prev=1,t.setItem("someKeyHere","test"),t.removeItem("someKeyHere"),e.next=10;break;case 6:if(e.prev=6,e.t0=e.catch(1),e.t0.code!==DOMException.QUOTA_EXCEEDED_ERR||0!==t.length){e.next=10;break}return e.abrupt("return",!0);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e,null,[[1,6]])})))).apply(this,arguments)}function Hn(){return(Hn=j(Nn().mark((function e(){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",!window.indexedDB);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vn(){return Vn=j(Nn().mark((function e(){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){var t=indexedDB.open("test");t.onerror=function(){return e(!0)},t.onsuccess=function(){return e(!1)}})));case 1:case"end":return e.stop()}}),e)}))),Vn.apply(this,arguments)}function Fn(){return(Fn=j(Nn().mark((function e(){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k();case 2:if(e.t1=e.sent,e.t1){e.next=7;break}return e.next=6,C();case 6:e.t1=e.sent;case 7:if(e.t0=e.t1,e.t0){e.next=12;break}return e.next=11,E();case 11:e.t0=e.sent;case 12:return e.abrupt("return",e.t0);case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Kn="openmrs3:offline-mode",zn="unavailable";function $n(){return($n=j(Nn().mark((function e(){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A();case 2:e.sent||(zn="active"===localStorage.getItem(Kn)?"on":"off"),navigator.onLine;case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Zn=Object.keys,Gn=Array.isArray;"undefined"==typeof Promise||qn.Promise||(qn.Promise=Promise);var Wn=Object.getPrototypeOf,Jn={}.hasOwnProperty,Yn=Object.defineProperty,Qn=Object.getOwnPropertyDescriptor;function Xn(e,t){var n;return Qn(e,t)||(n=Wn(e))&&Xn(n,t)}var er=[].slice;function tr(e,t){if(L(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=tr(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var u=e[t.substr(0,a)];return void 0===u?void 0:tr(u,t.substr(a+1))}}function nr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){H("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)nr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),u=t.substr(i+1);if(""===u)void 0===n?Gn(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var c=e[a];c||(c=e[a]={}),nr(c,u,n)}}else void 0===n?Gn(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}var rr=[].concat,or="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(z([8,16,32,64].map((function(e){return["Int","Uint","Float"].map((function(t){return t+e+"Array"}))})))).filter((function(e){return qn[e]})),ir=or.map((function(e){return qn[e]}));F(or,(function(e){return[e,!0]}));var ar=null;function ur(e){if(!e||"object"!=typeof e)return e;var t=ar&&ar.get(e);if(t)return t;if(Gn(e)){t=[],ar&&ar.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(ur(e[n]))}else if(ir.indexOf(e.constructor)>=0)t=e;else{var o=Wn(e);for(var i in t=o===Object.prototype?{}:Object.create(o),ar&&ar.set(e,t),e)L(e,i)&&(t[i]=ur(e[i]))}return t}var cr={}.toString,sr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",lr="symbol"==(void 0===sr?"undefined":d(sr))?function(e){var t;return null!=e&&(t=e[sr])&&t.apply(e)}:function(){return null},fr={},dr="undefined"!=typeof Symbol?function(e){return"AsyncFunction"===e[Symbol.toStringTag]}:function(){return!1},pr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href),hr=function(){return!0},vr=!new Error("").stack;function yr(){if(vr)try{throw yr.arguments,new Error}catch(e){return e}return new Error}var mr=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],gr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(mr),br={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"};N(J).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+W(this._e,2))}},toString:function(){return this.name+": "+this.message}}),N(Q).from(J),N(X).from(J);var wr=gr.reduce((function(e,t){return e[t]=t+"Error",e}),{}),Sr=J,_r=gr.reduce((function(e,t){var n=function(e,n){this._e=yr(),this.name=r,e?"string"==typeof e?(this.message="".concat(e).concat(n?"\n "+n:""),this.inner=n||null):"object"==typeof e&&(this.message="".concat(e.name," ").concat(e.message),this.inner=e):(this.message=br[t]||r,this.inner=null)},r=t+"Error";return N(n).from(Sr),e[t]=n,e}),{});_r.Syntax=SyntaxError,_r.Type=TypeError,_r.Range=RangeError;var xr=mr.reduce((function(e,t){return e[t+"Error"]=_r[t],e}),{}),Or=gr.reduce((function(e,t){return-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=_r[t]),e}),{});Or.ModifyError=Q,Or.DexieError=J,Or.BulkError=X;var jr={},Er=l("undefined"==typeof Promise?[]:function(){var e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,Wn(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,Wn(t),e]}(),3),Cr=Er[0],kr=Er[1],Ar=Er[2],Pr=kr&&kr.then,Ir=Cr&&Cr.constructor,Tr=!!Ar,Mr=!1,Lr=Ar?function(){Ar.then(ye)}:qn.setImmediate?setImmediate.bind(null,ye):qn.MutationObserver?function(){var e=document.createElement("div");new MutationObserver((function(){ye(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:function(){setTimeout(ye,0)},Dr=function(e,t){zr.push([e,t]),Nr&&(Lr(),Nr=!1)},Rr=!0,Nr=!0,Br=[],Ur=[],Hr=null,Vr=te,Fr={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Le,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((function(e){try{Le(e[0],e[1])}catch(e){}}))}},Kr=Fr,zr=[],$r=0,qr=[],Zr={get:function(){var e=function(e,r){var o=this,i=!t.global&&(t!==Kr||n!==eo),a=i&&!Oe(),u=new se((function(n,u){pe(o,new le(Te(e,t,i,a),Te(r,t,i,a),n,u,t))}));return pr&&ve(u,this),u},t=Kr,n=eo;return e.prototype=jr,e},set:function(e){R(this,"then",e&&e.prototype===jr?Zr:{get:function(){return e},set:Zr.set})}};function Gr(e,t){try{t((function(t){if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&me();t&&"function"==typeof t.then?Gr(e,(function(e,n){c(t,se)?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,de(e)),n&&ge()}}),fe.bind(null,e))}catch(t){fe(e,t)}}function Wr(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=W(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return pr&&((r=W(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Wr(e._prev,t,n)),t}D(se.prototype,{then:Zr,_then:function(e,t){pe(this,new le(null,null,e,t,Kr))},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,(function(e){return c(e,t)?n(e):we(e)})):this.then(null,(function(e){return e&&e.name===t?n(e):we(e)}))},finally:function(e){return this.then((function(t){return e(),t}),(function(t){return e(),we(t)}))},stack:{get:function(){if(this._stack)return this._stack;try{Mr=!0;var e=Wr(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Mr=!1}}},timeout:function(e,t){var n=this;return e<1/0?new se((function(r,o){var i=setTimeout((function(){return o(new _r.Timeout(t))}),e);n.then(r,o).finally(clearTimeout.bind(null,i))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&R(se.prototype,Symbol.toStringTag,"Dexie.Promise"),Fr.env=Ae(),D(se,{all:function(){var e=Z.apply(null,arguments).map(je);return new se((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach((function(o,i){return se.resolve(o).then((function(n){e[i]=n,--r||t(e)}),n)}))}))},resolve:function(e){if(c(e,se))return e;if(e&&"function"==typeof e.then)return new se((function(t,n){e.then(t,n)}));var t=new se(jr,!0,e);return ve(t,Hr),t},reject:we,race:function(){var e=Z.apply(null,arguments).map(je);return new se((function(t,n){e.map((function(e){return se.resolve(e).then(t,n)}))}))},PSD:{get:function(){return Kr},set:function(e){return Kr=e}},totalEchoes:{get:function(){return eo}},newPSD:_e,usePSD:Pe,scheduler:{get:function(){return Dr},set:function(e){Dr=e}},rejectionMapper:{get:function(){return Vr},set:function(e){Vr=e}},follow:function(e,t){return new se((function(n,r){return _e((function(t,n){var r=Kr;r.unhandleds=[],r.onunhandled=n,r.finalize=re((function(){var e=this;qr.push((function r(){0===e.unhandleds.length?t():n(e.unhandleds[0]),qr.splice(qr.indexOf(r),1)})),++$r,Dr((function(){0==--$r&&be()}),[])}),r.finalize),e()}),t,n,r)}))}}),Ir&&(Ir.allSettled&&R(se,"allSettled",(function(){var e=Z.apply(null,arguments).map(je);return new se((function(t){0===e.length&&t([]);var n=e.length,r=new Array(n);e.forEach((function(e,o){return se.resolve(e).then((function(e){return r[o]={status:"fulfilled",value:e}}),(function(e){return r[o]={status:"rejected",reason:e}})).then((function(){return--n||t(r)}))}))}))})),Ir.any&&"undefined"!=typeof AggregateError&&R(se,"any",(function(){var e=Z.apply(null,arguments).map(je);return new se((function(t,n){0===e.length&&n(new AggregateError([]));var r=e.length,o=new Array(r);e.forEach((function(e,i){return se.resolve(e).then((function(e){return t(e)}),(function(e){o[i]=e,--r||n(new AggregateError(o))}))}))}))})));var Jr={awaits:0,echoes:0,id:0},Yr=0,Qr=[],Xr=0,eo=0,to=0;-1===(""+Pr).indexOf("[native code]")&&(xe=Oe=ee);var no=se.reject;function ro(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Kr.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===wr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return ro(e,t,n,r)}))):no(o)}return o._promise(t,(function(e,t){return _e((function(){return Kr.trans=o,r(e,t,o)}))})).then((function(e){return o._completion.then((function(){return e}))}))}if(e._state.openComplete)return no(new _r.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return no(new _r.DatabaseClosed);e.open().catch(ee)}return e._state.dbReadyPromise.then((function(){return ro(e,t,n,r)}))}var oo=String.fromCharCode(65535),io="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",ao=[],uo="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),co=uo,so=uo,lo=function(e){return!/(dexie\.js|dexie\.min\.js)/.test(e)},fo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1},po=function(){function e(){o(this,e)}return a(e,[{key:"_trans",value:function(e,t,n){var r=function(e,n,r){if(!r.schema[i])throw new _r.NotFound("Table "+i+" not part of transaction");return t(r.idbtrans,r)},o=this._tx||Kr.trans,i=this.name,a=me();try{return o&&o.db===this.db?o===Kr.trans?o._promise(e,r,n):_e((function(){return o._promise(e,r,n)}),{trans:o,transless:Kr.transless||Kr}):ro(this.db,e,[this.name],r)}finally{a&&ge()}}},{key:"get",value:function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(function(t){return n.core.get({trans:t,key:e}).then((function(e){return n.hook.reading.fire(e)}))})).then(t)}},{key:"where",value:function(e){var t=function(e,t){try{return 0===i.cmp(e,t)}catch(e){return!1}};if("string"==typeof e)return new this.db.WhereClause(this,e);if(Gn(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var n=Zn(e);if(1===n.length)return this.where(n[0]).equals(e[n[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter((function(e){return e.compound&&n.every((function(t){return e.keyPath.indexOf(t)>=0}))&&e.keyPath.every((function(e){return n.indexOf(e)>=0}))}))[0];if(r&&this.db._maxKey!==oo)return this.where(r.name).equals(r.keyPath.map((function(t){return e[t]})));!r&&pr&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit of a compound index [").concat(n.join("+"),"]"));var o=this.schema.idxByName,i=this.db._deps.indexedDB,a=l(n.reduce((function(n,r){var i=l(n,2),a=i[0],u=i[1],c=o[r],s=e[r];return[a||c,a||!c?De(u,c&&c.multi?function(e){var n=tr(e,r);return Gn(n)&&n.some((function(e){return t(s,e)}))}:function(e){return t(s,tr(e,r))}):u]}),[null,null]),2),u=a[0],c=a[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(c):r?this.filter(c):this.where(n).equals("")}},{key:"filter",value:function(e){return this.toCollection().and(e)}},{key:"count",value:function(e){return this.toCollection().count(e)}},{key:"offset",value:function(e){return this.toCollection().offset(e)}},{key:"limit",value:function(e){return this.toCollection().limit(e)}},{key:"each",value:function(e){return this.toCollection().each(e)}},{key:"toArray",value:function(e){return this.toCollection().toArray(e)}},{key:"toCollection",value:function(){return new this.db.Collection(new this.db.WhereClause(this))}},{key:"orderBy",value:function(e){return new this.db.Collection(new this.db.WhereClause(this,Gn(e)?"[".concat(e.join("+"),"]"):e))}},{key:"reverse",value:function(){return this.toCollection().reverse()}},{key:"mapToClass",value:function(e){this.schema.mappedClass=e;var t=function(t){if(!t)return t;var n=Object.create(e.prototype);for(var r in t)if(L(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}},{key:"defineClass",value:function(){return this.mapToClass((function(e){M(this,e)}))}},{key:"add",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Re(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[a]})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{nr(e,i,t)}catch(e){}return t}))}},{key:"update",value:function(e,t){if("object"!=typeof e||Gn(e))return this.where(":id").equals(e).modify(t);var n=tr(e,this.schema.primKey.keyPath);if(void 0===n)return no(new _r.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?Zn(t).forEach((function(n){nr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}},{key:"put",value:function(e,t){var n=this,r=this.schema.primKey,o=r.auto,i=r.keyPath,a=e;return i&&o&&(a=Re(i)(e)),this._trans("readwrite",(function(e){return n.core.mutate({trans:e,type:"put",values:[a],keys:null!=t?[t]:null})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):e.lastResult})).then((function(t){if(i)try{nr(e,i,t)}catch(e){}return t}))}},{key:"delete",value:function(e){var t=this;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):void 0}))}},{key:"clear",value:function(){var e=this;return this._trans("readwrite",(function(t){return e.core.mutate({trans:t,type:"deleteRange",range:fo})})).then((function(e){return e.numFailures?se.reject(e.failures[0]):void 0}))}},{key:"bulkGet",value:function(e){var t=this;return this._trans("readonly",(function(n){return t.core.getMany({keys:e,trans:n}).then((function(e){return e.map((function(e){return t.hook.reading.fire(e)}))}))}))}},{key:"bulkAdd",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new _r.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(Re(c)):e;return r.core.mutate({trans:t,type:"add",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new X("".concat(n.name,".bulkAdd(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkPut",value:function(e,t,n){var r=this,o=Array.isArray(t)?t:void 0,i=(n=n||(o?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(function(t){var n=r,a=r.schema.primKey,u=a.auto,c=a.keyPath;if(c&&o)throw new _r.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(o&&o.length!==e.length)throw new _r.InvalidArgument("Arguments objects and keys must have the same length");var s=e.length,l=c&&u?e.map(Re(c)):e;return r.core.mutate({trans:t,type:"put",keys:o,values:l,wantResults:i}).then((function(e){var t=e.numFailures,r=e.results,o=e.lastResult,a=e.failures;if(0===t)return i?r:o;throw new X("".concat(n.name,".bulkPut(): ").concat(t," of ").concat(s," operations failed"),a)}))}))}},{key:"bulkDelete",value:function(e){var t=this,n=e.length;return this._trans("readwrite",(function(n){return t.core.mutate({trans:n,type:"delete",keys:e})})).then((function(e){var r=e.numFailures,o=e.lastResult,i=e.failures;if(0===r)return o;throw new X("".concat(t.name,".bulkDelete(): ").concat(r," of ").concat(n," operations failed"),i)}))}}]),e}();function ho(e,t){try{var n=qe(e),r=qe(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){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i)if(e[i]!==t[i])return e[i]<t[i]?-1:1;return n===r?0:n<r?-1:1}(Ze(e),Ze(t));case"Array":return function(e,t){for(var n=e.length,r=t.length,o=n<r?n:r,i=0;i<o;++i){var a=ho(e[i],t[i]);if(0!==a)return a}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}var vo=function(){function e(){o(this,e)}return a(e,[{key:"_read",value:function(e,t){var n=this._ctx;return n.error?n.table._trans(null,no.bind(null,n.error)):n.table._trans("readonly",e).then(t)}},{key:"_write",value:function(e){var t=this._ctx;return t.error?t.table._trans(null,no.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}},{key:"_addAlgorithm",value:function(e){var t=this._ctx;t.algorithm=De(t.algorithm,e)}},{key:"_iterate",value:function(e,t){return ze(this._ctx,e,t,this._ctx.table.core)}},{key:"clone",value:function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&M(n,e),t._ctx=n,t}},{key:"raw",value:function(){return this._ctx.valueMapper=null,this}},{key:"each",value:function(e){var t=this._ctx;return this._read((function(n){return ze(t,e,n,t.table.core)}))}},{key:"count",value:function(e){var t=this;return this._read((function(e){var n=t._ctx,r=n.table.core;if(Ue(n,!0))return r.count({trans:e,query:{index:Fe(n,r.schema),range:n.range}}).then((function(e){return Math.min(e,n.limit)}));var o=0;return ze(n,(function(){return++o,!1}),e,r).then((function(){return o}))})).then(e)}},{key:"sortBy",value:function(e,t){var n=function(e,t){var n=a(e,i),r=a(t,i);return n<r?-u:n>r?u:0},r=e.split(".").reverse(),o=r[0],i=r.length-1;function a(e,t){return t?a(e[r[t]],t-1):e[o]}var u="next"===this._ctx.dir?1:-1;return this.toArray((function(e){return e.sort(n)})).then(t)}},{key:"toArray",value:function(e){var t=this;return this._read((function(e){var n=t._ctx;if("next"===n.dir&&Ue(n,!0)&&n.limit>0){var r=n.valueMapper,o=Fe(n,n.table.core.schema);return n.table.core.query({trans:e,limit:n.limit,values:!0,query:{index:o,range:n.range}}).then((function(e){var t=e.result;return r?t.map(r):t}))}var i=[];return ze(n,(function(e){return i.push(e)}),e,n.table.core).then((function(){return i}))}),e)}},{key:"offset",value:function(e){var t=this._ctx;return e<=0||(t.offset+=e,Ue(t)?Ve(t,(function(){var t=e;return function(e,n){return 0===t||(1===t?(--t,!1):(n((function(){e.advance(t),t=0})),!1))}})):Ve(t,(function(){var t=e;return function(){return--t<0}}))),this}},{key:"limit",value:function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ve(this._ctx,(function(){var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}},{key:"until",value:function(e,t){return He(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}},{key:"first",value:function(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}},{key:"last",value:function(e){return this.reverse().first(e)}},{key:"filter",value:function(e){var t,n;return He(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=De(t.isMatch,n),this}},{key:"and",value:function(e){return this.filter(e)}},{key:"or",value:function(e){return new this.db.WhereClause(this._ctx.table,e,this)}},{key:"reverse",value:function(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}},{key:"desc",value:function(){return this.reverse()}},{key:"eachKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}},{key:"eachUniqueKey",value:function(e){return this._ctx.unique="unique",this.eachKey(e)}},{key:"eachPrimaryKey",value:function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}},{key:"keys",value:function(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)}},{key:"primaryKeys",value:function(e){var t=this._ctx;if("next"===t.dir&&Ue(t,!0)&&t.limit>0)return this._read((function(e){var n=Fe(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((function(e){return e.result})).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}},{key:"uniqueKeys",value:function(e){return this._ctx.unique="unique",this.keys(e)}},{key:"firstKey",value:function(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}},{key:"lastKey",value:function(e){return this.reverse().firstKey(e)}},{key:"distinct",value:function(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return He(this._ctx,(function(e){var t=e.primaryKey.toString(),r=L(n,t);return n[t]=!0,!r})),this}},{key:"modify",value:function(e){var t=this,n=this._ctx;return this._write((function(r){var o;if("function"==typeof e)o=e;else{var i=Zn(e),a=i.length;o=function(t){for(var n=!1,r=0;r<a;++r){var o=i[r],u=e[o];tr(t,o)!==u&&(nr(t,o,u),n=!0)}return n}}var u=n.table.core,c=u.schema.primaryKey,s=c.outbound,l=c.extractKey,f=t.db._options.modifyChunkSize||200,d=[],p=0,h=[],v=function(e,t){var n=t.failures,r=t.numFailures;p+=e-r;var o=!0,i=!1,a=void 0;try{for(var u,c=Zn(n)[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value;d.push(n[s])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}};return t.clone().primaryKeys().then((function(t){var i=function(a){var c=Math.min(f,t.length-a);return u.getMany({trans:r,keys:t.slice(a,a+c),cache:"immutable"}).then((function(d){for(var p=[],h=[],y=s?[]:null,m=[],g=0;g<c;++g){var b=d[g],w={value:$(b),primKey:t[a+g]};!1!==o.call(w,w.value,w)&&(null==w.value?m.push(t[a+g]):s||0===ho(l(b),l(w.value))?(h.push(w.value),s&&y.push(t[a+g])):(m.push(t[a+g]),p.push(w.value)))}var S=Ue(n)&&n.limit===1/0&&("function"!=typeof e||e===yo)&&{index:n.index,range:n.range};return Promise.resolve(p.length>0&&u.mutate({trans:r,type:"add",values:p}).then((function(e){for(var t in e.failures)m.splice(parseInt(t),1);v(p.length,e)}))).then((function(){return(h.length>0||S&&"object"==typeof e)&&u.mutate({trans:r,type:"put",keys:y,values:h,criteria:S,changeSpec:"function"!=typeof e&&e}).then((function(e){return v(h.length,e)}))})).then((function(){return(m.length>0||S&&e===yo)&&u.mutate({trans:r,type:"delete",keys:m,criteria:S}).then((function(e){return v(m.length,e)}))})).then((function(){return t.length>a+c&&i(a+f)}))}))};return i(0).then((function(){if(d.length>0)throw new Q("Error modifying one or more objects",d,p,h);return t.length}))}))}))}},{key:"delete",value:function(){var e=this._ctx,t=e.range;return Ue(e)&&(e.isPrimKey&&!so||3===t.type)?this._write((function(n){var r=e.table.core.schema.primaryKey,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((function(t){return e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((function(e){var n=e.failures,r=(e.lastResult,e.results,e.numFailures);if(r)throw new Q("Could not delete some values",Object.keys(n).map((function(e){return n[e]})),t-r);return t-r}))}))})):this.modify(yo)}}]),e}(),yo=function(e,t){return t.value=null},mo=function(){function e(){o(this,e)}return a(e,[{key:"Collection",get:function(){return this._ctx.table.db.Collection}},{key:"between",value:function(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)?Ye(this):new this.Collection(this,(function(){return et(e,t,!n,!r)}))}catch(e){return Je(this,io)}}},{key:"equals",value:function(e){return null==e?Je(this,io):new this.Collection(this,(function(){return tt(e)}))}},{key:"above",value:function(e){return null==e?Je(this,io):new this.Collection(this,(function(){return et(e,void 0,!0)}))}},{key:"aboveOrEqual",value:function(e){return null==e?Je(this,io):new this.Collection(this,(function(){return et(e,void 0,!1)}))}},{key:"below",value:function(e){return null==e?Je(this,io):new this.Collection(this,(function(){return et(void 0,e,!1,!0)}))}},{key:"belowOrEqual",value:function(e){return null==e?Je(this,io):new this.Collection(this,(function(){return et(void 0,e)}))}},{key:"startsWith",value:function(e){return"string"!=typeof e?Je(this,"String expected."):this.between(e,e+oo,!0,!0)}},{key:"startsWithIgnoreCase",value:function(e){return""===e?this.startsWith(e):Xe(this,(function(e,t){return 0===e.indexOf(t[0])}),[e],oo)}},{key:"equalsIgnoreCase",value:function(e){return Xe(this,(function(e,t){return e===t[0]}),[e],"")}},{key:"anyOfIgnoreCase",value:function(){var e=Z.apply(fr,arguments);return 0===e.length?Ye(this):Xe(this,(function(e,t){return-1!==t.indexOf(e)}),e,"")}},{key:"startsWithAnyOfIgnoreCase",value:function(){var e=Z.apply(fr,arguments);return 0===e.length?Ye(this):Xe(this,(function(e,t){return t.some((function(t){return 0===e.indexOf(t)}))}),e,oo)}},{key:"anyOf",value:function(){var e=this,t=Z.apply(fr,arguments),n=this._cmp;try{t.sort(n)}catch(e){return Je(this,io)}if(0===t.length)return Ye(this);var r=new this.Collection(this,(function(){return et(t[0],t[t.length-1])}));r._ondirectionchange=function(r){n="next"===r?e._ascending:e._descending,t.sort(n)};var o=0;return r._addAlgorithm((function(e,r,i){for(var a=e.key;n(a,t[o])>0;)if(++o===t.length)return r(i),!1;return 0===n(a,t[o])||(r((function(){e.continue(t[o])})),!1)})),r}},{key:"notEqual",value:function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}},{key:"noneOf",value:function(){var e=Z.apply(fr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Je(this,io)}var t=e.reduce((function(e,t){return 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})}},{key:"inAnyRange",value:function(e,t){var n=this,r=function(e,t){return d(e[0],t[0])},o=this._cmp,i=this._ascending,a=this._descending,u=this._min,c=this._max;if(0===e.length)return Ye(this);if(!e.every((function(e){return void 0!==e[0]&&void 0!==e[1]&&i(e[0],e[1])<=0})))return Je(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",_r.InvalidArgument);var s,l=!t||!1!==t.includeLowers,f=t&&!0===t.includeUppers,d=i;try{(s=e.reduce((function(e,t){for(var n=0,r=e.length;n<r;++n){var i=e[n];if(o(t[0],i[1])<0&&o(t[1],i[0])>0){i[0]=u(i[0],t[0]),i[1]=c(i[1],t[1]);break}}return n===r&&e.push(t),e}),[])).sort(r)}catch(e){return Je(this,io)}var p=0,h=f?function(e){return i(e,s[p][1])>0}:function(e){return i(e,s[p][1])>=0},v=l?function(e){return a(e,s[p][0])>0}:function(e){return a(e,s[p][0])>=0},y=h,m=new this.Collection(this,(function(){return et(s[0][0],s[s.length-1][1],!l,!f)}));return m._ondirectionchange=function(e){"next"===e?(y=h,d=i):(y=v,d=a),s.sort(r)},m._addAlgorithm((function(e,t,r){for(var o=e.key;y(o);)if(++p===s.length)return t(r),!1;return!((h(a=o)||v(a))&&(0===n._cmp(o,s[p][1])||0===n._cmp(o,s[p][0])||t((function(){d===i?e.continue(s[p][0]):e.continue(s[p][1])})),1));var a})),m}},{key:"startsWithAnyOf",value:function(){var e=Z.apply(fr,arguments);return e.every((function(e){return"string"==typeof e}))?0===e.length?Ye(this):this.inAnyRange(e.map((function(e){return[e,e+oo]}))):Je(this,"startsWithAnyOf() only works with strings")}}]),e}(),go=Ne(null,"storagemutated"),bo=function(){function e(){o(this,e)}return a(e,[{key:"_lock",value:function(){return H(!Kr.global),++this._reculock,1!==this._reculock||Kr.global||(Kr.lockOwnerFor=this),this}},{key:"_unlock",value:function(){if(H(!Kr.global),0==--this._reculock)for(Kr.global||(Kr.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Pe(e[1],e[0])}catch(e){}}return this}},{key:"_locked",value:function(){return this._reculock&&Kr.lockOwnerFor!==this}},{key:"create",value:function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,r=this.db._state.dbOpenError;if(H(!this.idbtrans),!e&&!n)switch(r&&r.name){case"DatabaseClosedError":throw new _r.DatabaseClosed(r);case"MissingAPIError":throw new _r.MissingAPI(r.message,r);default:throw new _r.OpenFailed(r)}if(!this.active)throw new _r.TransactionInactive;return H(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):n.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Se((function(n){rt(n),t._reject(e.error)})),e.onabort=Se((function(n){rt(n),t.active&&t._reject(new _r.Abort(e.error)),t.active=!1,t.on("abort").fire(n)})),e.oncomplete=Se((function(){t.active=!1,t._resolve(),"mutatedParts"in e&&go.storagemutated.fire(e.mutatedParts)})),this}},{key:"_promise",value:function(e,t,n){var r=this;if("readwrite"===e&&"readwrite"!==this.mode)return no(new _r.ReadOnly("Transaction is readonly"));if(!this.active)return no(new _r.TransactionInactive);if(this._locked())return new se((function(o,i){var a=r;r._blockedFuncs.push([function(){a._promise(e,t,n).then(o,i)},Kr])}));if(n)return _e((function(){var e=r,n=new se((function(n,r){e._lock();var o=t(n,r,e);o&&o.then&&o.then(n,r)}));return n.finally((function(){return e._unlock()})),n._lib=!0,n}));var o=new se((function(e,n){var o=t(e,n,r);o&&o.then&&o.then(e,n)}));return o._lib=!0,o}},{key:"_root",value:function(){return this.parent?this.parent._root():this}},{key:"waitFor",value:function(e){var t=this._root(),n=se.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((function(){return 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 se((function(e,r){n.then((function(n){return t._waitingQueue.push(Se(e.bind(null,n)))}),(function(e){return t._waitingQueue.push(Se(r.bind(null,e)))})).finally((function(){t._waitingFor===o&&(t._waitingFor=null)}))}))}},{key:"abort",value:function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new _r.Abort))}},{key:"table",value:function(e){var t=this._memoizedTables||(this._memoizedTables={});if(L(t,e))return t[e];var n=this.schema[e];if(!n)throw new _r.NotFound("Table "+e+" not part of transaction");var r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}]),e}(),wo=function(e){try{return e.only([[]]),wo=function(){return[[]]},[[]]}catch(e){return wo=function(){return oo},oo}},So=0,_o=function(){function e(){o(this,e)}return a(e,[{key:"_parseStoresSpec",value:function(e,t){Zn(e).forEach((function(n){if(null!==e[n]){var r=e[n].split(",").map((function(e,t){var n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return ot(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Gn(r),0===t)})),o=r.shift();if(o.multi)throw new _r.Schema("Primary key cannot be multi-valued");r.forEach((function(e){if(e.auto)throw new _r.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new _r.Schema("Index must have a name and cannot be an empty string")})),t[n]=at(n,o,r)}}))}},{key:"stores",value:function(e){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?M(this._cfg.storesSource,e):e;var n=t._versions,r={},o={};return n.forEach((function(e){M(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,dt(t,[t._allTables,t,t.Transaction.prototype]),ft(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],Zn(o),o),t._storeNames=Zn(o),this}},{key:"upgrade",value:function(e){return this._cfg.contentUpgrade=ce(this._cfg.contentUpgrade||ee,e),this}}]),e}();function xo(e,t,n,r,o){return se.resolve().then((function(){var i=Kr.transless||Kr,a=e._createTransaction(t,n,e._dbSchema,r),u={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===wr.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((function(){return xo(e,t,n,null,o)}))):no(r)}var c,s=dr(o);s&&xe();var l=se.follow((function(){if(c=o.call(a,a))if(s){var e=Oe.bind(null,null);c.then(e,e)}else"function"==typeof c.next&&"function"==typeof c.throw&&(c=xt(c))}),u);return(c&&"function"==typeof c.then?se.resolve(c).then((function(e){return a.active?e:no(new _r.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))})):l.then((function(){return c}))).then((function(e){return r&&a._resolve(),a._completion.then((function(){return e}))})).catch((function(e){return a._reject(e),no(e)}))}))}var Oo={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return s({},e,{table:function(t){var n=function(t){var n,r,o=t.query.index;return o.isVirtual?s({},t,{query:{index:o,range:(n=t.query.range,r=o.keyTail,{type:1===n.type?2:n.type,lower:jt(n.lower,n.lowerOpen?e.MAX_KEY:e.MIN_KEY,r),lowerOpen:!0,upper:jt(n.upper,n.upperOpen?e.MIN_KEY:e.MAX_KEY,r),upperOpen:!0})}}):t},r=e.table(t),o=r.schema,i={},a=[];function u(e,t,n){var r=st(e),o=i[r]=i[r]||[],c=null==e?0:"string"==typeof e?1:e.length,l=t>0,f=s({},n,{isVirtual:l,keyTail:t,keyLength:c,extractKey:ut(e),unique:!l&&n.unique});return o.push(f),f.isPrimaryKey||a.push(f),c>1&&u(2===c?e[0]:e.slice(0,c-1),t+1,n),o.sort((function(e,t){return e.keyTail-t.keyTail})),f}var c=u(o.primaryKey.keyPath,0,o.primaryKey);i[":id"]=[c];var l=!0,f=!1,d=void 0;try{for(var p,h=o.indexes[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;u(v.keyPath,0,v)}}catch(e){f=!0,d=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}var y=s({},r,{schema:s({},o,{primaryKey:c,indexes:a,getIndexByKeyPath:function(e){var t=i[st(e)];return t&&t[0]}}),count:function(e){return r.count(n(e))},query:function(e){return r.query(n(e))},openCursor:function(t){var o=t.query.index,i=o.keyTail,a=o.isVirtual,u=o.keyLength;return a?r.openCursor(n(t)).then((function(n){return n&&(r=n,o=Object.create(r,{continue:{value:function(n){null!=n?r.continue(jt(n,t.reverse?e.MAX_KEY:e.MIN_KEY,i)):t.unique?r.continue(r.key.slice(0,u).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,i)):r.continue()}},continuePrimaryKey:{value:function(t,n){r.continuePrimaryKey(jt(t,e.MAX_KEY,i),n)}},primaryKey:{get:function(){return r.primaryKey}},key:{get:function(){var e=r.key;return 1===u?e[0]:e.slice(0,u)}},value:{get:function(){return r.value}}}),o);var r,o})):r.openCursor(t)}});return y}})}};function jo(e,t,n,r){return n=n||{},r=r||"",Zn(e).forEach((function(o){if(L(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){var u=q(i);u!==q(a)?n[r+o]=t[o]:"Object"===u?jo(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})),Zn(t).forEach((function(o){L(e,o)||(n[r+o]=t[o])})),n}var Eo={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return s({},e,{table:function(t){var n=e.table(t),r=n.schema.primaryKey,o=s({},n,{mutate:function(e){var o=function(e){var t,o,i=Kr.trans,a=e.keys||(t=r,"delete"===(o=e).type?o.keys:o.keys||o.values.map(t.extractKey));if(!a)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?s({},e,{keys:a}):s({},e)).type&&(e.values=f(e.values)),e.keys&&(e.keys=f(e.keys)),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,a).then((function(t){var o=a.map((function(n,o){var a=t[o],s={onerror:null,onsuccess:null};if("delete"===e.type)u.fire.call(s,n,a,i);else if("add"===e.type||void 0===a){var f=c.fire.call(s,n,e.values[o],i);null==n&&null!=f&&(n=f,e.keys[o]=n,r.outbound||nr(e.values[o],r.keyPath,n))}else{var d=jo(a,e.values[o]),p=l.fire.call(s,d,n,a,i);if(p){var h=e.values[o];Object.keys(p).forEach((function(e){L(h,e)?h[e]=p[e]:nr(h,e,p[e])}))}}return s}));return n.mutate(e).then((function(n){for(var r=n.failures,i=n.results,u=n.numFailures,c=n.lastResult,s=0;s<a.length;++s){var l=i?i[s]:a[s],f=o[s];null==l?f.onerror&&f.onerror(r[s]):f.onsuccess&&f.onsuccess("put"===e.type&&t[s]?e.values[s]:l)}return{failures:r,results:i,numFailures:u,lastResult:c}})).catch((function(e){return o.forEach((function(t){return t.onerror&&t.onerror(e)})),Promise.reject(e)}))}))},i=Kr.trans,a=i.table(t).hook,u=a.deleting,c=a.creating,l=a.updating;switch(e.type){case"add":if(c.fire===ee)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"put":if(c.fire===ee&&l.fire===ee)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"delete":if(u.fire===ee)break;return i._promise("readwrite",(function(){return o(e)}),!0);case"deleteRange":if(u.fire===ee)break;return i._promise("readwrite",(function(){return d((t=e).trans,t.range,1e4);var t}),!0)}return n.mutate(e);function d(e,t,i){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:i}).then((function(n){var r=n.result;return o({type:"delete",keys:r,trans:e}).then((function(n){return n.numFailures>0?Promise.reject(n.failures[0]):r.length<i?{failures:[],numFailures:0,lastResult:void 0}:d(e,s({},t,{lower:r[r.length-1],lowerOpen:!0}),i)}))}))}}});return o}})}},Co={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return s({},n,{getMany:function(e){if(!e.cache)return n.getMany(e);var t=Et(e.keys,e.trans._cache,"clone"===e.cache);return t?se.resolve(t):n.getMany(e).then((function(t){return e.trans._cache={keys:e.keys,values:"clone"===e.cache?$(t):t},t}))},mutate:function(e){return"add"!==e.type&&(e.trans._cache=null),n.mutate(e)}})}}}},ko=function(e,t){if(!this){var n=new ko;return e&&"d"in e&&M(n,e),n}M(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Ao(e,t,n){var r=ho(t,n);if(!isNaN(r)){if(r>0)throw RangeError();if(Ct(e))return M(e,{from:t,to:n,d:1});var o=e.l,i=e.r;if(ho(n,e.from)<0)return o?Ao(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Pt(e);if(ho(t,e.to)>0)return i?Ao(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Pt(e);ho(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ho(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);var a=!e.r;o&&!e.l&&kt(e,o),i&&a&&kt(e,i)}}D(ko.prototype,u({add:function(e){return kt(this,e),this},addKey:function(e){return Ao(this,e,e),this},addKeys:function(e){var t=this;return e.forEach((function(e){return Ao(t,e,e)})),this}},sr,(function(){return At(this)})));var Po,Io={stack:"dbcore",level:0,create:function(e){var t=e.schema.name,n=new ko(e.MIN_KEY,e.MAX_KEY);return s({},e,{table:function(r){var o=e.table(r),i=o.schema,a=i.primaryKey,u=a.extractKey,c=a.outbound,f=s({},o,{mutate:function(e){var a=e.trans,u=a.mutatedParts||(a.mutatedParts={}),c=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return u[n]||(u[n]=new ko)},s=c(""),f=c(":dels"),d=e.type,p=l("deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[],2),h=p[0],v=p[1],y=e.trans._cache;return o.mutate(e).then((function(e){if(Gn(h)){"delete"!==d&&(h=e.results),s.addKeys(h);var t=Et(h,y);t||"add"===d||f.addKeys(h),(t||v)&&(o=c,a=t,u=v,i.indexes.forEach((function(e){var t=function(t){return null!=t?e.extractKey(t):null},n=o(e.name||""),r=function(t){return e.multiEntry&&Gn(t)?t.forEach((function(e){return n.addKey(e)})):n.addKey(t)};(a||u).forEach((function(e,n){var o=a&&t(a[n]),i=u&&t(u[n]);0!==ho(o,i)&&(null!=o&&r(o),null!=i&&r(i))}))})))}else if(h){var r={from:h.lower,to:h.upper};f.add(r),s.add(r)}else s.add(n),f.add(n),i.indexes.forEach((function(e){return c(e.name).add(n)}));var o,a,u;return e}))}}),d=function(t){var n,r,o=t.query,i=o.index,a=o.range;return[i,new ko(null!==(n=a.lower)&&void 0!==n?n:e.MIN_KEY,null!==(r=a.upper)&&void 0!==r?r:e.MAX_KEY)]},p={get:function(e){return[a,new ko(e.key)]},getMany:function(e){return[a,(new ko).addKeys(e.keys)]},count:d,query:d,openCursor:d};return Zn(p).forEach((function(e){f[e]=function(i){var a=Kr.subscr;if(a){var f=function(e){var n="idb://".concat(t,"/").concat(r,"/").concat(e);return a[n]||(a[n]=new ko)},d=f(""),h=f(":dels"),v=l(p[e](i),2),y=v[0],m=v[1];if(f(y.name||"").add(m),!y.isPrimaryKey){if("count"!==e){var g="query"===e&&c&&i.values&&o.query(s({},i,{values:!1}));return o[e].apply(this,arguments).then((function(t){if("query"===e){if(c&&i.values)return g.then((function(e){var n=e.result;return d.addKeys(n),t}));var n=i.values?t.result.map(u):t.result;i.values?d.addKeys(n):h.addKeys(n)}else if("openCursor"===e){var r=t,o=i.values;return r&&Object.create(r,{key:{get:function(){return h.addKey(r.primaryKey),r.key}},primaryKey:{get:function(){var e=r.primaryKey;return h.addKey(e),e}},value:{get:function(){return o&&d.addKey(r.primaryKey),r.value}}})}return t}))}h.add(n)}}return o[e].apply(this,arguments)}})),f}})}},To=function(){function e(t,n){var r=this;o(this,e),this._middlewares={},this.verno=0;var i=e.dependencies;this._options=n=s({addons:e.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};var a=n.addons;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var u,c,l,f,d={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ee,dbReadyPromise:null,cancelOpen:ee,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};d.dbReadyPromise=new se((function(e){d.dbReadyResolve=e})),d.openCanceller=new se((function(e,t){d.cancelOpen=t})),this._state=d,this.name=t,this.on=Ne(this,"populate","blocked","versionchange","close",{ready:[ce,ee]}),this.on.ready.subscribe=U(this.on.ready.subscribe,(function(t){return function(n,o){var i=r;e.vip((function(){var e=i._state;if(e.openComplete)e.dbOpenError||se.resolve().then(n),o&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),o&&t(n);else{t(n);var r=i;o||t((function e(){r.on.ready.unsubscribe(n),r.on.ready.unsubscribe(e)}))}}))}})),this.Collection=(u=this,Be(vo.prototype,(function(e,t){this.db=u;var n=fo,r=null;if(t)try{n=t()}catch(e){r=e}var o=e._ctx,i=o.table,a=i.hook.reading.fire;this._ctx={table:i,index:o.index,isPrimKey:!o.index||i.schema.primKey.keyPath&&o.index===i.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:a!==te?a:null}}))),this.Table=(f=this,Be(po.prototype,(function(e,t,n){this.db=f,this._tx=n,this.name=e,this.schema=t,this.hook=f._allTables[e]?f._allTables[e].hook:Ne(null,{creating:[oe,ee],reading:[ne,te],updating:[ae,ee],deleting:[ie,ee]})}))),this.Transaction=(l=this,Be(bo.prototype,(function(e,t,n,r,o){var i=this;this.db=l,this.mode=e,this.storeNames=t,this.schema=n,this.chromeTransactionDurability=r,this.idbtrans=null,this.on=Ne(this,"complete","error","abort"),this.parent=o||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 se((function(e,t){i._resolve=e,i._reject=t})),this._completion.then((function(){i.active=!1,i.on.complete.fire()}),(function(e){var t=i.active;return i.active=!1,i.on.error.fire(e),i.parent?i.parent._reject(e):t&&i.idbtrans&&i.idbtrans.abort(),no(e)}))}))),this.Version=function(e){return Be(_o.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=(c=this,Be(mo.prototype,(function(e,t,n){this.db=c,this._ctx={table:e,index:":id"===t?null:t,or:n};var r=c._deps.indexedDB;if(!r)throw new _r.MissingAPI;this._cmp=this._ascending=r.cmp.bind(r),this._descending=function(e,t){return r.cmp(t,e)},this._max=function(e,t){return r.cmp(e,t)>0?e:t},this._min=function(e,t){return r.cmp(e,t)<0?e:t},this._IDBKeyRange=c._deps.IDBKeyRange}))),this.on("versionchange",(function(e){e.newVersion>0?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close()})),this.on("blocked",(function(e){!e.newVersion||e.newVersion<e.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(e.oldVersion/10))})),this._maxKey=wo(n.IDBKeyRange),this._createTransaction=function(e,t,n,o){return new r.Transaction(e,t,n,r._options.chromeTransactionDurability,o)},this._fireOnBlocked=function(e){var t=r;r.on("blocked").fire(e),ao.filter((function(e){return e.name===t.name&&e!==t&&!e._state.vcFired})).map((function(t){return t.on("versionchange").fire(e)}))},this.use(Oo),this.use(Eo),this.use(Io),this.use(Co),this.vip=Object.create(this,{_vip:{value:!0}}),a.forEach((function(e){return e(r)}))}return a(e,[{key:"version",value:function(e){if(isNaN(e)||e<.1)throw new _r.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new _r.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter((function(t){return t._cfg.version===e}))[0];return n||(n=new this.Version(e),t.push(n),t.sort(pt),n.stores({}),this._state.autoSchema=!1,n)}},{key:"_whenReady",value:function(e){var t=this;return this.idbdb&&(this._state.openComplete||Kr.letThrough||this._vip)?e():new se((function(e,n){if(t._state.openComplete)return n(new _r.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._options.autoOpen)return void n(new _r.DatabaseClosed);t.open().catch(ee)}t._state.dbReadyPromise.then(e,n)})).then(e)}},{key:"use",value:function(e){var t=e.stack,n=e.create,r=e.level,o=e.name;o&&this.unuse({stack:t,name:o});var i=this._middlewares[t]||(this._middlewares[t]=[]);return i.push({stack:t,create:n,level:null==r?10:r,name:o}),i.sort((function(e,t){return e.level-t.level})),this}},{key:"unuse",value:function(e){var t=e.stack,n=e.name,r=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter((function(e){return r?e.create!==r:!!n&&e.name!==n}))),this}},{key:"open",value:function(){return function(e){var t=function(){if(n.openCanceller!==o)throw new _r.DatabaseClosed("db.open() was cancelled")},n=e._state,r=e._deps.indexedDB;if(n.isBeingOpened||e.idbdb)return n.dbReadyPromise.then((function(){return n.dbOpenError?no(n.dbOpenError):e}));pr&&(n.openCanceller._stackHolder=yr()),n.isBeingOpened=!0,n.dbOpenError=null,n.openComplete=!1;var o=n.openCanceller,i=n.dbReadyResolve,a=null,u=!1;return se.race([o,("undefined"==typeof navigator?se.resolve():_t()).then((function(){return new se((function(o,i){if(t(),!r)throw new _r.MissingAPI;var c=e.name,s=n.autoSchema?r.open(c):r.open(c,Math.round(10*e.verno));if(!s)throw new _r.MissingAPI;s.onerror=nt(i),s.onblocked=Se(e._fireOnBlocked),s.onupgradeneeded=Se((function(t){if(a=s.transaction,n.autoSchema&&!e._options.allowEmptyDB){s.onerror=rt,a.abort(),s.result.close();var o=r.deleteDatabase(c);o.onsuccess=o.onerror=Se((function(){i(new _r.NoSuchDatabase("Database ".concat(c," doesnt exist")))}))}else{a.onerror=nt(i);var l=t.oldVersion>Math.pow(2,62)?0:t.oldVersion;u=l<1,e._novip.idbdb=s.result,function(e,t,n,r){var o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);var a=i._reject.bind(i),u=Kr.transless||Kr;_e((function(){var r,c,s,l,f,d,p,h,v;Kr.trans=i,Kr.transless=u,0===t?(Zn(o).forEach((function(e){vt(n,e,o[e].primKey,o[e].indexes)})),lt(e,n),se.follow((function(){return e.on.populate.fire(i)})).catch(a)):(r=e,c=t,s=i,l=n,f=r._novip,d=[],p=f._versions,h=f._dbSchema=mt(0,f.idbdb,l),v=!1,p.filter((function(e){return e._cfg.version>=c})).forEach((function(e){d.push((function(){var t=h,n=e._cfg.dbschema;gt(f,t,l),gt(f,n,l),h=f._dbSchema=n;var r=ht(t,n);r.add.forEach((function(e){vt(l,e[0],e[1].primKey,e[1].indexes)})),r.change.forEach((function(e){if(e.recreate)throw new _r.Upgrade("Not yet support for changing primary key");var t=l.objectStore(e.name);e.add.forEach((function(e){return yt(t,e)})),e.change.forEach((function(e){t.deleteIndex(e.name),yt(t,e)})),e.del.forEach((function(e){return t.deleteIndex(e)}))}));var o=e._cfg.contentUpgrade;if(o&&e._cfg.version>c){lt(f,l),s._memoizedTables={},v=!0;var i=K(n);r.del.forEach((function(e){i[e]=t[e]})),dt(f,[f.Transaction.prototype]),ft(f,[f.Transaction.prototype],Zn(i),i),s.schema=i;var a,u=dr(o);u&&xe();var d=se.follow((function(){if((a=o(s))&&u){var e=Oe.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?se.resolve(a):d.then((function(){return a}))}})),d.push((function(t){var n,r;v&&co||(n=e._cfg.dbschema,r=t,[].slice.call(r.db.objectStoreNames).forEach((function(e){return null==n[e]&&r.db.deleteObjectStore(e)}))),dt(f,[f.Transaction.prototype]),ft(f,[f.Transaction.prototype],f._storeNames,f._dbSchema),s.schema=f._dbSchema}))})),function e(){return d.length?se.resolve(d.shift()(s.idbtrans)).then(e):se.resolve()}().then((function(){var e,t;t=l,Zn(e=h).forEach((function(n){t.db.objectStoreNames.contains(n)||vt(t,n,e[n].primKey,e[n].indexes)}))}))).catch(a)}))}(e,l/10,a,i)}}),i),s.onsuccess=Se((function(){a=null;var t,r,i,l,f=e._novip.idbdb=s.result,d=B(f.objectStoreNames);if(d.length>0)try{var p=f.transaction(1===(l=d).length?l[0]:l,"readonly");n.autoSchema?function(e,t,n){var r=e._novip;r.verno=t.version/10;var o=r._dbSchema=mt(0,t,n);r._storeNames=B(t.objectStoreNames,0),ft(r,[r._allTables],Zn(o),o)}(e,f,p):(gt(e,e._dbSchema,p),r=p,!((i=ht(mt(0,(t=e).idbdb,r),t._dbSchema)).add.length||i.change.some((function(e){return e.add.length||e.change.length})))||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),lt(e,p)}catch(e){}ao.push(e),f.onversionchange=Se((function(t){n.vcFired=!0,e.on("versionchange").fire(t)})),f.onclose=Se((function(t){e.on("close").fire(t)})),u&&function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!wt(n)&&"__dbnames"!==t&&bt(n,r).put({name:t}).catch(ee)}(e._deps,c),o()}),i)}))}))]).then((function(){return t(),n.onReadyBeingFired=[],se.resolve(St((function(){return e.on.ready.fire(e.vip)}))).then((function t(){if(n.onReadyBeingFired.length>0){var r=n.onReadyBeingFired.reduce(ce,ee);return n.onReadyBeingFired=[],se.resolve(St((function(){return r(e.vip)}))).then(t)}}))})).finally((function(){n.onReadyBeingFired=null,n.isBeingOpened=!1})).then((function(){return e})).catch((function(t){n.dbOpenError=t;try{a&&a.abort()}catch(e){}return o===n.openCanceller&&e._close(),no(t)})).finally((function(){n.openComplete=!0,i()}))}(this)}},{key:"_close",value:function(){var e=this._state,t=ao.indexOf(this);if(t>=0&&ao.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new se((function(t){e.dbReadyResolve=t})),e.openCanceller=new se((function(t,n){e.cancelOpen=n}))}},{key:"close",value:function(){this._close();var e=this._state;this._options.autoOpen=!1,e.dbOpenError=new _r.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}},{key:"delete",value:function(){var e=this,t=arguments.length>0,n=this._state;return new se((function(r,o){var i=e,a=function(){var e=i;i.close();var t=i._deps.indexedDB.deleteDatabase(i.name);t.onsuccess=Se((function(){!function(e,t){var n=e.indexedDB,r=e.IDBKeyRange;!wt(n)&&"__dbnames"!==t&&bt(n,r).delete(t).catch(ee)}(e._deps,e.name),r()})),t.onerror=nt(o),t.onblocked=i._fireOnBlocked};if(t)throw new _r.InvalidArgument("Arguments not allowed in db.delete()");n.isBeingOpened?n.dbReadyPromise.then(a):a()}))}},{key:"backendDB",value:function(){return this.idbdb}},{key:"isOpen",value:function(){return null!==this.idbdb}},{key:"hasBeenClosed",value:function(){var e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}},{key:"hasFailed",value:function(){return null!==this._state.dbOpenError}},{key:"dynamicallyOpened",value:function(){return this._state.autoSchema}},{key:"tables",get:function(){var e=this;return Zn(this._allTables).map((function(t){return e._allTables[t]}))}},{key:"transaction",value:function(){var e=Ot.apply(this,arguments);return this._transaction.apply(this,e)}},{key:"_transaction",value:function(e,t,n){var r=this,o=Kr.trans;o&&o.db===this&&-1===e.indexOf("!")||(o=null);var i,a,u=-1!==e.indexOf("?");e=e.replace("!","").replace("?","");try{var s=this;if(a=t.map((function(e){var t=c(e,s.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 _r.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(o){if("readonly"===o.mode&&"readwrite"===i){if(!u)throw new _r.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");o=null}o&&a.forEach((function(e){if(o&&-1===o.storeNames.indexOf(e)){if(!u)throw new _r.SubTransaction("Table "+e+" not included in parent transaction.");o=null}})),u&&o&&!o.active&&(o=null)}}catch(e){return o?o._promise(null,(function(t,n){n(e)})):no(e)}var l=xo.bind(null,this,i,a,o,n);return o?o._promise(i,l,"lock"):Kr.trans?Pe(Kr.transless,(function(){return r._whenReady(l)})):this._whenReady(l)}},{key:"table",value:function(e){if(!L(this._allTables,e))throw new _r.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]}}]),e}(),Mo="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable",Lo=function(){function e(t){o(this,e),this._subscribe=t}return a(e,[{key:"subscribe",value:function(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}},{key:Mo,value:function(){return this}}]),e}();try{Po={indexedDB:qn.indexedDB||qn.mozIndexedDB||qn.webkitIndexedDB||qn.msIndexedDB,IDBKeyRange:qn.IDBKeyRange||qn.webkitIDBKeyRange}}catch(e){Po={indexedDB:null,IDBKeyRange:null}}var Do=To;D(Do,s({},Or,{delete:function(e){return new Do(e,{addons:[]}).delete()},exists:function(e){return new Do(e,{addons:[]}).open().then((function(e){return e.close(),!0})).catch("NoSuchDatabaseError",(function(){return!1}))},getDatabaseNames:function(e){try{return function(e){var t=e.indexedDB,n=e.IDBKeyRange;return wt(t)?Promise.resolve(t.databases()).then((function(e){return e.map((function(e){return e.name})).filter((function(e){return"__dbnames"!==e}))})):bt(t,n).toCollection().primaryKeys()}(Do.dependencies).then(e)}catch(e){return no(new _r.MissingAPI)}},defineClass:function(){return function(e){M(this,e)}},ignoreTransaction:function(e){return Kr.trans?Pe(Kr.transless,e):e()},vip:St,async:function(e){return function(){try{var t=xt(e.apply(this,arguments));return t&&"function"==typeof t.then?t:se.resolve(t)}catch(e){return no(e)}}},spawn:function(e,t,n){try{var r=xt(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:se.resolve(r)}catch(e){return no(e)}},currentTransaction:{get:function(){return Kr.trans||null}},waitFor:function(e,t){var n=se.resolve("function"==typeof e?Do.ignoreTransaction(e):e).timeout(t||6e4);return Kr.trans?Kr.trans.waitFor(n):n},Promise:se,debug:{get:function(){return pr},set:function(e){G(e,"dexie"===e?function(){return!0}:lo)}},derive:N,extend:M,props:D,override:U,Events:Ne,on:go,liveQuery:function(e){return new Lo((function(t){var n=function(){return Zn(a).some((function(e){return i[e]&&function(e,t){var n=At(t),r=n.next();if(r.done)return!1;for(var o=r.value,i=At(e),a=i.next(o.from),u=a.value;!r.done&&!a.done;){if(ho(u.from,o.to)<=0&&ho(u.to,o.from)>=0)return!0;ho(o.from,u.from)<0?o=(r=n.next(u.from)).value:u=(a=i.next(o.from)).value}return!1}(i[e],a[e])}))},r=dr(e),o=!1,i={},a={},u={get closed(){return o},unsubscribe:function(){o=!0,go.storagemutated.unsubscribe(l)}};t.start&&t.start(u);var c=!1,s=!1,l=function(e){Tt(i,e),n()&&f()},f=function(){if(!c&&!o){i={};var d={},p=function(t){r&&xe();var n=function(){return _e(e,{subscr:t,trans:null})},o=Kr.trans?Pe(Kr.transless,n):n();return r&&o.then(Oe,Oe),o}(d);s||(go("storagemutated",l),s=!0),c=!0,Promise.resolve(p).then((function(e){c=!1,o||(n()?f():(i={},a=d,t.next&&t.next(e)))}),(function(e){c=!1,t.error&&t.error(e),u.unsubscribe()}))}};return f(),u}))},extendObservabilitySet:Tt,getByKeyPath:tr,setByKeyPath:nr,delByKeyPath:function(e,t){"string"==typeof t?nr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){nr(e,t,void 0)}))},shallowClone:K,deepClone:$,getObjectDiff:jo,cmp:ho,asap:V,minKey:-1/0,addons:[],connections:ao,errnames:wr,dependencies:Po,semVer:"3.2.1",version:"3.2.1".split(".").map((function(e){return parseInt(e)})).reduce((function(e,t,n){return e+t/Math.pow(10,2*n)}))})),Do.maxKey=wo(Do.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(go("storagemutated",(function(e){var t;Ro||(uo?(t=document.createEvent("CustomEvent")).initCustomEvent("x-storagemutated-1",!0,!0,e):t=new CustomEvent("x-storagemutated-1",{detail:e}),Ro=!0,dispatchEvent(t),Ro=!1)})),addEventListener("x-storagemutated-1",(function(e){var t=e.detail;Ro||Mt(t)})));var Ro=!1;if("undefined"!=typeof BroadcastChannel){var No=new BroadcastChannel("x-storagemutated-1");go("storagemutated",(function(e){Ro||No.postMessage(e)})),No.onmessage=function(e){e.data&&Mt(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){go("storagemutated",(function(e){try{Ro||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&f(self.clients.matchAll({includeUncontrolled:!0})).forEach((function(t){return t.postMessage({type:"x-storagemutated-1",changedParts:e})})))}catch(e){}})),addEventListener("storage",(function(e){if("x-storagemutated-1"===e.key){var t=JSON.parse(e.newValue);t&&Mt(t.changedParts)}}));var Bo=self.document&&navigator.serviceWorker;Bo&&Bo.addEventListener("message",(function(e){var t=e.data;t&&"x-storagemutated-1"===t.type&&Mt(t.changedParts)}))}se.rejectionMapper=function(e,t){if(!e||c(e,J)||c(e,TypeError)||c(e,SyntaxError)||!e.name||!xr[e.name])return e;var n=new xr[e.name](t||e.message,e);return"stack"in e&&R(n,"stack",{get:function(){return this.inner.stack}}),n},G(pr,lo);var Uo=h(766),Ho=h(685);function Vo(e){return(Vo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Fo(e,t){return(Fo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ko,zo=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":d(e)},$o=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&&Fo(e,t)}(o,e);var t,n,r=(t=o,n=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}}(),function(){var e,r=Vo(t);if(n){var o=Vo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Lt(this,e)});function o(){var e;return function(e,t){if(!c(e,t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=r.call(this,"EsmOffline")).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 o}(To),qo=new $o,Zo={},Go=(0,Ho.createGlobalStore)("offline-synchronization",{});function Wo(){return Wo=Bt(Nn().mark((function e(){var t,n,r,o,i,a,u,c,s,l,f,d,p;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Go.getState().synchronization){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,qo.syncQueue.count();case 4:t=e.sent,n={},r=Object.entries(Zo),o=r.length,i={},a=new AbortController,u=function(){var e=Go.getState().synchronization;Go.setState({synchronization:Ht({},e,{pendingCount:e.pendingCount-1})})},e.prev=11,Go.setState({synchronization:{totalCount:t,pendingCount:t,abortController:a}}),c=0;case 14:if(!(c<o&&r.length>0)){e.next=30;break}s=r.length;case 16:if(!s--){e.next=27;break}if(l=Vt(r[s],2),f=l[0],d=l[1],!(p=d.dependsOn.map((function(e){return n[e]}))).every(Boolean)){e.next=25;break}return i[f]={},e.next=23,Promise.all(p);case 23:n[f]=zt(d,i,a,u),r.splice(s,1);case 25:e.next=16;break;case 27:c++,e.next=14;break;case 30:return e.next=32,Promise.allSettled(Object.values(n));case 32:return e.prev=32,Go.setState({synchronization:void 0}),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[11,,32,35]])}))),Wo.apply(this,arguments)}function Jo(){return Jo=Bt(Nn().mark((function e(t,n,r,o){var i,a,u,c,s,l,f,d,p,h,v,y,m,g,b,w;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.type,a=t.dependsOn,u=t.process,c=[],s=[],e.next=5,$t();case 5:return l=e.sent,e.next=8,qo.syncQueue.where({type:i,userId:l}).each((function(e,t){c.push([t.primaryKey,e.content,e.descriptor]),s.push(e.content)}));case 8:f=0;case 9:if(!(f<c.length)){e.next=31;break}return d=Vt(c[f],3),p=d[0],h=d[1],v=d[2],y=v.id,m=v.dependencies,g=void 0===m?[]:m,e.prev=11,e.next=14,u(h,{abort:r,index:f,items:s,userId:l,dependencies:g.map((function(e){var t=e.id,r=e.type;return a.includes(r)?n[r][t]:void 0}))});case 14:return b=e.sent,void 0!==y&&(n[i][y]=b),e.next=18,qo.syncQueue.delete(p);case 18:e.next=25;break;case 20:return e.prev=20,e.t0=e.catch(11),e.next=25,qo.syncQueue.update(p,{lastError:{name:null===e.t0||void 0===e.t0?void 0:e.t0.name,message:null!==(w=null===e.t0||void 0===e.t0?void 0:e.t0.message)&&void 0!==w?w:null===e.t0||void 0===e.t0?void 0:e.t0.toString()}});case 25:return e.prev=25,o(),e.finish(25);case 28:f++,e.next=9;break;case 31:case"end":return e.stop()}}),e,null,[[11,20,25,28]])}))),Jo.apply(this,arguments)}function Yo(){return(Yo=Bt(Nn().mark((function e(){var t;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Uo.getLoggedInUser)();case 2:return t=e.sent,e.abrupt("return",(null==t?void 0:t.uuid)||"*");case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qo(){return(Qo=Bt(Nn().mark((function e(t,n,r,o){var i,a;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(i=o&&o.id)){e.next=4;break}return e.next=4,qo.syncQueue.where({type:n,userId:t}).filter((function(e){return(null==e?void 0:e.descriptor.id)===i})).delete().catch(To.errnames.DatabaseClosed);case 4:return e.next=6,qo.syncQueue.add({type:n,content:r,userId:t,descriptor:o||{},createdOn:new Date}).catch(To.errnames.DatabaseClosed,(function(){return-1}));case 6:return a=e.sent,e.abrupt("return",a);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Xo(){return(Xo=Bt(Nn().mark((function e(t,n,r){var o;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$t();case 2:return o=e.sent,e.next=5,qt(o,t,n,r);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ei(){return(ei=Bt(Nn().mark((function e(t,n){var r;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Wt(t,n);case 2:return r=e.sent,e.abrupt("return",r.map((function(e){return e.content})));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ti(){return(ti=Bt(Nn().mark((function e(t,n){var r;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,userId:t}:{userId:t},e.next=3,qo.syncQueue.where(r).toArray().catch(To.errnames.DatabaseClosed,(function(){return[]}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ni(){return(ni=Bt(Nn().mark((function e(t){var n;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$t();case 2:return n=e.sent,e.next=5,Gt(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ri(){return(ri=Bt(Nn().mark((function e(t){var n;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$t();case 2:return n=e.sent,e.next=5,Wt(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oi(){return(oi=Bt(Nn().mark((function e(t){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qo.syncQueue.get(t).catch(To.errnames.DatabaseClosed,(function(){}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ii(){return(ii=Bt(Nn().mark((function e(t){var n,r,o;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,Qt(t);case 3:if(r=e.sent){e.next=6;break}throw new Error("No sync item with the ID ".concat(t," exists."));case 6:if(o=null===(n=Zo[r.type])||void 0===n?void 0:n.options.onBeginEditSyncItem){e.next=9;break}throw new Error("A sync item with the ID ".concat(t,' exists, but the associated handler (if one exists) doesn\'t support editing the item. You can avoid this error by either verifying that sync items of this type can be edited via the "canEditSynchronizationItemsOfType(type: string)" function or alternatively ensure that the synchronizaton handler for sync items of type "').concat(r.type,'" supports editing items.'));case 9:o(r);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ai(){return(ai=Bt(Nn().mark((function e(t){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qo.syncQueue.delete(t).catch(To.errnames.DatabaseClosed);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}for(var ui=new Uint8Array(16),ci=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,si=function(e){return"string"==typeof e&&ci.test(e)},li=[],fi=0;fi<256;++fi)li.push((fi+256).toString(16).substr(1));var di=function(e,t,n){var r=(e=e||{}).random||(e.rng||rn)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(li[e[t+0]]+li[e[t+1]]+li[e[t+2]]+li[e[t+3]]+"-"+li[e[t+4]]+li[e[t+5]]+"-"+li[e[t+6]]+li[e[t+7]]+"-"+li[e[t+8]]+li[e[t+9]]+"-"+li[e[t+10]]+li[e[t+11]]+li[e[t+12]]+li[e[t+13]]+li[e[t+14]]+li[e[t+15]]).toLowerCase();if(!si(n))throw TypeError("Stringified UUID is invalid");return n}(r)},pi="OFFLINE+",hi={};function vi(){return(vi=sn(Nn().mark((function e(t){var n;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sn();case 2:return n=e.sent,e.next=5,hn(n,t);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yi(){return(yi=sn(Nn().mark((function e(t,n){var r,o;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n?{type:n,users:t}:{users:t},o=new $o,e.next=4,o.dynamicOfflineData.where(r).toArray().catch(To.errnames.DatabaseClosed,(function(){return[]}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mi(){return(mi=sn(Nn().mark((function e(t,n){var r;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sn();case 2:return r=e.sent,e.next=5,yn(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function gi(){return(gi=sn(Nn().mark((function e(t,n,r){var o,i;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new $o,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r}).catch(To.errnames.DatabaseClosed,(function(){}));case 3:if(i=e.sent){e.next=9;break}return e.next=7,o.dynamicOfflineData.add({users:[t],type:n,identifier:r}).catch(To.errnames.DatabaseClosed);case 7:e.next=12;break;case 9:if(i.users.includes(t)){e.next=12;break}return e.next=12,o.dynamicOfflineData.update(i.id,{users:ln(i.users).concat([t])}).catch(To.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bi(){return(bi=sn(Nn().mark((function e(t,n){var r;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Sn();case 2:return r=e.sent,e.next=5,gn(r,t,n);case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wi(){return(wi=sn(Nn().mark((function e(t,n,r){var o,i;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new $o,e.next=3,o.dynamicOfflineData.get({type:n,identifier:r,users:t}).catch(To.errnames.DatabaseClosed,(function(){}));case 3:if(!(i=e.sent)){e.next=12;break}if(!(i.users.length>1)){e.next=10;break}return e.next=8,o.dynamicOfflineData.update(i.id,{users:i.users.filter((function(e){return e!==t}))}).catch(To.errnames.DatabaseClosed);case 8:e.next=12;break;case 10:return e.next=12,o.dynamicOfflineData.delete(i.id).catch(To.errnames.DatabaseClosed);case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Si(){return Si=sn(Nn().mark((function e(t,n){var r;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pn(t);case 2:return r=e.sent,e.next=5,Promise.all(r.map(function(){var e=sn(Nn().mark((function e(t){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",wn(t.type,t.identifier,n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 5:case"end":return e.stop()}}),e)}))),Si.apply(this,arguments)}function _i(){return _i=sn(Nn().mark((function e(t,n,r){var o,i,a,u,c,s,l,f,d;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,vn(t,n);case 2:return o=new $o,e.next=5,Sn();case 5:return i=e.sent,e.next=8,o.dynamicOfflineData.get({type:t,identifier:n}).catch(To.errnames.DatabaseClosed,(function(){}));case 8:if(a=e.sent,u=fn().filter((function(e){return e.type===t})),a){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,Promise.all(u.map(function(){var e=sn(Nn().mark((function e(t){var o,i,a;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t.sync(n,r),e.abrupt("return",{id:t.id,error:void 0});case 5:return e.prev=5,e.t0=e.catch(0),a=null!==(i=null===(o=e.t0.message)||void 0===o?void 0:o.toString())&&void 0!==i?i:e.t0.toString(),e.abrupt("return",{id:t.id,error:a});case 11:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(t){return e.apply(this,arguments)}}()));case 14:if(c=e.sent,s=c.filter((function(e){return!e.error})).map((function(e){return e.id})),l=c.filter((function(e){return e.error})).map((function(e){return e.id})),f=c.filter((function(e){return e.error})).map((function(e){return{handlerId:e.id,message:e.error}})),d={syncedOn:new Date,syncedBy:i,succeededHandlers:s,erroredHandlers:l,errors:f},!a.id){e.next=22;break}return e.next=22,o.dynamicOfflineData.update(a.id,{syncState:d}).catch(To.errnames.DatabaseClosed);case 22:case"end":return e.stop()}}),e)}))),_i.apply(this,arguments)}function xi(){return(xi=sn(Nn().mark((function e(){var t;return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Uo.getLoggedInUser)();case 2:if(t=e.sent.uuid){e.next=5;break}throw new Error("Using the dynamic offline data API requires a logged in user.");case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Oi=(0,Ho.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});function ji(){return(ji=xn(Nn().mark((function e(t){return Nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Cn(),e.next=3,wn("patient",t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}(),v}())}}}))},336:(e,t,n)=>{function r(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}e=n.nmd(e);var o=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["react","@openmrs/esm-config","@openmrs/esm-extensions","@openmrs/esm-globals","react-dom","i18next","react-i18next","@openmrs/esm-api","dayjs"],(function(i,a){var u={},c={},s={},l={},f={},d={},p={},h={},v={};return{setters:[function(e){u.createContext=e.createContext,u.createElement=e.createElement,u.default=e.default,u.useCallback=e.useCallback,u.useContext=e.useContext,u.useDebugValue=e.useDebugValue,u.useEffect=e.useEffect,u.useLayoutEffect=e.useLayoutEffect,u.useMemo=e.useMemo,u.useReducer=e.useReducer,u.useRef=e.useRef,u.useState=e.useState},function(e){c.getConfigStore=e.getConfigStore,c.getExtensionConfigFromStore=e.getExtensionConfigFromStore,c.getExtensionsConfigStore=e.getExtensionsConfigStore,c.interpolateUrl=e.interpolateUrl,c.navigate=e.navigate},function(e){s.getConnectedExtensions=e.getConnectedExtensions,s.getExtensionInternalStore=e.getExtensionInternalStore,s.getExtensionStore=e.getExtensionStore,s.registerExtensionSlot=e.registerExtensionSlot,s.renderExtension=e.renderExtension},function(e){l.subscribeConnectivityChanged=e.subscribeConnectivityChanged},function(e){f.default=e.default},function(e){d.default=e.default},function(e){p.I18nextProvider=e.I18nextProvider},function(e){h.defaultVisitCustomRepresentation=e.defaultVisitCustomRepresentation,h.fetchCurrentPatient=e.fetchCurrentPatient,h.getCurrentUser=e.getCurrentUser,h.getLocations=e.getLocations,h.getSessionStore=e.getSessionStore,h.getVisitTypes=e.getVisitTypes,h.openmrsFetch=e.openmrsFetch,h.userHasAccess=e.userHasAccess},function(e){v.default=e.default}],execute:function(){i(function(){var i={4332: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)}}}()},5549:function(e,t,n){var r=n(4457)(n(441),"DataView");e.exports=r},4613:function(e,t,n){var r=function(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])}},o=n(8145),i=n(9096),a=n(5239),u=n(8228),c=n(5920);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=c,e.exports=r},131:function(e,t,n){var r=function(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])}},o=n(7168),i=n(6582),a=n(3867),u=n(9557),c=n(2726);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=c,e.exports=r},4438:function(e,t,n){var r=n(4457)(n(441),"Map");e.exports=r},278:function(e,t,n){var r=function(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])}},o=n(7076),i=n(2530),a=n(4858),u=n(6265),c=n(9909);r.prototype.clear=o,r.prototype.delete=i,r.prototype.get=a,r.prototype.has=u,r.prototype.set=c,e.exports=r},385:function(e,t,n){var r=n(4457)(n(441),"Promise");e.exports=r},9902:function(e,t,n){var r=n(4457)(n(441),"Set");e.exports=r},1124:function(e,t,n){var r=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new o;++t<n;)this.add(e[t])},o=n(278),i=n(6718),a=n(6996);r.prototype.add=r.prototype.push=i,r.prototype.has=a,e.exports=r},4281:function(e,t,n){var r=function(e){var t=this.__data__=new o(e);this.size=t.size},o=n(131),i=n(560),a=n(8282),u=n(6638),c=n(4270),s=n(3229);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=u,r.prototype.has=c,r.prototype.set=s,e.exports=r},4690:function(e,t,n){var r=n(441).Symbol;e.exports=r},5982:function(e,t,n){var r=n(441).Uint8Array;e.exports=r},8965:function(e,t,n){var r=n(4457)(n(441),"WeakMap");e.exports=r},9037:function(e){e.exports=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}},6222:function(e,t,n){var r=n(5092),o=n(6981),i=n(7236),a=n(8752),u=n(4363),c=n(4812),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),d=!n&&!l&&!f&&c(e),p=n||l||f||d,h=p?r(e.length,String):[],v=h.length;for(var y in e)!t&&!s.call(e,y)||p&&("length"==y||f&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,v))||h.push(y);return h}},3848:function(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},4793:function(e){e.exports=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}},3833:function(e,t,n){var r=n(6530);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},9329:function(e,t,n){var r=n(3848),o=n(7236);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},4318:function(e,t,n){var r=n(4690),o=n(7077),i=n(1954),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},8520:function(e,t,n){var r=n(4318),o=n(3387);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},1071:function(e,t,n){var r=n(7229),o=n(3387);e.exports=function e(t,n,i,a,u){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,u))}},7229:function(e,t,n){var r=n(4281),o=n(2503),i=n(6001),a=n(8784),u=n(6686),c=n(7236),s=n(8752),l=n(4812),f="[object Arguments]",d="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,v,y,m){var g=c(e),b=c(t),w=g?d:u(e),S=b?d:u(t),_=(w=w==f?p:w)==p,x=(S=S==f?p:S)==p,O=w==S;if(O&&s(e)){if(!s(t))return!1;g=!0,_=!1}if(O&&!_)return m||(m=new r),g||l(e)?o(e,t,n,v,y,m):i(e,t,w,n,v,y,m);if(!(1&n)){var j=_&&h.call(e,"__wrapped__"),E=x&&h.call(t,"__wrapped__");if(j||E){var C=j?e.value():e,k=E?t.value():t;return m||(m=new r),y(C,k,n,v,m)}}return!!O&&(m||(m=new r),a(e,t,n,v,y,m))}},2987:function(e,t,n){var r=n(3839),o=n(7275),i=n(5973),a=n(6822),u=/^\[object .+?Constructor\]$/,c=Function.prototype,s=Object.prototype,l=c.toString,f=s.hasOwnProperty,d=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?d:u).test(a(e))}},3749:function(e,t,n){var r=n(4318),o=n(9216),i=n(3387),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},8803:function(e,t,n){var r=n(5003),o=n(1466),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},5092:function(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},6535:function(e){e.exports=function(e){return function(t){return e(t)}}},555:function(e){e.exports=function(e,t){return e.has(t)}},8507:function(e,t,n){var r=n(441)["__core-js_shared__"];e.exports=r},2503:function(e,t,n){var r=n(1124),o=n(4793),i=n(555);e.exports=function(e,t,n,a,u,c){var s=1&n,l=e.length,f=t.length;if(l!=f&&!(s&&f>l))return!1;var d=c.get(e),p=c.get(t);if(d&&p)return d==t&&p==e;var h=-1,v=!0,y=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++h<l;){var m=e[h],g=t[h];if(a)var b=s?a(g,m,h,t,e,c):a(m,g,h,e,t,c);if(void 0!==b){if(b)continue;v=!1;break}if(y){if(!o(t,(function(e,t){if(!i(y,t)&&(m===e||u(m,e,n,a,c)))return y.push(t)}))){v=!1;break}}else if(m!==g&&!u(m,g,n,a,c)){v=!1;break}}return c.delete(e),c.delete(t),v}},6001:function(e,t,n){var r=n(4690),o=n(5982),i=n(6530),a=n(2503),u=n(2876),c=n(6350),s=r?r.prototype:void 0,l=s?s.valueOf:void 0;e.exports=function(e,t,n,r,s,f,d){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||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+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 p=u;case"[object Set]":var h=1&r;if(p||(p=c),e.size!=t.size&&!h)return!1;var v=d.get(e);if(v)return v==t;r|=2,d.set(e,t);var y=a(p(e),p(t),r,s,f,d);return d.delete(e),y;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},8784:function(e,t,n){var o=n(6094),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,u,c){var s=1&n,l=o(e),f=l.length;if(f!=o(t).length&&!s)return!1;for(var d=f;d--;){var p=l[d];if(!(s?p in t:i.call(t,p)))return!1}var h=c.get(e),v=c.get(t);if(h&&v)return h==t&&v==e;var y=!0;c.set(e,t),c.set(t,e);for(var m=s;++d<f;){var g=e[p=l[d]],b=t[p];if(a)var w=s?a(b,g,p,t,e,c):a(g,b,p,e,t,c);if(!(void 0===w?g===b||u(g,b,n,a,c):w)){y=!1;break}m||(m="constructor"==p)}if(y&&!m){var S=e.constructor,_=t.constructor;S==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof S&&r(S,S)&&"function"==typeof _&&r(_,_)||(y=!1)}return c.delete(e),c.delete(t),y}},4414:function(e,t,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},6094:function(e,t,n){var r=n(9329),o=n(5904),i=n(2635);e.exports=function(e){return r(e,i,o)}},2907:function(e,t,n){var r=n(7620);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},4457:function(e,t,n){var r=n(2987),o=n(9741);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},7077:function(e,t,n){var r=n(4690),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,u=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[u]=n:delete e[u]),o}},5904:function(e,t,n){var r=n(9037),o=n(7471),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=u},6686:function(e,t,n){var r=n(5549),o=n(4438),i=n(385),a=n(9902),u=n(8965),c=n(4318),s=n(6822),l="[object Map]",f="[object Promise]",d="[object Set]",p="[object WeakMap]",h="[object DataView]",v=s(r),y=s(o),m=s(i),g=s(a),b=s(u),w=c;(r&&w(new r(new ArrayBuffer(1)))!=h||o&&w(new o)!=l||i&&w(i.resolve())!=f||a&&w(new a)!=d||u&&w(new u)!=p)&&(w=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?s(n):"";if(r)switch(r){case v:return h;case y:return l;case m:return f;case g:return d;case b:return p}return t}),e.exports=w},9741:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},8145:function(e,t,n){var r=n(5148);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},9096:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},5239:function(e,t,n){var r=n(5148),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},8228:function(e,t,n){var r=n(5148),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},5920:function(e,t,n){var r=n(5148);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},4363:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=void 0===e?"undefined":o(e);return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},7620:function(e){e.exports=function(e){var t=void 0===e?"undefined":o(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7275:function(e,t,n){var r,o=n(8507),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5003:function(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7168:function(e){e.exports=function(){this.__data__=[],this.size=0}},6582:function(e,t,n){var r=n(3833),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},3867:function(e,t,n){var r=n(3833);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},9557:function(e,t,n){var r=n(3833);e.exports=function(e){return r(this.__data__,e)>-1}},2726:function(e,t,n){var r=n(3833);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},7076:function(e,t,n){var r=n(4613),o=n(131),i=n(4438);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},2530:function(e,t,n){var r=n(2907);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},4858:function(e,t,n){var r=n(2907);e.exports=function(e){return r(this,e).get(e)}},6265:function(e,t,n){var r=n(2907);e.exports=function(e){return r(this,e).has(e)}},9909:function(e,t,n){var r=n(2907);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},2876:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},5148:function(e,t,n){var r=n(4457)(Object,"create");e.exports=r},1466:function(e,t,n){var r=n(3717)(Object.keys,Object);e.exports=r},1782:function(e,t,n){e=n.nmd(e);var r=n(4414),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,u=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=u},1954:function(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3717:function(e){e.exports=function(e,t){return function(n){return e(t(n))}}},441:function(e,t,n){var r=n(4414),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},6718:function(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},6996:function(e){e.exports=function(e){return this.__data__.has(e)}},6350:function(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},560:function(e,t,n){var r=n(131);e.exports=function(){this.__data__=new r,this.size=0}},8282:function(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},6638:function(e){e.exports=function(e){return this.__data__.get(e)}},4270:function(e){e.exports=function(e){return this.__data__.has(e)}},3229:function(e,t,n){var o=n(131),i=n(4438),a=n(278);e.exports=function(e,t){var n=this.__data__;if(r(n,o)){var u=n.__data__;if(!i||u.length<199)return u.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(u)}return n.set(e,t),this.size=n.size,this}},6822:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},6530:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},6981:function(e,t,n){var r=n(8520),o=n(3387),i=Object.prototype,a=i.hasOwnProperty,u=i.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!u.call(e,"callee")};e.exports=c},7236:function(e){var t=Array.isArray;e.exports=t},1580:function(e,t,n){var r=n(3839),o=n(9216);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},8752:function(e,t,n){e=n.nmd(e);var r=n(441),o=n(7149),i=t&&!t.nodeType&&t,a=i&&e&&!e.nodeType&&e,u=a&&a.exports===i?r.Buffer:void 0,c=(u?u.isBuffer:void 0)||o;e.exports=c},9793:function(e,t,n){var r=n(1071);e.exports=function(e,t){return r(e,t)}},3839:function(e,t,n){var r=n(4318),o=n(5973);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9216:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},5973:function(e){e.exports=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)}},3387:function(e){e.exports=function(e){return null!=e&&"object"==typeof e}},4812:function(e,t,n){var r=n(3749),o=n(6535),i=n(1782),a=i&&i.isTypedArray,u=a?o(a):r;e.exports=u},2635:function(e,t,n){var r=n(6222),o=n(8803),i=n(1580);e.exports=function(e){return i(e)?r(e):o(e)}},7471:function(e){e.exports=function(){return[]}},7149:function(e){e.exports=function(){return!1}},5385:function(){System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=function(e){for(var t=[],n=0;n<o.length;n++)o[n]===e?e=null:t.push(o[n]);o=t},r=function(n,r,i){t=r?n:e(e({},t),n);for(var a=o,u=0;u<a.length;u++)a[u](t,i)},o=[];return t=t||{},{action:function(e){var n=function(t){r(t,!1,e)};return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:r,subscribe:function(e){return o.push(e),function(){n(e)}},unsubscribe:n,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=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.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},7968:function(e,t,n){var r=n(1577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},1577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},766:function(e){"use strict";e.exports=h},9824:function(e){"use strict";e.exports=c},45:function(e){"use strict";e.exports=s},5728:function(e){"use strict";e.exports=l},9688:function(e){"use strict";e.exports=v},7064:function(e){"use strict";e.exports=d},5954:function(e){"use strict";e.exports=u},493:function(e){"use strict";e.exports=f},8834:function(e){"use strict";e.exports=p}},y={};function m(e){var t=y[e];if(void 0!==t)return t.exports;var n=y[e]={id:e,loaded:!1,exports:{}};return i[e].call(n.exports,n,n.exports,m),n.loaded=!0,n.exports}m.y=a,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},m.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},function(){var e;m.g.importScripts&&(e=m.g.location+"");var t=m.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),m.p=e}();var g={};return(0,m(7968).s)(1),function(){"use strict";var i=function(e){var t=e.to,n=e.templateParams,r=e.children,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["to","templateParams","children"]);return Re.default.createElement("a",Ue({onClick:function(e){return o=t,i=n,void((r=e).metaKey||r.ctrlKey||r.shiftKey||0!=r.button||(r.preventDefault(),(0,Be.navigate)({to:o,templateParams:i})));var r,o,i},href:(0,Be.interpolateUrl)(t,n)},o),r)},a=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},u=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){return function(t){var n,r=function(e){if(Array.isArray(e))return e}(n=(0,Re.useState)(e.getState()))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(n)||function(e,t){if(e){if("string"==typeof e)return a(e,2);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)?a(e,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.")}(),o=r[0],i=r[1];(0,Re.useEffect)((function(){return e.subscribe((function(e){return i(e)}))}),[]);var c={};return t&&(c=(0,Re.useMemo)((function(){return function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n}(e,t)}),[e,t])),function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){u(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},o,c)}},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},l=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},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(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(window.navigator.onLine))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,2);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,2):void 0}}(e)||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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){return(0,Fe.subscribeConnectivityChanged)((function(e){var t=e.online;return r(t)}))}),[]),n},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},h=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return p(e,2);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,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){var t=function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions)&&void 0!==i?i:[];ze()(a,r)||o(a)};return t((0,He.getExtensionStore)().getState()),(0,He.getExtensionStore)().subscribe(t)}),[e,r]),r},v=function(e){var t=d(),n=h(e);return(0,Re.useMemo)((function(){return(0,He.getConnectedExtensions)(n,t)}),[n,t])},y=function(e){var t=(0,Re.useContext)(Ne).moduleName;if(!t)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,Re.useEffect)((function(){(0,He.registerExtensionSlot)(t,e)}),[]),{extensions:v(e),extensionSlotName:e,extensionSlotModuleName:t}},b=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},w=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){b(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},S=function(e){return e},_=function(e){var t=e.name,n=e.extensionSlotName,r=e.select,o=void 0===r?S:r,i=e.children,a=e.state,u=e.style,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["name","extensionSlotName","select","children","state","style"]);if(i&&a)throw new Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");var s,l,f=null!=t?t:n,d=(0,Re.useRef)(null),p=y(f),h=p.extensions,v=p.extensionSlotModuleName,m=(0,Re.useMemo)((function(){return o(h)}),[o,h]),g=(0,Re.useMemo)((function(){if("function"==typeof i&&!Re.default.isValidElement(i))return m.map((function(e){return i(e)}))}),[i,m]);return Re.default.createElement("div",$e({ref:d,"data-extension-slot-name":f,"data-extension-slot-module-name":v,style:w({},u,{position:"relative"})},c),f&&m.map((function(e,t){return Re.default.createElement(Ne.Provider,{key:e.id,value:{moduleName:v,extension:{extensionId:e.id,extensionSlotName:f,extensionSlotModuleName:v}}},null!==(l=null!==(s=null==g?void 0:g[t])&&void 0!==s?s:i)&&void 0!==l?l:Re.default.createElement(Ve,{state:a}))})))},x=function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n},O=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[n]:{};n%2?x(Object(r),!0).forEach((function(t){j(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))},r=1;r<arguments.length;r++)n(r);return e},j=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=function(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(Ge(n)));return function(){var e=n(t);if(!r(e,HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(Ge(e)));return e}},C=function(e){if("object"!==Ze(e))throw new Error("single-spa-react requires a configuration object");var t=O(O({},Je),e);if(!t.React)throw new Error("single-spa-react must be passed opts.React");if(!t.ReactDOM)throw new Error("single-spa-react must be passed opts.ReactDOM");if(!t.rootComponent&&!t.loadRootComponent)throw new Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(t.errorBoundary&&"function"!=typeof t.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!We&&t.React.createContext&&(We=t.React.createContext()),t.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(t);var n={bootstrap:k.bind(null,t),mount:A.bind(null,t),unmount:P.bind(null,t)};return t.parcelCanUpdate&&(n.update=I.bind(null,t)),n},k=function(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then((function(t){e.rootComponent=t}))},A=function(e,t){return new Promise((function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var o=T(e,t,(function(){n(this)})),i=E(e,t)(),a=function(e){var t=e.opts,n=e.elementToRender,r=e.domElement,o="function"==typeof t.renderType?t.renderType():t.renderType;if(["createRoot","unstable_createRoot","createBlockingRoot","unstable_createBlockingRoot"].indexOf(o)>=0){var i=t.ReactDOM[o](r);return i.render(n),i}return"hydrate"===o?t.ReactDOM.hydrate(n,r):t.ReactDOM.render(n,r),null}({elementToRender:o,domElement:i,opts:e});e.domElements[t.name]=i,e.renderResults[t.name]=a}))},P=function(e,t){return new Promise((function(n){e.unmountFinished=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():e.ReactDOM.unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]}))},I=function(e,t){return new Promise((function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=T(e,t,null),o=e.renderResults[t.name];if(o&&o.render)o.render(r);else{var i=E(e,t)();e.ReactDOM.render(r,i)}}))},T=function(e,t,n){var r=e.React.createElement(e.rootComponent,t),o=We?e.React.createElement(We.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),o=e.React.createElement(e.errorBoundaryClass,t,o)),e.React.createElement(e.SingleSpaRoot,O(O({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach((function(e){return e()})),delete e.updateResolves[t.name])},unmountFinished:function(){setTimeout(e.unmountFinished)}}),o)},M=function(e,t){return!t||"object"!==nt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t},L=function(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw new Error("Invalid options");var t=Object.assign({},ot,e);return function(e){var n;return(n=function(n){!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&&tt(e,t)}(u,n);var o,i,a=(o=u,i=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}}(),function(){var e,t=et(o);if(i){var n=et(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return M(this,e)});function u(e){var n;return function(e,t){if(!r(e,t))throw new TypeError("Cannot call a class as a function")}(this,u),(n=a.call(this,e)).state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,extension:e._extensionContext}},n}var c=u.prototype;return c.componentDidCatch=function(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout((function(){throw e})),this.setState({caughtError:e,caughtErrorInfo:n})},c.render=function(){if(this.state.caughtError)return Re.default.createElement("div",null,"An error has occurred. Please try reloading the page.");var n=this,r=Re.default.createElement(Ne.Provider,{value:this.state.config},Re.default.createElement(Re.default.Suspense,{fallback:null},t.disableTranslations?Re.default.createElement(e,Xe({},this.props)):Re.default.createElement(it,{ns:t.moduleName,forceUpdate:function(){return n.forceUpdate()}},Re.default.createElement(Qe.I18nextProvider,{i18n:rt,defaultNS:t.moduleName},Re.default.createElement(e,Xe({},this.props))))));return t.strictMode||!Re.default.StrictMode?r:Re.default.createElement(Re.default.StrictMode,null,r)},u}(Re.default.Component)).displayName="OpenmrsReactComponent(".concat(t.featureName,")"),n}},D=function(e,t){return C({React:Re.default,ReactDOM:qe.default,rootComponent:L(t)(e)})},R=function(e,t){return function(){return e().then((function(e){return D(e.default,t)}))}},N=function(e,t){return function(){return Promise.resolve(D(e,t))}},B=function(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])}},U=function(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])}},H=function(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])}},V=function(e){var t=this.__data__=new ft(e);this.size=t.size},F=function(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ft;++t<n;)this.add(e[t])},K=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},z=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return K(e,2);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)?K(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){return(0,He.getExtensionStore)().subscribe((function(t){var n,i,a=null!==(i=null===(n=t.slots[e])||void 0===n?void 0:n.assignedExtensions.map((function(e){return e.id})))&&void 0!==i?i:[];tr(a,r)||o(a)}))}),[]),r},$=function(e){(0,Re.useEffect)((function(){if(e){var t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",function(){document.body.style.overflow=t}}}),[e])},q=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},Z=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},G=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(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)?q(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.")}()},W=function(){var e=(0,Re.useContext)(Ne),t=e.moduleName,n=e.extension;if(!t&&!n)throw Error('No ComponentContext has been provided. This should come from "openmrsComponentDecorator".\nUsually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".');var r=function(e){var t,n,r,o,i,a,u=(0,Re.useMemo)((function(){return(0,Be.getConfigStore)(e)}),[e]),c=e,s=(t=u,o=(r=G((0,Re.useState)((n=t,function(){var e=n.getState();return e.loaded&&e.config?e.config:null})),2))[0],i=r[1],(0,Re.useEffect)((function(){return null==t?void 0:t.subscribe((function(e){e.loaded&&e.config&&i(e.config)}))}),[t]),o);if(!s)throw nr[c]||(nr[c]=(a=u,new Promise((function(e){var t=a.subscribe((function(n){n.loaded&&n.config&&(e(n.config),t())}))})))),nr[c];return s}(t),o=function(e){var t,n,r,o,i,a,u,c=(0,Re.useMemo)(Be.getExtensionsConfigStore,[]),s=(t=c,n=e,i=G((0,Re.useState)((r=t,(o=n)?function(){var e=r.getState(),t=(0,Be.getExtensionConfigFromStore)(e,o.extensionSlotName,o.extensionId);if(t.loaded&&t.config)return t.config}:null)),2),a=i[0],u=i[1],(0,Re.useEffect)((function(){if(n)return t.subscribe((function(e){var t=(0,Be.getExtensionConfigFromStore)(e,n.extensionSlotName,n.extensionId);t.loaded&&t.config&&!tr(t.config,a)&&u(t.config)}))}),[t,n,a]),a);if(!s&&e){var l="".concat(e.extensionSlotName,"-").concat(e.extensionId);throw!nr[l]&&c&&(nr[l]=function(e,t){return new Promise((function(n){var r=e.subscribe((function(e){var o=(0,Be.getExtensionConfigFromStore)(e,t.extensionSlotName,t.extensionId);o.loaded&&o.config&&(n(o.config),r())}))}))}(c,e)),nr[l]}return s||{}}(n),i=(0,Re.useMemo)((function(){return function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){Z(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},r,o)}),[r,o]);return i},J=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},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},Q=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){Y(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},X=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},ee=function(e,t){switch(t.type){case Gn.loadPatient:return Q({},e,{patientUuid:t.patientUuid,patient:null,isPendingUuid:!1,isLoadingPatient:!0,err:null});case Gn.newPatient:return Q({},e,{patient:t.patient,isPendingUuid:!1,isLoadingPatient:!1,err:null});case Gn.loadError:return Q({},e,{patient:null,isPendingUuid:!1,isLoadingPatient:!1,err:t.err});default:return e}},te=function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=(0,Re.useReducer)(ee,Q({},ir,{patientUuid:null!=e?e:null,isPendingUuid:!e,isLoadingPatient:!!e})))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return J(e,2);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?J(e,2):void 0}}(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.")}(),r=n[0],o=n[1];return(0,Re.useEffect)((function(){if(r.isPendingUuid){var e=X();o(e?{type:Gn.loadPatient,patientUuid:e}:{type:Gn.newPatient,patient:null})}var t=!0;return r.isLoadingPatient&&r.patientUuid&&(0,rr.fetchCurrentPatient)(r.patientUuid).then((function(e){return t&&o({patient:e.data,type:Gn.newPatient})}),(function(e){return t&&o({err:e,type:Gn.loadError})})),function(){t=!1}}),[r.isPendingUuid,r.isLoadingPatient,r.patientUuid]),(0,Re.useEffect)((function(){var e=function(e){var t=X();t!=r.patientUuid&&o({type:Gn.loadPatient,patientUuid:t})};return window.addEventListener("single-spa:routing-event",e),function(){return window.removeEventListener("single-spa:routing-event",e)}}),[r.patientUuid]),{isLoading:r.isPendingUuid||r.isLoadingPatient,patient:r.patient,patientUuid:null!=e?e:r.patientUuid,error:r.err}},ne=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},re=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},oe=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){re(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},ie=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ne(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)?ne(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.")}()},ae=function(){var e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]},ue=function(e,t){switch(t.type){case or.loadPatient:return oe({},e,{patient:null,isLoadingPatient:!0,err:null});case or.newPatient:return oe({},e,{patient:t.patient,isLoadingPatient:!1,err:null});case or.loadError:return oe({},e,{patient:null,isLoadingPatient:!1,err:t.err});default:return e}},ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ae(),t=ie((0,Re.useReducer)(ue,sr),2),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var t=!0;return e?((0,rr.fetchCurrentPatient)(e).then((function(e){return t&&r({patient:e.data,type:or.newPatient})}),(function(e){return t&&r({err:e,type:or.loadError})})),r({type:or.loadPatient})):r({type:or.newPatient,patient:null}),function(){t=!1}}),[e]),[n.isLoadingPatient,n.patient,e,n.err]},se=function(e){var t=v(e);return(0,Re.useMemo)((function(){return Object.fromEntries(t.map((function(e){return[e.name,e.meta]})))}),[t])},le=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},fe=function(){var e,t=(e=(0,Re.useState)(0),function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return le(e,2);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)?le(e,2):void 0}}(e)||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.")}())[1];return(0,Re.useCallback)((function(){t((function(e){return e+1}))}),[])},de=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},pe=function(){var e="tablet";return document.body.classList.forEach((function(t){switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-tablet":e="desktop"}})),e},he=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(pe))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return de(e,2);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)?de(e,2):void 0}}(e)||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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=function(){r(pe())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),n},ve=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},ye=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return ve(e,2);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)?ve(e,2):void 0}}(e)||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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,rr.getLocations)().subscribe((function(e){r(e)}),(function(e){console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},me=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=(0,Re.useRef)(null);return(0,Re.useEffect)((function(){if(t){var r=function(t){var r;(null==n||null===(r=n.current)||void 0===r?void 0:r.contains(t.target))||e(t)};return window.addEventListener("click",r),function(){return window.removeEventListener("click",r)}}}),[e,t]),n},ge=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},be=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},we=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return be(e,2);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)?be(e,2):void 0}}(e)||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.")}(),n=t[0],r=t[1],o=null;if(!n){if(ar){var i=(0,rr.getSessionStore)().getState();i.loaded&&(o=i.session)}else ar=new Promise((function(e){var t=function(t){var n=t.loaded,r=t.session;n&&(e(r),o=r,ur&&ur(),ur=void 0)};t((0,rr.getSessionStore)().getState()),o||(ur=(0,rr.getSessionStore)().subscribe(t))}));if(!o)throw ar;r(o)}(0,Re.useEffect)((function(){return ur||(ur=(0,rr.getSessionStore)().subscribe((function(e){var t=e.loaded,n=e.session;t&&(o=n,r(n))}))),function(){ur&&ur(),ur=void 0}}),[]);var a=n||o;if(!a)throw ar?(console.warn("useSession is in an unexpected state. Attempting to recover."),ar):Error("useSession is in an invalid state.");return a},Se=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},_e=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},xe=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){_e(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e},Oe=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Se(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)?Se(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.")}()},je=function(e,t){"function"==typeof t&&(t=t(e));var n={};for(var r in t)n[r]=e.action(t[r]);return n},Ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:hr,n=arguments.length>2?arguments[2]:void 0,r=Oe((0,Re.useState)((function(){return t(e.getState())})),2),o=r[0],i=r[1];(0,Re.useEffect)((function(){return(0,pr.subscribeTo)(e,t,i)}),[e,t]);var a={};return n&&(a=(0,Re.useMemo)((function(){return je(e,n)}),[e,n])),xe({},o,a)},Ce=function(e,t){return Ee(e,hr,t)},ke=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function u(e){try{s(o.next(e))}catch(e){a(e)}}function c(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,r(t,n)?t:new n((function(e){e(t)}))).then(u,c)}s((o=o.apply(e,t||[])).next())}))},Ae=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},Pe=function(e){var t,n=ro(e?"/ws/rest/v1/visit?patient=".concat(e,"&v=").concat(rr.defaultVisitCustomRepresentation,"&includeInactive=false"):null,rr.openmrsFetch),r=n.data,o=n.error;return{error:o,mutate:n.mutate,isValidating:n.isValidating,currentVisit:(0,Re.useMemo)((function(){return null!==(t=null==r?void 0:r.data.results.find((function(e){return null===e.stopDatetime&&(0,oo.default)(e.startDatetime).isToday()})))&&void 0!==t?t:null}),[null==r?void 0:r.data.results]),isLoading:!r&&!o}},Ie=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},Te=function(){var e,t=function(e){if(Array.isArray(e))return e}(e=(0,Re.useState)([]))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e)||function(e,t){if(e){if("string"==typeof e)return Ie(e,2);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)?Ie(e,2):void 0}}(e)||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.")}(),n=t[0],r=t[1];return(0,Re.useEffect)((function(){var e=(0,rr.getVisitTypes)().subscribe((function(e){r(e)}),(function(e){return console.error(e)}));return function(){return e.unsubscribe()}}),[]),n},Me=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},Le=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Me(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)?Me(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.")}()},De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=Le((0,Re.useState)(1),2),r=n[0],o=n[1],i=(0,Re.useMemo)((function(){return Math.max(1,Math.ceil(e.length/t))}),[e.length,t]),a=(0,Re.useMemo)((function(){var n=(r-1)*t,o=(r+0)*t;return e.slice(n,o)}),[e,r,t]);return{results:a,totalPages:i,currentPage:r,paginated:e.length>t,showNextButton:r<i,showPreviousButton:r>1,goTo:function(e){o(Math.max(1,Math.min(i,e)))},goToNext:function(){r<i&&o(r+1)},goToPrevious:function(){r>1&&o(r-1)}}};m.r(g),m.d(g,{ComponentContext:function(){return Ne},ConfigurableLink:function(){return i},Extension:function(){return Ve},ExtensionSlot:function(){return _},UserHasAccess:function(){return dr},createUseStore:function(){return c},getAsyncExtensionLifecycle:function(){return at},getAsyncLifecycle:function(){return R},getLifecycle:function(){return D},getSyncLifecycle:function(){return N},openmrsComponentDecorator:function(){return L},useAssignedExtensionIds:function(){return z},useAssignedExtensions:function(){return h},useBodyScrollLock:function(){return $},useConfig:function(){return W},useConnectedExtensions:function(){return v},useConnectivity:function(){return d},useCurrentPatient:function(){return ce},useExtensionInternalStore:function(){return lr},useExtensionSlot:function(){return y},useExtensionSlotMeta:function(){return se},useExtensionStore:function(){return fr},useForceUpdate:function(){return fe},useLayoutType:function(){return he},useLocations:function(){return ye},useOnClickOutside:function(){return me},usePagination:function(){return De},usePatient:function(){return te},useSession:function(){return we},useStore:function(){return Ee},useStoreWithActions:function(){return Ce},useVisit:function(){return Pe},useVisitTypes:function(){return Te}});var Re=m(5954),Ne=Re.default.createContext({moduleName:""}),Be=m(9824);function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ue.apply(this,arguments)}var He=m(45),Ve=function(e){var t,n=e.state,r=e.wrap,o=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)())||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return s(e,2);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,2):void 0}}(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.")}(),i=o[0],a=o[1],u=(0,Re.useContext)(Ne).extension,c=(0,Re.useRef)();r&&console.warn("`wrap` prop of Extension is being used. This will be removed in a future release.");var f=(0,Re.useCallback)((function(e){a(e)}),[]);(0,Re.useEffect)((function(){if(null!=i&&u&&!c.current)return c.current=(0,He.renderExtension)(i,u.extensionSlotName,u.extensionSlotModuleName,u.extensionId,void 0,n),function(){c.current&&c.current.unmount()}}),[null==u?void 0:u.extensionSlotName,null==u?void 0:u.extensionId,null==u?void 0:u.extensionSlotModuleName,n,i]),(0,Re.useEffect)((function(){c.current&&c.current.update&&c.current.update(function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){l(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({},n))}),[c.current,n]);var d=Re.default.createElement("div",{ref:f,"data-extension-id":null==u?void 0:u.extensionId,style:{position:"relative"}});return u&&r?r(d,u):d},Fe=m(5728),Ke=m(9793),ze=m.n(Ke);function $e(){return $e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$e.apply(this,arguments)}var qe=m(493);function Ze(e){return(Ze="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==o(Symbol.iterator)?function(e){return void 0===e?"undefined":o(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":o(e)})(e)}var We=null;try{We=n(983).createContext()}catch(e){}var Je={React:null,ReactDOM:null,rootComponent:null,loadRootComponent:null,renderType:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{}},Ye=m(7064),Qe=m(8834);function Xe(){return Xe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(this,arguments)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nt=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":o(e)},rt=Ye.default.default||Ye.default,ot={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},it=function(e){(0,Re.useEffect)((function(){return rt.on("languageChanged",e.forceUpdate),function(){return rt.off("languageChanged",e.forceUpdate)}}),[e.forceUpdate]);var t=(0,Re.useRef)(null);if(t.current)throw t.current;if(!rt.hasLoadedNamespace(e.ns)){var n=setTimeout((function(){console.warn("openmrsComponentDecorator: the React suspense promise for i18next.loadNamespaces(['".concat(e.ns,"']) did not resolve nor reject after three seconds. This could mean you have multiple versions of i18next and haven't made i18next a webpack external in all projects."))}),3e3);throw rt.loadNamespaces([e.ns]).then((function(){return clearTimeout(n)})).catch((function(e){clearTimeout(n),t.current=e}))}return Re.default.createElement(Re.default.Fragment,null,e.children)},at=R,ut=function(e,t){return e===t||e!=e&&t!=t},ct=function(e,t){for(var n=e.length;n--;)if(ut(e[n][0],t))return n;return-1},st=Array.prototype.splice;B.prototype.clear=function(){this.__data__=[],this.size=0},B.prototype.delete=function(e){var t=this.__data__,n=ct(t,e);return!(n<0||(n==t.length-1?t.pop():st.call(t,n,1),--this.size,0))},B.prototype.get=function(e){var t=this.__data__,n=ct(t,e);return n<0?void 0:t[n][1]},B.prototype.has=function(e){return ct(this.__data__,e)>-1},B.prototype.set=function(e,t){var n=this.__data__,r=ct(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var lt,ft=B,dt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,ht=dt||pt||Function("return this")(),vt=ht.Symbol,yt=Object.prototype,mt=yt.hasOwnProperty,gt=yt.toString,bt=vt?vt.toStringTag:void 0,wt=Object.prototype.toString,St=vt?vt.toStringTag:void 0,_t=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":St&&St in Object(e)?function(e){var t=mt.call(e,bt),n=e[bt];try{e[bt]=void 0;var r=!0}catch(e){}var o=gt.call(e);return r&&(t?e[bt]=n:delete e[bt]),o}(e):(t=e,wt.call(t));var t},xt=function(e){var t=void 0===e?"undefined":o(e);return null!=e&&("object"==t||"function"==t)},Ot=function(e){if(!xt(e))return!1;var t=_t(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},jt=ht["__core-js_shared__"],Et=(lt=/[^.]+$/.exec(jt&&jt.keys&&jt.keys.IE_PROTO||""))?"Symbol(src)_1."+lt:"",Ct=Function.prototype.toString,kt=function(e){if(null!=e){try{return Ct.call(e)}catch(e){}try{return e+""}catch(e){}}return""},At=/^\[object .+?Constructor\]$/,Pt=Function.prototype,It=Object.prototype,Tt=Pt.toString,Mt=It.hasOwnProperty,Lt=RegExp("^"+Tt.call(Mt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dt=function(e,t){var n,r=null==(n=e)?void 0:n[t];return function(e){return!(!xt(e)||(t=e,Et&&Et in t))&&(Ot(e)?Lt:At).test(kt(e));var t}(r)?r:void 0},Rt=Dt(ht,"Map"),Nt=Dt(Object,"create"),Bt=Object.prototype.hasOwnProperty,Ut=Object.prototype.hasOwnProperty;U.prototype.clear=function(){this.__data__=Nt?Nt(null):{},this.size=0},U.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},U.prototype.get=function(e){var t=this.__data__;if(Nt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Bt.call(t,e)?t[e]:void 0},U.prototype.has=function(e){var t=this.__data__;return Nt?void 0!==t[e]:Ut.call(t,e)},U.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Nt&&void 0===t?"__lodash_hash_undefined__":t,this};var Ht=U,Vt=function(e,t){var n,r,i=e.__data__;return("string"==(r=o(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};H.prototype.clear=function(){this.size=0,this.__data__={hash:new Ht,map:new(Rt||ft),string:new Ht}},H.prototype.delete=function(e){var t=Vt(this,e).delete(e);return this.size-=t?1:0,t},H.prototype.get=function(e){return Vt(this,e).get(e)},H.prototype.has=function(e){return Vt(this,e).has(e)},H.prototype.set=function(e,t){var n=Vt(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};var Ft=H;V.prototype.clear=function(){this.__data__=new ft,this.size=0},V.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},V.prototype.get=function(e){return this.__data__.get(e)},V.prototype.has=function(e){return this.__data__.has(e)},V.prototype.set=function(e,t){var n=this.__data__;if(r(n,ft)){var o=n.__data__;if(!Rt||o.length<199)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ft(o)}return n.set(e,t),this.size=n.size,this};var Kt=V;F.prototype.add=F.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},F.prototype.has=function(e){return this.__data__.has(e)};var zt=F,$t=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},qt=function(e,t){return e.has(t)},Zt=function(e,t,n,r,o,i){var a=1&n,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var s=i.get(e),l=i.get(t);if(s&&l)return s==t&&l==e;var f=-1,d=!0,p=2&n?new zt:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var h=e[f],v=t[f];if(r)var y=a?r(v,h,f,t,e,i):r(h,v,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!$t(t,(function(e,t){if(!qt(p,t)&&(h===e||o(h,e,n,r,i)))return p.push(t)}))){d=!1;break}}else if(h!==v&&!o(h,v,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Gt=ht.Uint8Array,Wt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Jt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Yt=vt?vt.prototype:void 0,Qt=Yt?Yt.valueOf:void 0,Xt=Array.isArray,en=Object.prototype.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,nn=tn?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)&&(i[o++]=a)}return i}(tn(e),(function(t){return en.call(e,t)})))}:function(){return[]},rn=function(e){return null!=e&&"object"==typeof e},on=function(e){return rn(e)&&"[object Arguments]"==_t(e)},an=Object.prototype,un=an.hasOwnProperty,cn=an.propertyIsEnumerable,sn=on(function(){return arguments}())?on:function(e){return rn(e)&&un.call(e,"callee")&&!cn.call(e,"callee")},ln=sn,fn=t&&!t.nodeType&&t,dn=fn&&e&&!e.nodeType&&e,pn=dn&&dn.exports===fn?ht.Buffer:void 0,hn=(pn?pn.isBuffer:void 0)||function(){return!1},vn=/^(?:0|[1-9]\d*)$/,yn=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},mn={};mn["[object Float32Array]"]=mn["[object Float64Array]"]=mn["[object Int8Array]"]=mn["[object Int16Array]"]=mn["[object Int32Array]"]=mn["[object Uint8Array]"]=mn["[object Uint8ClampedArray]"]=mn["[object Uint16Array]"]=mn["[object Uint32Array]"]=!0,mn["[object Arguments]"]=mn["[object Array]"]=mn["[object ArrayBuffer]"]=mn["[object Boolean]"]=mn["[object DataView]"]=mn["[object Date]"]=mn["[object Error]"]=mn["[object Function]"]=mn["[object Map]"]=mn["[object Number]"]=mn["[object Object]"]=mn["[object RegExp]"]=mn["[object Set]"]=mn["[object String]"]=mn["[object WeakMap]"]=!1;var gn,bn,wn,Sn=t&&!t.nodeType&&t,_n=Sn&&e&&!e.nodeType&&e,xn=_n&&_n.exports===Sn&&dt.process,On=function(){try{return _n&&_n.require&&_n.require("util").types||xn&&xn.binding&&xn.binding("util")}catch(e){}}(),jn=On&&On.isTypedArray,En=jn?(gn=jn,function(e){return gn(e)}):function(e){return rn(e)&&yn(e.length)&&!!mn[_t(e)]},Cn=Object.prototype.hasOwnProperty,kn=Object.prototype,An=(bn=Object.keys,wn=Object,function(e){return bn(wn(e))}),Pn=Object.prototype.hasOwnProperty,In=function(e){return n=nn,r=function(e){return null!=(t=e)&&yn(t.length)&&!Ot(t)?function(e,t){var n,r,i,a=Xt(e),u=!a&&ln(e),c=!a&&!u&&hn(e),s=!a&&!u&&!c&&En(e),l=a||u||c||s,f=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],d=f.length;for(var p in e)!Cn.call(e,p)||l&&("length"==p||c&&("offset"==p||"parent"==p)||s&&("buffer"==p||"byteLength"==p||"byteOffset"==p)||(r=d,i=void 0===(n=p)?"undefined":o(n),(r=null==r?9007199254740991:r)&&("number"==i||"symbol"!=i&&vn.test(n))&&n>-1&&n%1==0&&n<r))||f.push(p);return f}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||kn))return An(e);var t,n,r=[];for(var o in Object(e))Pn.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t}(t=e),Xt(t)?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(t));var t,n,r},Tn=Object.prototype.hasOwnProperty,Mn=Dt(ht,"DataView"),Ln=Dt(ht,"Promise"),Dn=Dt(ht,"Set"),Rn=Dt(ht,"WeakMap"),Nn="[object Map]",Bn="[object Promise]",Un="[object Set]",Hn="[object WeakMap]",Vn="[object DataView]",Fn=kt(Mn),Kn=kt(Rt),zn=kt(Ln),$n=kt(Dn),qn=kt(Rn),Zn=_t;(Mn&&Zn(new Mn(new ArrayBuffer(1)))!=Vn||Rt&&Zn(new Rt)!=Nn||Ln&&Zn(Ln.resolve())!=Bn||Dn&&Zn(new Dn)!=Un||Rn&&Zn(new Rn)!=Hn)&&(Zn=function(e){var t=_t(e),n="[object Object]"==t?e.constructor:void 0,r=n?kt(n):"";if(r)switch(r){case Fn:return Vn;case Kn:return Nn;case zn:return Bn;case $n:return Un;case qn:return Hn}return t});var Gn,Wn=Zn,Jn="[object Arguments]",Yn="[object Array]",Qn="[object Object]",Xn=Object.prototype.hasOwnProperty,er=function e(t,n,o,i,a){return t===n||(null==t||null==n||!rn(t)&&!rn(n)?t!=t&&n!=n:function(e,t,n,o,i,a){var u=Xt(e),c=Xt(t),s=u?Yn:Wn(e),l=c?Yn:Wn(t),f=(s=s==Jn?Qn:s)==Qn,d=(l=l==Jn?Qn:l)==Qn,p=s==l;if(p&&hn(e)){if(!hn(t))return!1;u=!0,f=!1}if(p&&!f)return a||(a=new Kt),u||En(e)?Zt(e,t,n,o,i,a):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 Gt(e),new Gt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ut(+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 u=Wt;case"[object Set]":var c=1&r;if(u||(u=Jt),e.size!=t.size&&!c)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var l=Zt(u(e),u(t),r,o,i,a);return a.delete(e),l;case"[object Symbol]":if(Qt)return Qt.call(e)==Qt.call(t)}return!1}(e,t,s,n,o,i,a);if(!(1&n)){var h=f&&Xn.call(e,"__wrapped__"),v=d&&Xn.call(t,"__wrapped__");if(h||v){var y=h?e.value():e,m=v?t.value():t;return a||(a=new Kt),i(y,m,n,o,a)}}return!!p&&(a||(a=new Kt),function(e,t,n,o,i,a){var u=1&n,c=In(e),s=c.length;if(s!=In(t).length&&!u)return!1;for(var l=s;l--;){var f=c[l];if(!(u?f in t:Tn.call(t,f)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var v=u;++l<s;){var y=e[f=c[l]],m=t[f];if(o)var g=u?o(m,y,f,t,e,a):o(y,m,f,e,t,a);if(!(void 0===g?y===m||i(y,m,n,o,a):g)){h=!1;break}v||(v="constructor"==f)}if(h&&!v){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&r(b,b)&&"function"==typeof w&&r(w,w)||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,n,o,i,a))}(t,n,o,i,e,a))},tr=function(e,t){return er(e,t)},nr={},rr=m(766);!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(Gn||(Gn={}));var or,ir={patientUuid:null,patient:null,isPendingUuid:!0,isLoadingPatient:!1,err:null};!function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLloadErroroadError"}(or||(or={}));var ar,ur,cr,sr={patient:null,isLoadingPatient:!0,err:null},lr=c((0,He.getExtensionInternalStore)()),fr=c((0,He.getExtensionStore)()),dr=function(e){var t,n=e.privilege,r=e.fallback,o=e.children,i=function(e){if(Array.isArray(e))return e}(t=(0,Re.useState)(null))||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),2!==i.length);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t)||function(e,t){if(e){if("string"==typeof e)return ge(e,2);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)?ge(e,2):void 0}}(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.")}(),a=i[0],u=i[1];return(0,Re.useEffect)((function(){var e=(0,rr.getCurrentUser)({includeAuthStatus:!1}).subscribe(u);return function(){return e.unsubscribe()}}),[]),a&&(0,rr.userHasAccess)(n,a)?Re.default.createElement(Re.default.Fragment,null,o):r?Re.default.createElement(Re.default.Fragment,null,r):null},pr=m(5385),hr=function(e){return e},vr=function(){},yr=void 0,mr=Object,gr=function(e){return e===yr},br=function(e){return"function"==typeof e},wr=function(e,t){return mr.assign({},e,t)},Sr="undefined",_r=function(){return("undefined"==typeof window?"undefined":o(window))!=Sr},xr=new WeakMap,Or=0,jr=function(e){var t,n,r=void 0===e?"undefined":o(e),i=e&&e.constructor,a=i==Date;if(mr(e)!==e||a||i==RegExp)t=a?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=xr.get(e))return t;if(t=++Or+"~",xr.set(e,t),i==Array){for(t="@",n=0;n<e.length;n++)t+=jr(e[n])+",";xr.set(e,t)}if(i==mr){t="#";for(var u=mr.keys(e).sort();!gr(n=u.pop());)gr(e[n])||(t+=n+":"+jr(e[n])+",");xr.set(e,t)}}return t},Er=!0,Cr=_r(),kr=("undefined"==typeof document?"undefined":o(document))!=Sr,Ar=Cr&&window.addEventListener?window.addEventListener.bind(window):vr,Pr=kr?document.addEventListener.bind(document):vr,Ir=Cr&&window.removeEventListener?window.removeEventListener.bind(window):vr,Tr=kr?document.removeEventListener.bind(document):vr,Mr={isOnline:function(){return Er},isVisible:function(){var e=kr&&document.visibilityState;return gr(e)||"hidden"!==e}},Lr={initFocus:function(e){return Pr("visibilitychange",e),Ar("focus",e),function(){Tr("visibilitychange",e),Ir("focus",e)}},initReconnect:function(e){var t=function(){Er=!0,e()},n=function(){Er=!1};return Ar("online",t),Ar("offline",n),function(){Ir("online",t),Ir("offline",n)}}},Dr=!_r()||"Deno"in window,Rr=Dr?Re.useEffect:Re.useLayoutEffect,Nr="undefined"!=typeof navigator&&navigator.connection,Br=!Dr&&Nr&&(["slow-2g","2g"].includes(Nr.effectiveType)||Nr.saveData),Ur=function(e){if(br(e))try{e=e()}catch(t){e=""}var t=[].concat(e);return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?jr(e):"",t,e?"$swr$"+e:""]},Hr=new WeakMap,Vr=function(e,t,n,r,o,i,a){void 0===a&&(a=!0);var u=Hr.get(e),c=u[0],s=u[1],l=u[3],f=c[t],d=s[t];if(a&&d)for(var p=0;p<d.length;++p)d[p](n,r,o);return i&&(delete l[t],f&&f[0])?f[0](2).then((function(){return e.get(t)})):e.get(t)},Fr=0,Kr=function(){return++Fr},zr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ke(void 0,void 0,void 0,(function(){var t,n,r,o,i,a,u,c,s,l,f,d,p,h,v,y,m,g,b,w;return Ae(this,(function(S){switch(S.label){case 0:if(t=e[0],n=e[1],r=e[2],o=e[3],a=!!gr((i="boolean"==typeof o?{revalidate:o}:o||{}).populateCache)||i.populateCache,u=!1!==i.revalidate,c=!1!==i.rollbackOnError,s=i.optimisticData,l=Ur(n),f=l[0],d=l[2],!f)return[2];if(p=Hr.get(t),h=p[2],e.length<3)return[2,Vr(t,f,t.get(f),yr,yr,u,!0)];if(v=r,m=Kr(),h[f]=[m,0],g=!gr(s),b=t.get(f),g&&(t.set(f,s),Vr(t,f,s)),br(v))try{v=v(t.get(f))}catch(e){y=e}return v&&br(v.then)?[4,v.catch((function(e){y=e}))]:[3,2];case 1:if(v=S.sent(),m!==h[f][0]){if(y)throw y;return[2,v]}y&&g&&c&&(a=!0,v=b,t.set(f,b)),S.label=2;case 2:return a&&(y||(br(a)&&(v=a(v,b)),t.set(f,v)),t.set(d,wr(t.get(d),{error:y}))),h[f][1]=Kr(),[4,Vr(t,f,v,y,yr,u,!!a)];case 3:if(w=S.sent(),y)throw y;return[2,a?w:v]}}))}))},$r=function(e,t){for(var n in e)e[n][0]&&e[n][0](t)},qr=function(e,t){if(!Hr.has(e)){var n=wr(Lr,t),r={},o=zr.bind(yr,e),i=vr;if(Hr.set(e,[r,{},{},{},o]),!Dr){var a=n.initFocus(setTimeout.bind(yr,$r.bind(yr,r,0))),u=n.initReconnect(setTimeout.bind(yr,$r.bind(yr,r,1)));i=function(){a&&a(),u&&u(),Hr.delete(e)}}return[e,o,i]}return[e,Hr.get(e)[4]]},Zr=qr(new Map),Gr=Zr[0],Wr=Zr[1],Jr=wr({onLoadingSlow:vr,onSuccess:vr,onError:vr,onErrorRetry:function(e,t,n,r,o){var i=n.errorRetryCount,a=o.retryCount,u=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!gr(i)&&a>i||setTimeout(r,u,o)},onDiscarded:vr,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Br?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Br?5e3:3e3,compare:function(e,t){return jr(e)==jr(t)},isPaused:function(){return!1},cache:Gr,mutate:Wr,fallback:{}},Mr),Yr=function(e,t){var n=wr(e,t);if(t){var r=e.use,o=e.fallback,i=t.use,a=t.fallback;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=wr(o,a))}return n},Qr=(0,Re.createContext)({}),Xr=function(e){return br(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}]},eo=function(){return wr(Jr,(0,Re.useContext)(Qr))},to=function(e,t,n){var r=t[e]||(t[e]=[]);return r.push(n),function(){var e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}},no={dedupe:!0},ro=(mr.defineProperty((function(e){var t=e.value,n=Yr((0,Re.useContext)(Qr),t),r=t&&t.provider,o=(0,Re.useState)((function(){return r?qr(r(n.cache||Gr),t):yr}))[0];return o&&(n.cache=o[0],n.mutate=o[1]),Rr((function(){return o?o[2]:yr}),[]),(0,Re.createElement)(Qr.Provider,wr(e,{value:n}))}),"default",{value:Jr}),cr=function(e,t,n){var r=n.cache,i=n.compare,a=n.fallbackData,u=n.suspense,c=n.revalidateOnMount,s=n.refreshInterval,l=n.refreshWhenHidden,f=n.refreshWhenOffline,d=Hr.get(r),p=d[0],h=d[1],v=d[2],y=d[3],m=Ur(e),g=m[0],b=m[1],w=m[2],S=(0,Re.useRef)(!1),_=(0,Re.useRef)(!1),x=(0,Re.useRef)(g),O=(0,Re.useRef)(t),j=(0,Re.useRef)(n),E=function(){return j.current},C=function(){return E().isVisible()&&E().isOnline()},k=function(e){return r.set(w,wr(r.get(w),e))},A=r.get(g),P=gr(a)?n.fallback[g]:a,I=gr(A)?P:A,T=r.get(w)||{},M=T.error,L=!S.current,D=function(){return L&&!gr(c)?c:!E().isPaused()&&(u?!gr(I):gr(I)||n.revalidateIfStale)},R=!(!g||!t)&&(!!T.isValidating||L&&D()),N=function(e,t){var n=(0,Re.useState)({})[1],r=(0,Re.useRef)(e),o=(0,Re.useRef)({data:!1,error:!1,isValidating:!1}),i=(0,Re.useCallback)((function(e){var i=!1,a=r.current;for(var u in e){var c=u;a[c]!==e[c]&&(a[c]=e[c],o.current[c]&&(i=!0))}i&&!t.current&&n({})}),[]);return Rr((function(){r.current=e})),[r,o.current,i]}({data:I,error:M,isValidating:R},_),B=N[0],U=N[1],H=N[2],V=(0,Re.useCallback)((function(e){return ke(void 0,void 0,void 0,(function(){var t,o,a,u,c,s,l,f,d,p,h,m,w;return Ae(this,(function(j){switch(j.label){case 0:if(t=O.current,!g||!t||_.current||E().isPaused())return[2,!1];u=!0,c=e||{},s=!y[g]||!c.dedupe,l=function(){return!_.current&&g===x.current&&S.current},f=function(){var e=y[g];e&&e[1]===a&&delete y[g]},d={isValidating:!1},p=function(){k({isValidating:!1}),l()&&H(d)},k({isValidating:!0}),H({isValidating:!0}),j.label=1;case 1:return j.trys.push([1,3,,4]),s&&(Vr(r,g,B.current.data,B.current.error,!0),n.loadingTimeout&&!r.get(g)&&setTimeout((function(){u&&l()&&E().onLoadingSlow(g,n)}),n.loadingTimeout),y[g]=[t.apply(void 0,b),Kr()]),w=y[g],o=w[0],a=w[1],[4,o];case 2:return o=j.sent(),s&&setTimeout(f,n.dedupingInterval),y[g]&&y[g][1]===a?(k({error:yr}),d.error=yr,h=v[g],!gr(h)&&(a<=h[0]||a<=h[1]||0===h[1])?(p(),s&&l()&&E().onDiscarded(g),[2,!1]):(i(B.current.data,o)?d.data=B.current.data:d.data=o,i(r.get(g),o)||r.set(g,o),s&&l()&&E().onSuccess(o,g,n),[3,4])):(s&&l()&&E().onDiscarded(g),[2,!1]);case 3:return m=j.sent(),f(),E().isPaused()||(k({error:m}),d.error=m,s&&l()&&(E().onError(m,g,n),("boolean"==typeof n.shouldRetryOnError&&n.shouldRetryOnError||br(n.shouldRetryOnError)&&n.shouldRetryOnError(m))&&C()&&E().onErrorRetry(m,g,n,V,{retryCount:(c.retryCount||0)+1,dedupe:!0}))),[3,4];case 4:return u=!1,p(),l()&&s&&Vr(r,g,d.data,d.error,!1),[2,!0]}}))}))}),[g]),F=(0,Re.useCallback)(zr.bind(yr,r,(function(){return x.current})),[]);if(Rr((function(){O.current=t,j.current=n})),Rr((function(){if(g){var e=g!==x.current,t=V.bind(yr,no),n=0,r=to(g,h,(function(e,t,n){H(wr({error:t,isValidating:n},i(B.current.data,e)?yr:{data:e}))})),a=to(g,p,(function(e){if(0==e){var r=Date.now();E().revalidateOnFocus&&r>n&&C()&&(n=r+E().focusThrottleInterval,t())}else if(1==e)E().revalidateOnReconnect&&C()&&t();else if(2==e)return V()}));return _.current=!1,x.current=g,S.current=!0,e&&H({data:I,error:M,isValidating:R}),D()&&(gr(I)||Dr?t():(u=t,_r()&&o(window.requestAnimationFrame)!=Sr?window.requestAnimationFrame(u):setTimeout(u,1))),function(){_.current=!0,r(),a()}}var u}),[g,V]),Rr((function(){var e,t=function(){var t=br(s)?s(I):s;t&&-1!==e&&(e=setTimeout(n,t))},n=function(){B.current.error||!l&&!E().isVisible()||!f&&!E().isOnline()?t():V(no).then(t)};return t(),function(){e&&(clearTimeout(e),e=-1)}}),[s,l,f,V]),(0,Re.useDebugValue)(I),u&&gr(I)&&g)throw O.current=t,j.current=n,_.current=!1,gr(M)?V(no):M;return{mutate:F,get data(){return U.data=!0,I},get error(){return U.error=!0,M},get isValidating(){return U.isValidating=!0,R}}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=eo(),r=Xr(e),o=r[0],i=r[1],a=r[2],u=Yr(n,a),c=cr,s=u.use;if(s)for(var l=s.length;l-- >0;)c=s[l](c);return c(o,i||u.fetcher,u)}),oo=m(9688),io=m(4332),ao=m.n(io);oo.default.extend(ao())}(),g}())}}}))},493:()=>{System.register([],(function(e,t){return{execute:function(){e(function(){var e={968:function(e,t,n){var r=n(577).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},577:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.y=t,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.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),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})},function(){var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e}();var o={};return(0,r(968).s)(1),function(){"use strict";var e=function(e,t){for(var n in t)e[n]=t[n];return e},t=function(t){var n=[];function r(e){for(var t=[],r=0;r<n.length;r++)n[r]===e?e=null:t.push(n[r]);n=t}function o(r,o,i){t=o?r:e(e({},t),r);for(var a=n,u=0;u<a.length;u++)a[u](t,i)}return t=t||{},{action:function(e){function n(t){o(t,!1,e)}return function(){for(var r=arguments,o=[t],i=0;i<arguments.length;i++)o.push(r[i]);var a=e.apply(this,o);if(null!=a)return a.then?a.then(n):n(a)}},setState:o,subscribe:function(e){return n.push(e),function(){r(e)}},unsubscribe:r,getState:function(){return t}}},n=function(e,n){var r=s[e];if(r)return r.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):r.value.setState(n,!0),r.active=!0,r.value;var o=t(n);return s[e]={value:o,active:!0},o},i=function(e,n){var r=s[e];if(!r){var o=t(n);return s[e]={value:o,active:!1},o}return r.value},a=function(e){return n("app",e)},u=function(){return i("app",{})},c=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.r(o),r.d(o,{createAppState:function(){return a},createGlobalStore:function(){return n},getAppState:function(){return u},getGlobalStore:function(){return i},subscribeTo:function(){return c}});var s={}}(),o}())}}}))},390:()=>{System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","react-i18next","rxjs"],(function(e,t){var n={},r={},o={},i={},a={},u={},c={};return{setters:[function(){},function(){},function(e){o.createGlobalStore=e.createGlobalStore},function(){},function(){},function(){},function(e){c.Subject=e.Subject}],execute:function(){e(function(){var e={584:function(e,t,n){var r=n(518).R;t.s=function(e){if(e||(e=1),!n.y.meta||!n.y.meta.url)throw console.error("__system_context__",n.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");n.p=r(n.y.meta.url,e)}},518:function(e,t,n){t.R=function(e,t){var n=document.createElement("a");n.href=e;for(var r="/"===n.pathname[0]?n.pathname:"/"+n.pathname,o=0,i=r.length;o!==t&&i>=0;)"/"===r[--i]&&o++;if(o!==t)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+t+") is greater than the number of directories ("+o+") in the URL path "+e);var a=r.slice(0,i+1);return n.protocol+"//"+n.host+a},Number.isInteger},78:function(){var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":void 0===e?"undefined":(t=e)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t;var t};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},u=function(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1},c=function(e,t){return Object.prototype.hasOwnProperty.call(t,e)},s=function(e,t,n,r){var i=function(e,t){return se(e,t,n.slice(),r.slice())},a=o(e);return!u((function(e,t){return!u(i,t,e)}),o(t),a)},l=function(e){return function o(i,a,u){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(u)?o:t(i)&&t(a)?r((function(t,n){return e(t,n,u)})):t(i)&&t(u)?r((function(t,n){return e(t,a,n)})):t(a)&&t(u)?r((function(t,n){return e(i,t,n)})):t(i)?n((function(t){return e(t,a,u)})):t(a)?n((function(t){return e(i,t,u)})):t(u)?n((function(t){return e(i,a,t)})):e(i,a,u)}}},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)},p=function(e,t,n,r){return e["@@transducer/result"](n[r](xe(e["@@transducer/step"],e),t))},h=function(e,t){return function(n){if(!e(n))return"function"==typeof t?t(n):t}},v=function(){try{return JSON.parse(localStorage.getItem("openmrs:configAreDevDefaultsOn")||"false")}catch(e){return!1}},y=function(e){return(0,Te.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},m=function(){return(0,Te.getGlobalStore)("config-extension-slots",{slots:{}})},g=function(e){return b(m().getState(),e)},b=function(e,t){var n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}},w=function(){return(0,Te.getGlobalStore)("config-extensions",{configs:{}})},S=function(e,t){var n=Object.assign({},_(w().getState(),e,t));return n.config=he(["Display conditions"],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}},x=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},j=function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){O(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return 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,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||k(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.")}()},C=function(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k(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.")}()},k=function(e,t){if(e){if("string"==typeof e)return x(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)?x(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 u=i.value,c=V(u,e,t);y(u).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(r)throw o}}},P=function(e,t){var n,r,o=(n=K(H(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),u=a[0],c=a[1],s=!0,l=!1,f=void 0;try{for(var d,p=Object.entries(c)[Symbol.iterator]();!(s=(d=p.next()).done);s=!0){var h=E(d.value,2),v=h[0];U(h[1],u,v)}}catch(e){l=!0,f=e}finally{try{s||null==p.return||p.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 j({},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=m(),u=a.getState(),c={slots:j({},u.slots,i)};le(u,c)||a.setState(c)},I=function(e,t){var n=function(e,t){var n=Ue(ge(e.schemas)),r=C(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 u,c=r[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=E(u.value,2);n=K([n,He(s[0],s[1])])}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}return n}(e,t);Be.setState({config:n})},T=function(e,t,n){var r={},o=!0,i=!1,a=void 0;try{for(var u,c=t.mountedExtensions[Symbol.iterator]();!(o=(u=c.next()).done);o=!0){var s=u.value,l=B(s.slotModuleName,s.extensionModuleName,s.slotName,s.extensionId,e,n);r[s.slotName]=j({},r[s.slotName],O({},s.extensionId,{config:l,loaded:!0}))}}catch(e){i=!0,a=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw a}}w().setState({configs:r})},M=function(e,t){Ve(e,t);var n=pe(t,$e),r=Le.getState();Le.setState({schemas:j({},r.schemas,O({},e,n))})},L=function(e,t){Ve(e,t);var n=pe(t,$e),r=Le.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.")),Le.setState({schemas:j({},r.schemas,O({},e,n))})},D=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",n=Le.getState();Le.setState({providedConfigs:C(n.providedConfigs).concat([{source:t,config:e}])})},R=function(e){return new Promise((function(t){var n=function(e){if(e.loaded&&e.config){var n=he(["Display conditions"],e.config);t(n),o&&o()}},r=y(e);n(r.getState());var o=r.subscribe(n)}))},N=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];z(e,t,n);var o=ze(e,t,r);return Ke(e,o,n),o},B=function(e,t,n,r,o,i){var a,u,c,s,l=E(r.split("#"),1)[0],f=o.schemas[l],d=f?l:t,p=H(o,i),h=F(e,p),v=null!==(s=null==h||null===(a=h.extensionSlots)||void 0===a||null===(u=a[n])||void 0===u||null===(c=u.configure)||void 0===c?void 0:c[r])&&void 0!==s?s:{},y=K([F(d,p),v]),m=null!=f?f:o.schemas[t];z(m,y,d);var g=ze(m,y,o.devDefaultsAreOn);return Ke(m,g,d),delete g.extensionSlots,g},U=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&&(G(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},H=function(e,t){return C(e.providedConfigs.map((function(e){return e.config}))).concat([t.config])},V=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=F(e,H(t,n));z(r,o,e);var i=ze(r,o,t.devDefaultsAreOn);return Ke(r,i,e),delete i.extensionSlots,i},F=function(e,t){return K(t.map((function(t){return t[e]})).filter((function(e){return!!e})))},K=function(e){return je(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,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e.hasOwnProperty(c)?Fe(f,s,l):"extensionSlots"===c&&""!==n||console.error("Unknown config key '".concat(l,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}},$=function(e,t,n){t&&q(e,[{Array:Ee,Boolean:Ce,ConceptUuid:Ie,Number:ke,Object:Pe,String:Ae,UUID:Ie,PersonAttributeTypeUuid:Ie,PatientIdentifierTypeUuid:Ie}[t]],n)},q=function(e,t,n){if(t)try{var r=!0,o=!1,i=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=(0,a.value)(n);"string"==typeof c&&("object"==typeof n?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(n," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}catch(t){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(t))}},Z=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},G=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},W=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 Y(e,function(e){for(var t=arguments,n=function(n){var r=null!=t[n]?t[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(t){W(e,t,r[t])}))},r=1;r<arguments.length;r++)n(r);return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")},Y=function(e,t){return Object.keys(t).reduce((function(e,n){return e.split("${"+n+"}").join(t[n])}),e)},Q=function(e){var t=e.to,n=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=J(t,n);o.startsWith(r)?(0,qe.navigateToUrl)(o):window.location.assign(o)};i.r(a),i.d(a,{Type:function(){return ye},configExtensionStore:function(){return Ne},configInternalStore:function(){return Le},defineConfigSchema:function(){return M},defineExtensionConfigSchema:function(){return L},getConfig:function(){return R},getConfigStore:function(){return y},getExtensionConfig:function(){return S},getExtensionConfigFromStore:function(){return _},getExtensionSlotConfig:function(){return g},getExtensionSlotConfigFromStore:function(){return b},getExtensionSlotsConfigStore:function(){return m},getExtensionsConfigStore:function(){return w},implementerToolsConfigStore:function(){return Be},inRange:function(){return Ze},interpolateString:function(){return Y},interpolateUrl:function(){return J},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return Ge},navigate:function(){return Q},oneOf:function(){return Je},processConfig:function(){return N},provide:function(){return D},temporaryConfigStore:function(){return Re},validator:function(){return h},validators:function(){return Ye}});var X="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},ee=Object.prototype.toString,te=function(){return"[object Arguments]"===ee.call(arguments)?function(e){return"[object Arguments]"===ee.call(e)}:function(e){return c("callee",e)}}(),ne=te,re=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ie=function(){return arguments.propertyIsEnumerable("length")}(),ae=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||ie?n((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ie&&ne(e);for(t in e)!c(t,e)||o&&"length"===t||(r[r.length]=t);if(re)for(n=oe.length-1;n>=0;)c(t=oe[n],e)&&!ae(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 se(t,n,r,o){if(X(t,n))return!0;var i,a,u=ce(t);if(u!==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(u){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))||!X(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!X(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(u){case"Map":return t.size===n.size&&s(t.entries(),n.entries(),r.concat([t]),o.concat([n]));case"Set":return t.size===n.size&&s(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]),p=o.concat([n]);for(l=f.length-1;l>=0;){var h=f[l];if(!c(h,n)||!se(n[h],t[h],d,p))return!1;l-=1}return!0}var le=r((function(e,t){return se(e,t,[],[])})),fe=l((function(e,t,n){var r,o={};for(r in t)c(r,t)&&(o[r]=c(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)c(r,n)&&!c(r,o)&&(o[r]=n[r]);return o})),de=l((function e(t,n,r){return fe((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 de((function(e,t,n){return n}),e,t)})),he=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 u in t[a+1]=e,n[a+1]=o,e)o[u]=r?ve(e[u],t,n,!0):e[u];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 ye,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&&(t=e,!("[object String]"===Object.prototype.toString.call(t)))&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1));var t})),Se=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}(),_e=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,u){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,u,c){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,u,c,s){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,u,c,s,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)}))})),xe=_e,Oe="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",je=l((function(e,t,n){if("function"==typeof e&&(e=new Se(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 p(e,t,n,"fantasy-land/reduce");if(null!=n[Oe])return d(e,t,n[Oe]());if("function"==typeof n.next)return d(e,t,n);if("function"==typeof n.reduce)return p(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));(me=ye||(ye={})).Array="Array",me.Boolean="Boolean",me.ConceptUuid="ConceptUuid",me.Number="Number",me.Object="Object",me.String="String",me.UUID="UUID",me.PersonAttributeTypeUuid="PersonAttributeTypeUuid",me.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";var Ee=h((function(e){return Array.isArray(e)}),"must be an array"),Ce=h((function(e){return"boolean"==typeof e}),"must be a boolean"),ke=h((function(e){return"number"==typeof e}),"must be a number"),Ae=h((function(e){return"string"==typeof e}),"must be a string"),Pe=h((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),Ie=h((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"),Te=i(685),Me={providedConfigs:[],schemas:{},devDefaultsAreOn:v()},Le=(0,Te.createGlobalStore)("config-internal",Me),De=v();Le.subscribe((function(e){var t;e.devDefaultsAreOn!=De&&(t=e.devDefaultsAreOn,localStorage.setItem("openmrs:configAreDevDefaultsOn",JSON.stringify(t)),De=e.devDefaultsAreOn)}));var Re=(0,Te.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Re.subscribe((function(e){var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));var Ne=(0,Te.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Be=(0,Te.createGlobalStore)("config-implementer-tools",{config:{}});function Ue(e){return e.hasOwnProperty("_default")?j({},e,{_value:e._default,_source:"default"}):G(e)?Object.keys(e).reduce((function(t,n){return t[n]=Ue(e[n]),t}),{}):{}}function He(e,t){return G(e)?Object.keys(e).reduce((function(n,r){return n[r]=He(e[r],t),n}),{}):{_value:e,_source:t}}function Ve(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 u,c=function(o,i){var a=i.value,u=n+(n&&".")+a,c=t[a];if("Display conditions"===u&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),!G(c))return console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").concat(r)),"continue";c.hasOwnProperty("_default")||Ve(e,c,u);var s=c._elements;if(Z(s)&&Ve(e,s,u+"._elements"),c._validators){var l=!0,f=!1,d=void 0;try{for(var p,h=c._validators[Symbol.iterator]();!(l=(p=h.next()).done);l=!0){var v=p.value;"function"!=typeof v&&console.error("".concat(e," has invalid validator for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(v,"."))}}catch(e){f=!0,d=e}finally{try{l||null==h.return||h.return()}finally{if(f)throw d}}}var y=c._type;y&&!Object.values(ye).includes(y)&&console.error("".concat(e," has invalid type for key '").concat(u,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ye).join(", "),". ")+"Received '".concat(y,"'")),Object.keys(c).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(u,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(c))),s&&y&&![ye.Array,ye.Object].includes(y)&&console.error("".concat(e," has bad config schema definition for key '").concat(u,"'. ").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)))},s=Object.keys(t).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(s,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}}function Fe(e,t,n){$(n,e._type,t),G(t)?e._type===ye.Object?function(e,t,n){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c];z(e._elements,s,"".concat(n,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}}(e,t,n):e.hasOwnProperty("_default")||z(e,t,n):e._type===ye.Array&&function(e,t,n){if(Z(e._elements))for(var r=0;r<t.length;r++)Fe(e._elements,t[r],"".concat(n,"[").concat(r,"]"));for(var o=0;o<t.length;o++){var i;$("".concat(n,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,t[o])}}(e,t,n)}function Ke(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(t!==e._default&&q(n,e._validators,t),G(t)){var r=!0,o=!1,i=void 0;try{for(var a,u=Object.keys(t)[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var c=a.value,s=t[c],l=n+"."+c,f=e[c];e._type===ye.Object&&e._elements?Ke(e._elements,s,l):Ke(f,s,l)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}}else if(Array.isArray(t)&&e._elements)for(var d=0;d<t.length;d++)Ke(e._elements,t[d],"".concat(n,"[").concat(d,"]"))}A(Le.getState(),Re.getState()),Le.subscribe((function(e){return A(e,Re.getState())})),Re.subscribe((function(e){return A(Le.getState(),e)})),I(Le.getState(),Re.getState()),Le.subscribe((function(e){return I(e,Re.getState())})),Re.subscribe((function(e){return I(Le.getState(),e)})),P(Le.getState(),Re.getState()),Le.subscribe((function(e){return P(e,Re.getState())})),Re.subscribe((function(e){return P(Le.getState(),e)})),T(Le.getState(),Ne.getState(),Re.getState()),Le.subscribe((function(e){T(e,Ne.getState(),Re.getState())})),Ne.subscribe((function(e){T(Le.getState(),e,Re.getState())})),Re.subscribe((function(e){T(Le.getState(),Ne.getState(),e)}));var ze=function(e,t,n){var r=ge(t);if(!e)return r;var o=!0,i=!1,a=void 0;try{for(var u,c=function(t,o){var i=o.value,a=r[i],u=e[i];if(u&&u.hasOwnProperty("_default")){if(!r.hasOwnProperty(i)){var c=u._devDefault||u._default;r[i]=n?c:u._default}var s=u._elements;if(a&&Z(s))if(u._type===ye.Array&&Array.isArray(a)){var l=a.map((function(e){return ze(s,e,n)}));r[i]=l}else if(u._type===ye.Object){var f=!0,d=!1,p=void 0;try{for(var h,v=Object.keys(a)[Symbol.iterator]();!(f=(h=v.next()).done);f=!0){var y=h.value;a[y]=ze(s,a[y],n)}}catch(e){d=!0,p=e}finally{try{f||null==v.return||v.return()}finally{if(d)throw p}}}}else if(G(u)){var m=r.hasOwnProperty(i)?a:{};G(m)&&(r[i]=ze(u,m,n))}},s=Object.keys(e)[Symbol.iterator]();!(o=(u=s.next()).done);o=!0)c(0,u)}catch(e){i=!0,a=e}finally{try{o||null==s.return||s.return()}finally{if(i)throw a}}return r},$e={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:ye.Array,_default:[]}}},qe=i(645),Ze=function(e,t){return h((function(n){return e<=n&&n<=t}),"must be between ".concat(e," and ").concat(t))},Ge=function(e){var t=e.concat(["openmrsBase","openmrsSpaBase"]);return h((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=Ge([]),Je=function(e){return h((function(t){return e.includes(t)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Ye={inRange:Ze,isUrl:We,isUrlWithTemplateParameters:Ge,oneOf:Je}}(),a}())}}}))},991:function(e){"use strict";e.exports='<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>'},662:function(e){"use strict";e.exports='<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'},865:function(e){"use strict";e.exports='<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'},646:function(e){"use strict";e.exports='<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'},509:function(e){"use strict";e.exports='<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>'},250:function(e){"use strict";e.exports='<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'},142:function(e){"use strict";e.exports='<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>'},451:function(e){"use strict";e.exports='<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'},61:function(e){"use strict";e.exports='<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'},76:function(e){"use strict";e.exports='<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'},600:function(e){"use strict";e.exports='<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'},40:function(e){"use strict";e.exports='<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'},714:function(e){"use strict";e.exports='<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>'},752:function(e){"use strict";e.exports='<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>'},862:function(e){"use strict";e.exports='<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>'},601:function(e){"use strict";e.exports='<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'},879:function(e){"use strict";e.exports='<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>'},739:function(e){"use strict";e.exports='<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'},524:function(e){"use strict";e.exports='<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'},787:function(e){"use strict";e.exports='<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'},592:function(e){"use strict";e.exports='<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'},141:function(e){"use strict";e.exports='<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'},647:function(e){"use strict";e.exports='<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>'},885:function(e){"use strict";e.exports='<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'},575:function(e){"use strict";e.exports='<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'},93:function(e){"use strict";e.exports='<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'},839:function(e){"use strict";e.exports='<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'},45:function(e){"use strict";e.exports=n},740:function(e){"use strict";e.exports=r},685:function(e){"use strict";e.exports=o},954:function(e){"use strict";e.exports=i},493:function(e){"use strict";e.exports=a},281:function(e){"use strict";e.exports=u},792:function(e){"use strict";e.exports=c}},s={};function l(t){var n=s[t];if(void 0!==n)return n.exports;var r=s[t]={exports:{}};return e[t](r,r.exports,l),r.exports}l.y=t,l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e;l.g.importScripts&&(e=l.g.location+"");var t=l.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),l.p=e}();var f={};return(0,l(584).s)(1),function(){"use strict";var e=function(e,t){var n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,i.appendChild(n))},t=l(885),n=l(93),r=l(575),o=l(839),i=document.createElement("div"),a=function(){document.body.appendChild(i)};i.id="omrs-svgs-container",i.style.display="none","complete"===document.readyState?a():window.addEventListener("load",a);var u=l(141),c=l(739),s=l(787),f=l(865),d=l(509),p=l(646),h=l(250),v=l(76),y=l(600),m=l(40),g=l(61),b=l(592),w=l(862),S=l(714),_=l(601),x=l(142),O=l(991),j=l(662),E=l(524),C=l(451),k=l(647),A=l(879),P=l(752),I=l(78);l(954),l(493);var T=l(792);new T.Subject,new T.Subject,l(45);var M,L=l(685);(0,L.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,l(740),(0,L.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),l(281),M=function(e,t){document.documentElement.style.setProperty(e,t)},(0,I.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:I.Type.String},"Brand color #2":{_default:"#004144",_type:I.Type.String},"Brand color #3":{_default:"#007d79",_type:I.Type.String}}),(0,I.getConfigStore)("@openmrs/esm-styleguide").subscribe((function(e){e.loaded&&e.config&&(M("--brand-01",e.config["Brand color #1"]),M("--brand-02",e.config["Brand color #2"]),M("--brand-03",e.config["Brand color #3"]))})),e("omrs-logo-full-color",t),e("omrs-logo-full-mono",t),e("omrs-logo-full-grey",t),e("omrs-logo-partial-color",n),e("omrs-logo-partial-mono",n),e("omrs-logo-partial-grey",n),e("omrs-logo-icon-color",r),e("omrs-logo-icon-mono",r),e("omrs-logo-icon-grey",r),e("omrs-logo-white",o),e("omrs-icon-visibility",u),e("omrs-icon-menu",c),e("omrs-icon-search",s),e("omrs-icon-arrow-back",f),e("omrs-icon-arrow-forward",d),e("omrs-icon-arrow-downward",p),e("omrs-icon-arrow-upward",h),e("omrs-icon-chevron-left",v),e("omrs-icon-chevron-right",y),e("omrs-icon-chevron-up",m),e("omrs-icon-chevron-down",g),e("omrs-icon-supervised-user-circle",b),e("omrs-icon-home",w),e("omrs-icon-close",S),e("omrs-icon-important-notification",_),e("omrs-icon-calendar",x),e("omrs-icon-access-time",O),e("omrs-icon-add",j),e("omrs-icon-remove",E),e("omrs-icon-check-circle",C),e("omrs-icon-zoomoutmap",k),e("omrs-icon-location",A),e("omrs-icon-download",P)}(),function(){"use strict";l.r(f)}(),f}())}}}))}}]);