@openmrs/esm-styleguide 4.5.1-pre.804 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,3 @@
1
- System.register(["@openmrs/esm-extensions","@openmrs/esm-react-utils","@openmrs/esm-state","react","react-dom","rxjs"],(function(e,n){var t={},r={},o={},i={},l={},a={};return Object.defineProperty(l,"__esModule",{value:!0}),{setters:[function(){},function(){},function(e){o.createGlobalStore=e.createGlobalStore},function(){},function(e){Object.keys(e).forEach((function(n){l[n]=e[n]}))},function(e){a.Subject=e.Subject}],execute:function(){e((()=>{var e={279:(e,n,t)=>{"use strict";var r=t(493);r.createRoot,r.hydrateRoot},584:(e,n,t)=>{var r=t(518).R;n.s=function(e){if(e||(e=1),!t.y.meta||!t.y.meta.url)throw console.error("__system_context__",t.y),Error("systemjs-webpack-interop was provided an unknown SystemJS context. Expected context.meta.url, but none was provided");t.p=r(t.y.meta.url,e)}},518:(e,n,t)=>{n.R=function(e,n){var t=document.createElement("a");t.href=e;for(var r="/"===t.pathname[0]?t.pathname:"/"+t.pathname,o=0,i=r.length;o!==n&&i>=0;)"/"===r[--i]&&o++;if(o!==n)throw Error("systemjs-webpack-interop: rootDirectoryLevel ("+n+") is greater than the number of directories ("+o+") in the URL path "+e);var l=r.slice(0,i+1);return t.protocol+"//"+t.host+l};Number.isInteger},714:()=>{var e=function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};System.register(["@openmrs/esm-state","single-spa"],(function(n,t){var r={},o={};return{setters:[function(e){r.createGlobalStore=e.createGlobalStore,r.getGlobalStore=e.getGlobalStore},function(e){o.navigateToUrl=e.navigateToUrl}],execute:function(){n(function(){"use strict";var n={685:function(e){e.exports=r},645:function(e){e.exports=o}},t={};function i(e){var r=t[e];if(void 0!==r)return r.exports;var o=t[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=function(e,n){for(var t in n)i.o(n,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},i.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var l={};return function(){var n=function(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]},t=function(e){return function t(r){return 0===arguments.length||n(r)?t:e.apply(this,arguments)}},r=function(e){return function r(o,i){switch(arguments.length){case 0:return r;case 1:return n(o)?r:t((function(n){return e(o,n)}));default:return n(o)&&n(i)?r:n(o)?t((function(n){return e(n,i)})):n(i)?t((function(n){return e(o,n)})):e(o,i)}}},o=function(e){for(var n,t=[];!(n=e.next()).done;)t.push(n.value);return t},a=function(e,n,t){for(var r=0,o=t.length;r<o;){if(e(n,t[r]))return!0;r+=1}return!1},c=function(e,n){return Object.prototype.hasOwnProperty.call(n,e)},u=function(e,n,t,r){var i=o(e);function l(e,n){return se(e,n,t.slice(),r.slice())}return!a((function(e,n){return!a(l,n,e)}),o(n),i)},s=function(e){return function o(i,l,a){switch(arguments.length){case 0:return o;case 1:return n(i)?o:r((function(n,t){return e(i,n,t)}));case 2:return n(i)&&n(l)?o:n(i)?r((function(n,t){return e(n,l,t)})):n(l)?r((function(n,t){return e(i,n,t)})):t((function(n){return e(i,l,n)}));default:return n(i)&&n(l)&&n(a)?o:n(i)&&n(l)?r((function(n,t){return e(n,t,a)})):n(i)&&n(a)?r((function(n,t){return e(n,l,t)})):n(l)&&n(a)?r((function(n,t){return e(i,n,t)})):n(i)?t((function(n){return e(n,l,a)})):n(l)?t((function(n){return e(i,n,a)})):n(a)?t((function(n){return e(i,l,n)})):e(i,l,a)}}},f=function(e){return"[object Object]"===Object.prototype.toString.call(e)},d=function(e,n,t){for(var r=t.next();!r.done;){if((n=e["@@transducer/step"](n,r.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}r=t.next()}return e["@@transducer/result"](n)},v=function(e,n,t,r){return e["@@transducer/result"](t[r](xe(e["@@transducer/step"],e),n))},p=function(e,n){return function(t){if(!e(t))return"function"==typeof n?n(t):n}},g=function(e){return(0,Ae.getGlobalStore)("config-module-".concat(e),{config:null,loaded:!1})},h=function(){return(0,Ae.getGlobalStore)("config-extension-slots",{slots:{}})},y=function(e){return C(h().getState(),e)},C=function(e,n){var t=e.slots[n];return null!=t?t:{loaded:!1,config:{}}},m=function(){return(0,Ae.getGlobalStore)("config-extensions",{configs:{}})},b=function(e,n){var t=Object.assign({},w(m().getState(),e,n));return t.config=ge(["Display conditions","Translation overrides"],t.config),t},w=function(e,n,t){var r,o=null===(r=e.configs[n])||void 0===r?void 0:r[t];return null!=o?o:{loaded:!1,config:null}},S=function(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r},x=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},H=function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){x(e,n,t[n])}))}return e},L=function(e,n){return n=null!=n?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):function(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t}(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})),e},_=function(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],l=!0,a=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==t.return||t.return()}finally{if(a)throw o}}return i}}(e,n)||M(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()},O=function(e){return function(e){if(Array.isArray(e))return S(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(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.")}()},M=function(e,n){if(e){if("string"==typeof e)return S(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,n):void 0}},V=function(e,n){var t=!0,r=!1,o=void 0;try{for(var i,l=Object.keys(e.schemas)[Symbol.iterator]();!(t=(i=l.next()).done);t=!0){var a=i.value,c=z(a,e,n);g(a).setState({loaded:!0,config:c})}}catch(e){r=!0,o=e}finally{try{t||null==l.return||l.return()}finally{if(r)throw o}}},j=function(e,n){var t,r,o=(t=G(N(e,n)),function(e){var n=!0,t=!1,r=void 0;try{for(var o,i=Object.entries(e)[Symbol.iterator]();!(n=(o=i.next()).done);n=!0){var l=_(o.value,2),a=l[0],c=l[1],u=!0,s=!1,f=void 0;try{for(var d,v=Object.entries(c)[Symbol.iterator]();!(u=(d=v.next()).done);u=!0){var p=_(d.value,2),g=p[0];R(p[1],a,g)}}catch(e){s=!0,f=e}finally{try{u||null==v.return||v.return()}finally{if(s)throw f}}}}catch(e){t=!0,r=e}finally{try{n||null==i.return||i.return()}finally{if(t)throw r}}}(r=Object.keys(t).reduce((function(e,n){var r,o;return(null===(r=t[n])||void 0===r?void 0:r.extensionSlots)&&(e[n]=null===(o=t[n])||void 0===o?void 0:o.extensionSlots),e}),{})),Object.keys(r).reduce((function(e,n){return H({},e,r[n])}),{})),i=Object.fromEntries(Object.entries(o).map((function(e){var n=_(e,2);return[n[0],{loaded:!0,config:n[1]}]}))),l=h(),a=l.getState(),c={slots:H({},a.slots,i)};fe(a,c)||l.setState(c)},k=function(e,n){var t=function(e,n){var t=Ie(Ce(e.schemas)),r=O(e.providedConfigs.map((function(e){return[e.config,e.source]}))).concat([[n.config,"temporary config"]]),o=!0,i=!1,l=void 0;try{for(var a,c=r[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var u=_(a.value,2);t=G([t,Te(u[0],u[1])])}}catch(e){i=!0,l=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw l}}return t}(e,n);Pe.setState({config:t})},A=function(e,n,t){var r={},o=!0,i=!1,l=void 0;try{for(var a,c=n.mountedExtensions[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var u=a.value,s=U(u.slotModuleName,u.extensionModuleName,u.slotName,u.extensionId,e,t);r[u.slotName]=L(H({},r[u.slotName]),x({},u.extensionId,{config:s,loaded:!0}))}}catch(e){i=!0,l=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw l}}m().setState({configs:r})},Z=function(e,n){Ue(e,n);var t=pe(n,De),r=Ze.getState();Ze.setState({schemas:L(H({},r.schemas),x({},e,t))})},E=function(e,n){Ue(e,n);var t=pe(n,De),r=Ze.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.")),Ze.setState({schemas:L(H({},r.schemas),x({},e,t))})},B=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"provided",t=Ze.getState();Ze.setState({providedConfigs:O(t.providedConfigs).concat([{source:n,config:e}])})},P=function(e){return new Promise((function(n){var t=function(e){if(e.loaded&&e.config){var t=ge(["Display conditions","Translation overrides"],e.config);n(t),o&&o()}},r=g(e);t(r.getState());var o=r.subscribe(t)}))},I=function(e){return new Promise((function(n){var t=function(e){if(e.loaded&&e.config){var t=e.config;n(t),o&&o()}},r=g(e);t(r.getState());var o=r.subscribe(t)}))},T=function(e,n,t){F(e,n,t);var r=ze(e,n);return Ne(e,r,t),r},U=function(e,n,t,r,o,i){var l,a,c,u,s=function(e){return _(e.split("#"),1)[0]}(r),f=o.schemas[s],d=f?s:n,v=N(o,i),p=D(e,v),g=null!==(u=null==p||null===(l=p.extensionSlots)||void 0===l||null===(a=l[t])||void 0===a||null===(c=a.configure)||void 0===c?void 0:c[r])&&void 0!==u?u:{},h=G([D(d,v),g]),y=null!=f?f:o.schemas[n];F(y,h,d);var C=ze(y,h);return Ne(y,C,d),delete C.extensionSlots,C},R=function(e,n,t){var r="Extension slot config '".concat(n,".extensionSlots.").concat(t),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&&(J(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))},N=function(e,n){return O(e.providedConfigs.map((function(e){return e.config}))).concat([n.config])},z=function(e,n,t){if(!n.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);var r=n.schemas[e],o=D(e,N(n,t));F(r,o,e);var i=ze(r,o);return Ne(r,i,e),delete i.extensionSlots,i},D=function(e,n){return G(n.map((function(n){return n[e]})).filter((function(e){return!!e})))},G=function(e){return Le(pe)({},e)},F=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=!0,o=!1,i=void 0;try{for(var l,a=Object.keys(n)[Symbol.iterator]();!(r=(l=a.next()).done);r=!0){var c=l.value,u=n[c],s=t+"."+c,f=e[c];e.hasOwnProperty(c)?Re(f,u,s):"extensionSlots"===c&&""!==t||console.error("Unknown config key '".concat(s,"' provided. Ignoring."))}}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}},q=function(e,n,t){n&&W(e,[{Array:_e,Boolean:Oe,ConceptUuid:ke,Number:Me,Object:je,String:Ve,UUID:ke,PersonAttributeTypeUuid:ke,PatientIdentifierTypeUuid:ke}[n]],t)},W=function(e,n,t){if(n)try{var r=!0,o=!1,i=void 0;try{for(var l,a=n[Symbol.iterator]();!(r=(l=a.next()).done);r=!0){var c=(0,l.value)(t);"string"==typeof c&&("object"==typeof t?console.error("Invalid configuration for ".concat(e,": ").concat(c)):console.error("Invalid configuration value ".concat(t," for ").concat(e,": ").concat(c)))}}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}catch(n){console.error('Skipping invalid validator at "'.concat(e,'". Encountered error\n\t').concat(n))}},$=function(e){return!!e&&Object.keys(e).filter((function(e){return!["_default","_validators"].includes(e)})).length>0},J=function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e},X=function(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e},K=function(e,n){var t=window.getOpenmrsSpaBase().replace(/\/$/,"");return Q(e,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})))),r.forEach((function(n){X(e,n,t[n])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:t},n)).replace(/^\/\//,"/")},Q=function(e,n){return Object.keys(n).reduce((function(e,t){return e.split("${"+t+"}").join(n[t])}),e)},Y=function(e){var n=e.to,t=e.templateParams,r=window.getOpenmrsSpaBase().replace(/\/$/,""),o=K(n,t);o.startsWith(r)?(0,Ge.navigateToUrl)(o):window.location.assign(o)};i.r(l),i.d(l,{Type:function(){return ye},configExtensionStore:function(){return Be},configInternalStore:function(){return Ze},defineConfigSchema:function(){return Z},defineExtensionConfigSchema:function(){return E},getConfig:function(){return P},getConfigInternal:function(){return I},getConfigStore:function(){return g},getExtensionConfig:function(){return b},getExtensionConfigFromStore:function(){return w},getExtensionSlotConfig:function(){return y},getExtensionSlotConfigFromStore:function(){return C},getExtensionSlotsConfigStore:function(){return h},getExtensionsConfigStore:function(){return m},implementerToolsConfigStore:function(){return Pe},inRange:function(){return Fe},interpolateString:function(){return Q},interpolateUrl:function(){return K},isUrl:function(){return We},isUrlWithTemplateParameters:function(){return qe},navigate:function(){return Y},oneOf:function(){return $e},processConfig:function(){return T},provide:function(){return B},temporaryConfigStore:function(){return Ee},validator:function(){return p},validators:function(){return Je}});var ee="function"==typeof Object.is?Object.is:function(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n},ne=Object.prototype.toString,te=function(){return"[object Arguments]"===ne.call(arguments)?function(e){return"[object Arguments]"===ne.call(e)}:function(e){return c("callee",e)}}(),re=te,oe=!{toString:null}.propertyIsEnumerable("toString"),ie=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],le=function(){return arguments.propertyIsEnumerable("length")}(),ae=function(e,n){for(var t=0;t<e.length;){if(e[t]===n)return!0;t+=1}return!1},ce="function"!=typeof Object.keys||le?t((function(e){if(Object(e)!==e)return[];var n,t,r=[],o=le&&re(e);for(n in e)!c(n,e)||o&&"length"===n||(r[r.length]=n);if(oe)for(t=ie.length-1;t>=0;)c(n=ie[t],e)&&!ae(r,n)&&(r[r.length]=n),t-=1;return r})):t((function(e){return Object(e)!==e?[]:Object.keys(e)})),ue=t((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function se(n,t,r,o){if(ee(n,t))return!0;var i,l,a=ue(n);if(a!==ue(t))return!1;if(null==n||null==t)return!1;if("function"==typeof n["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n);if("function"==typeof n.equals||"function"==typeof t.equals)return"function"==typeof n.equals&&n.equals(t)&&"function"==typeof t.equals&&t.equals(n);switch(a){case"Arguments":case"Array":case"Object":if("function"==typeof n.constructor&&"Promise"===(i=n.constructor,null==(l=String(i).match(/^function (\w*)/))?"":l[1]))return n===t;break;case"Boolean":case"Number":case"String":if((void 0===n?"undefined":e(n))!=(void 0===t?"undefined":e(t))||!ee(n.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ee(n.valueOf(),t.valueOf()))return!1;break;case"Error":return n.name===t.name&&n.message===t.message;case"RegExp":if(n.source!==t.source||n.global!==t.global||n.ignoreCase!==t.ignoreCase||n.multiline!==t.multiline||n.sticky!==t.sticky||n.unicode!==t.unicode)return!1}for(var s=r.length-1;s>=0;){if(r[s]===n)return o[s]===t;s-=1}switch(a){case"Map":return n.size===t.size&&u(n.entries(),t.entries(),r.concat([n]),o.concat([t]));case"Set":return n.size===t.size&&u(n.values(),t.values(),r.concat([n]),o.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var f=ce(n);if(f.length!==ce(t).length)return!1;var d=r.concat([n]),v=o.concat([t]);for(s=f.length-1;s>=0;){var p=f[s];if(!c(p,t)||!se(t[p],n[p],d,v))return!1;s-=1}return!0}var fe=r((function(e,n){return se(e,n,[],[])})),de=s((function(e,n,t){var r,o={};for(r in n)c(r,n)&&(o[r]=c(r,t)?e(r,n[r],t[r]):n[r]);for(r in t)c(r,t)&&!c(r,o)&&(o[r]=t[r]);return o})),ve=s((function e(n,t,r){return de((function(t,r,o){return f(r)&&f(o)?e(n,r,o):n(t,r,o)}),t,r)})),pe=r((function(e,n){return ve((function(e,n,t){return t}),e,n)})),ge=r((function(e,n){for(var t={},r={},o=0,i=e.length;o<i;)r[e[o]]=1,o+=1;for(var l in n)r.hasOwnProperty(l)||(t[l]=n[l]);return t}));function he(e,n,t,r){var o,i=function(o){for(var i=n.length,l=0;l<i;){if(e===n[l])return t[l];l+=1}for(var a in n[l+1]=e,t[l+1]=o,e)o[a]=r?he(e[a],n,t,!0):e[a];return o};switch(ue(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,Ce=t((function(e){return null!=e&&"function"==typeof e.clone?e.clone():he(e,[],[],!0)})),me=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)},be=t((function(e){return!!me(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),we=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,n){return this.f(e,n)},e}(),Se=r((function(e,n){return function(e,n){switch(e){case 0:return function(){return n.apply(this,arguments)};case 1:return function(e){return n.apply(this,arguments)};case 2:return function(e,t){return n.apply(this,arguments)};case 3:return function(e,t,r){return n.apply(this,arguments)};case 4:return function(e,t,r,o){return n.apply(this,arguments)};case 5:return function(e,t,r,o,i){return n.apply(this,arguments)};case 6:return function(e,t,r,o,i,l){return n.apply(this,arguments)};case 7:return function(e,t,r,o,i,l,a){return n.apply(this,arguments)};case 8:return function(e,t,r,o,i,l,a,c){return n.apply(this,arguments)};case 9:return function(e,t,r,o,i,l,a,c,u){return n.apply(this,arguments)};case 10:return function(e,t,r,o,i,l,a,c,u,s){return n.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(n,arguments)}))})),xe=Se,He="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Le=s((function(e,n,t){if("function"==typeof e&&(e=function(e){return new we(e)}(e)),be(t))return function(e,n,t){for(var r=0,o=t.length;r<o;){if((n=e["@@transducer/step"](n,t[r]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}r+=1}return e["@@transducer/result"](n)}(e,n,t);if("function"==typeof t["fantasy-land/reduce"])return v(e,n,t,"fantasy-land/reduce");if(null!=t[He])return d(e,n,t[He]());if("function"==typeof t.next)return d(e,n,t);if("function"==typeof t.reduce)return v(e,n,t,"reduce");throw new TypeError("reduce: list must be array or iterable")}));!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(ye||(ye={}));var _e=p((function(e){return Array.isArray(e)}),"must be an array"),Oe=p((function(e){return"boolean"==typeof e}),"must be a boolean"),Me=p((function(e){return"number"==typeof e}),"must be a number"),Ve=p((function(e){return"string"==typeof e}),"must be a string"),je=p((function(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}),"must be an object (not an array or null)"),ke=p((function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e)}),"must be a valid UUID or a 36-character hexadecimal string"),Ae=i(685),Ze=(0,Ae.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),Ee=(0,Ae.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Ee.subscribe((function(e){var n;n=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(n))}));var Be=(0,Ae.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]}),Pe=(0,Ae.createGlobalStore)("config-implementer-tools",{config:{}});function Ie(e){return e.hasOwnProperty("_default")?L(H({},e),{_value:e._default,_source:"default"}):J(e)?Object.keys(e).reduce((function(n,t){return n[t]=Ie(e[t]),n}),{}):{}}function Te(e,n){return J(e)?Object.keys(e).reduce((function(t,r){return t[r]=Te(e[r],n),t}),{}):{_value:e,_source:n}}function Ue(e,n){var t=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,l=void 0;try{for(var a,c=function(){var o=a.value,i=t+(t&&".")+o,l=n[o];if("Display conditions"===i&&console.error("".concat(e,' declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ').concat(r)),"Translation overrides"===i&&console.error("".concat(e,' declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ').concat(r)),!J(l))return console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r)),"continue";l.hasOwnProperty("_default")||Ue(e,l,i);var c=l._elements;if($(c)&&Ue(e,c,i+"._elements"),l._validators){var u=!0,s=!1,f=void 0;try{for(var d,v=l._validators[Symbol.iterator]();!(u=(d=v.next()).done);u=!0){var p=d.value;"function"!=typeof p&&console.error("".concat(e," has invalid validator for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: validators must be functions that return either "+"undefined or an error string. Received ".concat(p,"."))}}catch(e){s=!0,f=e}finally{try{u||null==v.return||v.return()}finally{if(s)throw f}}}var g=l._type;g&&!Object.values(ye).includes(g)&&console.error("".concat(e," has invalid type for key '").concat(i,"' ").concat(r,".")+"\n\nIf you're the maintainer: the allowed types are ".concat(Object.values(ye).join(", "),". ")+"Received '".concat(g,"'")),Object.keys(l).every((function(e){return["_description","_validators","_elements","_type"].includes(e)}))&&!t.includes("._elements")&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: all config elements must have a default. "+"Received ".concat(JSON.stringify(l))),c&&g&&![ye.Array,ye.Object].includes(g)&&console.error("".concat(e," has bad config schema definition for key '").concat(i,"'. ").concat(r,".")+"\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. "+"Received ".concat(JSON.stringify(g)))},u=Object.keys(n).filter((function(e){return!e.startsWith("_")}))[Symbol.iterator]();!(o=(a=u.next()).done);o=!0)c()}catch(e){i=!0,l=e}finally{try{o||null==u.return||u.return()}finally{if(i)throw l}}}function Re(e,n,t){q(t,e._type,n),J(n)?e._type===ye.Object?function(e,n,t){if(e._elements){var r=!0,o=!1,i=void 0;try{for(var l,a=Object.keys(n)[Symbol.iterator]();!(r=(l=a.next()).done);r=!0){var c=l.value,u=n[c];F(e._elements,u,"".concat(t,".").concat(c))}}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}}(e,n,t):e.hasOwnProperty("_default")||F(e,n,t):e._type===ye.Array&&function(e,n,t){if($(e._elements))for(var r=0;r<n.length;r++)Re(e._elements,n[r],"".concat(t,"[").concat(r,"]"));for(var o=0;o<n.length;o++){var i;q("".concat(t,"[").concat(o,"]"),null===(i=e._elements)||void 0===i?void 0:i._type,n[o])}}(e,n,t)}function Ne(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(e)if(n!==e._default&&W(t,e._validators,n),J(n)){var r=!0,o=!1,i=void 0;try{for(var l,a=Object.keys(n)[Symbol.iterator]();!(r=(l=a.next()).done);r=!0){var c=l.value,u=n[c],s=t+"."+c,f=e[c];e._type===ye.Object&&e._elements?Ne(e._elements,u,s):Ne(f,u,s)}}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}}else if(Array.isArray(n)&&e._elements)for(var d=0;d<n.length;d++)Ne(e._elements,n[d],"".concat(t,"[").concat(d,"]"))}V(Ze.getState(),Ee.getState()),Ze.subscribe((function(e){return V(e,Ee.getState())})),Ee.subscribe((function(e){return V(Ze.getState(),e)})),k(Ze.getState(),Ee.getState()),Ze.subscribe((function(e){return k(e,Ee.getState())})),Ee.subscribe((function(e){return k(Ze.getState(),e)})),j(Ze.getState(),Ee.getState()),Ze.subscribe((function(e){return j(e,Ee.getState())})),Ee.subscribe((function(e){return j(Ze.getState(),e)})),A(Ze.getState(),Be.getState(),Ee.getState()),Ze.subscribe((function(e){A(e,Be.getState(),Ee.getState())})),Be.subscribe((function(e){A(Ze.getState(),e,Ee.getState())})),Ee.subscribe((function(e){A(Ze.getState(),Be.getState(),e)}));var ze=function(e,n){var t=Ce(n);if(!e)return t;var r=!0,o=!1,i=void 0;try{for(var l,a=function(){var n=l.value,r=t[n],o=e[n];if(o&&o.hasOwnProperty("_default")){t.hasOwnProperty(n)||(t[n]=o._default);var i=o._elements;if(r&&$(i))if(o._type===ye.Array&&Array.isArray(r)){var a=r.map((function(e){return ze(i,e)}));t[n]=a}else if(o._type===ye.Object){var c=!0,u=!1,s=void 0;try{for(var f,d=Object.keys(r)[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var v=f.value;r[v]=ze(i,r[v])}}catch(e){u=!0,s=e}finally{try{c||null==d.return||d.return()}finally{if(u)throw s}}}}else if(J(o)){var p=t.hasOwnProperty(n)?r:{};J(p)&&(t[n]=ze(o,p))}},c=Object.keys(e)[Symbol.iterator]();!(r=(l=c.next()).done);r=!0)a()}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return t},De={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:ye.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:ye.Object,_default:{}}},Ge=i(645),Fe=function(e,n){return p((function(t){return e<=t&&t<=n}),"must be between ".concat(e," and ").concat(n))},qe=function(e){var n=e.concat(["openmrsBase","openmrsSpaBase"]);return p((function(e){if(!e||"string"!=typeof e)return!1;for(var t=/\${(.*?)}/g,r=t.exec(e);r;){if(!n.includes(r[1]))return!1;r=t.exec(e)}return!0}),"Should be a URL or path. The allowed template parameters are "+n.map((function(e){return"${"+e+"}"})).join(", "))},We=qe([]),$e=function(e){return p((function(n){return e.includes(n)}),"Must be one of the following: '".concat(e.join("', '"),"'."))},Je={inRange:Fe,isUrl:We,isUrlWithTemplateParameters:qe,oneOf:$e}}(),l}())}}}))},45:e=>{"use strict";e.exports=t},740:e=>{"use strict";e.exports=r},685:e=>{"use strict";e.exports=o},954:e=>{"use strict";e.exports=i},493:e=>{"use strict";e.exports=l},792:e=>{"use strict";e.exports=a}},c={};function u(n){var t=c[n];if(void 0!==t)return t.exports;var r=c[n]={exports:{}};return e[n](r,r.exports,u),r.exports}u.y=n,u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;u.g.importScripts&&(e=u.g.location+"");var n=u.g.document;if(!e&&n&&(n.currentScript&&(e=n.currentScript.src),!e)){var t=n.getElementsByTagName("script");t.length&&(e=t[t.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),u.p=e})();var s={};return(0,u(584).s)(1),(()=>{"use strict";const e='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n',n='<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',t='<svg id="omrs-logo-icon" width="121" height="118" viewBox="0 0 121 118" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.436 39.474C45.505 34.405 52.509 31.269 60.247 31.269C67.964 31.269 74.952 34.391 80.017 39.436L80.038 20.78C74.107 17.725 67.376 16 60.247 16C53.114 16 46.348 17.943 40.415 20.999L40.436 39.474Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.038 79.064C74.969 84.134 67.968 87.269 60.23 87.269C52.513 87.269 45.525 84.148 40.456 79.102L40.436 97.759C46.37 100.813 53.098 102.539 60.23 102.539C67.363 102.539 74.093 100.813 80.024 97.758L80.038 79.064Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.474 79.089C35.405 74.02 32.269 67.019 32.269 59.281C32.269 51.564 35.39 44.577 40.436 39.508L21.779 39.488C18.725 45.421 17 52.148 17 59.281C17 66.414 18.725 73.144 21.782 79.076L40.474 79.089Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M80.027 39.435C85.096 44.503 88.232 51.508 88.232 59.246C88.232 66.963 85.111 73.951 80.064 79.015L98.722 79.036C101.776 73.105 103.501 66.375 103.501 59.246C103.501 52.112 101.776 45.381 98.72 39.448L80.027 39.435Z" fill="var(--logo-green)"/>\n</svg>\n';var r=document.createElement("div"),o=function(){document.body.appendChild(r)};function i(e,n){var t=(new DOMParser).parseFromString(n,"text/html").querySelector("svg");t&&(t.id=e,r.appendChild(t))}r.id="omrs-svgs-container",r.style.display="none","complete"===document.readyState?o():window.addEventListener("load",o);var l=u(714);Number.MAX_SAFE_INTEGER,u(954);var a=u(792),c={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?c.enableCssCustomProperties=!0:c.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?c.enableUseControlledStateWithValue=!0:c.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?c.enableCssGrid=!0:c.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE&&"true"===process.env.CARBON_ENABLE_V11_RELEASE?c.enableV11Release=!0:c.enableV11Release=!1}catch(e){c.enableCssCustomProperties=!1,c.enableUseControlledStateWithValue=!1,c.enableCssGrid=!1,c.enableV11Release=!1}var s=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:c.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:c.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:c.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:c.enableV11Release}];function f(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,i=[],l=!0,a=!1;try{for(t=t.call(e);!(l=(r=t.next()).done)&&(i.push(r.value),!n||i.length!==n);l=!0);}catch(e){a=!0,o=e}finally{try{l||null==t.return||t.return()}finally{if(a)throw o}}return i}}(e,n)||v(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,n){if(e){if("string"==typeof e)return p(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?p(e,n):void 0}}function p(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}for(var g=function(){function e(n){var t=this;(function(e,n){if(t=e,!(null!=(r=n)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r))throw new TypeError("Cannot call a class as a function");var t,r})(this,e),this.flags=new Map,n&&Object.keys(n).forEach((function(e){t.flags.set(e,n[e])}))}var n,t;return n=e,t=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,n){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,n)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var n=this;Object.keys(e).forEach((function(t){n.flags.set(t,e[t])}))}},{key:"mergeWithScope",value:function(e){var n,t=function(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=v(e))){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}(e.flags);try{for(t.s();!(n=t.n()).done;){var r=d(n.value,2),o=r[0],i=r[1];this.flags.has(o)||this.flags.set(o,i)}}catch(e){t.e(e)}finally{t.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],t&&f(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),e}(),h=new g(undefined),y=0;y<s.length;y++){var C=s[y];h.add(C.name,C.enabled)}!function(){h.merge.apply(h,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0}),u(279),new a.Subject,new a.Subject,new a.Subject,u(45);var m,b=u(685);(0,b.createGlobalStore)("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,u(740),(0,b.createGlobalStore)("left-nav",{slotName:null,basePath:window.spaBase}),m=function(e,n){document.documentElement.style.setProperty(e,n)},(0,l.defineConfigSchema)("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:l.Type.String},"Brand color #2":{_default:"#004144",_type:l.Type.String},"Brand color #3":{_default:"#007d79",_type:l.Type.String}}),(0,l.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"]))})),i("omrs-logo-full-color",e),i("omrs-logo-full-mono",e),i("omrs-logo-full-grey",e),i("omrs-logo-partial-color",n),i("omrs-logo-partial-mono",n),i("omrs-logo-partial-grey",n),i("omrs-logo-icon-color",t),i("omrs-logo-icon-mono",t),i("omrs-logo-icon-grey",t),i("omrs-logo-white",'<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'),i("omrs-icon-visibility",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'),i("omrs-icon-menu",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'),i("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'),i("omrs-icon-arrow-back",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'),i("omrs-icon-arrow-forward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'),i("omrs-icon-arrow-downward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'),i("omrs-icon-arrow-upward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'),i("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'),i("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'),i("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'),i("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'),i("omrs-icon-supervised-user-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'),i("omrs-icon-home",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'),i("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'),i("omrs-icon-important-notification",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'),i("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'),i("omrs-icon-access-time",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'),i("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'),i("omrs-icon-remove",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'),i("omrs-icon-check-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'),i("omrs-icon-zoomoutmap",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'),i("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'),i("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>')})(),(()=>{"use strict";u.r(s)})(),s})())}}}));
1
+ /*! For license information please see openmrs-esm-styleguide.js.LICENSE.txt */
2
+ var _openmrs_esm_styleguide;(()=>{var e={590:function(e){e.exports=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",o="minute",i="hour",a="day",s="week",u="month",l="quarter",c="year",f="date",d="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|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("_")},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+v(r,2,"0")+":"+v(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),i=n-o<0,a=t.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:c,w:s,d:a,D:f,h:i,m:o,s:r,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},m="en",b={};b[m]=y;var w=function(e){return e instanceof O},_=function e(t,n,r){var o;if(!t)return m;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),n&&(b[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!r&&o&&(m=o),o||!r&&m},S=function(e,t){if(w(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},E=g;E.l=_,E.i=w,E.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function y(e){this.$L=_(e.locale,null,!0),this.parse(e)}var v=y.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return!(this.$d.toString()===d)},v.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return S(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<S(e)},v.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,l=!!E.u(t)||t,d=E.p(e),h=function(e,t){var r=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return l?r:r.endOf(a)},p=function(e,t){return E.w(n.toDate()[e].apply(n.toDate("s"),(l?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},y=this.$W,v=this.$M,g=this.$D,m="set"+(this.$u?"UTC":"");switch(d){case c:return l?h(1,0):h(31,11);case u:return l?h(1,v):h(0,v+1);case s:var b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return h(l?g-w:g+(6-w),v);case a:case f:return p(m+"Hours",0);case i:return p(m+"Minutes",1);case o:return p(m+"Seconds",2);case r:return p(m+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var s,l=E.p(e),d="set"+(this.$u?"UTC":""),h=(s={},s[a]=d+"Date",s[f]=d+"Date",s[u]=d+"Month",s[c]=d+"FullYear",s[i]=d+"Hours",s[o]=d+"Minutes",s[r]=d+"Seconds",s[n]=d+"Milliseconds",s)[l],p=l===a?this.$D+(t-this.$W):t;if(l===u||l===c){var y=this.clone().set(f,1);y.$d[h](p),y.init(),this.$d=y.set(f,Math.min(this.$D,y.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[E.p(e)]()},v.add=function(n,l){var f,d=this;n=Number(n);var h=E.p(l),p=function(e){var t=S(d);return E.w(t.date(t.date()+Math.round(e*n)),d)};if(h===u)return this.set(u,this.$M+n);if(h===c)return this.set(c,this.$y+n);if(h===a)return p(1);if(h===s)return p(7);var y=(f={},f[o]=e,f[i]=t,f[r]=1e3,f)[h]||1,v=this.$d.getTime()+n*y;return E.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||d;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=E.z(this),i=this.$H,a=this.$m,s=this.$M,u=n.weekdays,l=n.months,c=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},f=function(e){return E.s(i%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},y={YY:String(this.$y).slice(-2),YYYY:this.$y,M:s+1,MM:E.s(s+1,2,"0"),MMM:c(n.monthsShort,s,l,3),MMMM:c(l,s),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:c(n.weekdaysMin,this.$W,u,2),ddd:c(n.weekdaysShort,this.$W,u,3),dddd:u[this.$W],H:String(i),HH:E.s(i,2,"0"),h:f(1),hh:f(2),a:h(i,a,!0),A:h(i,a,!1),m:String(a),mm:E.s(a,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:o};return r.replace(p,(function(e,t){return t||y[e]||o.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,f,d){var h,p=E.p(f),y=S(n),v=(y.utcOffset()-this.utcOffset())*e,g=this-y,m=E.m(this,y);return m=(h={},h[c]=m/12,h[u]=m,h[l]=m/3,h[s]=(g-v)/6048e5,h[a]=(g-v)/864e5,h[i]=g/t,h[o]=g/e,h[r]=g/1e3,h)[p]||g,d?m:E.a(m)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=_(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return E.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},y}(),k=O.prototype;return S.prototype=k,[["$ms",n],["$s",r],["$m",o],["$H",i],["$W",a],["$M",u],["$y",c],["$D",f]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,O,S),e.$i=!0),S},S.locale=_,S.isDayjs=w,S.unix=function(e){return S(1e3*e)},S.en=b[m],S.Ls=b,S.p={},S}()},567: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)}}}()},585:(e,t,n)=>{"use strict";var r=n(400),o=n(887);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function u(e,t){l(e,t),l(e+"Capture",t)}function l(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function y(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new y(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new y(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new y(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new y(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new y(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new y(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new y(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new y(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new y(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function m(e){return e[1].toUpperCase()}function b(e,t,n,r){var o=v.hasOwnProperty(t)?v[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!f.call(p,e)||!f.call(h,e)&&(d.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,m);v[t]=new y(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,m);v[t]=new y(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,m);v[t]=new y(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new y(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new y(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),S=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),P=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),N=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function L(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=M&&e[M]||e["@@iterator"])?e:null}var I,R=Object.assign;function B(e){if(void 0===I)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);I=t&&t[1]||""}return"\n"+I+e}var $=!1;function U(e,t){if(!e||$)return"";$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var o=t.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var u="\n"+o[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=a&&0<=s);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?B(e):""}function F(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return U(e.type,!1);case 11:return U(e.type.render,!1);case 1:return U(e.type,!0);default:return""}}function K(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case E:return"Fragment";case S:return"Portal";case k:return"Profiler";case O:return"StrictMode";case C:return"Suspense";case T:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case x:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case A:return null!==(t=e.displayName||null)?t:K(e.type)||"Memo";case N:t=e._payload,e=e._init;try{return K(e(t))}catch(e){}}return null}function z(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return K(t);case 8:return t===O?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function V(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function H(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function q(e){e._valueTracker||(e._valueTracker=function(e){var t=H(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function W(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=H(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function G(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Q(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=V(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Z(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function J(e,t){Z(e,t);var n=V(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,V(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function X(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&G(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+V(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return R({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:V(n)}}function ie(e,t){var n=V(t.value),r=V(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ue(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ce,fe=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var he={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function ye(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||he.hasOwnProperty(e)&&he[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=ye(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(he).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),he[t]=he[e]}))}));var ge=R({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function me(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(i(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var we=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Se=null,Ee=null,Oe=null;function ke(e){if(e=wo(e)){if("function"!=typeof Se)throw Error(i(280));var t=e.stateNode;t&&(t=So(t),Se(e.stateNode,e.type,t))}}function xe(e){Ee?Oe?Oe.push(e):Oe=[e]:Ee=e}function Pe(){if(Ee){var e=Ee,t=Oe;if(Oe=Ee=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function je(e,t){return e(t)}function Ce(){}var Te=!1;function Ae(e,t,n){if(Te)return e(t,n);Te=!0;try{return je(e,t,n)}finally{Te=!1,(null!==Ee||null!==Oe)&&(Ce(),Pe())}}function Ne(e,t){var n=e.stateNode;if(null===n)return null;var r=So(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(i(231,t,typeof n));return n}var De=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){De=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){De=!1}function Le(e,t,n,r,o,i,a,s,u){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Ie=!1,Re=null,Be=!1,$e=null,Ue={onError:function(e){Ie=!0,Re=e}};function Fe(e,t,n,r,o,i,a,s,u){Ie=!1,Re=null,Le.apply(Ue,arguments)}function Ke(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ve(e){if(Ke(e)!==e)throw Error(i(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ke(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return Ve(o),e;if(a===r)return Ve(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,u=o.child;u;){if(u===n){s=!0,n=o,r=a;break}if(u===r){s=!0,r=o,n=a;break}u=u.sibling}if(!s){for(u=a.child;u;){if(u===n){s=!0,n=a,r=o;break}if(u===r){s=!0,r=a,n=o;break}u=u.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?qe(e):null}function qe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=qe(e);if(null!==t)return t;e=e.sibling}return null}var We=o.unstable_scheduleCallback,Ge=o.unstable_cancelCallback,Qe=o.unstable_shouldYield,Ye=o.unstable_requestPaint,Ze=o.unstable_now,Je=o.unstable_getCurrentPriorityLevel,Xe=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null,at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/ut|0)|0},st=Math.log,ut=Math.LN2,lt=64,ct=4194304;function ft(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=ft(s):0!=(i&=a)&&(r=ft(i))}else 0!=(a=n&~o)?r=ft(a):0!==i&&(r=ft(i));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!=(4194240&i)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function ht(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function yt(){var e=lt;return 0==(4194240&(lt<<=1))&&(lt=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function mt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var bt=0;function wt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var _t,St,Et,Ot,kt,xt=!1,Pt=[],jt=null,Ct=null,Tt=null,At=new Map,Nt=new Map,Dt=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Lt(e,t){switch(e){case"focusin":case"focusout":jt=null;break;case"dragenter":case"dragleave":Ct=null;break;case"mouseover":case"mouseout":Tt=null;break;case"pointerover":case"pointerout":At.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Nt.delete(t.pointerId)}}function It(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&null!==(t=wo(t))&&St(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Rt(e){var t=bo(e.target);if(null!==t){var n=Ke(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=ze(n)))return e.blockedOn=t,void kt(e.priority,(function(){Et(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&St(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);we=r,n.target.dispatchEvent(r),we=null,t.shift()}return!0}function $t(e,t,n){Bt(e)&&n.delete(t)}function Ut(){xt=!1,null!==jt&&Bt(jt)&&(jt=null),null!==Ct&&Bt(Ct)&&(Ct=null),null!==Tt&&Bt(Tt)&&(Tt=null),At.forEach($t),Nt.forEach($t)}function Ft(e,t){e.blockedOn===t&&(e.blockedOn=null,xt||(xt=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Ut)))}function Kt(e){function t(t){return Ft(t,e)}if(0<Pt.length){Ft(Pt[0],e);for(var n=1;n<Pt.length;n++){var r=Pt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==jt&&Ft(jt,e),null!==Ct&&Ft(Ct,e),null!==Tt&&Ft(Tt,e),At.forEach(t),Nt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Dt.shift()}var zt=w.ReactCurrentBatchConfig,Vt=!0;function Ht(e,t,n,r){var o=bt,i=zt.transition;zt.transition=null;try{bt=1,Wt(e,t,n,r)}finally{bt=o,zt.transition=i}}function qt(e,t,n,r){var o=bt,i=zt.transition;zt.transition=null;try{bt=4,Wt(e,t,n,r)}finally{bt=o,zt.transition=i}}function Wt(e,t,n,r){if(Vt){var o=Qt(e,t,n,r);if(null===o)Vr(e,t,r,Gt,n),Lt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return jt=It(jt,e,t,n,r,o),!0;case"dragenter":return Ct=It(Ct,e,t,n,r,o),!0;case"mouseover":return Tt=It(Tt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return At.set(i,It(At.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Nt.set(i,It(Nt.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Lt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var i=wo(o);if(null!==i&&_t(i),null===(i=Qt(e,t,n,r))&&Vr(e,t,r,Gt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Vr(e,t,r,null,n)}}var Gt=null;function Qt(e,t,n,r){if(Gt=null,null!==(e=bo(e=_e(r))))if(null===(t=Ke(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=ze(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Je()){case Xe:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Zt=null,Jt=null,Xt=null;function en(){if(Xt)return Xt;var e,t,n=Jt,r=n.length,o="value"in Zt?Zt.value:Zt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Xt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return R(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,un,ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(ln),fn=R({},ln,{view:0,detail:0}),dn=on(fn),hn=R({},fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==un&&(un&&"mousemove"===e.type?(an=e.screenX-un.screenX,sn=e.screenY-un.screenY):sn=an=0,un=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=on(hn),yn=on(R({},hn,{dataTransfer:0})),vn=on(R({},fn,{relatedTarget:0})),gn=on(R({},ln,{animationName:0,elapsedTime:0,pseudoElement:0})),mn=R({},ln,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(mn),wn=on(R({},ln,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function On(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function kn(){return On}var xn=R({},fn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Sn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=on(xn),jn=on(R({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=on(R({},fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kn})),Tn=on(R({},ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),An=R({},hn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Nn=on(An),Dn=[9,13,27,32],Mn=c&&"CompositionEvent"in window,Ln=null;c&&"documentMode"in document&&(Ln=document.documentMode);var In=c&&"TextEvent"in window&&!Ln,Rn=c&&(!Mn||Ln&&8<Ln&&11>=Ln),Bn=String.fromCharCode(32),$n=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Kn=!1,zn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!zn[e.type]:"textarea"===t}function Hn(e,t,n,r){xe(r),0<(t=qr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var qn=null,Wn=null;function Gn(e){Br(e,0)}function Qn(e){if(W(_o(e)))return e}function Yn(e,t){if("change"===e)return t}var Zn=!1;if(c){var Jn;if(c){var Xn="oninput"in document;if(!Xn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Xn="function"==typeof er.oninput}Jn=Xn}else Jn=!1;Zn=Jn&&(!document.documentMode||9<document.documentMode)}function tr(){qn&&(qn.detachEvent("onpropertychange",nr),Wn=qn=null)}function nr(e){if("value"===e.propertyName&&Qn(Wn)){var t=[];Hn(t,Wn,e,_e(e)),Ae(Gn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Wn=n,(qn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Qn(Wn)}function ir(e,t){if("click"===e)return Qn(t)}function ar(e,t){if("input"===e||"change"===e)return Qn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ur(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!f.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=lr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=lr(r)}}function fr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?fr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=G();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=G((e=t.contentWindow).document)}return t}function hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&fr(n.ownerDocument.documentElement,n)){if(null!==r&&hr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=cr(n,i);var a=cr(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var yr=c&&"documentMode"in document&&11>=document.documentMode,vr=null,gr=null,mr=null,br=!1;function wr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==vr||vr!==G(r)||(r="selectionStart"in(r=vr)&&hr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&ur(mr,r)||(mr=r,0<(r=qr(gr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Sr={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},Er={},Or={};function kr(e){if(Er[e])return Er[e];if(!Sr[e])return e;var t,n=Sr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Or)return Er[e]=n[t];return e}c&&(Or=document.createElement("div").style,"AnimationEvent"in window||(delete Sr.animationend.animation,delete Sr.animationiteration.animation,delete Sr.animationstart.animation),"TransitionEvent"in window||delete Sr.transitionend.transition);var xr=kr("animationend"),Pr=kr("animationiteration"),jr=kr("animationstart"),Cr=kr("transitionend"),Tr=new Map,Ar="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Nr(e,t){Tr.set(e,t),u(t,[e])}for(var Dr=0;Dr<Ar.length;Dr++){var Mr=Ar[Dr];Nr(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Nr(xr,"onAnimationEnd"),Nr(Pr,"onAnimationIteration"),Nr(jr,"onAnimationStart"),Nr("dblclick","onDoubleClick"),Nr("focusin","onFocus"),Nr("focusout","onBlur"),Nr(Cr,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lr));function Rr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,u,l){if(Fe.apply(this,arguments),Ie){if(!Ie)throw Error(i(198));var c=Re;Ie=!1,Re=null,Be||(Be=!0,$e=c)}}(r,t,void 0,e),e.currentTarget=null}function Br(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],u=s.instance,l=s.currentTarget;if(s=s.listener,u!==i&&o.isPropagationStopped())break e;Rr(o,s,l),i=u}else for(a=0;a<r.length;a++){if(u=(s=r[a]).instance,l=s.currentTarget,s=s.listener,u!==i&&o.isPropagationStopped())break e;Rr(o,s,l),i=u}}}if(Be)throw e=$e,Be=!1,$e=null,e}function $r(e,t){var n=t[vo];void 0===n&&(n=t[vo]=new Set);var r=e+"__bubble";n.has(r)||(zr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),zr(n,e,r,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function Kr(e){if(!e[Fr]){e[Fr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Ur(t,!1,e),Ur(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Fr]||(t[Fr]=!0,Ur("selectionchange",!1,t))}}function zr(e,t,n,r){switch(Yt(t)){case 1:var o=Ht;break;case 4:o=qt;break;default:o=Wt}n=o.bind(null,t,n,e),o=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Vr(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var u=a.tag;if((3===u||4===u)&&((u=a.stateNode.containerInfo)===o||8===u.nodeType&&u.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=bo(s)))return;if(5===(u=a.tag)||6===u){r=i=a;continue e}s=s.parentNode}}r=r.return}Ae((function(){var r=i,o=_e(n),a=[];e:{var s=Tr.get(e);if(void 0!==s){var u=cn,l=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":u=Pn;break;case"focusin":l="focus",u=vn;break;case"focusout":l="blur",u=vn;break;case"beforeblur":case"afterblur":u=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":u=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":u=yn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":u=Cn;break;case xr:case Pr:case jr:u=gn;break;case Cr:u=Tn;break;case"scroll":u=dn;break;case"wheel":u=Nn;break;case"copy":case"cut":case"paste":u=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":u=jn}var c=0!=(4&t),f=!c&&"scroll"===e,d=c?null!==s?s+"Capture":null:s;c=[];for(var h,p=r;null!==p;){var y=(h=p).stateNode;if(5===h.tag&&null!==y&&(h=y,null!==d&&null!=(y=Ne(p,d))&&c.push(Hr(p,y,h))),f)break;p=p.return}0<c.length&&(s=new u(s,l,null,n,o),a.push({event:s,listeners:c}))}}if(0==(7&t)){if(u="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===we||!(l=n.relatedTarget||n.fromElement)||!bo(l)&&!l[yo])&&(u||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,u?(u=r,null!==(l=(l=n.relatedTarget||n.toElement)?bo(l):null)&&(l!==(f=Ke(l))||5!==l.tag&&6!==l.tag)&&(l=null)):(u=null,l=r),u!==l)){if(c=pn,y="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=jn,y="onPointerLeave",d="onPointerEnter",p="pointer"),f=null==u?s:_o(u),h=null==l?s:_o(l),(s=new c(y,p+"leave",u,n,o)).target=f,s.relatedTarget=h,y=null,bo(o)===r&&((c=new c(d,p+"enter",l,n,o)).target=h,c.relatedTarget=f,y=c),f=y,u&&l)e:{for(d=l,p=0,h=c=u;h;h=Wr(h))p++;for(h=0,y=d;y;y=Wr(y))h++;for(;0<p-h;)c=Wr(c),p--;for(;0<h-p;)d=Wr(d),h--;for(;p--;){if(c===d||null!==d&&c===d.alternate)break e;c=Wr(c),d=Wr(d)}c=null}else c=null;null!==u&&Gr(a,s,u,c,!1),null!==l&&null!==f&&Gr(a,f,l,c,!0)}if("select"===(u=(s=r?_o(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===u&&"file"===s.type)var v=Yn;else if(Vn(s))if(Zn)v=ar;else{v=or;var g=rr}else(u=s.nodeName)&&"input"===u.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=ir);switch(v&&(v=v(e,r))?Hn(a,v,n,o):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ee(s,"number",s.value)),g=r?_o(r):window,e){case"focusin":(Vn(g)||"true"===g.contentEditable)&&(vr=g,gr=r,mr=null);break;case"focusout":mr=gr=vr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,wr(a,n,o);break;case"selectionchange":if(yr)break;case"keydown":case"keyup":wr(a,n,o)}var m;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Kn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Rn&&"ko"!==n.locale&&(Kn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Kn&&(m=en()):(Jt="value"in(Zt=o)?Zt.value:Zt.textContent,Kn=!0)),0<(g=qr(r,b)).length&&(b=new wn(b,e,null,n,o),a.push({event:b,listeners:g}),(m||null!==(m=Fn(n)))&&(b.data=m))),(m=In?function(e,t){switch(e){case"compositionend":return Fn(t);case"keypress":return 32!==t.which?null:($n=!0,Bn);case"textInput":return(e=t.data)===Bn&&$n?null:e;default:return null}}(e,n):function(e,t){if(Kn)return"compositionend"===e||!Mn&&Un(e,t)?(e=en(),Xt=Jt=Zt=null,Kn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Rn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=qr(r,"onBeforeInput")).length&&(o=new wn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=m)}Br(a,t)}))}function Hr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function qr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Ne(e,n))&&r.unshift(Hr(e,i,o)),null!=(i=Ne(e,t))&&r.push(Hr(e,i,o))),e=e.return}return r}function Wr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,u=s.alternate,l=s.stateNode;if(null!==u&&u===r)break;5===s.tag&&null!==l&&(s=l,o?null!=(u=Ne(n,i))&&a.unshift(Hr(n,u,s)):o||null!=(u=Ne(n,i))&&a.push(Hr(n,u,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Qr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function Zr(e){return("string"==typeof e?e:""+e).replace(Qr,"\n").replace(Yr,"")}function Jr(e,t,n){if(t=Zr(t),Zr(e)!==t&&n)throw Error(i(425))}function Xr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,io="function"==typeof Promise?Promise:void 0,ao="function"==typeof queueMicrotask?queueMicrotask:void 0!==io?function(e){return io.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function uo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Kt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Kt(t)}function lo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function co(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),ho="__reactFiber$"+fo,po="__reactProps$"+fo,yo="__reactContainer$"+fo,vo="__reactEvents$"+fo,go="__reactListeners$"+fo,mo="__reactHandles$"+fo;function bo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yo]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=co(e);null!==e;){if(n=e[ho])return n;e=co(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[ho]||e[yo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function _o(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function So(e){return e[po]||null}var Eo=[],Oo=-1;function ko(e){return{current:e}}function xo(e){0>Oo||(e.current=Eo[Oo],Eo[Oo]=null,Oo--)}function Po(e,t){Oo++,Eo[Oo]=e.current,e.current=t}var jo={},Co=ko(jo),To=ko(!1),Ao=jo;function No(e,t){var n=e.type.contextTypes;if(!n)return jo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Do(e){return null!=e.childContextTypes}function Mo(){xo(To),xo(Co)}function Lo(e,t,n){if(Co.current!==jo)throw Error(i(168));Po(Co,t),Po(To,n)}function Io(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,z(e)||"Unknown",o));return R({},n,r)}function Ro(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jo,Ao=Co.current,Po(Co,e),Po(To,To.current),!0}function Bo(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Io(e,t,Ao),r.__reactInternalMemoizedMergedChildContext=e,xo(To),xo(Co),Po(Co,e)):xo(To),Po(To,n)}var $o=null,Uo=!1,Fo=!1;function Ko(e){null===$o?$o=[e]:$o.push(e)}function zo(){if(!Fo&&null!==$o){Fo=!0;var e=0,t=bt;try{var n=$o;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}$o=null,Uo=!1}catch(t){throw null!==$o&&($o=$o.slice(e+1)),We(Xe,zo),t}finally{bt=t,Fo=!1}}return null}var Vo=[],Ho=0,qo=null,Wo=0,Go=[],Qo=0,Yo=null,Zo=1,Jo="";function Xo(e,t){Vo[Ho++]=Wo,Vo[Ho++]=qo,qo=e,Wo=t}function ei(e,t,n){Go[Qo++]=Zo,Go[Qo++]=Jo,Go[Qo++]=Yo,Yo=e;var r=Zo;e=Jo;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Zo=1<<32-at(t)+o|n<<o|r,Jo=i+e}else Zo=1<<i|n<<o|r,Jo=e}function ti(e){null!==e.return&&(Xo(e,1),ei(e,1,0))}function ni(e){for(;e===qo;)qo=Vo[--Ho],Vo[Ho]=null,Wo=Vo[--Ho],Vo[Ho]=null;for(;e===Yo;)Yo=Go[--Qo],Go[Qo]=null,Jo=Go[--Qo],Go[Qo]=null,Zo=Go[--Qo],Go[Qo]=null}var ri=null,oi=null,ii=!1,ai=null;function si(e,t){var n=Nl(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ui(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ri=e,oi=lo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ri=e,oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Zo,overflow:Jo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Nl(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ri=e,oi=null,!0);default:return!1}}function li(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ci(e){if(ii){var t=oi;if(t){var n=t;if(!ui(e,t)){if(li(e))throw Error(i(418));t=lo(n.nextSibling);var r=ri;t&&ui(e,t)?si(r,n):(e.flags=-4097&e.flags|2,ii=!1,ri=e)}}else{if(li(e))throw Error(i(418));e.flags=-4097&e.flags|2,ii=!1,ri=e}}}function fi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ri=e}function di(e){if(e!==ri)return!1;if(!ii)return fi(e),ii=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=oi)){if(li(e))throw hi(),Error(i(418));for(;t;)si(e,t),t=lo(t.nextSibling)}if(fi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oi=lo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oi=null}}else oi=ri?lo(e.stateNode.nextSibling):null;return!0}function hi(){for(var e=oi;e;)e=lo(e.nextSibling)}function pi(){oi=ri=null,ii=!1}function yi(e){null===ai?ai=[e]:ai.push(e)}var vi=w.ReactCurrentBatchConfig;function gi(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var mi=ko(null),bi=null,wi=null,_i=null;function Si(){_i=wi=bi=null}function Ei(e){var t=mi.current;xo(mi),e._currentValue=t}function Oi(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ki(e,t){bi=e,_i=wi=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(ws=!0),e.firstContext=null)}function xi(e){var t=e._currentValue;if(_i!==e)if(e={context:e,memoizedValue:t,next:null},null===wi){if(null===bi)throw Error(i(308));wi=e,bi.dependencies={lanes:0,firstContext:e}}else wi=wi.next=e;return t}var Pi=null;function ji(e){null===Pi?Pi=[e]:Pi.push(e)}function Ci(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,ji(t)):(n.next=o.next,o.next=n),t.interleaved=n,Ti(e,r)}function Ti(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ai=!1;function Ni(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Di(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Li(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Cu)){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ti(e,n)}return null===(o=r.interleaved)?(t.next=t,ji(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ti(e,n)}function Ii(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}function Ri(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Bi(e,t,n,r){var o=e.updateQueue;Ai=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var u=s,l=u.next;u.next=null,null===a?i=l:a.next=l,a=u;var c=e.alternate;null!==c&&(s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u)}if(null!==i){var f=o.baseState;for(a=0,c=l=u=null,s=i;;){var d=s.lane,h=s.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,y=s;switch(d=t,h=n,y.tag){case 1:if("function"==typeof(p=y.payload)){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=y.payload)?p.call(h,f,d):p))break e;f=R({},f,d);break e;case 2:Ai=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(d=o.effects)?o.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(l=c=h,u=f):c=c.next=h,a|=d;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(d=s).next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}if(null===c&&(u=f),o.baseState=u,o.firstBaseUpdate=l,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Ru|=a,e.lanes=a,e.memoizedState=f}}function $i(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(i(191,o));o.call(r)}}}var Ui=(new r.Component).refs;function Fi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:R({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ki={isMounted:function(e){return!!(e=e._reactInternals)&&Ke(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tl(),o=nl(e),i=Mi(r,o);i.payload=t,null!=n&&(i.callback=n),null!==(t=Li(e,i,o))&&(rl(t,e,o,r),Ii(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tl(),o=nl(e),i=Mi(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),null!==(t=Li(e,i,o))&&(rl(t,e,o,r),Ii(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tl(),r=nl(e),o=Mi(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Li(e,o,r))&&(rl(t,e,r,n),Ii(t,e,r))}};function zi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&ur(n,r)&&ur(o,i))}function Vi(e,t,n){var r=!1,o=jo,i=t.contextType;return"object"==typeof i&&null!==i?i=xi(i):(o=Do(t)?Ao:Co.current,i=(r=null!=(r=t.contextTypes))?No(e,o):jo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ki,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Hi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ki.enqueueReplaceState(t,t.state,null)}function qi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Ui,Ni(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=xi(i):(i=Do(t)?Ao:Co.current,o.context=No(e,i)),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(Fi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&Ki.enqueueReplaceState(o,o.state,null),Bi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function Wi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===Ui&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Gi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Qi(e){return(0,e._init)(e._payload)}function Yi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ml(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Bl(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"==typeof i&&null!==i&&i.$$typeof===N&&Qi(i)===t.type)?((r=o(t,n.props)).ref=Wi(e,t,n),r.return=e,r):((r=Ll(n.type,n.key,n.props,null,e.mode,r)).ref=Wi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$l(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Il(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Bl(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=Ll(t.type,t.key,t.props,null,e.mode,n)).ref=Wi(e,null,t),n.return=e,n;case S:return(t=$l(t,e.mode,n)).return=e,t;case N:return d(e,(0,t._init)(t._payload),n)}if(te(t)||L(t))return(t=Il(t,e.mode,n,null)).return=e,t;Gi(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===o?l(e,t,n,r):null;case S:return n.key===o?c(e,t,n,r):null;case N:return h(e,t,(o=n._init)(n._payload),r)}if(te(n)||L(n))return null!==o?null:f(e,t,n,r,null);Gi(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case N:return p(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||L(r))return f(t,e=e.get(n)||null,r,o,null);Gi(t,r)}return null}function y(o,i,s,u){for(var l=null,c=null,f=i,y=i=0,v=null;null!==f&&y<s.length;y++){f.index>y?(v=f,f=null):v=f.sibling;var g=h(o,f,s[y],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(o,f),i=a(g,i,y),null===c?l=g:c.sibling=g,c=g,f=v}if(y===s.length)return n(o,f),ii&&Xo(o,y),l;if(null===f){for(;y<s.length;y++)null!==(f=d(o,s[y],u))&&(i=a(f,i,y),null===c?l=f:c.sibling=f,c=f);return ii&&Xo(o,y),l}for(f=r(o,f);y<s.length;y++)null!==(v=p(f,o,y,s[y],u))&&(e&&null!==v.alternate&&f.delete(null===v.key?y:v.key),i=a(v,i,y),null===c?l=v:c.sibling=v,c=v);return e&&f.forEach((function(e){return t(o,e)})),ii&&Xo(o,y),l}function v(o,s,u,l){var c=L(u);if("function"!=typeof c)throw Error(i(150));if(null==(u=c.call(u)))throw Error(i(151));for(var f=c=null,y=s,v=s=0,g=null,m=u.next();null!==y&&!m.done;v++,m=u.next()){y.index>v?(g=y,y=null):g=y.sibling;var b=h(o,y,m.value,l);if(null===b){null===y&&(y=g);break}e&&y&&null===b.alternate&&t(o,y),s=a(b,s,v),null===f?c=b:f.sibling=b,f=b,y=g}if(m.done)return n(o,y),ii&&Xo(o,v),c;if(null===y){for(;!m.done;v++,m=u.next())null!==(m=d(o,m.value,l))&&(s=a(m,s,v),null===f?c=m:f.sibling=m,f=m);return ii&&Xo(o,v),c}for(y=r(o,y);!m.done;v++,m=u.next())null!==(m=p(y,o,v,m.value,l))&&(e&&null!==m.alternate&&y.delete(null===m.key?v:m.key),s=a(m,s,v),null===f?c=m:f.sibling=m,f=m);return e&&y.forEach((function(e){return t(o,e)})),ii&&Xo(o,v),c}return function e(r,i,a,u){if("object"==typeof a&&null!==a&&a.type===E&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case _:e:{for(var l=a.key,c=i;null!==c;){if(c.key===l){if((l=a.type)===E){if(7===c.tag){n(r,c.sibling),(i=o(c,a.props.children)).return=r,r=i;break e}}else if(c.elementType===l||"object"==typeof l&&null!==l&&l.$$typeof===N&&Qi(l)===c.type){n(r,c.sibling),(i=o(c,a.props)).ref=Wi(r,c,a),i.return=r,r=i;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===E?((i=Il(a.props.children,r.mode,u,a.key)).return=r,r=i):((u=Ll(a.type,a.key,a.props,null,r.mode,u)).ref=Wi(r,i,a),u.return=r,r=u)}return s(r);case S:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=$l(a,r.mode,u)).return=r,r=i}return s(r);case N:return e(r,i,(c=a._init)(a._payload),u)}if(te(a))return y(r,i,a,u);if(L(a))return v(r,i,a,u);Gi(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=Bl(a,r.mode,u)).return=r,r=i),s(r)):n(r,i)}}var Zi=Yi(!0),Ji=Yi(!1),Xi={},ea=ko(Xi),ta=ko(Xi),na=ko(Xi);function ra(e){if(e===Xi)throw Error(i(174));return e}function oa(e,t){switch(Po(na,t),Po(ta,e),Po(ea,Xi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ue(null,"");break;default:t=ue(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}xo(ea),Po(ea,t)}function ia(){xo(ea),xo(ta),xo(na)}function aa(e){ra(na.current);var t=ra(ea.current),n=ue(t,e.type);t!==n&&(Po(ta,e),Po(ea,n))}function sa(e){ta.current===e&&(xo(ea),xo(ta))}var ua=ko(0);function la(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ca=[];function fa(){for(var e=0;e<ca.length;e++)ca[e]._workInProgressVersionPrimary=null;ca.length=0}var da=w.ReactCurrentDispatcher,ha=w.ReactCurrentBatchConfig,pa=0,ya=null,va=null,ga=null,ma=!1,ba=!1,wa=0,_a=0;function Sa(){throw Error(i(321))}function Ea(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function Oa(e,t,n,r,o,a){if(pa=a,ya=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,da.current=null===e||null===e.memoizedState?ss:us,e=n(r,o),ba){a=0;do{if(ba=!1,wa=0,25<=a)throw Error(i(301));a+=1,ga=va=null,t.updateQueue=null,da.current=ls,e=n(r,o)}while(ba)}if(da.current=as,t=null!==va&&null!==va.next,pa=0,ga=va=ya=null,ma=!1,t)throw Error(i(300));return e}function ka(){var e=0!==wa;return wa=0,e}function xa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ga?ya.memoizedState=ga=e:ga=ga.next=e,ga}function Pa(){if(null===va){var e=ya.alternate;e=null!==e?e.memoizedState:null}else e=va.next;var t=null===ga?ya.memoizedState:ga.next;if(null!==t)ga=t,va=e;else{if(null===e)throw Error(i(310));e={memoizedState:(va=e).memoizedState,baseState:va.baseState,baseQueue:va.baseQueue,queue:va.queue,next:null},null===ga?ya.memoizedState=ga=e:ga=ga.next=e}return ga}function ja(e,t){return"function"==typeof t?t(e):t}function Ca(e){var t=Pa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=va,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var u=s=null,l=null,c=a;do{var f=c.lane;if((pa&f)===f)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(u=l=d,s=r):l=l.next=d,ya.lanes|=f,Ru|=f}c=c.next}while(null!==c&&c!==a);null===l?s=r:l.next=u,sr(r,t.memoizedState)||(ws=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ya.lanes|=a,Ru|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ta(e){var t=Pa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sr(a,t.memoizedState)||(ws=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Aa(){}function Na(e,t){var n=ya,r=Pa(),o=t(),a=!sr(r.memoizedState,o);if(a&&(r.memoizedState=o,ws=!0),r=r.queue,Va(La.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ga&&1&ga.memoizedState.tag){if(n.flags|=2048,$a(9,Ma.bind(null,n,r,o,t),void 0,null),null===Tu)throw Error(i(349));0!=(30&pa)||Da(n,t,o)}return o}function Da(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ya.updateQueue)?(t={lastEffect:null,stores:null},ya.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ma(e,t,n,r){t.value=n,t.getSnapshot=r,Ia(t)&&Ra(e)}function La(e,t,n){return n((function(){Ia(t)&&Ra(e)}))}function Ia(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(e){return!0}}function Ra(e){var t=Ti(e,1);null!==t&&rl(t,e,1,-1)}function Ba(e){var t=xa();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:e},t.queue=e,e=e.dispatch=ns.bind(null,ya,e),[t.memoizedState,e]}function $a(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ya.updateQueue)?(t={lastEffect:null,stores:null},ya.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ua(){return Pa().memoizedState}function Fa(e,t,n,r){var o=xa();ya.flags|=e,o.memoizedState=$a(1|t,n,void 0,void 0===r?null:r)}function Ka(e,t,n,r){var o=Pa();r=void 0===r?null:r;var i=void 0;if(null!==va){var a=va.memoizedState;if(i=a.destroy,null!==r&&Ea(r,a.deps))return void(o.memoizedState=$a(t,n,i,r))}ya.flags|=e,o.memoizedState=$a(1|t,n,i,r)}function za(e,t){return Fa(8390656,8,e,t)}function Va(e,t){return Ka(2048,8,e,t)}function Ha(e,t){return Ka(4,2,e,t)}function qa(e,t){return Ka(4,4,e,t)}function Wa(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ga(e,t,n){return n=null!=n?n.concat([e]):null,Ka(4,4,Wa.bind(null,t,e),n)}function Qa(){}function Ya(e,t){var n=Pa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ea(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Za(e,t){var n=Pa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Ea(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Ja(e,t,n){return 0==(21&pa)?(e.baseState&&(e.baseState=!1,ws=!0),e.memoizedState=n):(sr(n,t)||(n=yt(),ya.lanes|=n,Ru|=n,e.baseState=!0),t)}function Xa(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ha.transition;ha.transition={};try{e(!1),t()}finally{bt=n,ha.transition=r}}function es(){return Pa().memoizedState}function ts(e,t,n){var r=nl(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rs(e)?os(t,n):null!==(n=Ci(e,t,n,r))&&(rl(n,e,r,tl()),is(n,t,r))}function ns(e,t,n){var r=nl(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rs(e))os(t,o);else{var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,a)){var u=t.interleaved;return null===u?(o.next=o,ji(t)):(o.next=u.next,u.next=o),void(t.interleaved=o)}}catch(e){}null!==(n=Ci(e,t,o,r))&&(rl(n,e,r,o=tl()),is(n,t,r))}}function rs(e){var t=e.alternate;return e===ya||null!==t&&t===ya}function os(e,t){ba=ma=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function is(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,mt(e,n)}}var as={readContext:xi,useCallback:Sa,useContext:Sa,useEffect:Sa,useImperativeHandle:Sa,useInsertionEffect:Sa,useLayoutEffect:Sa,useMemo:Sa,useReducer:Sa,useRef:Sa,useState:Sa,useDebugValue:Sa,useDeferredValue:Sa,useTransition:Sa,useMutableSource:Sa,useSyncExternalStore:Sa,useId:Sa,unstable_isNewReconciler:!1},ss={readContext:xi,useCallback:function(e,t){return xa().memoizedState=[e,void 0===t?null:t],e},useContext:xi,useEffect:za,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Fa(4194308,4,Wa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fa(4194308,4,e,t)},useInsertionEffect:function(e,t){return Fa(4,2,e,t)},useMemo:function(e,t){var n=xa();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xa();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ts.bind(null,ya,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},xa().memoizedState=e},useState:Ba,useDebugValue:Qa,useDeferredValue:function(e){return xa().memoizedState=e},useTransition:function(){var e=Ba(!1),t=e[0];return e=Xa.bind(null,e[1]),xa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ya,o=xa();if(ii){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Tu)throw Error(i(349));0!=(30&pa)||Da(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,za(La.bind(null,r,a,e),[e]),r.flags|=2048,$a(9,Ma.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=xa(),t=Tu.identifierPrefix;if(ii){var n=Jo;t=":"+t+"R"+(n=(Zo&~(1<<32-at(Zo)-1)).toString(32)+n),0<(n=wa++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=_a++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},us={readContext:xi,useCallback:Ya,useContext:xi,useEffect:Va,useImperativeHandle:Ga,useInsertionEffect:Ha,useLayoutEffect:qa,useMemo:Za,useReducer:Ca,useRef:Ua,useState:function(){return Ca(ja)},useDebugValue:Qa,useDeferredValue:function(e){return Ja(Pa(),va.memoizedState,e)},useTransition:function(){return[Ca(ja)[0],Pa().memoizedState]},useMutableSource:Aa,useSyncExternalStore:Na,useId:es,unstable_isNewReconciler:!1},ls={readContext:xi,useCallback:Ya,useContext:xi,useEffect:Va,useImperativeHandle:Ga,useInsertionEffect:Ha,useLayoutEffect:qa,useMemo:Za,useReducer:Ta,useRef:Ua,useState:function(){return Ta(ja)},useDebugValue:Qa,useDeferredValue:function(e){var t=Pa();return null===va?t.memoizedState=e:Ja(t,va.memoizedState,e)},useTransition:function(){return[Ta(ja)[0],Pa().memoizedState]},useMutableSource:Aa,useSyncExternalStore:Na,useId:es,unstable_isNewReconciler:!1};function cs(e,t){try{var n="",r=t;do{n+=F(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o,digest:null}}function fs(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ds(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var hs="function"==typeof WeakMap?WeakMap:Map;function ps(e,t,n){(n=Mi(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hu||(Hu=!0,qu=r),ds(0,t)},n}function ys(e,t,n){(n=Mi(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ds(0,t)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){ds(0,t),"function"!=typeof r&&(null===Wu?Wu=new Set([this]):Wu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function vs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new hs;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=xl.bind(null,e,t,n),t.then(e,e))}function gs(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ms(e,t,n,r,o){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Mi(-1,1)).tag=2,Li(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var bs=w.ReactCurrentOwner,ws=!1;function _s(e,t,n,r){t.child=null===e?Ji(t,null,n,r):Zi(t,e.child,n,r)}function Ss(e,t,n,r,o){n=n.render;var i=t.ref;return ki(t,o),r=Oa(e,t,n,r,i,o),n=ka(),null===e||ws?(ii&&n&&ti(t),t.flags|=1,_s(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hs(e,t,o))}function Es(e,t,n,r,o){if(null===e){var i=n.type;return"function"!=typeof i||Dl(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ll(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Os(e,t,i,r,o))}if(i=e.child,0==(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:ur)(a,r)&&e.ref===t.ref)return Hs(e,t,o)}return t.flags|=1,(e=Ml(i,r)).ref=t.ref,e.return=t,t.child=e}function Os(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(ur(i,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=i,0==(e.lanes&o))return t.lanes=e.lanes,Hs(e,t,o);0!=(131072&e.flags)&&(ws=!0)}}return Ps(e,t,n,r,o)}function ks(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Po(Mu,Du),Du|=n;else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Po(Mu,Du),Du|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Po(Mu,Du),Du|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Po(Mu,Du),Du|=r;return _s(e,t,o,n),t.child}function xs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ps(e,t,n,r,o){var i=Do(n)?Ao:Co.current;return i=No(t,i),ki(t,o),n=Oa(e,t,n,r,i,o),r=ka(),null===e||ws?(ii&&r&&ti(t),t.flags|=1,_s(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Hs(e,t,o))}function js(e,t,n,r,o){if(Do(n)){var i=!0;Ro(t)}else i=!1;if(ki(t,o),null===t.stateNode)Vs(e,t),Vi(t,n,r),qi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;l="object"==typeof l&&null!==l?xi(l):No(t,l=Do(n)?Ao:Co.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||u!==l)&&Hi(t,a,r,l),Ai=!1;var d=t.memoizedState;a.state=d,Bi(t,r,a,o),u=t.memoizedState,s!==r||d!==u||To.current||Ai?("function"==typeof c&&(Fi(t,n,c,r),u=t.memoizedState),(s=Ai||zi(t,n,s,r,d,u,l))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Di(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:gi(t.type,s),a.props=l,f=t.pendingProps,d=a.context,u="object"==typeof(u=n.contextType)&&null!==u?xi(u):No(t,u=Do(n)?Ao:Co.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==f||d!==u)&&Hi(t,a,r,u),Ai=!1,d=t.memoizedState,a.state=d,Bi(t,r,a,o);var p=t.memoizedState;s!==f||d!==p||To.current||Ai?("function"==typeof h&&(Fi(t,n,h,r),p=t.memoizedState),(l=Ai||zi(t,n,l,r,d,p,u)||!1)?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=l):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Cs(e,t,n,r,i,o)}function Cs(e,t,n,r,o,i){xs(e,t);var a=0!=(128&t.flags);if(!r&&!a)return o&&Bo(t,n,!1),Hs(e,t,i);r=t.stateNode,bs.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Zi(t,e.child,null,i),t.child=Zi(t,null,s,i)):_s(e,t,s,i),t.memoizedState=r.state,o&&Bo(t,n,!0),t.child}function Ts(e){var t=e.stateNode;t.pendingContext?Lo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Lo(0,t.context,!1),oa(e,t.containerInfo)}function As(e,t,n,r,o){return pi(),yi(o),t.flags|=256,_s(e,t,n,r),t.child}var Ns,Ds,Ms,Ls,Is={dehydrated:null,treeContext:null,retryLane:0};function Rs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bs(e,t,n){var r,o=t.pendingProps,a=ua.current,s=!1,u=0!=(128&t.flags);if((r=u)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Po(ua,1&a),null===e)return ci(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(u=o.children,e=o.fallback,s?(o=t.mode,s=t.child,u={mode:"hidden",children:u},0==(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=u):s=Rl(u,o,0,null),e=Il(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Rs(n),t.memoizedState=Is,e):$s(t,u));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,s){if(n)return 256&t.flags?(t.flags&=-257,Us(e,t,s,r=fs(Error(i(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Rl({mode:"visible",children:r.children},o,0,null),(a=Il(a,o,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&Zi(t,e.child,null,s),t.child.memoizedState=Rs(s),t.memoizedState=Is,a);if(0==(1&t.mode))return Us(e,t,s,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var u=r.dgst;return r=u,Us(e,t,s,r=fs(a=Error(i(419)),r,void 0))}if(u=0!=(s&e.childLanes),ws||u){if(null!==(r=Tu)){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!=(o&(r.suspendedLanes|s))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Ti(e,o),rl(r,e,o,-1))}return vl(),Us(e,t,s,r=fs(Error(i(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=jl.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,oi=lo(o.nextSibling),ri=t,ii=!0,ai=null,null!==e&&(Go[Qo++]=Zo,Go[Qo++]=Jo,Go[Qo++]=Yo,Zo=e.id,Jo=e.overflow,Yo=t),(t=$s(t,r.children)).flags|=4096,t)}(e,t,u,o,r,a,n);if(s){s=o.fallback,u=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 0==(1&u)&&t.child!==a?((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null):(o=Ml(a,l)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=Ml(r,s):(s=Il(s,u,n,null)).flags|=2,s.return=t,o.return=t,o.sibling=s,t.child=o,o=s,s=t.child,u=null===(u=e.child.memoizedState)?Rs(n):{baseLanes:u.baseLanes|n,cachePool:null,transitions:u.transitions},s.memoizedState=u,s.childLanes=e.childLanes&~n,t.memoizedState=Is,o}return e=(s=e.child).sibling,o=Ml(s,{mode:"visible",children:o.children}),0==(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function $s(e,t){return(t=Rl({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Us(e,t,n,r){return null!==r&&yi(r),Zi(t,e.child,null,n),(e=$s(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Oi(e.return,t,n)}function Ks(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function zs(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(_s(e,t,r.children,n),0!=(2&(r=ua.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Po(ua,r),0==(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===la(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ks(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===la(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ks(t,!0,n,null,i);break;case"together":Ks(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Ru|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Ml(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ml(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function qs(e,t){if(!ii)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ws(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Gs(e,t,n){var r=t.pendingProps;switch(ni(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ws(t),null;case 1:case 17:return Do(t.type)&&Mo(),Ws(t),null;case 3:return r=t.stateNode,ia(),xo(To),xo(Co),fa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(di(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==ai&&(sl(ai),ai=null))),Ds(e,t),Ws(t),null;case 5:sa(t);var o=ra(na.current);if(n=t.type,null!==e&&null!=t.stateNode)Ms(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return Ws(t),null}if(e=ra(ea.current),di(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[ho]=t,r[po]=a,e=0!=(1&t.mode),n){case"dialog":$r("cancel",r),$r("close",r);break;case"iframe":case"object":case"embed":$r("load",r);break;case"video":case"audio":for(o=0;o<Lr.length;o++)$r(Lr[o],r);break;case"source":$r("error",r);break;case"img":case"image":case"link":$r("error",r),$r("load",r);break;case"details":$r("toggle",r);break;case"input":Y(r,a),$r("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},$r("invalid",r);break;case"textarea":oe(r,a),$r("invalid",r)}for(var u in me(n,a),o=null,a)if(a.hasOwnProperty(u)){var l=a[u];"children"===u?"string"==typeof l?r.textContent!==l&&(!0!==a.suppressHydrationWarning&&Jr(r.textContent,l,e),o=["children",l]):"number"==typeof l&&r.textContent!==""+l&&(!0!==a.suppressHydrationWarning&&Jr(r.textContent,l,e),o=["children",""+l]):s.hasOwnProperty(u)&&null!=l&&"onScroll"===u&&$r("scroll",r)}switch(n){case"input":q(r),X(r,a,!0);break;case"textarea":q(r),ae(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=Xr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{u=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(n,{is:r.is}):(e=u.createElement(n),"select"===n&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,n),e[ho]=t,e[po]=r,Ns(e,t,!1,!1),t.stateNode=e;e:{switch(u=be(n,r),n){case"dialog":$r("cancel",e),$r("close",e),o=r;break;case"iframe":case"object":case"embed":$r("load",e),o=r;break;case"video":case"audio":for(o=0;o<Lr.length;o++)$r(Lr[o],e);o=r;break;case"source":$r("error",e),o=r;break;case"img":case"image":case"link":$r("error",e),$r("load",e),o=r;break;case"details":$r("toggle",e),o=r;break;case"input":Y(e,r),o=Q(e,r),$r("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=R({},r,{value:void 0}),$r("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),$r("invalid",e)}for(a in me(n,o),l=o)if(l.hasOwnProperty(a)){var c=l[a];"style"===a?ve(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&fe(e,c):"children"===a?"string"==typeof c?("textarea"!==n||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=c&&"onScroll"===a&&$r("scroll",e):null!=c&&b(e,a,c,u))}switch(n){case"input":q(e),X(e,r,!1);break;case"textarea":q(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+V(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=Xr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ws(t),null;case 6:if(e&&null!=t.stateNode)Ls(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(n=ra(na.current),ra(ea.current),di(t)){if(r=t.stateNode,n=t.memoizedProps,r[ho]=t,(a=r.nodeValue!==n)&&null!==(e=ri))switch(e.tag){case 3:Jr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Jr(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ho]=t,t.stateNode=r}return Ws(t),null;case 13:if(xo(ua),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ii&&null!==oi&&0!=(1&t.mode)&&0==(128&t.flags))hi(),pi(),t.flags|=98560,a=!1;else if(a=di(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[ho]=t}else pi(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Ws(t),a=!1}else null!==ai&&(sl(ai),ai=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ua.current)?0===Lu&&(Lu=3):vl())),null!==t.updateQueue&&(t.flags|=4),Ws(t),null);case 4:return ia(),Ds(e,t),null===e&&Kr(t.stateNode.containerInfo),Ws(t),null;case 10:return Ei(t.type._context),Ws(t),null;case 19:if(xo(ua),null===(a=t.memoizedState))return Ws(t),null;if(r=0!=(128&t.flags),null===(u=a.rendering))if(r)qs(a,!1);else{if(0!==Lu||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(u=la(e))){for(t.flags|=128,qs(a,!1),null!==(r=u.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(u=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,e=u.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Po(ua,1&ua.current|2),t.child}e=e.sibling}null!==a.tail&&Ze()>zu&&(t.flags|=128,r=!0,qs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=la(u))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),qs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!u.alternate&&!ii)return Ws(t),null}else 2*Ze()-a.renderingStartTime>zu&&1073741824!==n&&(t.flags|=128,r=!0,qs(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(null!==(n=a.last)?n.sibling=u:t.child=u,a.last=u)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ze(),t.sibling=null,n=ua.current,Po(ua,r?1&n|2:1&n),t):(Ws(t),null);case 22:case 23:return dl(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Du)&&(Ws(t),6&t.subtreeFlags&&(t.flags|=8192)):Ws(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}function Qs(e,t){switch(ni(t),t.tag){case 1:return Do(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ia(),xo(To),xo(Co),fa(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return sa(t),null;case 13:if(xo(ua),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));pi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return xo(ua),null;case 4:return ia(),null;case 10:return Ei(t.type._context),null;case 22:case 23:return dl(),null;default:return null}}Ns=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ds=function(){},Ms=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,ra(ea.current);var i,a=null;switch(n){case"input":o=Q(e,o),r=Q(e,r),a=[];break;case"select":o=R({},o,{value:void 0}),r=R({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=Xr)}for(c in me(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var u=o[c];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(u=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&l!==u&&(null!=l||null!=u))if("style"===c)if(u){for(i in u)!u.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in l)l.hasOwnProperty(i)&&u[i]!==l[i]&&(n||(n={}),n[i]=l[i])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,u=u?u.__html:void 0,null!=l&&u!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&$r("scroll",e),a||u===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Ls=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ys=!1,Zs=!1,Js="function"==typeof WeakSet?WeakSet:Set,Xs=null;function eu(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){kl(e,t,n)}else n.current=null}function tu(e,t,n){try{n()}catch(n){kl(e,t,n)}}var nu=!1;function ru(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&tu(t,n,i)}o=o.next}while(o!==r)}}function ou(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function iu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function au(e){var t=e.alternate;null!==t&&(e.alternate=null,au(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[ho],delete t[po],delete t[vo],delete t[go],delete t[mo]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function su(e){return 5===e.tag||3===e.tag||4===e.tag}function uu(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||su(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Xr));else if(4!==r&&null!==(e=e.child))for(lu(e,t,n),e=e.sibling;null!==e;)lu(e,t,n),e=e.sibling}function cu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cu(e,t,n),e=e.sibling;null!==e;)cu(e,t,n),e=e.sibling}var fu=null,du=!1;function hu(e,t,n){for(n=n.child;null!==n;)pu(e,t,n),n=n.sibling}function pu(e,t,n){if(it&&"function"==typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(e){}switch(n.tag){case 5:Zs||eu(n,t);case 6:var r=fu,o=du;fu=null,hu(e,t,n),du=o,null!==(fu=r)&&(du?(e=fu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):fu.removeChild(n.stateNode));break;case 18:null!==fu&&(du?(e=fu,n=n.stateNode,8===e.nodeType?uo(e.parentNode,n):1===e.nodeType&&uo(e,n),Kt(e)):uo(fu,n.stateNode));break;case 4:r=fu,o=du,fu=n.stateNode.containerInfo,du=!0,hu(e,t,n),fu=r,du=o;break;case 0:case 11:case 14:case 15:if(!Zs&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&tu(n,t,a),o=o.next}while(o!==r)}hu(e,t,n);break;case 1:if(!Zs&&(eu(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){kl(n,t,e)}hu(e,t,n);break;case 21:hu(e,t,n);break;case 22:1&n.mode?(Zs=(r=Zs)||null!==n.memoizedState,hu(e,t,n),Zs=r):hu(e,t,n);break;default:hu(e,t,n)}}function yu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Js),t.forEach((function(t){var r=Cl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function vu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,u=s;e:for(;null!==u;){switch(u.tag){case 5:fu=u.stateNode,du=!1;break e;case 3:case 4:fu=u.stateNode.containerInfo,du=!0;break e}u=u.return}if(null===fu)throw Error(i(160));pu(a,s,o),fu=null,du=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(e){kl(o,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gu(t,e),t=t.sibling}function gu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vu(t,e),mu(e),4&r){try{ru(3,e,e.return),ou(3,e)}catch(t){kl(e,e.return,t)}try{ru(5,e,e.return)}catch(t){kl(e,e.return,t)}}break;case 1:vu(t,e),mu(e),512&r&&null!==n&&eu(n,n.return);break;case 5:if(vu(t,e),mu(e),512&r&&null!==n&&eu(n,n.return),32&e.flags){var o=e.stateNode;try{de(o,"")}catch(t){kl(e,e.return,t)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,u=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===u&&"radio"===a.type&&null!=a.name&&Z(o,a),be(u,s);var c=be(u,a);for(s=0;s<l.length;s+=2){var f=l[s],d=l[s+1];"style"===f?ve(o,d):"dangerouslySetInnerHTML"===f?fe(o,d):"children"===f?de(o,d):b(o,f,d,c)}switch(u){case"input":J(o,a);break;case"textarea":ie(o,a);break;case"select":var h=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?ne(o,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[po]=a}catch(t){kl(e,e.return,t)}}break;case 6:if(vu(t,e),mu(e),4&r){if(null===e.stateNode)throw Error(i(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(t){kl(e,e.return,t)}}break;case 3:if(vu(t,e),mu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Kt(t.containerInfo)}catch(t){kl(e,e.return,t)}break;case 4:default:vu(t,e),mu(e);break;case 13:vu(t,e),mu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Ku=Ze())),4&r&&yu(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Zs=(c=Zs)||f,vu(t,e),Zs=c):vu(t,e),mu(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!f&&0!=(1&e.mode))for(Xs=e,f=e.child;null!==f;){for(d=Xs=f;null!==Xs;){switch(p=(h=Xs).child,h.tag){case 0:case 11:case 14:case 15:ru(4,h,h.return);break;case 1:eu(h,h.return);var y=h.stateNode;if("function"==typeof y.componentWillUnmount){r=h,n=h.return;try{t=r,y.props=t.memoizedProps,y.state=t.memoizedState,y.componentWillUnmount()}catch(e){kl(r,n,e)}}break;case 5:eu(h,h.return);break;case 22:if(null!==h.memoizedState){Su(d);continue}}null!==p?(p.return=h,Xs=p):Su(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{o=d.stateNode,c?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(u=d.stateNode,s=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,u.style.display=ye("display",s))}catch(t){kl(e,e.return,t)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){kl(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:vu(t,e),mu(e),4&r&&yu(e);case 21:}}function mu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(su(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(de(o,""),r.flags&=-33),cu(e,uu(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;lu(e,uu(e),a);break;default:throw Error(i(161))}}catch(t){kl(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function bu(e,t,n){Xs=e,wu(e,t,n)}function wu(e,t,n){for(var r=0!=(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Ys;if(!a){var s=o.alternate,u=null!==s&&null!==s.memoizedState||Zs;s=Ys;var l=Zs;if(Ys=a,(Zs=u)&&!l)for(Xs=o;null!==Xs;)u=(a=Xs).child,22===a.tag&&null!==a.memoizedState?Eu(o):null!==u?(u.return=a,Xs=u):Eu(o);for(;null!==i;)Xs=i,wu(i,t,n),i=i.sibling;Xs=o,Ys=s,Zs=l}_u(e)}else 0!=(8772&o.subtreeFlags)&&null!==i?(i.return=o,Xs=i):_u(e)}}function _u(e){for(;null!==Xs;){var t=Xs;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Zs||ou(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Zs)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:gi(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&$i(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}$i(t,s,n)}break;case 5:var u=t.stateNode;if(null===n&&4&t.flags){n=u;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var f=c.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&Kt(d)}}}break;default:throw Error(i(163))}Zs||512&t.flags&&iu(t)}catch(e){kl(t,t.return,e)}}if(t===e){Xs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Xs=n;break}Xs=t.return}}function Su(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function Eu(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ou(4,t)}catch(e){kl(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(e){kl(t,o,e)}}var i=t.return;try{iu(t)}catch(e){kl(t,i,e)}break;case 5:var a=t.return;try{iu(t)}catch(e){kl(t,a,e)}}}catch(e){kl(t,t.return,e)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var Ou,ku=Math.ceil,xu=w.ReactCurrentDispatcher,Pu=w.ReactCurrentOwner,ju=w.ReactCurrentBatchConfig,Cu=0,Tu=null,Au=null,Nu=0,Du=0,Mu=ko(0),Lu=0,Iu=null,Ru=0,Bu=0,$u=0,Uu=null,Fu=null,Ku=0,zu=1/0,Vu=null,Hu=!1,qu=null,Wu=null,Gu=!1,Qu=null,Yu=0,Zu=0,Ju=null,Xu=-1,el=0;function tl(){return 0!=(6&Cu)?Ze():-1!==Xu?Xu:Xu=Ze()}function nl(e){return 0==(1&e.mode)?1:0!=(2&Cu)&&0!==Nu?Nu&-Nu:null!==vi.transition?(0===el&&(el=yt()),el):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function rl(e,t,n,r){if(50<Zu)throw Zu=0,Ju=null,Error(i(185));gt(e,n,r),0!=(2&Cu)&&e===Tu||(e===Tu&&(0==(2&Cu)&&(Bu|=n),4===Lu&&ul(e,Nu)),ol(e,r),1===n&&0===Cu&&0==(1&t.mode)&&(zu=Ze()+500,Uo&&zo()))}function ol(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,u=o[a];-1===u?0!=(s&n)&&0==(s&r)||(o[a]=ht(s,t)):u<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=dt(e,e===Tu?Nu:0);if(0===r)null!==n&&Ge(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ge(n),1===t)0===e.tag?function(e){Uo=!0,Ko(e)}(ll.bind(null,e)):Ko(ll.bind(null,e)),ao((function(){0==(6&Cu)&&zo()})),n=null;else{switch(wt(r)){case 1:n=Xe;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Tl(n,il.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function il(e,t){if(Xu=-1,el=0,0!=(6&Cu))throw Error(i(327));var n=e.callbackNode;if(El()&&e.callbackNode!==n)return null;var r=dt(e,e===Tu?Nu:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=gl(e,r);else{t=r;var o=Cu;Cu|=2;var a=yl();for(Tu===e&&Nu===t||(Vu=null,zu=Ze()+500,hl(e,t));;)try{bl();break}catch(t){pl(e,t)}Si(),xu.current=a,Cu=o,null!==Au?t=0:(Tu=null,Nu=0,t=Lu)}if(0!==t){if(2===t&&0!==(o=pt(e))&&(r=o,t=al(e,o)),1===t)throw n=Iu,hl(e,0),ul(e,r),ol(e,Ze()),n;if(6===t)ul(e,r);else{if(o=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=gl(e,r))&&0!==(a=pt(e))&&(r=a,t=al(e,a)),1===t))throw n=Iu,hl(e,0),ul(e,r),ol(e,Ze()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:Sl(e,Fu,Vu);break;case 3:if(ul(e,r),(130023424&r)===r&&10<(t=Ku+500-Ze())){if(0!==dt(e,0))break;if(((o=e.suspendedLanes)&r)!==r){tl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(Sl.bind(null,e,Fu,Vu),t);break}Sl(e,Fu,Vu);break;case 4:if(ul(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=Ze()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ku(r/1960))-r)){e.timeoutHandle=ro(Sl.bind(null,e,Fu,Vu),r);break}Sl(e,Fu,Vu);break;default:throw Error(i(329))}}}return ol(e,Ze()),e.callbackNode===n?il.bind(null,e):null}function al(e,t){var n=Uu;return e.current.memoizedState.isDehydrated&&(hl(e,t).flags|=256),2!==(e=gl(e,t))&&(t=Fu,Fu=n,null!==t&&sl(t)),e}function sl(e){null===Fu?Fu=e:Fu.push.apply(Fu,e)}function ul(e,t){for(t&=~$u,t&=~Bu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function ll(e){if(0!=(6&Cu))throw Error(i(327));El();var t=dt(e,0);if(0==(1&t))return ol(e,Ze()),null;var n=gl(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=al(e,r))}if(1===n)throw n=Iu,hl(e,0),ul(e,t),ol(e,Ze()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Sl(e,Fu,Vu),ol(e,Ze()),null}function cl(e,t){var n=Cu;Cu|=1;try{return e(t)}finally{0===(Cu=n)&&(zu=Ze()+500,Uo&&zo())}}function fl(e){null!==Qu&&0===Qu.tag&&0==(6&Cu)&&El();var t=Cu;Cu|=1;var n=ju.transition,r=bt;try{if(ju.transition=null,bt=1,e)return e()}finally{bt=r,ju.transition=n,0==(6&(Cu=t))&&zo()}}function dl(){Du=Mu.current,xo(Mu)}function hl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Au)for(n=Au.return;null!==n;){var r=n;switch(ni(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Mo();break;case 3:ia(),xo(To),xo(Co),fa();break;case 5:sa(r);break;case 4:ia();break;case 13:case 19:xo(ua);break;case 10:Ei(r.type._context);break;case 22:case 23:dl()}n=n.return}if(Tu=e,Au=e=Ml(e.current,null),Nu=Du=t,Lu=0,Iu=null,$u=Bu=Ru=0,Fu=Uu=null,null!==Pi){for(t=0;t<Pi.length;t++)if(null!==(r=(n=Pi[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}Pi=null}return e}function pl(e,t){for(;;){var n=Au;try{if(Si(),da.current=as,ma){for(var r=ya.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ma=!1}if(pa=0,ga=va=ya=null,ba=!1,wa=0,Pu.current=null,null===n||null===n.return){Lu=1,Iu=t,Au=null;break}e:{var a=e,s=n.return,u=n,l=t;if(t=Nu,u.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,f=u,d=f.tag;if(0==(1&f.mode)&&(0===d||11===d||15===d)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=gs(s);if(null!==p){p.flags&=-257,ms(p,s,u,0,t),1&p.mode&&vs(a,c,t),l=c;var y=(t=p).updateQueue;if(null===y){var v=new Set;v.add(l),t.updateQueue=v}else y.add(l);break e}if(0==(1&t)){vs(a,c,t),vl();break e}l=Error(i(426))}else if(ii&&1&u.mode){var g=gs(s);if(null!==g){0==(65536&g.flags)&&(g.flags|=256),ms(g,s,u,0,t),yi(cs(l,u));break e}}a=l=cs(l,u),4!==Lu&&(Lu=2),null===Uu?Uu=[a]:Uu.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Ri(a,ps(0,l,t));break e;case 1:u=l;var m=a.type,b=a.stateNode;if(0==(128&a.flags)&&("function"==typeof m.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Wu||!Wu.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,Ri(a,ys(a,u,t));break e}}a=a.return}while(null!==a)}_l(n)}catch(e){t=e,Au===n&&null!==n&&(Au=n=n.return);continue}break}}function yl(){var e=xu.current;return xu.current=as,null===e?as:e}function vl(){0!==Lu&&3!==Lu&&2!==Lu||(Lu=4),null===Tu||0==(268435455&Ru)&&0==(268435455&Bu)||ul(Tu,Nu)}function gl(e,t){var n=Cu;Cu|=2;var r=yl();for(Tu===e&&Nu===t||(Vu=null,hl(e,t));;)try{ml();break}catch(t){pl(e,t)}if(Si(),Cu=n,xu.current=r,null!==Au)throw Error(i(261));return Tu=null,Nu=0,Lu}function ml(){for(;null!==Au;)wl(Au)}function bl(){for(;null!==Au&&!Qe();)wl(Au)}function wl(e){var t=Ou(e.alternate,e,Du);e.memoizedProps=e.pendingProps,null===t?_l(e):Au=t,Pu.current=null}function _l(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Gs(n,t,Du)))return void(Au=n)}else{if(null!==(n=Qs(n,t)))return n.flags&=32767,void(Au=n);if(null===e)return Lu=6,void(Au=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Au=t);Au=t=e}while(null!==t);0===Lu&&(Lu=5)}function Sl(e,t,n){var r=bt,o=ju.transition;try{ju.transition=null,bt=1,function(e,t,n,r){do{El()}while(null!==Qu);if(0!=(6&Cu))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Tu&&(Au=Tu=null,Nu=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Gu||(Gu=!0,Tl(tt,(function(){return El(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=ju.transition,ju.transition=null;var s=bt;bt=1;var u=Cu;Cu|=4,Pu.current=null,function(e,t){if(eo=Vt,hr(e=dr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,u=-1,l=-1,c=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(u=s+o),d!==a||0!==r&&3!==d.nodeType||(l=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(p=d.firstChild);)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===o&&(u=s),h===a&&++f===r&&(l=s),null!==(p=d.nextSibling))break;h=(d=h).parentNode}d=p}n=-1===u||-1===l?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Vt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var y=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==y){var v=y.memoizedProps,g=y.memoizedState,m=t.stateNode,b=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:gi(t.type,v),g);m.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;default:throw Error(i(163))}}catch(e){kl(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}y=nu,nu=!1}(e,n),gu(n,e),pr(to),Vt=!!eo,to=eo=null,e.current=n,bu(n,e,o),Ye(),Cu=u,bt=s,ju.transition=a}else e.current=n;if(Gu&&(Gu=!1,Qu=e,Yu=o),0===(a=e.pendingLanes)&&(Wu=null),function(e){if(it&&"function"==typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),ol(e,Ze()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((o=t[n]).value,{componentStack:o.stack,digest:o.digest});if(Hu)throw Hu=!1,e=qu,qu=null,e;0!=(1&Yu)&&0!==e.tag&&El(),0!=(1&(a=e.pendingLanes))?e===Ju?Zu++:(Zu=0,Ju=e):Zu=0,zo()}(e,t,n,r)}finally{ju.transition=o,bt=r}return null}function El(){if(null!==Qu){var e=wt(Yu),t=ju.transition,n=bt;try{if(ju.transition=null,bt=16>e?16:e,null===Qu)var r=!1;else{if(e=Qu,Qu=null,Yu=0,0!=(6&Cu))throw Error(i(331));var o=Cu;for(Cu|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(0!=(16&Xs.flags)){var u=a.deletions;if(null!==u){for(var l=0;l<u.length;l++){var c=u[l];for(Xs=c;null!==Xs;){var f=Xs;switch(f.tag){case 0:case 11:case 15:ru(8,f,a)}var d=f.child;if(null!==d)d.return=f,Xs=d;else for(;null!==Xs;){var h=(f=Xs).sibling,p=f.return;if(au(f),f===c){Xs=null;break}if(null!==h){h.return=p,Xs=h;break}Xs=p}}}var y=a.alternate;if(null!==y){var v=y.child;if(null!==v){y.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}Xs=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(0!=(2048&(a=Xs).flags))switch(a.tag){case 0:case 11:case 15:ru(9,a,a.return)}var m=a.sibling;if(null!==m){m.return=a.return,Xs=m;break e}Xs=a.return}}var b=e.current;for(Xs=b;null!==Xs;){var w=(s=Xs).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,Xs=w;else e:for(s=b;null!==Xs;){if(0!=(2048&(u=Xs).flags))try{switch(u.tag){case 0:case 11:case 15:ou(9,u)}}catch(e){kl(u,u.return,e)}if(u===s){Xs=null;break e}var _=u.sibling;if(null!==_){_.return=u.return,Xs=_;break e}Xs=u.return}}if(Cu=o,zo(),it&&"function"==typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(e){}r=!0}return r}finally{bt=n,ju.transition=t}}return!1}function Ol(e,t,n){e=Li(e,t=ps(0,t=cs(n,t),1),1),t=tl(),null!==e&&(gt(e,1,t),ol(e,t))}function kl(e,t,n){if(3===e.tag)Ol(e,e,n);else for(;null!==t;){if(3===t.tag){Ol(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Wu||!Wu.has(r))){t=Li(t,e=ys(t,e=cs(n,e),1),1),e=tl(),null!==t&&(gt(t,1,e),ol(t,e));break}}t=t.return}}function xl(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=tl(),e.pingedLanes|=e.suspendedLanes&n,Tu===e&&(Nu&n)===n&&(4===Lu||3===Lu&&(130023424&Nu)===Nu&&500>Ze()-Ku?hl(e,0):$u|=n),ol(e,t)}function Pl(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ct,0==(130023424&(ct<<=1))&&(ct=4194304)));var n=tl();null!==(e=Ti(e,t))&&(gt(e,t,n),ol(e,n))}function jl(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Pl(e,n)}function Cl(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Pl(e,n)}function Tl(e,t){return We(e,t)}function Al(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nl(e,t,n,r){return new Al(e,t,n,r)}function Dl(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ml(e,t){var n=e.alternate;return null===n?((n=Nl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,o,a){var s=2;if(r=e,"function"==typeof e)Dl(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case E:return Il(n.children,o,a,t);case O:s=8,o|=8;break;case k:return(e=Nl(12,n,t,2|o)).elementType=k,e.lanes=a,e;case C:return(e=Nl(13,n,t,o)).elementType=C,e.lanes=a,e;case T:return(e=Nl(19,n,t,o)).elementType=T,e.lanes=a,e;case D:return Rl(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case x:s=10;break e;case P:s=9;break e;case j:s=11;break e;case A:s=14;break e;case N:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=Nl(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Il(e,t,n,r){return(e=Nl(7,e,r,t)).lanes=n,e}function Rl(e,t,n,r){return(e=Nl(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Bl(e,t,n){return(e=Nl(6,e,null,t)).lanes=n,e}function $l(e,t,n){return(t=Nl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ul(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Fl(e,t,n,r,o,i,a,s,u){return e=new Ul(e,t,n,s,u),1===t?(t=1,!0===i&&(t|=8)):t=0,i=Nl(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ni(i),e}function Kl(e){if(!e)return jo;e:{if(Ke(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Do(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Do(n))return Io(e,n,t)}return t}function zl(e,t,n,r,o,i,a,s,u){return(e=Fl(n,r,!0,e,0,i,0,s,u)).context=Kl(null),n=e.current,(i=Mi(r=tl(),o=nl(n))).callback=null!=t?t:null,Li(n,i,o),e.current.lanes=o,gt(e,o,r),ol(e,r),e}function Vl(e,t,n,r){var o=t.current,i=tl(),a=nl(o);return n=Kl(n),null===t.context?t.context=n:t.pendingContext=n,(t=Mi(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Li(o,t,a))&&(rl(e,o,a,i),Ii(e,o,a)),a}function Hl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function ql(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Wl(e,t){ql(e,t),(e=e.alternate)&&ql(e,t)}Ou=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||To.current)ws=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return ws=!1,function(e,t,n){switch(t.tag){case 3:Ts(t),pi();break;case 5:aa(t);break;case 1:Do(t.type)&&Ro(t);break;case 4:oa(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Po(mi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Po(ua,1&ua.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Bs(e,t,n):(Po(ua,1&ua.current),null!==(e=Hs(e,t,n))?e.sibling:null);Po(ua,1&ua.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return zs(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Po(ua,ua.current),r)break;return null;case 22:case 23:return t.lanes=0,ks(e,t,n)}return Hs(e,t,n)}(e,t,n);ws=0!=(131072&e.flags)}else ws=!1,ii&&0!=(1048576&t.flags)&&ei(t,Wo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vs(e,t),e=t.pendingProps;var o=No(t,Co.current);ki(t,n),o=Oa(null,t,r,e,o,n);var a=ka();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Do(r)?(a=!0,Ro(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Ni(t),o.updater=Ki,t.stateNode=o,o._reactInternals=t,qi(t,r,e,n),t=Cs(null,t,r,!0,a,n)):(t.tag=0,ii&&a&&ti(t),_s(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vs(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Dl(e)?1:0;if(null!=e){if((e=e.$$typeof)===j)return 11;if(e===A)return 14}return 2}(r),e=gi(r,e),o){case 0:t=Ps(null,t,r,e,n);break e;case 1:t=js(null,t,r,e,n);break e;case 11:t=Ss(null,t,r,e,n);break e;case 14:t=Es(null,t,r,gi(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ps(e,t,r,o=t.elementType===r?o:gi(r,o),n);case 1:return r=t.type,o=t.pendingProps,js(e,t,r,o=t.elementType===r?o:gi(r,o),n);case 3:e:{if(Ts(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,Di(e,t),Bi(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=As(e,t,r,n,o=cs(Error(i(423)),t));break e}if(r!==o){t=As(e,t,r,n,o=cs(Error(i(424)),t));break e}for(oi=lo(t.stateNode.containerInfo.firstChild),ri=t,ii=!0,ai=null,n=Ji(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(pi(),r===o){t=Hs(e,t,n);break e}_s(e,t,r,n)}t=t.child}return t;case 5:return aa(t),null===e&&ci(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==a&&no(r,a)&&(t.flags|=32),xs(e,t),_s(e,t,s,n),t.child;case 6:return null===e&&ci(t),null;case 13:return Bs(e,t,n);case 4:return oa(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Zi(t,null,r,n):_s(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ss(e,t,r,o=t.elementType===r?o:gi(r,o),n);case 7:return _s(e,t,t.pendingProps,n),t.child;case 8:case 12:return _s(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Po(mi,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===o.children&&!To.current){t=Hs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var u=a.dependencies;if(null!==u){s=a.child;for(var l=u.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Mi(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var f=(c=c.shared).pending;null===f?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Oi(a.return,n,t),u.lanes|=n;break}l=l.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),Oi(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}_s(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ki(t,n),r=r(o=xi(o)),t.flags|=1,_s(e,t,r,n),t.child;case 14:return o=gi(r=t.type,t.pendingProps),Es(e,t,r,o=gi(r.type,o),n);case 15:return Os(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:gi(r,o),Vs(e,t),t.tag=1,Do(r)?(e=!0,Ro(t)):e=!1,ki(t,n),Vi(t,r,o),qi(t,r,o,n),Cs(null,t,r,!0,e,n);case 19:return zs(e,t,n);case 22:return ks(e,t,n)}throw Error(i(156,t.tag))};var Gl="function"==typeof reportError?reportError:function(e){console.error(e)};function Ql(e){this._internalRoot=e}function Yl(e){this._internalRoot=e}function Zl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Jl(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xl(){}function ec(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"==typeof o){var s=o;o=function(){var e=Hl(a);s.call(e)}}Vl(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"==typeof r){var i=r;r=function(){var e=Hl(a);i.call(e)}}var a=zl(t,r,e,0,null,!1,0,"",Xl);return e._reactRootContainer=a,e[yo]=a.current,Kr(8===e.nodeType?e.parentNode:e),fl(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=Hl(u);s.call(e)}}var u=Fl(e,0,!1,null,0,!1,0,"",Xl);return e._reactRootContainer=u,e[yo]=u.current,Kr(8===e.nodeType?e.parentNode:e),fl((function(){Vl(t,u,n,r)})),u}(n,t,e,o,r);return Hl(a)}Yl.prototype.render=Ql.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Vl(e,t,null,null)},Yl.prototype.unmount=Ql.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;fl((function(){Vl(null,e,null,null)})),t[yo]=null}},Yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&Rt(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ft(t.pendingLanes);0!==n&&(mt(t,1|n),ol(t,Ze()),0==(6&Cu)&&(zu=Ze()+500,zo()))}break;case 13:fl((function(){var t=Ti(e,1);if(null!==t){var n=tl();rl(t,e,1,n)}})),Wl(e,1)}},St=function(e){if(13===e.tag){var t=Ti(e,134217728);null!==t&&rl(t,e,134217728,tl()),Wl(e,134217728)}},Et=function(e){if(13===e.tag){var t=nl(e),n=Ti(e,t);null!==n&&rl(n,e,t,tl()),Wl(e,t)}},Ot=function(){return bt},kt=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},Se=function(e,t,n){switch(t){case"input":if(J(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=So(r);if(!o)throw Error(i(90));W(r),J(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},je=cl,Ce=fl;var tc={usingClientEntryPoint:!1,Events:[wo,_o,So,xe,Pe,cl]},nc={findFiberByHostInstance:bo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=He(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{ot=oc.inject(rc),it=oc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Zl(t))throw Error(i(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.createRoot=function(e,t){if(!Zl(e))throw Error(i(299));var n=!1,r="",o=Gl;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Fl(e,1,!1,null,0,n,0,r,o),e[yo]=t.current,Kr(8===e.nodeType?e.parentNode:e),new Ql(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return null===(e=He(t))?null:e.stateNode},t.flushSync=function(e){return fl(e)},t.hydrate=function(e,t,n){if(!Jl(t))throw Error(i(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Zl(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=Gl;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=zl(t,null,e,1,null!=n?n:null,o,0,a,s),e[yo]=t.current,Kr(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Yl(t)},t.render=function(e,t,n){if(!Jl(t))throw Error(i(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Jl(e))throw Error(i(40));return!!e._reactRootContainer&&(fl((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[yo]=null}))})),!0)},t.unstable_batchedUpdates=cl,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Jl(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},746:(e,t,n)=>{"use strict";var r=n(563);r.createRoot,r.hydrateRoot},563:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(585)},309:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}function m(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||p}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=g.prototype;var w=b.prototype=new m;w.constructor=b,y(w,g.prototype),w.isPureReactComponent=!0;var _=Array.isArray,S=Object.prototype.hasOwnProperty,E={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function k(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)S.call(t,o)&&!O.hasOwnProperty(o)&&(i[o]=t[o]);var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){for(var l=Array(u),c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(o in u=e.defaultProps)void 0===i[o]&&(i[o]=u[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:E.current}}function x(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var P=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0}}if(u)return a=a(u=e),e=""===i?"."+j(u,0):i,_(a)?(o="",null!=e&&(o=e.replace(P,"$&/")+"/"),C(a,t,o,"",(function(e){return e}))):null!=a&&(x(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||u&&u.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),t.push(a)),1;if(u=0,i=""===i?".":i+":",_(e))for(var l=0;l<e.length;l++){var c=i+j(s=e[l],l);u+=C(s,t,o,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=h&&e[h]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),l=0;!(s=e.next()).done;)u+=C(s=s.value,t,o,c=i+j(s,l++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return u}function T(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function A(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N={current:null},D={transition:null},M={ReactCurrentDispatcher:N,ReactCurrentBatchConfig:D,ReactCurrentOwner:E};t.Children={map:T,forEach:function(e,t,n){T(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return T(e,(function(){t++})),t},toArray:function(e){return T(e,(function(e){return e}))||[]},only:function(e){if(!x(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=o,t.Profiler=a,t.PureComponent=b,t.StrictMode=i,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=y({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=E.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)S.call(t,l)&&!O.hasOwnProperty(l)&&(o[l]=void 0===t[l]&&void 0!==u?u[l]:t[l])}var l=arguments.length-2;if(1===l)o.children=r;else if(1<l){u=Array(l);for(var c=0;c<l;c++)u[c]=arguments[c+2];o.children=u}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:u,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=k,t.createFactory=function(e){var t=k.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=x,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return N.current.useCallback(e,t)},t.useContext=function(e){return N.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return N.current.useDeferredValue(e)},t.useEffect=function(e,t){return N.current.useEffect(e,t)},t.useId=function(){return N.current.useId()},t.useImperativeHandle=function(e,t,n){return N.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return N.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return N.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return N.current.useMemo(e,t)},t.useReducer=function(e,t,n){return N.current.useReducer(e,t,n)},t.useRef=function(e){return N.current.useRef(e)},t.useState=function(e){return N.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return N.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return N.current.useTransition()},t.version="18.2.0"},400:(e,t,n)=>{"use strict";e.exports=n(309)},984:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,u=e[s],l=s+1,c=e[l];if(0>i(u,n))l<o&&0>i(c,u)?(e[r]=c,e[l]=n,r=l):(e[r]=u,e[s]=n,r=s);else{if(!(l<o&&0>i(c,n)))break e;e[r]=c,e[l]=n,r=l}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,u=s.now();t.unstable_now=function(){return s.now()-u}}var l=[],c=[],f=1,d=null,h=3,p=!1,y=!1,v=!1,g="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(l,t)}t=r(c)}}function _(e){if(v=!1,w(e),!y)if(null!==r(l))y=!0,D(S);else{var t=r(c);null!==t&&M(_,t.startTime-e)}}function S(e,n){y=!1,v&&(v=!1,m(x),x=-1),p=!0;var i=h;try{for(w(n),d=r(l);null!==d&&(!(d.expirationTime>n)||e&&!C());){var a=d.callback;if("function"==typeof a){d.callback=null,h=d.priorityLevel;var s=a(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?d.callback=s:d===r(l)&&o(l),w(n)}else o(l);d=r(l)}if(null!==d)var u=!0;else{var f=r(c);null!==f&&M(_,f.startTime-n),u=!1}return u}finally{d=null,h=i,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var E,O=!1,k=null,x=-1,P=5,j=-1;function C(){return!(t.unstable_now()-j<P)}function T(){if(null!==k){var e=t.unstable_now();j=e;var n=!0;try{n=k(!0,e)}finally{n?E():(O=!1,k=null)}}else O=!1}if("function"==typeof b)E=function(){b(T)};else if("undefined"!=typeof MessageChannel){var A=new MessageChannel,N=A.port2;A.port1.onmessage=T,E=function(){N.postMessage(null)}}else E=function(){g(T,0)};function D(e){k=e,O||(O=!0,E())}function M(e,n){x=g((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){y||p||(y=!0,D(S))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch(i="object"==typeof i&&null!==i&&"number"==typeof(i=i.delay)&&0<i?a+i:a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(c,e),null===r(l)&&e===r(c)&&(v?(m(x),x=-1):v=!0,M(_,i-a))):(e.sortIndex=s,n(l,e),y||p||(y=!0,D(S))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},887:(e,t,n)=>{"use strict";e.exports=n(984)},673:(e,t,n)=>{"use strict";var r=n(400),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,a=r.useEffect,s=r.useLayoutEffect,u=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,c=r[1];return s((function(){o.value=n,o.getSnapshot=t,l(o)&&c({inst:o})}),[e,n,t]),a((function(){return l(o)&&c({inst:o}),e((function(){l(o)&&c({inst:o})}))}),[e]),u(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:c},885:(e,t,n)=>{"use strict";e.exports=n(673)},840:(e,t,n)=>{function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}(()=>{var e={151:()=>{(()=>{var e={758:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{dispatchActionableNotificationShown:()=>h,dispatchConnectivityChanged:()=>r,dispatchNotificationShown:()=>d,dispatchPrecacheStaticDependencies:()=>s,subscribeActionableNotificationShown:()=>y,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>o,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>v});const n="openmrs:connectivity-changed";function r(e){window.dispatchEvent(new CustomEvent(n,{detail:{online:e}}))}function o(e){const t=t=>e(t.detail);return window.addEventListener(n,t),()=>window.removeEventListener(n,t)}function i(e){return e({online:navigator.onLine}),o(e)}const a="openmrs:precache-static-dependencies";function s(e={}){window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const l="openmrs:notification-shown",c="openmrs:actionable-notification-shown",f="openmrs:toast-shown";function d(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function y(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function v(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{createErrorHandler:()=>o,reportError:()=>t});var e=n(758);function t(e){const t=i(e);setTimeout((()=>{throw t}))}function o(){const e=Error();return n=>{i(n).stack+=`\nAsync stacktrace:\n${e.stack}`,t(n)}}function i(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(t){return console.error("Unexpected error: ",t),(0,e.dispatchNotificationShown)({description:null!=t?t:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(t){var n;console.error("Unhandled rejection: ",t.reason),(0,e.dispatchNotificationShown)({description:null!==(n=t.reason)&&void 0!==n?n:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}})()})()},403:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>l});const n=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},r=e=>e?n(e):n,o={};function i(e,t){const n=o[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=r()((()=>t));return o[e]={value:n,active:!0},n}}function a(e,t){const n=o[e];if(!n){const n=r()((()=>null!=t?t:{}));return o[e]={value:n,active:!1},n}return n.value}function s(e){return i("app",e)}function u(){return a("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";r.r(a),r.d(a,{OpenmrsFetchError:()=>cr,VisitMode:()=>iu,VisitStatus:()=>au,backendDependencies:()=>fu,clearCurrentUser:()=>br,defaultVisitCustomRepresentation:()=>eu,fetchCurrentPatient:()=>Is,fhirBaseUrl:()=>ir,getCurrentUser:()=>vr,getLocations:()=>cu,getLoggedInUser:()=>_r,getSessionLocation:()=>Sr,getSessionStore:()=>gr,getStartedVisit:()=>ou,getVisitTypes:()=>uu,getVisitsForPatient:()=>tu,makeUrl:()=>sr,openmrsFetch:()=>ur,openmrsObservableFetch:()=>lr,refetchCurrentUser:()=>mr,restBaseUrl:()=>or,saveVisit:()=>nu,sessionEndpoint:()=>ar,setSessionLocation:()=>Er,setupApiModule:()=>kr,toLocationObject:()=>lu,toVisitTypeObject:()=>su,updateVisit:()=>ru,userHasAccess:()=>wr});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function s(e){return"function"==typeof e}var u=!1,l={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,u=e},get useDeprecatedSynchronousErrorHandling(){return u}};function c(e){setTimeout((function(){throw e}),0)}var f={closed:!0,next:function(e){},error:function(e){if(l.useDeprecatedSynchronousErrorHandling)throw e;c(e)},complete:function(){}},d=Array.isArray||function(e){return e&&"number"==typeof e.length};function h(e){return null!==e&&"object"==typeof e}var p=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),y=p,v=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,r=n._parentOrParents,o=n._ctorUnsubscribe,i=n._unsubscribe,a=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var u=0;u<r.length;++u)r[u].remove(this);if(s(i)){o&&(this._unsubscribe=void 0);try{i.call(this)}catch(e){t=e instanceof y?g(e.errors):[e]}}if(d(a)){u=-1;for(var l=a.length;++u<l;){var c=a[u];if(h(c))try{c.unsubscribe()}catch(e){t=t||[],e instanceof y?t=t.concat(g(e.errors)):t.push(e)}}}if(t)throw new y(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function g(e){return e.reduce((function(e,t){return e.concat(t instanceof y?t.errors:t)}),[])}var m="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),b=function(e){function n(t,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=f;break;case 1:if(!t){i.destination=f;break}if("object"==typeof t){t instanceof n?(i.syncErrorThrowable=t.syncErrorThrowable,i.destination=t,t.add(i)):(i.syncErrorThrowable=!0,i.destination=new w(i,t));break}default:i.syncErrorThrowable=!0,i.destination=new w(i,t,r,o)}return i}return t(n,e),n.prototype[m]=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,e.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}(v),w=function(e){function n(t,n,r,o){var i,a=e.call(this)||this;a._parentSubscriber=t;var u=a;return s(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==f&&(s((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}return t(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;l.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=l.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):c(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;c(e)}}},n.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)};l.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),l.useDeprecatedSynchronousErrorHandling)throw e;c(e)}},n.prototype.__tryOrSetError=function(e,t,n){if(!l.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return l.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(c(t),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(b),S="function"==typeof Symbol&&Symbol.observable||"@@observable";function E(e){return e}var O=function(){function e(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 r=this.operator,o=function(e,t,n){if(e){if(e instanceof b)return e;if(e[m])return e[m]()}return e||t||n?new b(e,t,n):new b(f)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||l.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),l.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){l.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof b?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=k(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[S]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?E:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=k(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}();function k(e){if(e||(e=l.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var P="object"==typeof self&&self&&self.Object===Object&&self;const j=(x||P||Function("return this")()).Symbol;var C=Object.prototype,T=C.hasOwnProperty,A=C.toString,N=j?j.toStringTag:void 0,D=Object.prototype.toString,M=j?j.toStringTag:void 0;const L=(I=Object.getPrototypeOf,R=Object,function(e){return I(R(e))});var I,R,B=Function.prototype,$=Object.prototype,U=B.toString,F=$.hasOwnProperty,K=U.call(Object);const z=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":M&&M in Object(e)?function(e){var t=T.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=A.call(e);return r&&(t?e[N]=n:delete e[N]),o}(e):function(e){return D.call(e)}(e)}(e))return!1;var t=L(e);if(null===t)return!0;var n=F.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&U.call(n)==K};function V(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function H(e){return function t(n){return 0===arguments.length||V(n)?t:e.apply(this,arguments)}}function q(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return V(n)?t:H((function(t){return e(n,t)}));default:return V(n)&&V(r)?t:V(n)?H((function(t){return e(t,r)})):V(r)?H((function(t){return e(n,t)})):e(n,r)}}}function W(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function G(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function Q(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const Y="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var Z=Object.prototype.toString,J=function(){return"[object Arguments]"===Z.call(arguments)?function(e){return"[object Arguments]"===Z.call(e)}:function(e){return Q("callee",e)}}();const X=J;var ee=!{toString:null}.propertyIsEnumerable("toString"),te=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ne=function(){return arguments.propertyIsEnumerable("length")}(),re=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const oe="function"!=typeof Object.keys||ne?H((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ne&&X(e);for(t in e)!Q(t,e)||o&&"length"===t||(r[r.length]=t);if(ee)for(n=te.length-1;n>=0;)Q(t=te[n],e)&&!re(r,t)&&(r[r.length]=t),n-=1;return r})):H((function(e){return Object(e)!==e?[]:Object.keys(e)})),ie=H((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function ae(e,t,n,r){var o=W(e);function i(e,t){return se(e,t,n.slice(),r.slice())}return!G((function(e,t){return!G(i,t,e)}),W(t),o)}function se(e,t,n,r){if(Y(e,t))return!0;var o=ie(e);if(o!==ie(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!Y(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!Y(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&ae(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&ae(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=oe(e);if(a.length!==oe(t).length)return!1;var s=n.concat([e]),u=r.concat([t]);for(i=a.length-1;i>=0;){var l=a[i];if(!Q(l,t)||!se(t[l],e[l],s,u))return!1;i-=1}return!0}var ue=q((function(e,t){return se(e,t,[],[])}));const le=ue;function ce(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return V(n)?t:q((function(t,r){return e(n,t,r)}));case 2:return V(n)&&V(r)?t:V(n)?q((function(t,n){return e(t,r,n)})):V(r)?q((function(t,r){return e(n,t,r)})):H((function(t){return e(n,r,t)}));default:return V(n)&&V(r)&&V(o)?t:V(n)&&V(r)?q((function(t,n){return e(t,n,o)})):V(n)&&V(o)?q((function(t,n){return e(t,r,n)})):V(r)&&V(o)?q((function(t,r){return e(n,t,r)})):V(n)?H((function(t){return e(t,r,o)})):V(r)?H((function(t){return e(n,t,o)})):V(o)?H((function(t){return e(n,r,t)})):e(n,r,o)}}}function fe(e){return"[object Object]"===Object.prototype.toString.call(e)}var de=ce((function(e,t,n){var r,o={};for(r in t)Q(r,t)&&(o[r]=Q(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)Q(r,n)&&!Q(r,o)&&(o[r]=n[r]);return o}));const he=de;var pe=ce((function e(t,n,r){return he((function(n,r,o){return fe(r)&&fe(o)?e(t,r,o):t(n,r,o)}),n,r)}));const ye=pe,ve=q((function(e,t){return ye((function(e,t,n){return n}),e,t)})),ge=q((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 me(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?me(e[s],t,n,!0):e[s];return o};switch(ie(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const be=H((function(e){return null!=e&&"function"==typeof e.clone?e.clone():me(e,[],[],!0)})),we=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var _e=H((function(e){return!!we(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));const Se=_e;var Ee=function(){function e(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}(),Oe=q((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,l){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,l,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const ke=Oe;function xe(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function Pe(e,t,n,r){return e["@@transducer/result"](n[r](ke(e["@@transducer/step"],e),t))}var je="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const Ce=ce((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Ee(e)}(e)),Se(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 Pe(e,t,n,"fantasy-land/reduce");if(null!=n[je])return xe(e,t,n[je]());if("function"==typeof n.next)return xe(e,t,n);if("function"==typeof n.reduce)return Pe(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));var Te;function Ae(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(Te||(Te={}));const Ne=Ae((e=>Array.isArray(e)),"must be an array"),De=Ae((e=>"boolean"==typeof e),"must be a boolean"),Me=Ae((e=>"number"==typeof e),"must be a number"),Le=Ae((e=>"string"==typeof e),"must be a string"),Ie=Ae((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),Re=Ae((e=>/^[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");var Be=r(403);const $e=(0,Be.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),Ue=(0,Be.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Ue.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const Fe=(0,Be.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function Ke(e){return(0,Be.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}const ze=(0,Be.createGlobalStore)("config-implementer-tools",{config:{}});function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(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){Ve(e,t,n[t])}))}return e}function qe(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function We(e,t){for(let n of Object.keys(e.schemas)){const r=rt(n,e,t);Ke(n).setState({loaded:!0,config:r})}}function Ge(e,t){const n=function(e,t){const n=it(tt(e,t)),r=Object.keys(n).reduce(((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}),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))et(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>He({},e,r[t])),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((([e,t])=>[e,{loaded:!0,config:t}]))),o=(0,Be.getGlobalStore)("config-extension-slots",{slots:{}}),i=o.getState(),a={slots:He({},i.slots,r)};le(i,a)||o.setState(a)}function Qe(e,t){const n=function(e,t){let n=Je(be(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=it([n,Xe(e,t)]);return n}(e,t);ze.setState({config:n})}function Ye(e,t,n){const r={};for(let o of t.mountedExtensions){const t=Ze(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]=qe(He({},r[o.slotName]),{[o.extensionId]:{config:t,loaded:!0}})}(0,Be.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})}function Ze(e,t,n,r,o,i){var a,s,u;const l=function(e){const[t]=e.split("#");return t}(r),c=o.schemas[l],f=c?l:t,d=tt(o,i),h=ot(e,d);var p;const y=null!==(p=null==h||null===(a=h.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==p?p:{},v=it([ot(f,d),y]),g=null!=c?c:o.schemas[t];at(g,v,f);const m=ft(g,v);return ut(g,m,f),delete m.extensionSlots,m}function Je(e){return e.hasOwnProperty("_default")?qe(He({},e),{_value:e._default,_source:"default"}):ht(e)?Object.keys(e).reduce(((t,n)=>(t[n]=Je(e[n]),t)),{}):{}}function Xe(e,t){return ht(e)?Object.keys(e).reduce(((n,r)=>(n[r]=Xe(e[r],t),n)),{}):{_value:e,_source:t}}function et(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"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((e=>"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((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(ht(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function tt(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function nt(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter((e=>!e.startsWith("_")))){const i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!ht(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||nt(e,a,i);const s=a._elements;if(dt(s)&&nt(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const u=a._type;u&&!Object.values(Te).includes(u)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(Te).join(", ")}. Received '${u}'`),Object.keys(a).every((e=>["_description","_validators","_elements","_type"].includes(e)))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&u&&![Te.Array,Te.Object].includes(u)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(u)}`)}}function rt(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=ot(e,tt(t,n));at(r,o,e);const i=ft(r,o);return ut(r,i,e),delete i.extensionSlots,i}function ot(e,t){return it(t.map((({[e]:t})=>t)).filter((e=>!!e)))}function it(e){return Ce(ve)({},e)}function at(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?st(a,o,i):"extensionSlots"===r&&""!==n||console.error(`Unknown config key '${i}' provided. Ignoring.`)}}function st(e,t,n){lt(n,e._type,t),ht(t)?e._type===Te.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];at(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||at(e,t,n):e._type===Te.Array&&function(e,t,n){if(dt(e._elements))for(let r=0;r<t.length;r++)st(e._elements,t[r],`${n}[${r}]`);for(let o=0;o<t.length;o++){var r;lt(`${n}[${o}]`,null===(r=e._elements)||void 0===r?void 0:r._type,t[o])}}(e,t,n)}function ut(e,t,n=""){if(e)if(t!==e._default&&ct(n,e._validators,t),ht(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e._type===Te.Object&&e._elements?ut(e._elements,o,i):ut(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)ut(e._elements,t[r],`${n}[${r}]`)}function lt(e,t,n){t&&ct(e,[{Array:Ne,Boolean:De,ConceptUuid:Re,Number:Me,Object:Ie,String:Le,UUID:Re,PersonAttributeTypeUuid:Re,PatientIdentifierTypeUuid:Re}[t]],n)}function ct(e,t,n){if(t)try{for(let r of t){const t=r(n);"string"==typeof t&&("object"==typeof n?console.error(`Invalid configuration for ${e}: ${t}`):console.error(`Invalid configuration value ${n} for ${e}: ${t}`))}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}}We($e.getState(),Ue.getState()),$e.subscribe((e=>We(e,Ue.getState()))),Ue.subscribe((e=>We($e.getState(),e))),Qe($e.getState(),Ue.getState()),$e.subscribe((e=>Qe(e,Ue.getState()))),Ue.subscribe((e=>Qe($e.getState(),e))),Ge($e.getState(),Ue.getState()),$e.subscribe((e=>Ge(e,Ue.getState()))),Ue.subscribe((e=>Ge($e.getState(),e))),Ye($e.getState(),Fe.getState(),Ue.getState()),$e.subscribe((e=>{Ye(e,Fe.getState(),Ue.getState())})),Fe.subscribe((e=>{Ye($e.getState(),e,Ue.getState())})),Ue.subscribe((e=>{Ye($e.getState(),Fe.getState(),e)}));const ft=(e,t)=>{const n=be(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&dt(e))if(o._type===Te.Array&&Array.isArray(r)){const o=r.map((t=>ft(e,t)));n[t]=o}else if(o._type===Te.Object)for(let t of Object.keys(r))r[t]=ft(e,r[t])}else if(ht(o)){const e=n.hasOwnProperty(t)?r:{};ht(e)&&(n[t]=ft(o,e))}}return n};function dt(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function ht(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}const pt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:Te.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:Te.Object,_default:{}}};var yt=Object.freeze({__proto__:null,get start(){return Yn},get ensureJQuerySupport(){return kn},get setBootstrapMaxTime(){return an},get setMountMaxTime(){return sn},get setUnmountMaxTime(){return un},get setUnloadMaxTime(){return ln},get registerApplication(){return In},get unregisterApplication(){return Bn},get getMountedApps(){return Dn},get getAppStatus(){return Ln},get unloadApplication(){return $n},get checkActivityFunctions(){return Rn},get getAppNames(){return Mn},get pathToActiveWhen(){return Kn},get navigateToUrl(){return gn},get triggerAppChange(){return qn},get addErrorHandler(){return St},get removeErrorHandler(){return Et},get mountRootParcel(){return en},get NOT_LOADED(){return xt},get LOADING_SOURCE_CODE(){return Pt},get NOT_BOOTSTRAPPED(){return jt},get BOOTSTRAPPING(){return Ct},get NOT_MOUNTED(){return Tt},get MOUNTING(){return At},get UPDATING(){return Dt},get LOAD_ERROR(){return Lt},get MOUNTED(){return Nt},get UNMOUNTING(){return Mt},get SKIP_BECAUSE_BROKEN(){return It}});function vt(e){return(vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).CustomEvent,bt=function(){try{var e=new mt("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?mt:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},wt=[];function _t(e,t,n){var r=kt(e,t,n);wt.length?wt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function St(e){if("function"!=typeof e)throw Error(Ot(28,!1));wt.push(e)}function Et(e){if("function"!=typeof e)throw Error(Ot(29,!1));var t=!1;return wt=wt.filter((function(n){var r=n===e;return t=t||r,!r})),t}function Ot(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function kt(e,t,n){var r,o="".concat(Ft(t)," '").concat($t(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(Ot(30,!1,t.status,$t(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=$t(t),t.status=n,r}var xt="NOT_LOADED",Pt="LOADING_SOURCE_CODE",jt="NOT_BOOTSTRAPPED",Ct="BOOTSTRAPPING",Tt="NOT_MOUNTED",At="MOUNTING",Nt="MOUNTED",Dt="UPDATING",Mt="UNMOUNTING",Lt="LOAD_ERROR",It="SKIP_BECAUSE_BROKEN";function Rt(e){return e.status===Nt}function Bt(e){try{return e.activeWhen(window.location)}catch(t){return _t(t,e,It),!1}}function $t(e){return e.name}function Ut(e){return Boolean(e.unmountThisParcel)}function Ft(e){return Ut(e)?"parcel":"application"}function Kt(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function zt(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function Vt(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!zt(t,(function(e){return"function"!=typeof e}))));var t}function Ht(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=Ft(e),o=$t(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return qt(n)?n:Promise.reject(Ot(15,!1,r,o,t,a))}))}),Promise.resolve())}}function qt(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function Wt(e,t){return Promise.resolve().then((function(){return e.status!==jt?e:(e.status=Ct,e.bootstrap?cn(e,"bootstrap").then(n).catch((function(n){if(t)throw kt(n,e,It);return _t(n,e,It),e})):Promise.resolve().then(n))}));function n(){return e.status=Tt,e}}function Gt(e,t){return Promise.resolve().then((function(){if(e.status!==Nt)return e;e.status=Mt;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw kt(r,e,It);_t(r,e,It)}))})).then((function(){return e}));function r(){return cn(e,"unmount").then((function(){e.status=Tt})).catch((function(n){if(t)throw kt(n,e,It);_t(n,e,It)}))}}))}var Qt=!1,Yt=!1;function Zt(e,t){return Promise.resolve().then((function(){return e.status!==Tt?e:(Qt||(window.dispatchEvent(new bt("single-spa:before-first-mount")),Qt=!0),cn(e,"mount").then((function(){return e.status=Nt,Yt||(window.dispatchEvent(new bt("single-spa:first-mount")),Yt=!0),e})).catch((function(n){return e.status=Nt,Gt(e,!0).then(r,r);function r(){if(t)throw kt(n,e,It);return _t(n,e,It),e}})))}))}var Jt=0,Xt={parcels:{}};function en(){return tn.apply(Xt,arguments)}function tn(e,t){var n=this;if(!e||"object"!==vt(e)&&"function"!=typeof e)throw Error(Ot(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(Ot(3,!1,vt(e.name)));if("object"!==vt(t))throw Error(Ot(4,!1,name,vt(t)));if(!t.domElement)throw Error(Ot(5,!1,name));var r,o=Jt++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?Pt:jt,customProps:t,parentName:$t(n),unmountThisParcel:function(){return d.then((function(){if(s.status!==Nt)throw Error(Ot(6,!1,name,s.status));return Gt(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=It,c(e),e}))}};n.parcels[o]=s;var u=a();if(!u||"function"!=typeof u.then)throw Error(Ot(7,!1));var l,c,f=(u=u.then((function(e){if(!e)throw Error(Ot(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!Vt(e.bootstrap))throw Error(Ot(9,!1,t));if(!Vt(e.mount))throw Error(Ot(10,!1,t));if(!Vt(e.unmount))throw Error(Ot(11,!1,t));if(e.update&&!Vt(e.update))throw Error(Ot(12,!1,t));var n=Ht(e,"bootstrap"),i=Ht(e,"mount"),a=Ht(e,"unmount");s.status=jt,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=fn(e.timeouts),e.update&&(s.update=Ht(e,"update"),r.update=function(e){return s.customProps=e,nn(function(e){return Promise.resolve().then((function(){if(e.status!==Nt)throw Error(Ot(32,!1,$t(e)));return e.status=Dt,cn(e,"update").then((function(){return e.status=Nt,e})).catch((function(t){throw kt(t,e,It)}))}))}(s))})}))).then((function(){return Wt(s,!0)})),d=f.then((function(){return Zt(s,!0)})),h=new Promise((function(e,t){l=e,c=t}));return r={mount:function(){return nn(Promise.resolve().then((function(){if(s.status!==Tt)throw Error(Ot(13,!1,name,s.status));return n.parcels[o]=s,Zt(s)})))},unmount:function(){return nn(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:nn(u),bootstrapPromise:nn(f),mountPromise:nn(d),unmountPromise:nn(h)}}function nn(e){return e.then((function(){return null}))}function rn(e){var t=$t(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==vt(n)||null===n||Array.isArray(n))&&(n={},console.warn(Ot(40,!1),t,n));var r=Kt({},n,{name:t,mountParcel:tn.bind(e),singleSpa:yt});return Ut(e)&&(r.unmountSelf=e.unmountThisParcel),r}var on={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function an(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(16,!1));on.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function sn(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(17,!1));on.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function un(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(18,!1));on.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ln(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(19,!1));on.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function cn(e,t){var n=e.timeouts[t],r=n.warningMillis,o=Ft(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](rn(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return c(1)}),r),setTimeout((function(){return c(!0)}),n.millis);var l=Ot(31,!1,t,o,$t(e),n.millis);function c(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(l)):console.error(l);else if(!u){var t=e,o=t*r;console.warn(l),o+r<n.millis&&setTimeout((function(){return c(t+1)}),r)}}}))}function fn(e){var t={};for(var n in on)t[n]=Kt({},on[n],e&&e[n]||{});return t}function dn(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==xt&&e.status!==Lt?e:(e.status=Pt,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(rn(e));if(!qt(r))throw n=!0,Error(Ot(33,!1,$t(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==vt(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!Vt(t.bootstrap)&&(r=35),Vt(t.mount)||(r=36),Vt(t.unmount)||(r=37);var o=Ft(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(Ot(r,!1,o,$t(e),i),t),_t(void 0,e,It),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=Kt({},e.devtools.overlays,t.devtools.overlays)),e.status=jt,e.bootstrap=Ht(t,"bootstrap"),e.mount=Ht(t,"mount"),e.unmount=Ht(t,"unmount"),e.unload=Ht(t,"unload"),e.timeouts=fn(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=It:(r=Lt,e.loadErrorTime=(new Date).getTime()),_t(t,e,r),e})));var t,n}))}var hn,pn="undefined"!=typeof window,yn={hashchange:[],popstate:[]},vn=["hashchange","popstate"];function gn(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(Ot(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=En(window.location.href),r=En(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function mn(e){var t=this;if(e){var n=e[0].type;vn.indexOf(n)>=0&&yn[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function bn(){Wn([],arguments)}function wn(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return hn&&n===o||(Zn()?window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)):Wn([])),r}}if(pn){window.addEventListener("hashchange",bn),window.addEventListener("popstate",bn);var _n=window.addEventListener,Sn=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&vn.indexOf(e)>=0)||zt(yn[e],(function(e){return e===t})))return _n.apply(this,arguments);yn[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&vn.indexOf(e)>=0))return Sn.apply(this,arguments);yn[e]=yn[e].filter((function(e){return e!==t}))},window.history.pushState=wn(window.history.pushState,"pushState"),window.history.replaceState=wn(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(Ot(41,!1)):window.singleSpaNavigate=gn}function En(e){var t=document.createElement("a");return t.href=e,t}var On=!1;function kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!On){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return xn.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return xn.call(this,n,window.removeEventListener,e,t,arguments)},On=!0}}function xn(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){vn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var Pn={};function jn(e){return Promise.resolve().then((function(){var t=Pn[$t(e)];if(!t)return e;if(e.status===xt)return Cn(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==Tt&&e.status!==Lt)return e;var n=e.status===Lt?Promise.resolve():cn(e,"unload");return e.status="UNLOADING",n.then((function(){return Cn(e,t),e})).catch((function(n){return function(e,t,n){delete Pn[$t(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,_t(n,e,It),t.reject(n)}(e,t,n),e}))}))}function Cn(e,t){delete Pn[$t(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=xt,t.resolve()}function Tn(e,t,n,r){Pn[$t(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Pn[$t(e)],"promise",{get:t})}function An(e){return Pn[e]}var Nn=[];function Dn(){return Nn.filter(Rt).map($t)}function Mn(){return Nn.map($t)}function Ln(e){var t=zt(Nn,(function(t){return $t(t)===e}));return t?t.status:null}function In(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===vt(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(Ot(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(Ot(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(Ot(20,!1));if("object"!==vt(e.app)&&"function"!=typeof e.app)throw Error(Ot(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(Ot(24,!1));if(!Fn(e.customProps))throw Error(Ot(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(Ot(20,!1));if(!t)throw Error(Ot(23,!1));if("function"!=typeof n)throw Error(Ot(24,!1));if(!Fn(r))throw Error(Ot(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Kn(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(-1!==Mn().indexOf(o.name))throw Error(Ot(21,!1,o.name));Nn.push(Kt({loadErrorTime:null,status:xt,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),pn&&(kn(),Wn())}function Rn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Nn.filter((function(t){return t.activeWhen(e)})).map($t)}function Bn(e){if(0===Nn.filter((function(t){return $t(t)===e})).length)throw Error(Ot(25,!1,e));return $n(e).then((function(){var t=Nn.map($t).indexOf(e);Nn.splice(t,1)}))}function $n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(Ot(26,!1));var n=zt(Nn,(function(t){return $t(t)===e}));if(!n)throw Error(Ot(27,!1,e));var r,o=An($t(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Tn(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,Un(n,o.resolve,o.reject)):r=new Promise((function(e,t){Tn(n,(function(){return r}),e,t),Un(n,e,t)})),r}function Un(e,t,n){Gt(e).then(jn).then((function(){t(),setTimeout((function(){Wn()}))})).catch(n)}function Fn(e){return!e||"function"==typeof e||"object"===vt(e)&&null!==e&&!Array.isArray(e)}function Kn(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var zn=!1,Vn=[],Hn=pn&&window.location.href;function qn(){return Wn()}function Wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(zn)return new Promise((function(e,n){Vn.push({resolve:e,reject:n,eventArguments:t})}));var n,r=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Nn.forEach((function(i){var a=i.status!==It&&Bt(i);switch(i.status){case Lt:a&&o-i.loadErrorTime>=200&&n.push(i);break;case xt:case Pt:a&&n.push(i);break;case jt:case Tt:!a&&An($t(i))?e.push(i):a&&r.push(i);break;case Nt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),o=r.appsToUnload,i=r.appsToUnmount,a=r.appsToLoad,s=r.appsToMount,u=!1,l=Hn,c=Hn=window.location.href;return Zn()?(zn=!0,n=o.concat(a,i,s),Promise.resolve().then((function(){if(window.dispatchEvent(new bt(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",p(!0))),window.dispatchEvent(new bt("single-spa:before-routing-event",p(!0,{cancelNavigation:f}))),u)return window.dispatchEvent(new bt("single-spa:before-mount-routing-event",p(!0))),d(),void gn(l);var t=o.map(jn),r=i.map(Gt).map((function(e){return e.then(jn)})).concat(t),c=Promise.all(r);c.then((function(){window.dispatchEvent(new bt("single-spa:before-mount-routing-event",p(!0)))}));var y=a.map((function(e){return dn(e).then((function(e){return Gn(e,c)}))})),v=s.filter((function(e){return a.indexOf(e)<0})).map((function(e){return Gn(e,c)}));return c.catch((function(e){throw h(),e})).then((function(){return h(),Promise.all(y.concat(v)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(d)}))}))):(n=a,Promise.resolve().then((function(){var e=a.map(dn);return Promise.all(e).then(h).then((function(){return[]})).catch((function(e){throw h(),e}))})));function f(){u=!0}function d(){var t=Dn();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new bt(r,p())),window.dispatchEvent(new bt("single-spa:routing-event",p()))}catch(e){setTimeout((function(){throw e}))}if(zn=!1,Vn.length>0){var o=Vn;Vn=[],Wn(o)}return t}function h(){e.forEach((function(e){mn(e.eventArguments)})),mn(t)}function p(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],f=arguments.length>1?arguments[1]:void 0,d={},h=(gt(e={},Nt,[]),gt(e,Tt,[]),gt(e,xt,[]),gt(e,It,[]),e);r?(a.concat(s).forEach((function(e,t){y(e,Nt)})),o.forEach((function(e){y(e,xt)})),i.forEach((function(e){y(e,Tt)}))):n.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:d,appsByNewStatus:h,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:c,navigationIsCanceled:u}};return f&&Kt(p.detail,f),p;function y(e,t){var n=$t(e);t=t||Ln(n),d[n]=t,(h[t]=h[t]||[]).push(n)}}}function Gn(e,t){return Bt(e)?Wt(e).then((function(e){return t.then((function(){return Bt(e)?Zt(e):e}))})):t.then((function(){return e}))}var Qn=!1;function Yn(e){var t;Qn=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,hn=t),pn&&Wn()}function Zn(){return Qn}pn&&setTimeout((function(){Qn||console.warn(Ot(1,!1))}),5e3);var Jn={getRawAppData:function(){return[].concat(Nn)},reroute:Wn,NOT_LOADED:xt,toLoadPromise:dn,toBootstrapPromise:Wt,unregisterApplication:Bn};function Xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pn&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Jn);const er=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return Ae((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;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((e=>"${"+e+"}")).join(", "))},tr={inRange:(e,t)=>Ae((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),isUrl:er([]),isUrlWithTemplateParameters:er,oneOf:e=>Ae((t=>e.includes(t)),`Must be one of the following: '${e.join("', '")}'.`)};function nr(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const or="/ws/rest/v1/",ir="/ws/fhir2/R4",ar=`${or}session`;function sr(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function ur(e,t={}){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.");let n=sr(e);if(t.headers||(t.headers={}),z(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(or)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(ir)){const e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}const r=Error();return window.fetch(n,t).then((o=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){nr(i,r,o,a,s,"next",e)}function s(e){nr(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function*(e){const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.clone().text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=yield new Promise((e=>{const t=Ke("@openmrs/esm-api");function n(t){if(t.loaded&&t.config){const n=ge(["Display conditions","Translation overrides"],t.config);e(n),r&&r()}}n(t.getState());const r=t.subscribe(n)}));return n===sr(ar)&&403===t.status||e.enabled&&e.errors.includes(t.status)?(function({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=function(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return function(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xn(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")}(e,t);r.startsWith(n)?gn(r):window.location.assign(r)}({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.clone().text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new cr(n,t,o,r)}),(e=>{throw new cr(n,t,null,r)}))}})),function(e){return o.apply(this,arguments)}));var o}function lr(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new O((r=>{let o=!1;return ur(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}let cr=class extends Error{constructor(e,t,n,r){super(),rr(this,"response",void 0),rr(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}};var fr=r(151);const dr=function(e){return void 0===e};function hr(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}const pr=(0,Be.createGlobalStore)("session",{loaded:!1,session:null});let yr=0;function vr(e={includeAuthStatus:!0}){return(yr<Date.now()-6e4||!pr.getState().loaded)&&mr(),new O((t=>{const n=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(pr.getState()),pr.subscribe(n)}))}function gr(){return(yr<Date.now()-6e4||!pr.getState().loaded)&&mr(),pr}function mr(){return new Promise(((e,t)=>{yr=Date.now(),ur(ar).then((n=>{if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();!function(e){var t,n,r;const o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale;o!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",o)}(n.data),e(n.data),pr.setState({loaded:!0,session:n.data})})).catch((e=>((0,fr.reportError)(`Failed to fetch new session information: ${e}`),t(e),{sessionId:"",authenticated:!1})))}))}function br(){pr.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function wr(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!dr(t.privileges.find((t=>e===t.display))):Array.isArray(e)?e.every((e=>!dr(t.privileges.find((t=>e===t.display))))):(dr(e)||console.error(`Could not understand privileges "${e}"`),!0)}(e,t)||function(e){return!dr(e.roles.find((e=>"System Developer"===e.display)))}(t)}function _r(){let e,t;return new Promise(((n,r)=>{const o=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(pr.getState()),e||(t=pr.subscribe(o))}))}function Sr(){return new Promise(((e,t)=>{vr().subscribe((t=>{e(t.sessionLocation)}),t).unsubscribe()}))}function Er(e,t){return Or.apply(this,arguments)}function Or(){return Or=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hr(i,r,o,a,s,"next",e)}function s(e){hr(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function*(e,t){yield ur(ar,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),yield mr()})),Or.apply(this,arguments)}function kr(){!function(e,t){nt(e,t);const n=ve(t,pt),r=$e.getState();$e.setState({schemas:qe(He({},r.schemas),{[e]:n})})}("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Te.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Te.String,_default:"${openmrsSpaBase}/login",_validators:[tr.isUrl]},errors:{_type:Te.Array,_default:[401],_elements:{_type:Te.Number,_validators:[tr.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Te.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."}}}),mr()}try{self["workbox:window:6.5.3"]&&_()}catch(vt){}function xr(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function Pr(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}try{self["workbox:core:6.5.3"]&&_()}catch(vt){}var jr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function Cr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var Tr=function(e,t){this.type=e,Object.assign(this,t)};function Ar(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Nr(){}var Dr={type:"SKIP_WAITING"};function Mr(e,t){if(!t)return e&&e.then?e.then(Nr):Promise.resolve()}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new jr,r.en=new jr,r.on=new jr,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!Cr(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 Tr(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Tr("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 Tr("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 Ar(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Tr("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return Mr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),Ar(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&Cr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Tr("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?Mr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return Ar(this.getSW(),(function(t){return xr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&xr(this.fn.waiting,Dr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&Cr(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return Ar(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const Lr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Ir=Object.keys,Rr=Array.isArray;function Br(e,t){return"object"!=typeof t||Ir(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||Lr.Promise||(Lr.Promise=Promise);const $r=Object.getPrototypeOf,Ur={}.hasOwnProperty;function Fr(e,t){return Ur.call(e,t)}function Kr(e,t){"function"==typeof t&&(t=t($r(e))),("undefined"==typeof Reflect?Ir:Reflect.ownKeys)(t).forEach((n=>{Vr(e,n,t[n])}))}const zr=Object.defineProperty;function Vr(e,t,n,r){zr(e,t,Br(n&&Fr(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Hr(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Vr(e.prototype,"constructor",e),{extend:Kr.bind(null,e.prototype)}}}}const qr=Object.getOwnPropertyDescriptor;function Wr(e,t){let n;return qr(e,t)||(n=$r(e))&&Wr(n,t)}const Gr=[].slice;function Qr(e,t,n){return Gr.call(e,t,n)}function Yr(e,t){return t(e)}function Zr(e){if(!e)throw new Error("Assertion Failed")}function Jr(e){Lr.setImmediate?setImmediate(e):setTimeout(e,0)}function Xr(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function eo(e,t){if(Fr(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=eo(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:eo(s,t.substr(a+1))}}function to(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Zr("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)to(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?Rr(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&Fr(e,a)||(u=e[a]={}),to(u,s,n)}}else void 0===n?Rr(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function no(e){var t={};for(var n in e)Fr(e,n)&&(t[n]=e[n]);return t}const ro=[].concat;function oo(e){return ro.apply([],e)}const io="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(oo([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>Lr[e])),ao=io.map((e=>Lr[e]));Xr(io,(e=>[e,!0]));let so=null;function uo(e){so="undefined"!=typeof WeakMap&&new WeakMap;const t=lo(e);return so=null,t}function lo(e){if(!e||"object"!=typeof e)return e;let t=so&&so.get(e);if(t)return t;if(Rr(e)){t=[],so&&so.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(lo(e[n]))}else if(ao.indexOf(e.constructor)>=0)t=e;else{const n=$r(e);for(var o in t=n===Object.prototype?{}:Object.create(n),so&&so.set(e,t),e)Fr(e,o)&&(t[o]=lo(e[o]))}return t}const{toString:co}={};function fo(e){return co.call(e).slice(8,-1)}const ho="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",po="symbol"==typeof ho?function(e){var t;return null!=e&&(t=e[ho])&&t.apply(e)}:function(){return null},yo={};function vo(e){var t,n,r,o;if(1===arguments.length){if(Rr(e))return e.slice();if(this===yo&&"string"==typeof e)return[e];if(o=po(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const go="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var mo="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function bo(e,t){mo=e,wo=t}var wo=()=>!0;const _o=!new Error("").stack;function So(){if(_o)try{throw So.arguments,new Error}catch(e){return e}return new Error}function Eo(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(wo).map((e=>"\n"+e)).join("")):""}var Oo=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ko=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Oo),xo={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Po(e,t){this._e=So(),this.name=e,this.message=t}function jo(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Co(e,t,n,r){this._e=So(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=jo(e,t)}function To(e,t){this._e=So(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=jo(e,t)}Hr(Po).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Eo(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Hr(Co).from(Po),Hr(To).from(Po);var Ao=ko.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const No=Po;var Do=ko.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=So(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=xo[t]||n,this.inner=null)}return Hr(r).from(No),e[t]=r,e}),{});Do.Syntax=SyntaxError,Do.Type=TypeError,Do.Range=RangeError;var Mo=Oo.reduce(((e,t)=>(e[t+"Error"]=Do[t],e)),{}),Lo=ko.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Do[t]),e)),{});function Io(){}function Ro(e){return e}function Bo(e,t){return null==e||e===Ro?t:function(n){return t(e(n))}}function $o(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Uo(e,t){return e===Io?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?$o(r,this.onsuccess):r),o&&(this.onerror=this.onerror?$o(o,this.onerror):o),void 0!==i?i:n}}function Fo(e,t){return e===Io?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?$o(n,this.onsuccess):n),r&&(this.onerror=this.onerror?$o(r,this.onerror):r)}}function Ko(e,t){return e===Io?t:function(n){var r=e.apply(this,arguments);Br(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?$o(o,this.onsuccess):o),i&&(this.onerror=this.onerror?$o(i,this.onerror):i),void 0===r?void 0===a?void 0:a:Br(r,a)}}function zo(e,t){return e===Io?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Vo(e,t){return e===Io?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)}}Lo.ModifyError=Co,Lo.DexieError=Po,Lo.BulkError=To;var Ho={};const[qo,Wo,Go]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,$r(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,$r(t),e]})(),Qo=Wo&&Wo.then,Yo=qo&&qo.constructor,Zo=!!Go;var Jo=!1,Xo=Go?()=>{Go.then(Si)}:Lr.setImmediate?setImmediate.bind(null,Si):Lr.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Si(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Si,0)},ei=function(e,t){li.push([e,t]),ni&&(Xo(),ni=!1)},ti=!0,ni=!0,ri=[],oi=[],ii=null,ai=Ro,si={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:qi,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{qi(e[0],e[1])}catch(e){}}))}},ui=si,li=[],ci=0,fi=[];function di(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Io,this._lib=!1;var t=this._PSD=ui;if(mo&&(this._stackHolder=So(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Ho)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&vi(this,this._value))}this._state=null,this._value=null,++t.ref,yi(this,e)}const hi={get:function(){var e=ui,t=Ni;function n(n,r){var o=!e.global&&(e!==ui||t!==Ni);const i=o&&!Ii();var a=new di(((t,a)=>{mi(this,new pi(Vi(n,e,o,i),Vi(r,e,o,i),t,a,e))}));return mo&&_i(a,this),a}return n.prototype=Ho,n},set:function(e){Vr(this,"then",e&&e.prototype===Ho?hi:{get:function(){return e},set:hi.set})}};function pi(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function yi(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Ei();t&&"function"==typeof t.then?yi(e,((e,n)=>{t instanceof di?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,gi(e)),n&&Oi()}}),vi.bind(null,e))}catch(t){vi(e,t)}}function vi(e,t){if(oi.push(t),null===e._state){var n=e._lib&&Ei();t=ai(t),e._state=!1,e._value=t,mo&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=Wr(t,"stack");t._promise=e,Vr(t,"stack",{get:()=>Jo?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){ri.some((t=>t._value===e._value))||ri.push(e)}(e),gi(e),n&&Oi()}}function gi(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)mi(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===ci&&(++ci,ei((()=>{0==--ci&&ki()}),[]))}function mi(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,++ci,ei(bi,[n,e,t])}else e._listeners.push(t)}function bi(e,t,n){try{ii=t;var r,o=t._value;t._state?r=e(o):(oi.length&&(oi=[]),r=e(o),-1===oi.indexOf(o)&&function(e){for(var t=ri.length;t;)if(ri[--t]._value===e._value)return void ri.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{ii=null,0==--ci&&ki(),--n.psd.ref||n.psd.finalize()}}function wi(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=Eo(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return mo&&((r=Eo(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&wi(e._prev,t,n)),t}function _i(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Si(){Ei()&&Oi()}function Ei(){var e=ti;return ti=!1,ni=!1,e}function Oi(){var e,t,n;do{for(;li.length>0;)for(e=li,li=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(li.length>0);ti=!0,ni=!0}function ki(){var e=ri;ri=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=fi.slice(0),n=t.length;n;)t[--n]()}function xi(e){return new di(Ho,!1,e)}function Pi(e,t){var n=ui;return function(){var r=Ei(),o=ui;try{return Ui(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Ui(o,!1),r&&Oi()}}}Kr(di.prototype,{then:hi,_then:function(e,t){mi(this,new pi(null,null,e,t,ui))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):xi(e))):this.then(null,(e=>e&&e.name===t?n(e):xi(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),xi(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Jo=!0;var e=wi(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Jo=!1}}},timeout:function(e,t){return e<1/0?new di(((n,r)=>{var o=setTimeout((()=>r(new Do.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Vr(di.prototype,Symbol.toStringTag,"Dexie.Promise"),si.env=Fi(),Kr(di,{all:function(){var e=vo.apply(null,arguments).map(Ri);return new di((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>di.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof di)return e;if(e&&"function"==typeof e.then)return new di(((t,n)=>{e.then(t,n)}));var t=new di(Ho,!0,e);return _i(t,ii),t},reject:xi,race:function(){var e=vo.apply(null,arguments).map(Ri);return new di(((t,n)=>{e.map((e=>di.resolve(e).then(t,n)))}))},PSD:{get:()=>ui,set:e=>ui=e},totalEchoes:{get:()=>Ni},newPSD:Mi,usePSD:Ki,scheduler:{get:()=>ei,set:e=>{ei=e}},rejectionMapper:{get:()=>ai,set:e=>{ai=e}},follow:(e,t)=>new di(((n,r)=>Mi(((t,n)=>{var r=ui;r.unhandleds=[],r.onunhandled=n,r.finalize=$o((function(){!function(e){fi.push((function t(){e(),fi.splice(fi.indexOf(t),1)})),++ci,ei((()=>{0==--ci&&ki()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),Yo&&(Yo.allSettled&&Vr(di,"allSettled",(function(){const e=vo.apply(null,arguments).map(Ri);return new di((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>di.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),Yo.any&&"undefined"!=typeof AggregateError&&Vr(di,"any",(function(){const e=vo.apply(null,arguments).map(Ri);return new di(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>di.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const ji={awaits:0,echoes:0,id:0};var Ci=0,Ti=[],Ai=0,Ni=0,Di=0;function Mi(e,t,n,r){var o=ui,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Di;var a=si.env;i.env=Zo?{Promise:di,PromiseProp:{value:di,configurable:!0,writable:!0},all:di.all,race:di.race,allSettled:di.allSettled,any:di.any,resolve:di.resolve,reject:di.reject,nthen:Hi(a.nthen,i),gthen:Hi(a.gthen,i)}:{},t&&Br(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Ki(i,e,n,r);return 0===i.ref&&i.finalize(),s}function Li(){return ji.id||(ji.id=++Ci),++ji.awaits,ji.echoes+=100,ji.id}function Ii(){return!!ji.awaits&&(0==--ji.awaits&&(ji.id=0),ji.echoes=100*ji.awaits,!0)}function Ri(e){return ji.echoes&&e&&e.constructor===Yo?(Li(),e.then((e=>(Ii(),e)),(e=>(Ii(),Wi(e))))):e}function Bi(e){++Ni,ji.echoes&&0!=--ji.echoes||(ji.echoes=ji.id=0),Ti.push(ui),Ui(e,!0)}function $i(){var e=Ti[Ti.length-1];Ti.pop(),Ui(e,!1)}function Ui(e,t){var n=ui;if((t?!ji.echoes||Ai++&&e===ui:!Ai||--Ai&&e===ui)||zi(t?Bi.bind(null,e):$i),e!==ui&&(ui=e,n===si&&(si.env=Fi()),Zo)){var r=si.env.Promise,o=e.env;Wo.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Lr,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Fi(){var e=Lr.Promise;return Zo?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Lr,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Wo.then,gthen:e.prototype.then}:{}}function Ki(e,t,n,r,o){var i=ui;try{return Ui(e,!0),t(n,r,o)}finally{Ui(i,!1)}}function zi(e){Qo.call(qo,e)}function Vi(e,t,n,r){return"function"!=typeof e?e:function(){var o=ui;n&&Li(),Ui(t,!0);try{return e.apply(this,arguments)}finally{Ui(o,!1),r&&zi(Ii)}}}function Hi(e,t){return function(n,r){return e.call(this,Vi(n,t),Vi(r,t))}}function qi(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Lr.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),Br(r,o)):Lr.CustomEvent&&Br(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Lr.dispatchEvent&&(dispatchEvent(r),!Lr.PromiseRejectionEvent&&Lr.onunhandledrejection))try{Lr.onunhandledrejection(r)}catch(e){}mo&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+Qo).indexOf("[native code]")&&(Li=Ii=Io);var Wi=di.reject;function Gi(e,t,n,r){if(e.idbdb&&(e._state.openComplete||ui.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Ao.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Gi(e,t,n,r)))):Wi(o)}return o._promise(t,((e,t)=>Mi((()=>(ui.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return Wi(new Do.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Wi(new Do.DatabaseClosed);e.open().catch(Io)}return e._state.dbReadyPromise.then((()=>Gi(e,t,n,r)))}const Qi=String.fromCharCode(65535),Yi="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Zi=[],Ji="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Xi=Ji,ea=Ji,ta=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function na(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const ra={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function oa(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=uo(t))[e],t)}let ia=class{_trans(e,t,n){const r=this._tx||ui.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Do.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Ei();try{return r&&r.db===this.db?r===ui.trans?r._promise(e,i,n):Mi((()=>r._promise(e,i,n)),{trans:r,transless:ui.transless||ui}):Gi(this.db,e,[this.name],i)}finally{a&&Oi()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(Rr(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=Ir(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==Qi)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&mo&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?na(n,a&&a.multi?e=>{const t=eo(e,o);return Rr(t)&&t.some((e=>i(s,e)))}:e=>i(s,eo(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,Rr(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(Fr(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){Br(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=oa(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?di.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{to(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||Rr(e))return this.where(":id").equals(e).modify(t);{const n=eo(e,this.schema.primKey.keyPath);if(void 0===n)return Wi(new Do.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?Ir(t).forEach((n=>{to(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=oa(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?di.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{to(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?di.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:ra}))).then((e=>e.numFailures?di.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Do.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Do.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(oa(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new To(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Do.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Do.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(oa(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new To(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new To(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}};function aa(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){Ir(e).forEach((function(t){var n=e[t];if(Rr(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Do.InvalidArgument("Invalid event config");var r=i(t,Ro,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){Jr((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=zo),o||(o=Io);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}}function sa(e,t){return Hr(t).from({prototype:e}),t}function ua(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function la(e,t){e.filter=na(e.filter,t)}function ca(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>na(r(),t()):t,e.justLimit=n&&!r}function fa(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Do.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function da(e,t,n){const r=fa(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function ha(e,t,n,r){const o=e.replayFilter?na(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),Fr(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),pa(da(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return pa(da(e,r,n),na(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function pa(e,t,n,r){var o=Pi(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=Io}),(t=>{e.fail(t),n=Io}))||o(e.value,e,(e=>n=e)),n()}))}))}function ya(e,t){try{const n=va(e),r=va(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(ga(e),ga(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=ya(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function va(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=fo(e);return"ArrayBuffer"===n?"binary":n}function ga(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}let ma=class{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,Wi.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,Wi.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=na(t.algorithm,e)}_iterate(e,t){return ha(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&Br(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>ha(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(ua(t,!0))return n.count({trans:e,query:{index:fa(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return ha(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&ua(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=fa(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return ha(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,ua(t)?ca(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):ca(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),ca(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return la(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return la(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=na(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&ua(t,!0)&&t.limit>0)return this._read((e=>{var n=fa(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return la(this._ctx,(function(e){var t=e.primaryKey.toString(),r=Fr(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=Ir(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];eo(t,a)!==s&&(to(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,c=[];let f=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of Ir(n))c.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=c=>{const f=Math.min(l,o.length-c);return a.getMany({trans:n,keys:o.slice(c,c+f),cache:"immutable"}).then((d=>{const p=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=d[e],n={value:uo(t),primKey:o[c+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[c+e]):s||0===ya(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[c+e])):(g.push(o[c+e]),p.push(n.value)))}const m=ua(t)&&t.limit===1/0&&("function"!=typeof e||e===ba)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);h(p.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(y.length,e))))).then((()=>(g.length>0||m&&e===ba)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>h(g.length,e))))).then((()=>o.length>c+f&&i(c+l)))}))};return i(0).then((()=>{if(c.length>0)throw new Co("Error modifying one or more objects",c,f,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return ua(e)&&(e.isPrimKey&&!ea||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Co("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(ba)}};const ba=(e,t)=>t.value=null;function wa(e,t){return e<t?-1:e===t?0:1}function _a(e,t){return e>t?-1:e===t?0:1}function Sa(e,t,n){var r=e instanceof ja?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Ea(e){return new e.Collection(e,(()=>Pa(""))).limit(0)}function Oa(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],l)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function ka(e,t,n,r){var o,i,a,s,u,l,c,f=n.length;if(!n.every((e=>"string"==typeof e)))return Sa(e,"String expected.");function d(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?wa:_a;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),l=e,c="next"===e?"":r}d("next");var h=new e.Collection(e,(()=>xa(s[0],u[f-1]+r)));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,u,p))return!0;for(var h=null,y=p;y<f;++y){var v=Oa(o,d,s[y],u[y],a,l);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+c)}:r),!1})),h}function xa(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Pa(e){return{type:1,lower:e,upper:e}}let ja=class{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Ea(this):new this.Collection(this,(()=>xa(e,t,!n,!r)))}catch(e){return Sa(this,Yi)}}equals(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>Pa(e)))}above(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(e,void 0,!0)))}aboveOrEqual(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(e,void 0,!1)))}below(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(void 0,e)))}startsWith(e){return"string"!=typeof e?Sa(this,"String expected."):this.between(e,e+Qi,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):ka(this,((e,t)=>0===e.indexOf(t[0])),[e],Qi)}equalsIgnoreCase(e){return ka(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=vo.apply(yo,arguments);return 0===e.length?Ea(this):ka(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=vo.apply(yo,arguments);return 0===e.length?Ea(this):ka(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,Qi)}anyOf(){const e=vo.apply(yo,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Sa(this,Yi)}if(0===e.length)return Ea(this);const n=new this.Collection(this,(()=>xa(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=vo.apply(yo,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Sa(this,Yi)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Ea(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Sa(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Do.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let l,c=r;function f(e,t){return c(e[0],t[0])}try{l=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),l.sort(f)}catch(e){return Sa(this,Yi)}let d=0;const h=u?e=>r(e,l[d][1])>0:e=>r(e,l[d][1])>=0,p=s?e=>o(e,l[d][0])>0:e=>o(e,l[d][0])>=0;let y=h;const v=new this.Collection(this,(()=>xa(l[0][0],l[l.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=h,c=r):(y=p,c=o),l.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++d,d===l.length)return t(n),!1;return!!function(e){return!h(e)&&!p(e)}(o)||(0===this._cmp(o,l[d][1])||0===this._cmp(o,l[d][0])||t((()=>{c===r?e.continue(l[d][0]):e.continue(l[d][1])})),!1)})),v}startsWithAnyOf(){const e=vo.apply(yo,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Ea(this):this.inAnyRange(e.map((e=>[e,e+Qi]))):Sa(this,"startsWithAnyOf() only works with strings")}};function Ca(e){return Pi((function(t){return Ta(t),e(t.target.error),!1}))}function Ta(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Aa=aa(null,"storagemutated");let Na=class{_lock(){return Zr(!ui.global),++this._reculock,1!==this._reculock||ui.global||(ui.lockOwnerFor=this),this}_unlock(){if(Zr(!ui.global),0==--this._reculock)for(ui.global||(ui.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Ki(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&ui.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(Zr(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Do.DatabaseClosed(n);case"MissingAPIError":throw new Do.MissingAPI(n.message,n);default:throw new Do.OpenFailed(n)}if(!this.active)throw new Do.TransactionInactive;return Zr(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Pi((t=>{Ta(t),this._reject(e.error)})),e.onabort=Pi((t=>{Ta(t),this.active&&this._reject(new Do.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Pi((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Aa.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return Wi(new Do.ReadOnly("Transaction is readonly"));if(!this.active)return Wi(new Do.TransactionInactive);if(this._locked())return new di(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},ui])}));if(n)return Mi((()=>{var e=new di(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new di(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=di.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new di(((e,r)=>{n.then((n=>t._waitingQueue.push(Pi(e.bind(null,n)))),(e=>t._waitingQueue.push(Pi(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Do.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(Fr(t,e))return t[e];const n=this.schema[e];if(!n)throw new Do.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}};function Da(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?"++":"")+Ma(t)}}function Ma(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function La(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Xr(n,(e=>[e.name,e]))}}let Ia=e=>{try{return e.only([[]]),Ia=()=>[[]],[[]]}catch(e){return Ia=()=>Qi,Qi}};function Ra(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>eo(t,e)}(e):t=>eo(t,e)}function Ba(e){return[].slice.call(e)}let $a=0;function Ua(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function Fa({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},i){const a=function(e,t){return t.reduce(((e,{create:t})=>o({},e,t(e))),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Ba(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=Rr(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:Ra(t)},indexes:Ba(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:Rr(o),keyPath:o,unique:n,multiEntry:r,extractKey:Ra(o)};return i[Ua(o)]=a,a})),getIndexByKeyPath:e=>i[Ua(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[Ua(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Pi(s);const l=e.objectStore(t),c=null==l.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:d}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const p=[],y=[];let v=0;const g=e=>{++v,Ta(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(h=l.clear()):p.push(h=l.delete(r(a)))}else{const[e,t]=f?c?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<d;++r)p.push(h=t&&void 0!==t[r]?l[n](e[r],t[r]):l[n](e[r])),h.onerror=g;else for(let t=0;t<d;++t)p.push(h=l[n](e[t])),h.onerror=g}const m=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};h.onerror=e=>{g(e),m(e)},h.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Pi(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,l=0,c=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++c===l&&r(s)},d=Ca(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=d,++l);0===l&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Pi(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Ca(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Pi(o);const{trans:a,values:s,limit:u,query:l}=n,c=u===1/0?void 0:u,{index:f,range:d}=l,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,c):p.getAllKeys(y,c);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Ca(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Ca(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Pi(s);const{index:l,range:c}=o,f=e.objectStore(t),d=l.isPrimaryKey?f:f.index(l.name),h=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(r(c),h):d.openKeyCursor(r(c),h);p.onerror=Ca(u),p.onsuccess=Pi((t=>{const n=p.result;if(!n)return void s(null);n.___id=++$a,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Pi(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Pi(e),p.onerror=Ca(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=Pi((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),l=r(i),c=l?u.count(l):u.count();c.onsuccess=Pi((t=>e(t.target.result))),c.onerror=Ca(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:Ia(t),schema:o}}(t,n,i),e.dbcore);return{dbcore:a}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Ka({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=Wr(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?Vr(t,n,{get(){return this.table(n)},set(e){zr(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function za({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Va(e,t){return e._cfg.version-t._cfg.version}function Ha(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ji)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function qa(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>Wa(o,e))),o}function Wa(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Ga(e,t,n){const r={};return Qr(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Da(Ma(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Da(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=La(e,i,a)})),r}function Qa({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+Qr(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Lr.WorkerGlobalScope&&Lr instanceof Lr.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}let Ya=class{_parseStoresSpec(e,t){Ir(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Da(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Rr(r),0===t)})),o=r.shift();if(o.multi)throw new Do.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Do.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Do.Schema("Index must have a name and cannot be an empty string")})),t[n]=La(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?Br(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{Br(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,za(t,[t._allTables,t,t.Transaction.prototype]),Ka(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],Ir(o),o),t._storeNames=Ir(o),this}upgrade(e){return this._cfg.contentUpgrade=Vo(this._cfg.contentUpgrade||Io,e),this}};function Za(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ms("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Ja(e){return e&&"function"==typeof e.databases}function Xa(e){return Mi((function(){return ui.letThrough=!0,e()}))}function es(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function ts(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Rr(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function ns(e,t,n){var r=arguments.length;if(r<2)throw new Do.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,oo(o),n]}function rs(e,t,n,r,o){return di.resolve().then((()=>{const i=ui.transless||ui,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Ao.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>rs(e,t,n,null,o)))):Wi(r)}const u=go(o);let l;u&&Li();const c=di.follow((()=>{if(l=o.call(a,a),l)if(u){var e=Ii.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=ts(l))}),s);return(l&&"function"==typeof l.then?di.resolve(l).then((e=>a.active?e:Wi(new Do.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):c.then((()=>l))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),Wi(e))))}))}function os(e,t,n){const r=Rr(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const is={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return i(o({},e),{table(t){const n=e.table(t),{schema:r}=n,a={},s=[];function u(e,t,n){const r=Ua(e),l=a[r]=a[r]||[],c=null==e?0:"string"==typeof e?1:e.length,f=t>0,d=i(o({},n),{isVirtual:f,keyTail:t,keyLength:c,extractKey:Ra(e),unique:!f&&n.unique});return l.push(d),d.isPrimaryKey||s.push(d),c>1&&u(2===c?e[0]:e.slice(0,c-1),t+1,n),l.sort(((e,t)=>e.keyTail-t.keyTail)),d}const l=u(r.primaryKey.keyPath,0,r.primaryKey);a[":id"]=[l];for(const e of r.indexes)u(e.keyPath,0,e);function c(t){const n=t.query.index;return n.isVirtual?i(o({},t),{query:{index:n,range:(r=t.query.range,a=n.keyTail,{type:1===r.type?2:r.type,lower:os(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,a),lowerOpen:!0,upper:os(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,a),upperOpen:!0})}}):t;var r,a}const f=i(o({},n),{schema:i(o({},r),{primaryKey:l,indexes:s,getIndexByKeyPath:function(e){const t=a[Ua(e)];return t&&t[0]}}),count:e=>n.count(c(e)),query:e=>n.query(c(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(c(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(os(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(os(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}});return f}})}};function as(e,t,n,r){return n=n||{},r=r||"",Ir(e).forEach((o=>{if(Fr(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=fo(i);e!==fo(a)?n[r+o]=t[o]:"Object"===e?as(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})),Ir(t).forEach((o=>{Fr(e,o)||(n[r+o]=t[o])})),n}const ss={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>i(o({},e),{table(t){const n=e.table(t),{primaryKey:r}=n.schema,a=i(o({},n),{mutate(e){const a=ui.trans,{deleting:s,creating:u,updating:l}=a.table(t).hook;switch(e.type){case"add":if(u.fire===Io)break;return a._promise("readwrite",(()=>c(e)),!0);case"put":if(u.fire===Io&&l.fire===Io)break;return a._promise("readwrite",(()=>c(e)),!0);case"delete":if(s.fire===Io)break;return a._promise("readwrite",(()=>c(e)),!0);case"deleteRange":if(s.fire===Io)break;return a._promise("readwrite",(()=>function(e){return f(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function c(e){const t=ui.trans,a=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!a)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?i(o({},e),{keys:a}):o({},e)).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,a).then((o=>{const i=a.map(((n,i)=>{const a=o[i],c={onerror:null,onsuccess:null};if("delete"===e.type)s.fire.call(c,n,a,t);else if("add"===e.type||void 0===a){const o=u.fire.call(c,n,e.values[i],t);null==n&&null!=o&&(n=o,e.keys[i]=n,r.outbound||to(e.values[i],r.keyPath,n))}else{const r=as(a,e.values[i]),o=l.fire.call(c,r,n,a,t);if(o){const t=e.values[i];Object.keys(o).forEach((e=>{Fr(t,e)?t[e]=o[e]:to(t,e,o[e])}))}}return c}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:s})=>{for(let r=0;r<a.length;++r){const s=n?n[r]:a[r],u=i[r];null==s?u.onerror&&u.onerror(t[r]):u.onsuccess&&u.onsuccess("put"===e.type&&o[r]?e.values[r]:s)}return{failures:t,results:n,numFailures:r,lastResult:s}})).catch((e=>(i.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function f(e,t,a){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:a}).then((({result:n})=>c({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<a?{failures:[],numFailures:0,lastResult:void 0}:f(e,i(o({},t),{lower:n[n.length-1],lowerOpen:!0}),a)))))}}});return a}})};function us(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ya(t.keys[o],e[i])&&(r.push(n?uo(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const ls={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return i(o({},n),{getMany:e=>{if(!e.cache)return n.getMany(e);const t=us(e.keys,e.trans._cache,"clone"===e.cache);return t?di.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?uo(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))})}})};function cs(e){return!("from"in e)}const fs=function(e,t){if(!this){const t=new fs;return e&&"d"in e&&Br(t,e),t}Br(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function ds(e,t,n){const r=ya(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(cs(e))return Br(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(ya(n,e.from)<0)return o?ds(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},ys(e);if(ya(t,e.to)>0)return i?ds(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},ys(e);ya(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ya(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&hs(e,o),i&&a&&hs(e,i)}function hs(e,t){cs(t)||function e(t,{from:n,to:r,l:o,r:i}){ds(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function ps(e){let t=cs(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ya(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||ya(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function ys(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){const t="r"===i?"l":"r",n=o({},e),r=e[i];e.from=r.from,e.to=r.to,e[i]=r[i],n[i]=r[t],e[t]=n,n.d=vs(n)}e.d=vs(e)}function vs({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Kr(fs.prototype,{add(e){return hs(this,e),this},addKey(e){return ds(this,e,e),this},addKeys(e){return e.forEach((e=>ds(this,e,e))),this},[ho](){return ps(this)}});const gs={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new fs(e.MIN_KEY,e.MAX_KEY);return i(o({},e),{table:r=>{const a=e.table(r),{schema:s}=a,{primaryKey:u}=s,{extractKey:l,outbound:c}=u,f=i(o({},a),{mutate:e=>{const o=e.trans,i=o.mutatedParts||(o.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return i[n]||(i[n]=new fs)},l=u(""),c=u(":dels"),{type:f}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return a.mutate(e).then((e=>{if(Rr(d)){"delete"!==f&&(d=e.results),l.addKeys(d);const t=us(d,p);t||"add"===f||c.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&Rr(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==ya(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,s,t,h)}else if(d){const e={from:d.lower,to:d.upper};c.add(e),l.add(e)}else l.add(n),c.add(n),s.indexes.forEach((e=>u(e.name).add(n)));return e}))}}),d=({query:{index:t,range:n}})=>{var r,o;return[t,new fs(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},h={get:e=>[u,new fs(e.key)],getMany:e=>[u,(new fs).addKeys(e.keys)],count:d,query:d,openCursor:d};return Ir(h).forEach((e=>{f[e]=function(s){const{subscr:u}=ui;if(u){const f=e=>{const n=`idb://${t}/${r}/${e}`;return u[n]||(u[n]=new fs)},d=f(""),p=f(":dels"),[y,v]=h[e](s);if(f(y.name||"").add(v),!y.isPrimaryKey){if("count"!==e){const t="query"===e&&c&&s.values&&a.query(i(o({},s),{values:!1}));return a[e].apply(this,arguments).then((n=>{if("query"===e){if(c&&s.values)return t.then((({result:e})=>(d.addKeys(e),n)));const e=s.values?n.result.map(l):n.result;s.values?d.addKeys(e):p.addKeys(e)}else if("openCursor"===e){const e=n,t=s.values;return e&&Object.create(e,{key:{get:()=>(p.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return p.addKey(t),t}},value:{get:()=>(t&&d.addKey(e.primaryKey),e.value)}})}return n}))}p.add(n)}}return a[e].apply(this,arguments)}})),f}})}};let ms=class e{version(e){if(isNaN(e)||e<.1)throw new Do.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Do.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Va),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||ui.letThrough||this._vip)?e():new di(((e,t)=>{if(this._state.openComplete)return t(new Do.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Do.DatabaseClosed);this.open().catch(Io)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?Wi(t.dbOpenError):e));mo&&(t.openCanceller._stackHolder=So()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Do.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return di.race([r,("undefined"==typeof navigator?di.resolve():es()).then((()=>new di(((r,i)=>{if(o(),!n)throw new Do.MissingAPI;const u=e.name,l=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!l)throw new Do.MissingAPI;l.onerror=Ca(i),l.onblocked=Pi(e._fireOnBlocked),l.onupgradeneeded=Pi((r=>{if(a=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=Ta,a.abort(),l.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Pi((()=>{i(new Do.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Ca(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=l.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=ui.transless||ui;Mi((()=>{ui.trans=i,ui.transless=s,0===t?(Ir(o).forEach((e=>{qa(n,e,o[e].primKey,o[e].indexes)})),Fa(e,n),di.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=Ga(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;Qa(e,o,r),Qa(e,u,r),a=e._dbSchema=u;const l=Ha(o,u);l.add.forEach((e=>{qa(r,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((e=>{if(e.recreate)throw new Do.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>Wa(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Wa(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){Fa(e,r),n._memoizedTables={},s=!0;let t=no(u);l.del.forEach((e=>{t[e]=o[e]})),za(e,[e.Transaction.prototype]),Ka(e,[e.Transaction.prototype],Ir(t),t),n.schema=t;const i=go(c);let a;i&&Li();const f=di.follow((()=>{if(a=c(n),a&&i){var e=Ii.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?di.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&Xi||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),za(e,[e.Transaction.prototype]),Ka(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?di.resolve(o.shift()(n.idbtrans)).then(e):di.resolve()}().then((()=>{var e,t;t=r,Ir(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||qa(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),l.onsuccess=Pi((()=>{a=null;const n=e._novip.idbdb=l.result,o=Qr(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Ga(0,t,n);e._storeNames=Qr(t.objectStoreNames,0),Ka(e,[e._allTables],Ir(r),r)}(e,n,r):(Qa(e,e._dbSchema,r),function(e,t){const n=Ha(Ga(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Fa(e,r)}catch(e){}var i;Zi.push(e),n.onversionchange=Pi((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Pi((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Ja(e)&&"__dbnames"!==n&&Za(e,t).put({name:n}).catch(Io)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],di.resolve(Xa((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Vo,Io);return t.onReadyBeingFired=[],di.resolve(Xa((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),Wi(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=Zi.indexOf(this);if(t>=0&&Zi.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new di((t=>{e.dbReadyResolve=t})),e.openCanceller=new di(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Do.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new di(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Pi((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Ja(e)&&"__dbnames"!==n&&Za(e,t).delete(n).catch(Io)}(this._deps,this.name),n()})),e.onerror=Ca(r),e.onblocked=this._fireOnBlocked};if(e)throw new Do.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Ir(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=ns.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=ui.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Do.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Do.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Do.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):Wi(e)}const s=rs.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):ui.trans?Ki(ui.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!Fr(this._allTables,e))throw new Do.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}constructor(t,n){this._middlewares={},this.verno=0;const r=e.dependencies;this._options=n=o({addons:e.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:i}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Io,dbReadyPromise:null,cancelOpen:Io,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var s;a.dbReadyPromise=new di((e=>{a.dbReadyResolve=e})),a.openCanceller=new di(((e,t)=>{a.cancelOpen=t})),this._state=a,this.name=t,this.on=aa(this,"populate","blocked","versionchange","close",{ready:[Vo,Io]}),this.on.ready.subscribe=Yr(this.on.ready.subscribe,(t=>(n,r)=>{e.vip((()=>{const e=this._state;if(e.openComplete)e.dbOpenError||di.resolve().then(n),r&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),r&&t(n);else{t(n);const e=this;r||t((function t(){e.on.ready.unsubscribe(n),e.on.ready.unsubscribe(t)}))}}))})),this.Collection=(s=this,sa(ma.prototype,(function(e,t){this.db=s;let n=ra,r=null;if(t)try{n=t()}catch(e){r=e}const 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!==Ro?a:null}}))),this.Table=function(e){return sa(ia.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:aa(null,{creating:[Uo,Io],reading:[Bo,Ro],updating:[Ko,Io],deleting:[Fo,Io]})}))}(this),this.Transaction=function(e){return sa(Na.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=aa(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new di(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),Wi(e)}))}))}(this),this.Version=function(e){return sa(Ya.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return sa(ja.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Do.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=Ia(n.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Zi.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(is),this.use(ss),this.use(gs),this.use(ls),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach((e=>e(this)))}};const bs="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";let ws,_s=class{subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[bs](){return this}constructor(e){this._subscribe=e}};function Ss(e,t){return Ir(t).forEach((n=>{hs(e[n]||(e[n]=new fs),t[n])})),e}try{ws={indexedDB:Lr.indexedDB||Lr.mozIndexedDB||Lr.webkitIndexedDB||Lr.msIndexedDB,IDBKeyRange:Lr.IDBKeyRange||Lr.webkitIDBKeyRange}}catch(gt){ws={indexedDB:null,IDBKeyRange:null}}const Es=ms;function Os(e){let t=ks;try{ks=!0,Aa.storagemutated.fire(e)}finally{ks=t}}Kr(Es,i(o({},Lo),{delete:e=>new Es(e,{addons:[]}).delete(),exists:e=>new Es(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Ja(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Za(e,t).toCollection().primaryKeys()}(Es.dependencies).then(e)}catch(e){return Wi(new Do.MissingAPI)}},defineClass:()=>function(e){Br(this,e)},ignoreTransaction:e=>ui.trans?Ki(ui.transless,e):e(),vip:Xa,async:function(e){return function(){try{var t=ts(e.apply(this,arguments));return t&&"function"==typeof t.then?t:di.resolve(t)}catch(e){return Wi(e)}}},spawn:function(e,t,n){try{var r=ts(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:di.resolve(r)}catch(e){return Wi(e)}},currentTransaction:{get:()=>ui.trans||null},waitFor:function(e,t){const n=di.resolve("function"==typeof e?Es.ignoreTransaction(e):e).timeout(t||6e4);return ui.trans?ui.trans.waitFor(n):n},Promise:di,debug:{get:()=>mo,set:e=>{bo(e,"dexie"===e?()=>!0:ta)}},derive:Hr,extend:Br,props:Kr,override:Yr,Events:aa,on:Aa,liveQuery:function(e){return new _s((t=>{const n=go(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Aa.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,u=!1;function l(){return Ir(i).some((e=>o[e]&&function(e,t){const n=ps(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=ps(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(ya(s.from,o.to)<=0&&ya(s.to,o.from)>=0)return!0;ya(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const c=e=>{Ss(o,e),l()&&f()},f=()=>{if(s||r)return;o={};const d={},h=function(t){n&&Li();const r=()=>Mi(e,{subscr:t,trans:null}),o=ui.trans?Ki(ui.transless,r):r();return n&&o.then(Ii,Ii),o}(d);u||(Aa("storagemutated",c),u=!0),s=!0,Promise.resolve(h).then((e=>{s=!1,r||(l()?f():(o={},i=d,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Ss,getByKeyPath:eo,setByKeyPath:to,delByKeyPath:function(e,t){"string"==typeof t?to(e,t,void 0):"length"in t&&[].map.call(t,(function(t){to(e,t,void 0)}))},shallowClone:no,deepClone:uo,getObjectDiff:as,cmp:ya,asap:Jr,minKey:-1/0,addons:[],connections:Zi,errnames:Ao,dependencies:ws,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))})),Es.maxKey=Ia(Es.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Aa("storagemutated",(e=>{if(!ks){let t;Ji?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),ks=!0,dispatchEvent(t),ks=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{ks||Os(e)})));let ks=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Aa("storagemutated",(t=>{ks||e.postMessage(t)})),e.onmessage=e=>{e.data&&Os(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Aa("storagemutated",(e=>{try{ks||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Os(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Os(e.changedParts)}))}function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ps(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function js(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ps(i,r,o,a,s,"next",e)}function s(e){Ps(i,r,o,a,s,"throw",e)}a(void 0)}))}}di.rejectionMapper=function(e,t){if(!e||e instanceof Po||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Mo[e.name])return e;var n=new Mo[e.name](t||e.message,e);return"stack"in e&&Vr(n,"stack",{get:function(){return this.inner.stack}}),n},bo(mo,ta);const Cs=new class extends ms{constructor(){super("EsmOffline"),xs(this,"syncQueue",void 0),xs(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}};function Ts(){return(Ts=js((function*(){const e=yield _r();return(null==e?void 0:e.uuid)||"*"}))).apply(this,arguments)}function As(){return As=js((function*(e,t){return(yield function(e,t){return Ns.apply(this,arguments)}(e,t)).map((e=>e.content))})),As.apply(this,arguments)}function Ns(){return(Ns=js((function*(e,t){const n=t?{type:t,userId:e}:{userId:e};return yield Cs.syncQueue.where(n).toArray().catch(ms.errnames.DatabaseClosed,(()=>[]))}))).apply(this,arguments)}function Ds(){return Ds=js((function*(e){const t=yield function(){return Ts.apply(this,arguments)}();return yield function(e,t){return As.apply(this,arguments)}(t,e)})),Ds.apply(this,arguments)}function Ms(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ls(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ms(i,r,o,a,s,"next",e)}function s(e){Ms(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Is(e,t){return Rs.apply(this,arguments)}function Rs(){return Rs=Ls((function*(e,t,n=!0){if(e){let r=null;const[o,i]=yield Promise.all([ur(`${ir}/Patient/${e}`,t).catch((e=>r=e)),n?Bs(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(r)throw r}return null})),Rs.apply(this,arguments)}function Bs(e){return $s.apply(this,arguments)}function $s(){return $s=Ls((function*(e){const t=yield function(e){return Ds.apply(this,arguments)}("patient-registration"),n=t.find((t=>t.fhirPatient.id===e));var r;return null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null})),$s.apply(this,arguments)}(0,Be.createGlobalStore)("offline-synchronization",{}),(0,Be.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});var Us=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Fs=function(e){function n(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 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}(v),Ks=function(e){function n(t){var n=e.call(this,t)||this;return n.destination=t,n}return t(n,e),n}(b),zs=function(e){function n(){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[m]=function(){return new Ks(this)},n.prototype.lift=function(e){var t=new Vs(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Us;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 Us;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 Us;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(t){if(this.closed)throw new Us;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){if(this.closed)throw new Us;return this.hasError?(e.error(this.thrownError),v.EMPTY):this.isStopped?(e.complete(),v.EMPTY):(this.observers.push(e),new Fs(this,e))},n.prototype.asObservable=function(){var e=new O;return e.source=this,e},n.create=function(e,t){return new Vs(e,t)},n}(O),Vs=function(e){function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t(n,e),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):v.EMPTY},n}(zs),Hs=function(e){function n(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 Us;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(zs),qs=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Ws=new O((function(e){return e.complete()}));function Gs(e){return function(t){return 0===e?Ws:t.lift(new Qs(e))}}var Qs=function(){function e(e){if(this.total=e,this.total<0)throw new qs}return e.prototype.call=function(e,t){return t.subscribe(new Ys(e,this.total))},e}(),Ys=function(e){function n(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(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(b);function Zs(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 Js(e,t))}}var Js=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Xs(e,this.project,this.thisArg))},e}(),Xs=function(e){function n(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(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}(b);const eu="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display),startDatetime,stopDatetime)";function tu(e,t,n){return lr(`/ws/rest/v1/visit?patient=${e}&v=${null!=n?n:eu}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(Gs(1)).pipe(Zs((e=>e)))}function nu(e,t){return lr("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function ru(e,t,n){return lr(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const ou=new Hs(null);var iu,au;function su(e){return{uuid:e.uuid,display:e.display,name:e.name}}function uu(){return lr("/ws/rest/v1/visittype").pipe(Zs((e=>e.data.results.map(su)))).pipe(Gs(1))}function lu(e){return{uuid:e.uuid,display:e.display}}function cu(){return lr("/ws/rest/v1/location").pipe(Zs((e=>e.data.results.map(lu)))).pipe(Gs(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(iu||(iu={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(au||(au={}));const fu={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})()})()},789:()=>{(()=>{var e={403:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>l});const n=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},r=e=>e?n(e):n,o={};function i(e,t){const n=o[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=r()((()=>t));return o[e]={value:n,active:!0},n}}function a(e,t){const n=o[e];if(!n){const n=r()((()=>null!=t?t:{}));return o[e]={value:n,active:!1},n}return n.value}function s(e){return i("app",e)}function u(){return a("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";function e(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function t(e){return e&&e.sensitive?"":"i"}function o(n,r,o){return function(n,r,o){void 0===o&&(o={});for(var i=o.strict,a=void 0!==i&&i,s=o.start,u=void 0===s||s,l=o.end,c=void 0===l||l,f=o.encode,d=void 0===f?function(e){return e}:f,h="["+e(o.endsWith||"")+"]|$",p="["+e(o.delimiter||"/#?")+"]",y=u?"^":"",v=0,g=n;v<g.length;v++){var m=g[v];if("string"==typeof m)y+=e(d(m));else{var b=e(d(m.prefix)),w=e(d(m.suffix));if(m.pattern)if(r&&r.push(m),b||w)if("+"===m.modifier||"*"===m.modifier){var _="*"===m.modifier?"?":"";y+="(?:"+b+"((?:"+m.pattern+")(?:"+w+b+"(?:"+m.pattern+"))*)"+w+")"+_}else y+="(?:"+b+"("+m.pattern+")"+w+")"+m.modifier;else y+="("+m.pattern+")"+m.modifier;else y+="(?:"+b+w+")"+m.modifier}}if(c)a||(y+=p+"?"),y+=o.endsWith?"(?="+h+")":"$";else{var S=n[n.length-1],E="string"==typeof S?p.indexOf(S[S.length-1])>-1:void 0===S;a||(y+="(?:"+p+"(?="+h+"))?"),E||(y+="(?="+p+"|"+h+")")}return new RegExp(y,t(o))}(function(t,n){void 0===n&&(n={});for(var r=function(e){for(var t=[],n=0;n<e.length;){var r=e[n];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:n,value:e[n++]});else{var o=1,i="";if("?"===e[s=n+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);i+=e[s++]}else i+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+n);if(!i)throw new TypeError("Missing pattern at "+n);t.push({type:"PATTERN",index:n,value:i}),n=s}else{for(var a="",s=n+1;s<e.length;){var u=e.charCodeAt(s);if(!(u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||95===u))break;a+=e[s++]}if(!a)throw new TypeError("Missing parameter name at "+n);t.push({type:"NAME",index:n,value:a}),n=s}else t.push({type:"CLOSE",index:n,value:e[n++]});else t.push({type:"OPEN",index:n,value:e[n++]});else t.push({type:"ESCAPED_CHAR",index:n++,value:e[n++]});else t.push({type:"MODIFIER",index:n,value:e[n++]})}return t.push({type:"END",index:n,value:""}),t}(t),o=n.prefixes,i=void 0===o?"./":o,a="[^"+e(n.delimiter||"/#?")+"]+?",s=[],u=0,l=0,c="",f=function(e){if(l<r.length&&r[l].type===e)return r[l++].value},d=function(e){var t=f(e);if(void 0!==t)return t;var n=r[l],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},h=function(){for(var e,t="";e=f("CHAR")||f("ESCAPED_CHAR");)t+=e;return t};l<r.length;){var p=f("CHAR"),y=f("NAME"),v=f("PATTERN");if(y||v){var g=p||"";-1===i.indexOf(g)&&(c+=g,g=""),c&&(s.push(c),c=""),s.push({name:y||u++,prefix:g,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var m=p||f("ESCAPED_CHAR");if(m)c+=m;else if(c&&(s.push(c),c=""),f("OPEN")){g=h();var b=f("NAME")||"",w=f("PATTERN")||"",_=h();d("CLOSE"),s.push({name:b||(w?u++:""),pattern:b&&!w?a:w,prefix:g,suffix:_,modifier:f("MODIFIER")||""})}else d("END")}}return s}(n,o),r,o)}function i(e,n,r){return e instanceof 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}(e,n):Array.isArray(e)?function(e,n,r){var o=e.map((function(e){return i(e,n,r).source}));return new RegExp("(?:"+o.join("|")+")",t(r))}(e,n,r):o(e,n,r)}n.r(r),n.d(r,{filterBreadcrumbs:()=>d,getBreadcrumbs:()=>c,getBreadcrumbsFor:()=>h,registerBreadcrumb:()=>u,registerBreadcrumbs:()=>l});const a=(0,n(403).createGlobalStore)("breadcrumbs",[]);function s(e){return e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?i(e.matcher):i(e.path)}function u(e){return l([e])}function l(e){const t=[...c(),...e.map((e=>({matcher:s(e),settings:e})))];a.setState(t,!0)}function c(){return a.getState()}function f(e,t){if(t)return function(e,t){const[n]=e.filter((e=>e.matcher.test(t)));return n}(e,t)||function(e,t){const n=t.split("/");for(;n.length>1;){n.pop();const t=f(e,n.join("/"));if(t)return t}}(e,t)}function d(e,t){if(e.length>0){const n=f(e,t);if(n){const t=[n];let r=f(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=f(e,r.settings.parent);return t.reverse()}}return[]}function h(e){return d(c(),e)}})()})()},151:()=>{(()=>{var e={758:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{dispatchActionableNotificationShown:()=>h,dispatchConnectivityChanged:()=>r,dispatchNotificationShown:()=>d,dispatchPrecacheStaticDependencies:()=>s,subscribeActionableNotificationShown:()=>y,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>o,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>v});const n="openmrs:connectivity-changed";function r(e){window.dispatchEvent(new CustomEvent(n,{detail:{online:e}}))}function o(e){const t=t=>e(t.detail);return window.addEventListener(n,t),()=>window.removeEventListener(n,t)}function i(e){return e({online:navigator.onLine}),o(e)}const a="openmrs:precache-static-dependencies";function s(e={}){window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const l="openmrs:notification-shown",c="openmrs:actionable-notification-shown",f="openmrs:toast-shown";function d(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function y(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function v(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{createErrorHandler:()=>o,reportError:()=>t});var e=n(758);function t(e){const t=i(e);setTimeout((()=>{throw t}))}function o(){const e=Error();return n=>{i(n).stack+=`\nAsync stacktrace:\n${e.stack}`,t(n)}}function i(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(t){return console.error("Unexpected error: ",t),(0,e.dispatchNotificationShown)({description:null!=t?t:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(t){var n;console.error("Unhandled rejection: ",t.reason),(0,e.dispatchNotificationShown)({description:null!==(n=t.reason)&&void 0!==n?n:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}})()})()},196:(e,t,n)=>{e=n.nmd(e),(()=>{var r={840:(e,t,n)=>{function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){r(e,t,n[t])}))}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}(()=>{var e={151:()=>{(()=>{var e={758:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{dispatchActionableNotificationShown:()=>h,dispatchConnectivityChanged:()=>r,dispatchNotificationShown:()=>d,dispatchPrecacheStaticDependencies:()=>s,subscribeActionableNotificationShown:()=>y,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>o,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>v});const n="openmrs:connectivity-changed";function r(e){window.dispatchEvent(new CustomEvent(n,{detail:{online:e}}))}function o(e){const t=t=>e(t.detail);return window.addEventListener(n,t),()=>window.removeEventListener(n,t)}function i(e){return e({online:navigator.onLine}),o(e)}const a="openmrs:precache-static-dependencies";function s(e={}){window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const l="openmrs:notification-shown",c="openmrs:actionable-notification-shown",f="openmrs:toast-shown";function d(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function y(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function v(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{createErrorHandler:()=>o,reportError:()=>t});var e=n(758);function t(e){const t=i(e);setTimeout((()=>{throw t}))}function o(){const e=Error();return n=>{i(n).stack+=`\nAsync stacktrace:\n${e.stack}`,t(n)}}function i(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}return void 0===e?Error("'undefined' was thrown as an error"):Error(e.toString())}window.onerror=function(t){return console.error("Unexpected error: ",t),(0,e.dispatchNotificationShown)({description:null!=t?t:"Oops! An unexpected error occurred.",kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(t){var n;console.error("Unhandled rejection: ",t.reason),(0,e.dispatchNotificationShown)({description:null!==(n=t.reason)&&void 0!==n?n:"Oops! An unhandled promise rejection occurred.",kind:"error",title:"Error"})}})()})()},403:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>l});const n=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},r=e=>e?n(e):n,o={};function i(e,t){const n=o[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=r()((()=>t));return o[e]={value:n,active:!0},n}}function a(e,t){const n=o[e];if(!n){const n=r()((()=>null!=t?t:{}));return o[e]={value:n,active:!1},n}return n.value}function s(e){return i("app",e)}function u(){return a("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";r.r(a),r.d(a,{OpenmrsFetchError:()=>cr,VisitMode:()=>iu,VisitStatus:()=>au,backendDependencies:()=>fu,clearCurrentUser:()=>br,defaultVisitCustomRepresentation:()=>eu,fetchCurrentPatient:()=>Is,fhirBaseUrl:()=>ir,getCurrentUser:()=>vr,getLocations:()=>cu,getLoggedInUser:()=>_r,getSessionLocation:()=>Sr,getSessionStore:()=>gr,getStartedVisit:()=>ou,getVisitTypes:()=>uu,getVisitsForPatient:()=>tu,makeUrl:()=>sr,openmrsFetch:()=>ur,openmrsObservableFetch:()=>lr,refetchCurrentUser:()=>mr,restBaseUrl:()=>or,saveVisit:()=>nu,sessionEndpoint:()=>ar,setSessionLocation:()=>Er,setupApiModule:()=>kr,toLocationObject:()=>lu,toVisitTypeObject:()=>su,updateVisit:()=>ru,userHasAccess:()=>wr});var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};function t(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}function s(e){return"function"==typeof e}var u=!1,l={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,u=e},get useDeprecatedSynchronousErrorHandling(){return u}};function c(e){setTimeout((function(){throw e}),0)}var f={closed:!0,next:function(e){},error:function(e){if(l.useDeprecatedSynchronousErrorHandling)throw e;c(e)},complete:function(){}},d=Array.isArray||function(e){return e&&"number"==typeof e.length};function h(e){return null!==e&&"object"==typeof e}var p=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),y=p,v=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,r=n._parentOrParents,o=n._ctorUnsubscribe,i=n._unsubscribe,a=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var u=0;u<r.length;++u)r[u].remove(this);if(s(i)){o&&(this._unsubscribe=void 0);try{i.call(this)}catch(e){t=e instanceof y?g(e.errors):[e]}}if(d(a)){u=-1;for(var l=a.length;++u<l;){var c=a[u];if(h(c))try{c.unsubscribe()}catch(e){t=t||[],e instanceof y?t=t.concat(g(e.errors)):t.push(e)}}}if(t)throw new y(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function g(e){return e.reduce((function(e,t){return e.concat(t instanceof y?t.errors:t)}),[])}var m="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random(),b=function(e){function n(t,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=f;break;case 1:if(!t){i.destination=f;break}if("object"==typeof t){t instanceof n?(i.syncErrorThrowable=t.syncErrorThrowable,i.destination=t,t.add(i)):(i.syncErrorThrowable=!0,i.destination=new w(i,t));break}default:i.syncErrorThrowable=!0,i.destination=new w(i,t,r,o)}return i}return t(n,e),n.prototype[m]=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,e.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}(v),w=function(e){function n(t,n,r,o){var i,a=e.call(this)||this;a._parentSubscriber=t;var u=a;return s(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==f&&(s((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}return t(n,e),n.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;l.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},n.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=l.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):c(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;c(e)}}},n.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)};l.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},n.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),l.useDeprecatedSynchronousErrorHandling)throw e;c(e)}},n.prototype.__tryOrSetError=function(e,t,n){if(!l.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return l.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(c(t),!0)}return!1},n.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},n}(b),S="function"==typeof Symbol&&Symbol.observable||"@@observable";function E(e){return e}var O=function(){function e(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 r=this.operator,o=function(e,t,n){if(e){if(e instanceof b)return e;if(e[m])return e[m]()}return e||t||n?new b(e,t,n):new b(f)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||l.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),l.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){l.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof b?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=k(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[S]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?E:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=k(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}();function k(e){if(e||(e=l.Promise||Promise),!e)throw new Error("no Promise impl found");return e}const x="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var P="object"==typeof self&&self&&self.Object===Object&&self;const j=(x||P||Function("return this")()).Symbol;var C=Object.prototype,T=C.hasOwnProperty,A=C.toString,N=j?j.toStringTag:void 0,D=Object.prototype.toString,M=j?j.toStringTag:void 0;const L=(I=Object.getPrototypeOf,R=Object,function(e){return I(R(e))});var I,R,B=Function.prototype,$=Object.prototype,U=B.toString,F=$.hasOwnProperty,K=U.call(Object);const z=function(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":M&&M in Object(e)?function(e){var t=T.call(e,N),n=e[N];try{e[N]=void 0;var r=!0}catch(e){}var o=A.call(e);return r&&(t?e[N]=n:delete e[N]),o}(e):function(e){return D.call(e)}(e)}(e))return!1;var t=L(e);if(null===t)return!0;var n=F.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&U.call(n)==K};function V(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function H(e){return function t(n){return 0===arguments.length||V(n)?t:e.apply(this,arguments)}}function q(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return V(n)?t:H((function(t){return e(n,t)}));default:return V(n)&&V(r)?t:V(n)?H((function(t){return e(t,r)})):V(r)?H((function(t){return e(n,t)})):e(n,r)}}}function W(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function G(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function Q(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const Y="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var Z=Object.prototype.toString,J=function(){return"[object Arguments]"===Z.call(arguments)?function(e){return"[object Arguments]"===Z.call(e)}:function(e){return Q("callee",e)}}();const X=J;var ee=!{toString:null}.propertyIsEnumerable("toString"),te=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ne=function(){return arguments.propertyIsEnumerable("length")}(),re=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const oe="function"!=typeof Object.keys||ne?H((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=ne&&X(e);for(t in e)!Q(t,e)||o&&"length"===t||(r[r.length]=t);if(ee)for(n=te.length-1;n>=0;)Q(t=te[n],e)&&!re(r,t)&&(r[r.length]=t),n-=1;return r})):H((function(e){return Object(e)!==e?[]:Object.keys(e)})),ie=H((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function ae(e,t,n,r){var o=W(e);function i(e,t){return se(e,t,n.slice(),r.slice())}return!G((function(e,t){return!G(i,t,e)}),W(t),o)}function se(e,t,n,r){if(Y(e,t))return!0;var o=ie(e);if(o!==ie(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!Y(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!Y(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&ae(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&ae(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=oe(e);if(a.length!==oe(t).length)return!1;var s=n.concat([e]),u=r.concat([t]);for(i=a.length-1;i>=0;){var l=a[i];if(!Q(l,t)||!se(t[l],e[l],s,u))return!1;i-=1}return!0}var ue=q((function(e,t){return se(e,t,[],[])}));const le=ue;function ce(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return V(n)?t:q((function(t,r){return e(n,t,r)}));case 2:return V(n)&&V(r)?t:V(n)?q((function(t,n){return e(t,r,n)})):V(r)?q((function(t,r){return e(n,t,r)})):H((function(t){return e(n,r,t)}));default:return V(n)&&V(r)&&V(o)?t:V(n)&&V(r)?q((function(t,n){return e(t,n,o)})):V(n)&&V(o)?q((function(t,n){return e(t,r,n)})):V(r)&&V(o)?q((function(t,r){return e(n,t,r)})):V(n)?H((function(t){return e(t,r,o)})):V(r)?H((function(t){return e(n,t,o)})):V(o)?H((function(t){return e(n,r,t)})):e(n,r,o)}}}function fe(e){return"[object Object]"===Object.prototype.toString.call(e)}var de=ce((function(e,t,n){var r,o={};for(r in t)Q(r,t)&&(o[r]=Q(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)Q(r,n)&&!Q(r,o)&&(o[r]=n[r]);return o}));const he=de;var pe=ce((function e(t,n,r){return he((function(n,r,o){return fe(r)&&fe(o)?e(t,r,o):t(n,r,o)}),n,r)}));const ye=pe,ve=q((function(e,t){return ye((function(e,t,n){return n}),e,t)})),ge=q((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 me(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?me(e[s],t,n,!0):e[s];return o};switch(ie(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const be=H((function(e){return null!=e&&"function"==typeof e.clone?e.clone():me(e,[],[],!0)})),we=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var _e=H((function(e){return!!we(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));const Se=_e;var Ee=function(){function e(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}(),Oe=q((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,l){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,l,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const ke=Oe;function xe(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function Pe(e,t,n,r){return e["@@transducer/result"](n[r](ke(e["@@transducer/step"],e),t))}var je="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const Ce=ce((function(e,t,n){if("function"==typeof e&&(e=function(e){return new Ee(e)}(e)),Se(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 Pe(e,t,n,"fantasy-land/reduce");if(null!=n[je])return xe(e,t,n[je]());if("function"==typeof n.next)return xe(e,t,n);if("function"==typeof n.reduce)return Pe(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));var Te;function Ae(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(Te||(Te={}));const Ne=Ae((e=>Array.isArray(e)),"must be an array"),De=Ae((e=>"boolean"==typeof e),"must be a boolean"),Me=Ae((e=>"number"==typeof e),"must be a number"),Le=Ae((e=>"string"==typeof e),"must be a string"),Ie=Ae((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),Re=Ae((e=>/^[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");var Be=r(403);const $e=(0,Be.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),Ue=(0,Be.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Ue.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const Fe=(0,Be.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function Ke(e){return(0,Be.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}const ze=(0,Be.createGlobalStore)("config-implementer-tools",{config:{}});function Ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(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){Ve(e,t,n[t])}))}return e}function qe(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function We(e,t){for(let n of Object.keys(e.schemas)){const r=rt(n,e,t);Ke(n).setState({loaded:!0,config:r})}}function Ge(e,t){const n=function(e,t){const n=it(tt(e,t)),r=Object.keys(n).reduce(((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}),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))et(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>He({},e,r[t])),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((([e,t])=>[e,{loaded:!0,config:t}]))),o=(0,Be.getGlobalStore)("config-extension-slots",{slots:{}}),i=o.getState(),a={slots:He({},i.slots,r)};le(i,a)||o.setState(a)}function Qe(e,t){const n=function(e,t){let n=Je(be(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=it([n,Xe(e,t)]);return n}(e,t);ze.setState({config:n})}function Ye(e,t,n){const r={};for(let o of t.mountedExtensions){const t=Ze(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]=qe(He({},r[o.slotName]),{[o.extensionId]:{config:t,loaded:!0}})}(0,Be.getGlobalStore)("config-extensions",{configs:{}}).setState({configs:r})}function Ze(e,t,n,r,o,i){var a,s,u;const l=function(e){const[t]=e.split("#");return t}(r),c=o.schemas[l],f=c?l:t,d=tt(o,i),h=ot(e,d);var p;const y=null!==(p=null==h||null===(a=h.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==p?p:{},v=it([ot(f,d),y]),g=null!=c?c:o.schemas[t];at(g,v,f);const m=ft(g,v);return ut(g,m,f),delete m.extensionSlots,m}function Je(e){return e.hasOwnProperty("_default")?qe(He({},e),{_value:e._default,_source:"default"}):ht(e)?Object.keys(e).reduce(((t,n)=>(t[n]=Je(e[n]),t)),{}):{}}function Xe(e,t){return ht(e)?Object.keys(e).reduce(((n,r)=>(n[r]=Xe(e[r],t),n)),{}):{_value:e,_source:t}}function et(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"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((e=>"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((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(ht(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function tt(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function nt(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter((e=>!e.startsWith("_")))){const i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!ht(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||nt(e,a,i);const s=a._elements;if(dt(s)&&nt(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const u=a._type;u&&!Object.values(Te).includes(u)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(Te).join(", ")}. Received '${u}'`),Object.keys(a).every((e=>["_description","_validators","_elements","_type"].includes(e)))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&u&&![Te.Array,Te.Object].includes(u)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(u)}`)}}function rt(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=ot(e,tt(t,n));at(r,o,e);const i=ft(r,o);return ut(r,i,e),delete i.extensionSlots,i}function ot(e,t){return it(t.map((({[e]:t})=>t)).filter((e=>!!e)))}function it(e){return Ce(ve)({},e)}function at(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?st(a,o,i):"extensionSlots"===r&&""!==n||console.error(`Unknown config key '${i}' provided. Ignoring.`)}}function st(e,t,n){lt(n,e._type,t),ht(t)?e._type===Te.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];at(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||at(e,t,n):e._type===Te.Array&&function(e,t,n){if(dt(e._elements))for(let r=0;r<t.length;r++)st(e._elements,t[r],`${n}[${r}]`);for(let o=0;o<t.length;o++){var r;lt(`${n}[${o}]`,null===(r=e._elements)||void 0===r?void 0:r._type,t[o])}}(e,t,n)}function ut(e,t,n=""){if(e)if(t!==e._default&&ct(n,e._validators,t),ht(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e._type===Te.Object&&e._elements?ut(e._elements,o,i):ut(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)ut(e._elements,t[r],`${n}[${r}]`)}function lt(e,t,n){t&&ct(e,[{Array:Ne,Boolean:De,ConceptUuid:Re,Number:Me,Object:Ie,String:Le,UUID:Re,PersonAttributeTypeUuid:Re,PatientIdentifierTypeUuid:Re}[t]],n)}function ct(e,t,n){if(t)try{for(let r of t){const t=r(n);"string"==typeof t&&("object"==typeof n?console.error(`Invalid configuration for ${e}: ${t}`):console.error(`Invalid configuration value ${n} for ${e}: ${t}`))}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}}We($e.getState(),Ue.getState()),$e.subscribe((e=>We(e,Ue.getState()))),Ue.subscribe((e=>We($e.getState(),e))),Qe($e.getState(),Ue.getState()),$e.subscribe((e=>Qe(e,Ue.getState()))),Ue.subscribe((e=>Qe($e.getState(),e))),Ge($e.getState(),Ue.getState()),$e.subscribe((e=>Ge(e,Ue.getState()))),Ue.subscribe((e=>Ge($e.getState(),e))),Ye($e.getState(),Fe.getState(),Ue.getState()),$e.subscribe((e=>{Ye(e,Fe.getState(),Ue.getState())})),Fe.subscribe((e=>{Ye($e.getState(),e,Ue.getState())})),Ue.subscribe((e=>{Ye($e.getState(),Fe.getState(),e)}));const ft=(e,t)=>{const n=be(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&dt(e))if(o._type===Te.Array&&Array.isArray(r)){const o=r.map((t=>ft(e,t)));n[t]=o}else if(o._type===Te.Object)for(let t of Object.keys(r))r[t]=ft(e,r[t])}else if(ht(o)){const e=n.hasOwnProperty(t)?r:{};ht(e)&&(n[t]=ft(o,e))}}return n};function dt(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function ht(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}const pt={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:Te.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:Te.Object,_default:{}}};var yt=Object.freeze({__proto__:null,get start(){return Yn},get ensureJQuerySupport(){return kn},get setBootstrapMaxTime(){return an},get setMountMaxTime(){return sn},get setUnmountMaxTime(){return un},get setUnloadMaxTime(){return ln},get registerApplication(){return In},get unregisterApplication(){return Bn},get getMountedApps(){return Dn},get getAppStatus(){return Ln},get unloadApplication(){return $n},get checkActivityFunctions(){return Rn},get getAppNames(){return Mn},get pathToActiveWhen(){return Kn},get navigateToUrl(){return gn},get triggerAppChange(){return qn},get addErrorHandler(){return St},get removeErrorHandler(){return Et},get mountRootParcel(){return en},get NOT_LOADED(){return xt},get LOADING_SOURCE_CODE(){return Pt},get NOT_BOOTSTRAPPED(){return jt},get BOOTSTRAPPING(){return Ct},get NOT_MOUNTED(){return Tt},get MOUNTING(){return At},get UPDATING(){return Dt},get LOAD_ERROR(){return Lt},get MOUNTED(){return Nt},get UNMOUNTING(){return Mt},get SKIP_BECAUSE_BROKEN(){return It}});function vt(e){return(vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var mt=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{}).CustomEvent,bt=function(){try{var e=new mt("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?mt:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},wt=[];function _t(e,t,n){var r=kt(e,t,n);wt.length?wt.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function St(e){if("function"!=typeof e)throw Error(Ot(28,!1));wt.push(e)}function Et(e){if("function"!=typeof e)throw Error(Ot(29,!1));var t=!1;return wt=wt.filter((function(n){var r=n===e;return t=t||r,!r})),t}function Ot(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function kt(e,t,n){var r,o="".concat(Ft(t)," '").concat($t(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(Ot(30,!1,t.status,$t(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=$t(t),t.status=n,r}var xt="NOT_LOADED",Pt="LOADING_SOURCE_CODE",jt="NOT_BOOTSTRAPPED",Ct="BOOTSTRAPPING",Tt="NOT_MOUNTED",At="MOUNTING",Nt="MOUNTED",Dt="UPDATING",Mt="UNMOUNTING",Lt="LOAD_ERROR",It="SKIP_BECAUSE_BROKEN";function Rt(e){return e.status===Nt}function Bt(e){try{return e.activeWhen(window.location)}catch(t){return _t(t,e,It),!1}}function $t(e){return e.name}function Ut(e){return Boolean(e.unmountThisParcel)}function Ft(e){return Ut(e)?"parcel":"application"}function Kt(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function zt(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function Vt(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!zt(t,(function(e){return"function"!=typeof e}))));var t}function Ht(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=Ft(e),o=$t(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return qt(n)?n:Promise.reject(Ot(15,!1,r,o,t,a))}))}),Promise.resolve())}}function qt(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function Wt(e,t){return Promise.resolve().then((function(){return e.status!==jt?e:(e.status=Ct,e.bootstrap?cn(e,"bootstrap").then(n).catch((function(n){if(t)throw kt(n,e,It);return _t(n,e,It),e})):Promise.resolve().then(n))}));function n(){return e.status=Tt,e}}function Gt(e,t){return Promise.resolve().then((function(){if(e.status!==Nt)return e;e.status=Mt;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw kt(r,e,It);_t(r,e,It)}))})).then((function(){return e}));function r(){return cn(e,"unmount").then((function(){e.status=Tt})).catch((function(n){if(t)throw kt(n,e,It);_t(n,e,It)}))}}))}var Qt=!1,Yt=!1;function Zt(e,t){return Promise.resolve().then((function(){return e.status!==Tt?e:(Qt||(window.dispatchEvent(new bt("single-spa:before-first-mount")),Qt=!0),cn(e,"mount").then((function(){return e.status=Nt,Yt||(window.dispatchEvent(new bt("single-spa:first-mount")),Yt=!0),e})).catch((function(n){return e.status=Nt,Gt(e,!0).then(r,r);function r(){if(t)throw kt(n,e,It);return _t(n,e,It),e}})))}))}var Jt=0,Xt={parcels:{}};function en(){return tn.apply(Xt,arguments)}function tn(e,t){var n=this;if(!e||"object"!==vt(e)&&"function"!=typeof e)throw Error(Ot(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(Ot(3,!1,vt(e.name)));if("object"!==vt(t))throw Error(Ot(4,!1,name,vt(t)));if(!t.domElement)throw Error(Ot(5,!1,name));var r,o=Jt++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?Pt:jt,customProps:t,parentName:$t(n),unmountThisParcel:function(){return d.then((function(){if(s.status!==Nt)throw Error(Ot(6,!1,name,s.status));return Gt(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=It,c(e),e}))}};n.parcels[o]=s;var u=a();if(!u||"function"!=typeof u.then)throw Error(Ot(7,!1));var l,c,f=(u=u.then((function(e){if(!e)throw Error(Ot(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!Vt(e.bootstrap))throw Error(Ot(9,!1,t));if(!Vt(e.mount))throw Error(Ot(10,!1,t));if(!Vt(e.unmount))throw Error(Ot(11,!1,t));if(e.update&&!Vt(e.update))throw Error(Ot(12,!1,t));var n=Ht(e,"bootstrap"),i=Ht(e,"mount"),a=Ht(e,"unmount");s.status=jt,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=fn(e.timeouts),e.update&&(s.update=Ht(e,"update"),r.update=function(e){return s.customProps=e,nn(function(e){return Promise.resolve().then((function(){if(e.status!==Nt)throw Error(Ot(32,!1,$t(e)));return e.status=Dt,cn(e,"update").then((function(){return e.status=Nt,e})).catch((function(t){throw kt(t,e,It)}))}))}(s))})}))).then((function(){return Wt(s,!0)})),d=f.then((function(){return Zt(s,!0)})),h=new Promise((function(e,t){l=e,c=t}));return r={mount:function(){return nn(Promise.resolve().then((function(){if(s.status!==Tt)throw Error(Ot(13,!1,name,s.status));return n.parcels[o]=s,Zt(s)})))},unmount:function(){return nn(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:nn(u),bootstrapPromise:nn(f),mountPromise:nn(d),unmountPromise:nn(h)}}function nn(e){return e.then((function(){return null}))}function rn(e){var t=$t(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==vt(n)||null===n||Array.isArray(n))&&(n={},console.warn(Ot(40,!1),t,n));var r=Kt({},n,{name:t,mountParcel:tn.bind(e),singleSpa:yt});return Ut(e)&&(r.unmountSelf=e.unmountThisParcel),r}var on={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function an(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(16,!1));on.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function sn(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(17,!1));on.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function un(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(18,!1));on.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function ln(e,t,n){if("number"!=typeof e||e<=0)throw Error(Ot(19,!1));on.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function cn(e,t){var n=e.timeouts[t],r=n.warningMillis,o=Ft(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](rn(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return c(1)}),r),setTimeout((function(){return c(!0)}),n.millis);var l=Ot(31,!1,t,o,$t(e),n.millis);function c(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(l)):console.error(l);else if(!u){var t=e,o=t*r;console.warn(l),o+r<n.millis&&setTimeout((function(){return c(t+1)}),r)}}}))}function fn(e){var t={};for(var n in on)t[n]=Kt({},on[n],e&&e[n]||{});return t}function dn(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==xt&&e.status!==Lt?e:(e.status=Pt,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(rn(e));if(!qt(r))throw n=!0,Error(Ot(33,!1,$t(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==vt(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!Vt(t.bootstrap)&&(r=35),Vt(t.mount)||(r=36),Vt(t.unmount)||(r=37);var o=Ft(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(Ot(r,!1,o,$t(e),i),t),_t(void 0,e,It),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=Kt({},e.devtools.overlays,t.devtools.overlays)),e.status=jt,e.bootstrap=Ht(t,"bootstrap"),e.mount=Ht(t,"mount"),e.unmount=Ht(t,"unmount"),e.unload=Ht(t,"unload"),e.timeouts=fn(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=It:(r=Lt,e.loadErrorTime=(new Date).getTime()),_t(t,e,r),e})));var t,n}))}var hn,pn="undefined"!=typeof window,yn={hashchange:[],popstate:[]},vn=["hashchange","popstate"];function gn(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(Ot(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=En(window.location.href),r=En(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function mn(e){var t=this;if(e){var n=e[0].type;vn.indexOf(n)>=0&&yn[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function bn(){Wn([],arguments)}function wn(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return hn&&n===o||(Zn()?window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)):Wn([])),r}}if(pn){window.addEventListener("hashchange",bn),window.addEventListener("popstate",bn);var _n=window.addEventListener,Sn=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&vn.indexOf(e)>=0)||zt(yn[e],(function(e){return e===t})))return _n.apply(this,arguments);yn[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&vn.indexOf(e)>=0))return Sn.apply(this,arguments);yn[e]=yn[e].filter((function(e){return e!==t}))},window.history.pushState=wn(window.history.pushState,"pushState"),window.history.replaceState=wn(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(Ot(41,!1)):window.singleSpaNavigate=gn}function En(e){var t=document.createElement("a");return t.href=e,t}var On=!1;function kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!On){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return xn.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return xn.call(this,n,window.removeEventListener,e,t,arguments)},On=!0}}function xn(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){vn.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var Pn={};function jn(e){return Promise.resolve().then((function(){var t=Pn[$t(e)];if(!t)return e;if(e.status===xt)return Cn(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==Tt&&e.status!==Lt)return e;var n=e.status===Lt?Promise.resolve():cn(e,"unload");return e.status="UNLOADING",n.then((function(){return Cn(e,t),e})).catch((function(n){return function(e,t,n){delete Pn[$t(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,_t(n,e,It),t.reject(n)}(e,t,n),e}))}))}function Cn(e,t){delete Pn[$t(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=xt,t.resolve()}function Tn(e,t,n,r){Pn[$t(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Pn[$t(e)],"promise",{get:t})}function An(e){return Pn[e]}var Nn=[];function Dn(){return Nn.filter(Rt).map($t)}function Mn(){return Nn.map($t)}function Ln(e){var t=zt(Nn,(function(t){return $t(t)===e}));return t?t.status:null}function In(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===vt(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(Ot(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(Ot(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(Ot(20,!1));if("object"!==vt(e.app)&&"function"!=typeof e.app)throw Error(Ot(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(Ot(24,!1));if(!Fn(e.customProps))throw Error(Ot(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(Ot(20,!1));if(!t)throw Error(Ot(23,!1));if("function"!=typeof n)throw Error(Ot(24,!1));if(!Fn(r))throw Error(Ot(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:Kn(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(-1!==Mn().indexOf(o.name))throw Error(Ot(21,!1,o.name));Nn.push(Kt({loadErrorTime:null,status:xt,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),pn&&(kn(),Wn())}function Rn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Nn.filter((function(t){return t.activeWhen(e)})).map($t)}function Bn(e){if(0===Nn.filter((function(t){return $t(t)===e})).length)throw Error(Ot(25,!1,e));return $n(e).then((function(){var t=Nn.map($t).indexOf(e);Nn.splice(t,1)}))}function $n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(Ot(26,!1));var n=zt(Nn,(function(t){return $t(t)===e}));if(!n)throw Error(Ot(27,!1,e));var r,o=An($t(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Tn(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,Un(n,o.resolve,o.reject)):r=new Promise((function(e,t){Tn(n,(function(){return r}),e,t),Un(n,e,t)})),r}function Un(e,t,n){Gt(e).then(jn).then((function(){t(),setTimeout((function(){Wn()}))})).catch(n)}function Fn(e){return!e||"function"==typeof e||"object"===vt(e)&&null!==e&&!Array.isArray(e)}function Kn(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var zn=!1,Vn=[],Hn=pn&&window.location.href;function qn(){return Wn()}function Wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(zn)return new Promise((function(e,n){Vn.push({resolve:e,reject:n,eventArguments:t})}));var n,r=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Nn.forEach((function(i){var a=i.status!==It&&Bt(i);switch(i.status){case Lt:a&&o-i.loadErrorTime>=200&&n.push(i);break;case xt:case Pt:a&&n.push(i);break;case jt:case Tt:!a&&An($t(i))?e.push(i):a&&r.push(i);break;case Nt:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),o=r.appsToUnload,i=r.appsToUnmount,a=r.appsToLoad,s=r.appsToMount,u=!1,l=Hn,c=Hn=window.location.href;return Zn()?(zn=!0,n=o.concat(a,i,s),Promise.resolve().then((function(){if(window.dispatchEvent(new bt(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",p(!0))),window.dispatchEvent(new bt("single-spa:before-routing-event",p(!0,{cancelNavigation:f}))),u)return window.dispatchEvent(new bt("single-spa:before-mount-routing-event",p(!0))),d(),void gn(l);var t=o.map(jn),r=i.map(Gt).map((function(e){return e.then(jn)})).concat(t),c=Promise.all(r);c.then((function(){window.dispatchEvent(new bt("single-spa:before-mount-routing-event",p(!0)))}));var y=a.map((function(e){return dn(e).then((function(e){return Gn(e,c)}))})),v=s.filter((function(e){return a.indexOf(e)<0})).map((function(e){return Gn(e,c)}));return c.catch((function(e){throw h(),e})).then((function(){return h(),Promise.all(y.concat(v)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(d)}))}))):(n=a,Promise.resolve().then((function(){var e=a.map(dn);return Promise.all(e).then(h).then((function(){return[]})).catch((function(e){throw h(),e}))})));function f(){u=!0}function d(){var t=Dn();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new bt(r,p())),window.dispatchEvent(new bt("single-spa:routing-event",p()))}catch(e){setTimeout((function(){throw e}))}if(zn=!1,Vn.length>0){var o=Vn;Vn=[],Wn(o)}return t}function h(){e.forEach((function(e){mn(e.eventArguments)})),mn(t)}function p(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],f=arguments.length>1?arguments[1]:void 0,d={},h=(gt(e={},Nt,[]),gt(e,Tt,[]),gt(e,xt,[]),gt(e,It,[]),e);r?(a.concat(s).forEach((function(e,t){y(e,Nt)})),o.forEach((function(e){y(e,xt)})),i.forEach((function(e){y(e,Tt)}))):n.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:d,appsByNewStatus:h,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:c,navigationIsCanceled:u}};return f&&Kt(p.detail,f),p;function y(e,t){var n=$t(e);t=t||Ln(n),d[n]=t,(h[t]=h[t]||[]).push(n)}}}function Gn(e,t){return Bt(e)?Wt(e).then((function(e){return t.then((function(){return Bt(e)?Zt(e):e}))})):t.then((function(){return e}))}var Qn=!1;function Yn(e){var t;Qn=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,hn=t),pn&&Wn()}function Zn(){return Qn}pn&&setTimeout((function(){Qn||console.warn(Ot(1,!1))}),5e3);var Jn={getRawAppData:function(){return[].concat(Nn)},reroute:Wn,NOT_LOADED:xt,toLoadPromise:dn,toBootstrapPromise:Wt,unregisterApplication:Bn};function Xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pn&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=Jn);const er=e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);return Ae((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;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((e=>"${"+e+"}")).join(", "))},tr={inRange:(e,t)=>Ae((n=>e<=n&&n<=t),`must be between ${e} and ${t}`),isUrl:er([]),isUrlWithTemplateParameters:er,oneOf:e=>Ae((t=>e.includes(t)),`Must be one of the following: '${e.join("', '")}'.`)};function nr(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const or="/ws/rest/v1/",ir="/ws/fhir2/R4",ar=`${or}session`;function sr(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function ur(e,t={}){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.");let n=sr(e);if(t.headers||(t.headers={}),z(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept,e.startsWith(or)&&void 0===t.headers["Disable-WWW-Authenticate"]&&(t.headers["Disable-WWW-Authenticate"]="true"),e.startsWith(ir)){const e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}const r=Error();return window.fetch(n,t).then((o=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){nr(i,r,o,a,s,"next",e)}function s(e){nr(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function*(e){const t=e;if(t.ok)return 204===t.status?(t.data=null,t):t.clone().text().then((e=>{try{e&&(t.data=JSON.parse(e))}catch(e){}return t}));{const{redirectAuthFailure:e}=yield new Promise((e=>{const t=Ke("@openmrs/esm-api");function n(t){if(t.loaded&&t.config){const n=ge(["Display conditions","Translation overrides"],t.config);e(n),r&&r()}}n(t.getState());const r=t.subscribe(n)}));return n===sr(ar)&&403===t.status||e.enabled&&e.errors.includes(t.status)?(function({to:e,templateParams:t}){const n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=function(e,t){const n=window.getOpenmrsSpaBase().replace(/\/$/,"");return function(e,t){return Object.keys(t).reduce(((e,n)=>e.split("${"+n+"}").join(t[n])),e)}(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xn(e,t,n[t])}))}return e}({openmrsBase:window.openmrsBase,openmrsSpaBase:n},t)).replace(/^\/\//,"/")}(e,t);r.startsWith(n)?gn(r):window.location.assign(r)}({to:e.url}),e.resolvePromise?Promise.resolve():new Promise((()=>{}))):t.clone().text().then((e=>{let o=e;try{o=JSON.parse(e)}catch(e){}throw new cr(n,t,o,r)}),(e=>{throw new cr(n,t,null,r)}))}})),function(e){return o.apply(this,arguments)}));var o}function lr(e,t={}){if("object"!=typeof t)throw Error("The second argument to openmrsObservableFetch must be either omitted or an object");const n=new AbortController;return t.signal=n.signal,new O((r=>{let o=!1;return ur(e,t).then((e=>{o=!0,r.next(e),r.complete()}),(e=>{o=!0,r.error(e)})),()=>{o||n.abort()}}))}let cr=class extends Error{constructor(e,t,n,r){super(),rr(this,"response",void 0),rr(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:\n${r.stack}\nStacktrace for incoming response:\n${this.stack}`}};var fr=r(151);const dr=function(e){return void 0===e};function hr(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}const pr=(0,Be.createGlobalStore)("session",{loaded:!1,session:null});let yr=0;function vr(e={includeAuthStatus:!0}){return(yr<Date.now()-6e4||!pr.getState().loaded)&&mr(),new O((t=>{const n=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(pr.getState()),pr.subscribe(n)}))}function gr(){return(yr<Date.now()-6e4||!pr.getState().loaded)&&mr(),pr}function mr(){return new Promise(((e,t)=>{yr=Date.now(),ur(ar).then((n=>{if("object"!=typeof(null==n?void 0:n.data))return t(),Promise.reject();!function(e){var t,n,r;const o=null!==(r=null==e||null===(t=e.user)||void 0===t||null===(n=t.userProperties)||void 0===n?void 0:n.defaultLocale)&&void 0!==r?r:e.locale;o!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",o)}(n.data),e(n.data),pr.setState({loaded:!0,session:n.data})})).catch((e=>((0,fr.reportError)(`Failed to fetch new session information: ${e}`),t(e),{sessionId:"",authenticated:!1})))}))}function br(){pr.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function wr(e,t){return void 0===t?Boolean(e):!Boolean(e)||function(e,t){return"string"==typeof e?!dr(t.privileges.find((t=>e===t.display))):Array.isArray(e)?e.every((e=>!dr(t.privileges.find((t=>e===t.display))))):(dr(e)||console.error(`Could not understand privileges "${e}"`),!0)}(e,t)||function(e){return!dr(e.roles.find((e=>"System Developer"===e.display)))}(t)}function _r(){let e,t;return new Promise(((n,r)=>{const o=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};o(pr.getState()),e||(t=pr.subscribe(o))}))}function Sr(){return new Promise(((e,t)=>{vr().subscribe((t=>{e(t.sessionLocation)}),t).unsubscribe()}))}function Er(e,t){return Or.apply(this,arguments)}function Or(){return Or=function(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){hr(i,r,o,a,s,"next",e)}function s(e){hr(i,r,o,a,s,"throw",e)}a(void 0)}))}}((function*(e,t){yield ur(ar,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}),yield mr()})),Or.apply(this,arguments)}function kr(){!function(e,t){nt(e,t);const n=ve(t,pt),r=$e.getState();$e.setState({schemas:qe(He({},r.schemas),{[e]:n})})}("@openmrs/esm-api",{redirectAuthFailure:{enabled:{_type:Te.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:Te.String,_default:"${openmrsSpaBase}/login",_validators:[tr.isUrl]},errors:{_type:Te.Array,_default:[401],_elements:{_type:Te.Number,_validators:[tr.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:Te.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."}}}),mr()}try{self["workbox:window:6.5.3"]&&_()}catch(vt){}function xr(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function Pr(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}try{self["workbox:core:6.5.3"]&&_()}catch(vt){}var jr=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function Cr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var Tr=function(e,t){this.type=e,Object.assign(this,t)};function Ar(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function Nr(){}var Dr={type:"SKIP_WAITING"};function Mr(e,t){if(!t)return e&&e.then?e.then(Nr):Promise.resolve()}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new jr,r.en=new jr,r.on=new jr,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!Cr(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 Tr(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new Tr("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 Tr("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 Ar(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new Tr("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return Mr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),Ar(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&Cr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new Tr("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?Mr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return Ar(this.getSW(),(function(t){return xr(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&xr(this.fn.waiting,Dr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&Cr(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return Ar(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pr(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const Lr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,Ir=Object.keys,Rr=Array.isArray;function Br(e,t){return"object"!=typeof t||Ir(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||Lr.Promise||(Lr.Promise=Promise);const $r=Object.getPrototypeOf,Ur={}.hasOwnProperty;function Fr(e,t){return Ur.call(e,t)}function Kr(e,t){"function"==typeof t&&(t=t($r(e))),("undefined"==typeof Reflect?Ir:Reflect.ownKeys)(t).forEach((n=>{Vr(e,n,t[n])}))}const zr=Object.defineProperty;function Vr(e,t,n,r){zr(e,t,Br(n&&Fr(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Hr(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Vr(e.prototype,"constructor",e),{extend:Kr.bind(null,e.prototype)}}}}const qr=Object.getOwnPropertyDescriptor;function Wr(e,t){let n;return qr(e,t)||(n=$r(e))&&Wr(n,t)}const Gr=[].slice;function Qr(e,t,n){return Gr.call(e,t,n)}function Yr(e,t){return t(e)}function Zr(e){if(!e)throw new Error("Assertion Failed")}function Jr(e){Lr.setImmediate?setImmediate(e):setTimeout(e,0)}function Xr(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function eo(e,t){if(Fr(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=eo(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:eo(s,t.substr(a+1))}}function to(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Zr("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)to(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?Rr(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&Fr(e,a)||(u=e[a]={}),to(u,s,n)}}else void 0===n?Rr(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function no(e){var t={};for(var n in e)Fr(e,n)&&(t[n]=e[n]);return t}const ro=[].concat;function oo(e){return ro.apply([],e)}const io="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(oo([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>Lr[e])),ao=io.map((e=>Lr[e]));Xr(io,(e=>[e,!0]));let so=null;function uo(e){so="undefined"!=typeof WeakMap&&new WeakMap;const t=lo(e);return so=null,t}function lo(e){if(!e||"object"!=typeof e)return e;let t=so&&so.get(e);if(t)return t;if(Rr(e)){t=[],so&&so.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(lo(e[n]))}else if(ao.indexOf(e.constructor)>=0)t=e;else{const n=$r(e);for(var o in t=n===Object.prototype?{}:Object.create(n),so&&so.set(e,t),e)Fr(e,o)&&(t[o]=lo(e[o]))}return t}const{toString:co}={};function fo(e){return co.call(e).slice(8,-1)}const ho="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",po="symbol"==typeof ho?function(e){var t;return null!=e&&(t=e[ho])&&t.apply(e)}:function(){return null},yo={};function vo(e){var t,n,r,o;if(1===arguments.length){if(Rr(e))return e.slice();if(this===yo&&"string"==typeof e)return[e];if(o=po(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const go="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var mo="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function bo(e,t){mo=e,wo=t}var wo=()=>!0;const _o=!new Error("").stack;function So(){if(_o)try{throw So.arguments,new Error}catch(e){return e}return new Error}function Eo(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(wo).map((e=>"\n"+e)).join("")):""}var Oo=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ko=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Oo),xo={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Po(e,t){this._e=So(),this.name=e,this.message=t}function jo(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function Co(e,t,n,r){this._e=So(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=jo(e,t)}function To(e,t){this._e=So(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=jo(e,t)}Hr(Po).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+Eo(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Hr(Co).from(Po),Hr(To).from(Po);var Ao=ko.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const No=Po;var Do=ko.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=So(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=xo[t]||n,this.inner=null)}return Hr(r).from(No),e[t]=r,e}),{});Do.Syntax=SyntaxError,Do.Type=TypeError,Do.Range=RangeError;var Mo=Oo.reduce(((e,t)=>(e[t+"Error"]=Do[t],e)),{}),Lo=ko.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=Do[t]),e)),{});function Io(){}function Ro(e){return e}function Bo(e,t){return null==e||e===Ro?t:function(n){return t(e(n))}}function $o(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function Uo(e,t){return e===Io?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?$o(r,this.onsuccess):r),o&&(this.onerror=this.onerror?$o(o,this.onerror):o),void 0!==i?i:n}}function Fo(e,t){return e===Io?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?$o(n,this.onsuccess):n),r&&(this.onerror=this.onerror?$o(r,this.onerror):r)}}function Ko(e,t){return e===Io?t:function(n){var r=e.apply(this,arguments);Br(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?$o(o,this.onsuccess):o),i&&(this.onerror=this.onerror?$o(i,this.onerror):i),void 0===r?void 0===a?void 0:a:Br(r,a)}}function zo(e,t){return e===Io?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function Vo(e,t){return e===Io?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)}}Lo.ModifyError=Co,Lo.DexieError=Po,Lo.BulkError=To;var Ho={};const[qo,Wo,Go]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,$r(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,$r(t),e]})(),Qo=Wo&&Wo.then,Yo=qo&&qo.constructor,Zo=!!Go;var Jo=!1,Xo=Go?()=>{Go.then(Si)}:Lr.setImmediate?setImmediate.bind(null,Si):Lr.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{Si(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(Si,0)},ei=function(e,t){li.push([e,t]),ni&&(Xo(),ni=!1)},ti=!0,ni=!0,ri=[],oi=[],ii=null,ai=Ro,si={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:qi,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{qi(e[0],e[1])}catch(e){}}))}},ui=si,li=[],ci=0,fi=[];function di(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=Io,this._lib=!1;var t=this._PSD=ui;if(mo&&(this._stackHolder=So(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Ho)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&vi(this,this._value))}this._state=null,this._value=null,++t.ref,yi(this,e)}const hi={get:function(){var e=ui,t=Ni;function n(n,r){var o=!e.global&&(e!==ui||t!==Ni);const i=o&&!Ii();var a=new di(((t,a)=>{mi(this,new pi(Vi(n,e,o,i),Vi(r,e,o,i),t,a,e))}));return mo&&_i(a,this),a}return n.prototype=Ho,n},set:function(e){Vr(this,"then",e&&e.prototype===Ho?hi:{get:function(){return e},set:hi.set})}};function pi(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function yi(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&Ei();t&&"function"==typeof t.then?yi(e,((e,n)=>{t instanceof di?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,gi(e)),n&&Oi()}}),vi.bind(null,e))}catch(t){vi(e,t)}}function vi(e,t){if(oi.push(t),null===e._state){var n=e._lib&&Ei();t=ai(t),e._state=!1,e._value=t,mo&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=Wr(t,"stack");t._promise=e,Vr(t,"stack",{get:()=>Jo?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){ri.some((t=>t._value===e._value))||ri.push(e)}(e),gi(e),n&&Oi()}}function gi(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)mi(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===ci&&(++ci,ei((()=>{0==--ci&&ki()}),[]))}function mi(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,++ci,ei(bi,[n,e,t])}else e._listeners.push(t)}function bi(e,t,n){try{ii=t;var r,o=t._value;t._state?r=e(o):(oi.length&&(oi=[]),r=e(o),-1===oi.indexOf(o)&&function(e){for(var t=ri.length;t;)if(ri[--t]._value===e._value)return void ri.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{ii=null,0==--ci&&ki(),--n.psd.ref||n.psd.finalize()}}function wi(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=Eo(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return mo&&((r=Eo(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&wi(e._prev,t,n)),t}function _i(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function Si(){Ei()&&Oi()}function Ei(){var e=ti;return ti=!1,ni=!1,e}function Oi(){var e,t,n;do{for(;li.length>0;)for(e=li,li=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(li.length>0);ti=!0,ni=!0}function ki(){var e=ri;ri=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=fi.slice(0),n=t.length;n;)t[--n]()}function xi(e){return new di(Ho,!1,e)}function Pi(e,t){var n=ui;return function(){var r=Ei(),o=ui;try{return Ui(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{Ui(o,!1),r&&Oi()}}}Kr(di.prototype,{then:hi,_then:function(e,t){mi(this,new pi(null,null,e,t,ui))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):xi(e))):this.then(null,(e=>e&&e.name===t?n(e):xi(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),xi(t))))},stack:{get:function(){if(this._stack)return this._stack;try{Jo=!0;var e=wi(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{Jo=!1}}},timeout:function(e,t){return e<1/0?new di(((n,r)=>{var o=setTimeout((()=>r(new Do.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Vr(di.prototype,Symbol.toStringTag,"Dexie.Promise"),si.env=Fi(),Kr(di,{all:function(){var e=vo.apply(null,arguments).map(Ri);return new di((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>di.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof di)return e;if(e&&"function"==typeof e.then)return new di(((t,n)=>{e.then(t,n)}));var t=new di(Ho,!0,e);return _i(t,ii),t},reject:xi,race:function(){var e=vo.apply(null,arguments).map(Ri);return new di(((t,n)=>{e.map((e=>di.resolve(e).then(t,n)))}))},PSD:{get:()=>ui,set:e=>ui=e},totalEchoes:{get:()=>Ni},newPSD:Mi,usePSD:Ki,scheduler:{get:()=>ei,set:e=>{ei=e}},rejectionMapper:{get:()=>ai,set:e=>{ai=e}},follow:(e,t)=>new di(((n,r)=>Mi(((t,n)=>{var r=ui;r.unhandleds=[],r.onunhandled=n,r.finalize=$o((function(){!function(e){fi.push((function t(){e(),fi.splice(fi.indexOf(t),1)})),++ci,ei((()=>{0==--ci&&ki()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),Yo&&(Yo.allSettled&&Vr(di,"allSettled",(function(){const e=vo.apply(null,arguments).map(Ri);return new di((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>di.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),Yo.any&&"undefined"!=typeof AggregateError&&Vr(di,"any",(function(){const e=vo.apply(null,arguments).map(Ri);return new di(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>di.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const ji={awaits:0,echoes:0,id:0};var Ci=0,Ti=[],Ai=0,Ni=0,Di=0;function Mi(e,t,n,r){var o=ui,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++Di;var a=si.env;i.env=Zo?{Promise:di,PromiseProp:{value:di,configurable:!0,writable:!0},all:di.all,race:di.race,allSettled:di.allSettled,any:di.any,resolve:di.resolve,reject:di.reject,nthen:Hi(a.nthen,i),gthen:Hi(a.gthen,i)}:{},t&&Br(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=Ki(i,e,n,r);return 0===i.ref&&i.finalize(),s}function Li(){return ji.id||(ji.id=++Ci),++ji.awaits,ji.echoes+=100,ji.id}function Ii(){return!!ji.awaits&&(0==--ji.awaits&&(ji.id=0),ji.echoes=100*ji.awaits,!0)}function Ri(e){return ji.echoes&&e&&e.constructor===Yo?(Li(),e.then((e=>(Ii(),e)),(e=>(Ii(),Wi(e))))):e}function Bi(e){++Ni,ji.echoes&&0!=--ji.echoes||(ji.echoes=ji.id=0),Ti.push(ui),Ui(e,!0)}function $i(){var e=Ti[Ti.length-1];Ti.pop(),Ui(e,!1)}function Ui(e,t){var n=ui;if((t?!ji.echoes||Ai++&&e===ui:!Ai||--Ai&&e===ui)||zi(t?Bi.bind(null,e):$i),e!==ui&&(ui=e,n===si&&(si.env=Fi()),Zo)){var r=si.env.Promise,o=e.env;Wo.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(Lr,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function Fi(){var e=Lr.Promise;return Zo?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(Lr,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:Wo.then,gthen:e.prototype.then}:{}}function Ki(e,t,n,r,o){var i=ui;try{return Ui(e,!0),t(n,r,o)}finally{Ui(i,!1)}}function zi(e){Qo.call(qo,e)}function Vi(e,t,n,r){return"function"!=typeof e?e:function(){var o=ui;n&&Li(),Ui(t,!0);try{return e.apply(this,arguments)}finally{Ui(o,!1),r&&zi(Ii)}}}function Hi(e,t){return function(n,r){return e.call(this,Vi(n,t),Vi(r,t))}}function qi(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(Lr.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),Br(r,o)):Lr.CustomEvent&&Br(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&Lr.dispatchEvent&&(dispatchEvent(r),!Lr.PromiseRejectionEvent&&Lr.onunhandledrejection))try{Lr.onunhandledrejection(r)}catch(e){}mo&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+Qo).indexOf("[native code]")&&(Li=Ii=Io);var Wi=di.reject;function Gi(e,t,n,r){if(e.idbdb&&(e._state.openComplete||ui.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===Ao.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>Gi(e,t,n,r)))):Wi(o)}return o._promise(t,((e,t)=>Mi((()=>(ui.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return Wi(new Do.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return Wi(new Do.DatabaseClosed);e.open().catch(Io)}return e._state.dbReadyPromise.then((()=>Gi(e,t,n,r)))}const Qi=String.fromCharCode(65535),Yi="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Zi=[],Ji="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Xi=Ji,ea=Ji,ta=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function na(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const ra={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function oa(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=uo(t))[e],t)}let ia=class{_trans(e,t,n){const r=this._tx||ui.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new Do.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=Ei();try{return r&&r.db===this.db?r===ui.trans?r._promise(e,i,n):Mi((()=>r._promise(e,i,n)),{trans:r,transless:ui.transless||ui}):Gi(this.db,e,[this.name],i)}finally{a&&Oi()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(Rr(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=Ir(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==Qi)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&mo&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?na(n,a&&a.multi?e=>{const t=eo(e,o);return Rr(t)&&t.some((e=>i(s,e)))}:e=>i(s,eo(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,Rr(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(Fr(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){Br(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=oa(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?di.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{to(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||Rr(e))return this.where(":id").equals(e).modify(t);{const n=eo(e,this.schema.primKey.keyPath);if(void 0===n)return Wi(new Do.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?Ir(t).forEach((n=>{to(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=oa(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?di.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{to(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?di.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:ra}))).then((e=>e.numFailures?di.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Do.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Do.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(oa(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new To(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new Do.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new Do.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(oa(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new To(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new To(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}};function aa(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){Ir(e).forEach((function(t){var n=e[t];if(Rr(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new Do.InvalidArgument("Invalid event config");var r=i(t,Ro,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){Jr((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=zo),o||(o=Io);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}}function sa(e,t){return Hr(t).from({prototype:e}),t}function ua(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function la(e,t){e.filter=na(e.filter,t)}function ca(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>na(r(),t()):t,e.justLimit=n&&!r}function fa(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new Do.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function da(e,t,n){const r=fa(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function ha(e,t,n,r){const o=e.replayFilter?na(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),Fr(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),pa(da(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return pa(da(e,r,n),na(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function pa(e,t,n,r){var o=Pi(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=Io}),(t=>{e.fail(t),n=Io}))||o(e.value,e,(e=>n=e)),n()}))}))}function ya(e,t){try{const n=va(e),r=va(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(ga(e),ga(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=ya(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function va(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=fo(e);return"ArrayBuffer"===n?"binary":n}function ga(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}let ma=class{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,Wi.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,Wi.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=na(t.algorithm,e)}_iterate(e,t){return ha(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&Br(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>ha(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(ua(t,!0))return n.count({trans:e,query:{index:fa(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return ha(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&ua(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=fa(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return ha(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,ua(t)?ca(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):ca(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),ca(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return la(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return la(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=na(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&ua(t,!0)&&t.limit>0)return this._read((e=>{var n=fa(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return la(this._ctx,(function(e){var t=e.primaryKey.toString(),r=Fr(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=Ir(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];eo(t,a)!==s&&(to(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,c=[];let f=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of Ir(n))c.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=c=>{const f=Math.min(l,o.length-c);return a.getMany({trans:n,keys:o.slice(c,c+f),cache:"immutable"}).then((d=>{const p=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=d[e],n={value:uo(t),primKey:o[c+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[c+e]):s||0===ya(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[c+e])):(g.push(o[c+e]),p.push(n.value)))}const m=ua(t)&&t.limit===1/0&&("function"!=typeof e||e===ba)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);h(p.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(y.length,e))))).then((()=>(g.length>0||m&&e===ba)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>h(g.length,e))))).then((()=>o.length>c+f&&i(c+l)))}))};return i(0).then((()=>{if(c.length>0)throw new Co("Error modifying one or more objects",c,f,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return ua(e)&&(e.isPrimKey&&!ea||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new Co("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(ba)}};const ba=(e,t)=>t.value=null;function wa(e,t){return e<t?-1:e===t?0:1}function _a(e,t){return e>t?-1:e===t?0:1}function Sa(e,t,n){var r=e instanceof ja?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function Ea(e){return new e.Collection(e,(()=>Pa(""))).limit(0)}function Oa(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],l)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function ka(e,t,n,r){var o,i,a,s,u,l,c,f=n.length;if(!n.every((e=>"string"==typeof e)))return Sa(e,"String expected.");function d(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?wa:_a;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),l=e,c="next"===e?"":r}d("next");var h=new e.Collection(e,(()=>xa(s[0],u[f-1]+r)));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,u,p))return!0;for(var h=null,y=p;y<f;++y){var v=Oa(o,d,s[y],u[y],a,l);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+c)}:r),!1})),h}function xa(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function Pa(e){return{type:1,lower:e,upper:e}}let ja=class{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?Ea(this):new this.Collection(this,(()=>xa(e,t,!n,!r)))}catch(e){return Sa(this,Yi)}}equals(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>Pa(e)))}above(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(e,void 0,!0)))}aboveOrEqual(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(e,void 0,!1)))}below(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?Sa(this,Yi):new this.Collection(this,(()=>xa(void 0,e)))}startsWith(e){return"string"!=typeof e?Sa(this,"String expected."):this.between(e,e+Qi,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):ka(this,((e,t)=>0===e.indexOf(t[0])),[e],Qi)}equalsIgnoreCase(e){return ka(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=vo.apply(yo,arguments);return 0===e.length?Ea(this):ka(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=vo.apply(yo,arguments);return 0===e.length?Ea(this):ka(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,Qi)}anyOf(){const e=vo.apply(yo,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return Sa(this,Yi)}if(0===e.length)return Ea(this);const n=new this.Collection(this,(()=>xa(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=vo.apply(yo,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return Sa(this,Yi)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return Ea(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return Sa(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Do.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let l,c=r;function f(e,t){return c(e[0],t[0])}try{l=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),l.sort(f)}catch(e){return Sa(this,Yi)}let d=0;const h=u?e=>r(e,l[d][1])>0:e=>r(e,l[d][1])>=0,p=s?e=>o(e,l[d][0])>0:e=>o(e,l[d][0])>=0;let y=h;const v=new this.Collection(this,(()=>xa(l[0][0],l[l.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=h,c=r):(y=p,c=o),l.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++d,d===l.length)return t(n),!1;return!!function(e){return!h(e)&&!p(e)}(o)||(0===this._cmp(o,l[d][1])||0===this._cmp(o,l[d][0])||t((()=>{c===r?e.continue(l[d][0]):e.continue(l[d][1])})),!1)})),v}startsWithAnyOf(){const e=vo.apply(yo,arguments);return e.every((e=>"string"==typeof e))?0===e.length?Ea(this):this.inAnyRange(e.map((e=>[e,e+Qi]))):Sa(this,"startsWithAnyOf() only works with strings")}};function Ca(e){return Pi((function(t){return Ta(t),e(t.target.error),!1}))}function Ta(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const Aa=aa(null,"storagemutated");let Na=class{_lock(){return Zr(!ui.global),++this._reculock,1!==this._reculock||ui.global||(ui.lockOwnerFor=this),this}_unlock(){if(Zr(!ui.global),0==--this._reculock)for(ui.global||(ui.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{Ki(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&ui.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(Zr(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new Do.DatabaseClosed(n);case"MissingAPIError":throw new Do.MissingAPI(n.message,n);default:throw new Do.OpenFailed(n)}if(!this.active)throw new Do.TransactionInactive;return Zr(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=Pi((t=>{Ta(t),this._reject(e.error)})),e.onabort=Pi((t=>{Ta(t),this.active&&this._reject(new Do.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=Pi((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&Aa.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return Wi(new Do.ReadOnly("Transaction is readonly"));if(!this.active)return Wi(new Do.TransactionInactive);if(this._locked())return new di(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},ui])}));if(n)return Mi((()=>{var e=new di(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new di(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=di.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new di(((e,r)=>{n.then((n=>t._waitingQueue.push(Pi(e.bind(null,n)))),(e=>t._waitingQueue.push(Pi(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Do.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(Fr(t,e))return t[e];const n=this.schema[e];if(!n)throw new Do.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}};function Da(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?"++":"")+Ma(t)}}function Ma(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function La(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Xr(n,(e=>[e.name,e]))}}let Ia=e=>{try{return e.only([[]]),Ia=()=>[[]],[[]]}catch(e){return Ia=()=>Qi,Qi}};function Ra(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>eo(t,e)}(e):t=>eo(t,e)}function Ba(e){return[].slice.call(e)}let $a=0;function Ua(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function Fa({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},i){const a=function(e,t){return t.reduce(((e,{create:t})=>o({},e,t(e))),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=Ba(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=Rr(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:Ra(t)},indexes:Ba(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:Rr(o),keyPath:o,unique:n,multiEntry:r,extractKey:Ra(o)};return i[Ua(o)]=a,a})),getIndexByKeyPath:e=>i[Ua(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[Ua(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=Pi(s);const l=e.objectStore(t),c=null==l.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:d}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const p=[],y=[];let v=0;const g=e=>{++v,Ta(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(h=l.clear()):p.push(h=l.delete(r(a)))}else{const[e,t]=f?c?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<d;++r)p.push(h=t&&void 0!==t[r]?l[n](e[r],t[r]):l[n](e[r])),h.onerror=g;else for(let t=0;t<d;++t)p.push(h=l[n](e[t])),h.onerror=g}const m=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};h.onerror=e=>{g(e),m(e)},h.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=Pi(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,l=0,c=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++c===l&&r(s)},d=Ca(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=d,++l);0===l&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=Pi(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=Ca(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=Pi(o);const{trans:a,values:s,limit:u,query:l}=n,c=u===1/0?void 0:u,{index:f,range:d}=l,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,c):p.getAllKeys(y,c);e.onsuccess=e=>o({result:e.target.result}),e.onerror=Ca(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=Ca(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=Pi(s);const{index:l,range:c}=o,f=e.objectStore(t),d=l.isPrimaryKey?f:f.index(l.name),h=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(r(c),h):d.openKeyCursor(r(c),h);p.onerror=Ca(u),p.onsuccess=Pi((t=>{const n=p.result;if(!n)return void s(null);n.___id=++$a,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=Pi(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=Pi(e),p.onerror=Ca(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=Pi((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),l=r(i),c=l?u.count(l):u.count();c.onsuccess=Pi((t=>e(t.target.result))),c.onerror=Ca(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:Ia(t),schema:o}}(t,n,i),e.dbcore);return{dbcore:a}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function Ka({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=Wr(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?Vr(t,n,{get(){return this.table(n)},set(e){zr(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function za({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Va(e,t){return e._cfg.version-t._cfg.version}function Ha(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ji)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function qa(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>Wa(o,e))),o}function Wa(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Ga(e,t,n){const r={};return Qr(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=Da(Ma(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=Da(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=La(e,i,a)})),r}function Qa({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+Qr(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&Lr.WorkerGlobalScope&&Lr instanceof Lr.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}let Ya=class{_parseStoresSpec(e,t){Ir(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return Da(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),Rr(r),0===t)})),o=r.shift();if(o.multi)throw new Do.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new Do.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new Do.Schema("Index must have a name and cannot be an empty string")})),t[n]=La(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?Br(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{Br(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,za(t,[t._allTables,t,t.Transaction.prototype]),Ka(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],Ir(o),o),t._storeNames=Ir(o),this}upgrade(e){return this._cfg.contentUpgrade=Vo(this._cfg.contentUpgrade||Io,e),this}};function Za(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new ms("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Ja(e){return e&&"function"==typeof e.databases}function Xa(e){return Mi((function(){return ui.letThrough=!0,e()}))}function es(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function ts(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):Rr(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function ns(e,t,n){var r=arguments.length;if(r<2)throw new Do.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,oo(o),n]}function rs(e,t,n,r,o){return di.resolve().then((()=>{const i=ui.transless||ui,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===Ao.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>rs(e,t,n,null,o)))):Wi(r)}const u=go(o);let l;u&&Li();const c=di.follow((()=>{if(l=o.call(a,a),l)if(u){var e=Ii.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=ts(l))}),s);return(l&&"function"==typeof l.then?di.resolve(l).then((e=>a.active?e:Wi(new Do.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):c.then((()=>l))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),Wi(e))))}))}function os(e,t,n){const r=Rr(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const is={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return i(o({},e),{table(t){const n=e.table(t),{schema:r}=n,a={},s=[];function u(e,t,n){const r=Ua(e),l=a[r]=a[r]||[],c=null==e?0:"string"==typeof e?1:e.length,f=t>0,d=i(o({},n),{isVirtual:f,keyTail:t,keyLength:c,extractKey:Ra(e),unique:!f&&n.unique});return l.push(d),d.isPrimaryKey||s.push(d),c>1&&u(2===c?e[0]:e.slice(0,c-1),t+1,n),l.sort(((e,t)=>e.keyTail-t.keyTail)),d}const l=u(r.primaryKey.keyPath,0,r.primaryKey);a[":id"]=[l];for(const e of r.indexes)u(e.keyPath,0,e);function c(t){const n=t.query.index;return n.isVirtual?i(o({},t),{query:{index:n,range:(r=t.query.range,a=n.keyTail,{type:1===r.type?2:r.type,lower:os(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,a),lowerOpen:!0,upper:os(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,a),upperOpen:!0})}}):t;var r,a}const f=i(o({},n),{schema:i(o({},r),{primaryKey:l,indexes:s,getIndexByKeyPath:function(e){const t=a[Ua(e)];return t&&t[0]}}),count:e=>n.count(c(e)),query:e=>n.query(c(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(c(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(os(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(os(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}});return f}})}};function as(e,t,n,r){return n=n||{},r=r||"",Ir(e).forEach((o=>{if(Fr(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=fo(i);e!==fo(a)?n[r+o]=t[o]:"Object"===e?as(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})),Ir(t).forEach((o=>{Fr(e,o)||(n[r+o]=t[o])})),n}const ss={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>i(o({},e),{table(t){const n=e.table(t),{primaryKey:r}=n.schema,a=i(o({},n),{mutate(e){const a=ui.trans,{deleting:s,creating:u,updating:l}=a.table(t).hook;switch(e.type){case"add":if(u.fire===Io)break;return a._promise("readwrite",(()=>c(e)),!0);case"put":if(u.fire===Io&&l.fire===Io)break;return a._promise("readwrite",(()=>c(e)),!0);case"delete":if(s.fire===Io)break;return a._promise("readwrite",(()=>c(e)),!0);case"deleteRange":if(s.fire===Io)break;return a._promise("readwrite",(()=>function(e){return f(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function c(e){const t=ui.trans,a=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!a)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?i(o({},e),{keys:a}):o({},e)).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,a).then((o=>{const i=a.map(((n,i)=>{const a=o[i],c={onerror:null,onsuccess:null};if("delete"===e.type)s.fire.call(c,n,a,t);else if("add"===e.type||void 0===a){const o=u.fire.call(c,n,e.values[i],t);null==n&&null!=o&&(n=o,e.keys[i]=n,r.outbound||to(e.values[i],r.keyPath,n))}else{const r=as(a,e.values[i]),o=l.fire.call(c,r,n,a,t);if(o){const t=e.values[i];Object.keys(o).forEach((e=>{Fr(t,e)?t[e]=o[e]:to(t,e,o[e])}))}}return c}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:s})=>{for(let r=0;r<a.length;++r){const s=n?n[r]:a[r],u=i[r];null==s?u.onerror&&u.onerror(t[r]):u.onsuccess&&u.onsuccess("put"===e.type&&o[r]?e.values[r]:s)}return{failures:t,results:n,numFailures:r,lastResult:s}})).catch((e=>(i.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function f(e,t,a){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:a}).then((({result:n})=>c({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<a?{failures:[],numFailures:0,lastResult:void 0}:f(e,i(o({},t),{lower:n[n.length-1],lowerOpen:!0}),a)))))}}});return a}})};function us(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===ya(t.keys[o],e[i])&&(r.push(n?uo(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const ls={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return i(o({},n),{getMany:e=>{if(!e.cache)return n.getMany(e);const t=us(e.keys,e.trans._cache,"clone"===e.cache);return t?di.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?uo(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))})}})};function cs(e){return!("from"in e)}const fs=function(e,t){if(!this){const t=new fs;return e&&"d"in e&&Br(t,e),t}Br(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function ds(e,t,n){const r=ya(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(cs(e))return Br(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(ya(n,e.from)<0)return o?ds(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},ys(e);if(ya(t,e.to)>0)return i?ds(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},ys(e);ya(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),ya(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&hs(e,o),i&&a&&hs(e,i)}function hs(e,t){cs(t)||function e(t,{from:n,to:r,l:o,r:i}){ds(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function ps(e){let t=cs(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&ya(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||ya(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function ys(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),i=r>1?"r":r<-1?"l":"";if(i){const t="r"===i?"l":"r",n=o({},e),r=e[i];e.from=r.from,e.to=r.to,e[i]=r[i],n[i]=r[t],e[t]=n,n.d=vs(n)}e.d=vs(e)}function vs({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}Kr(fs.prototype,{add(e){return hs(this,e),this},addKey(e){return ds(this,e,e),this},addKeys(e){return e.forEach((e=>ds(this,e,e))),this},[ho](){return ps(this)}});const gs={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new fs(e.MIN_KEY,e.MAX_KEY);return i(o({},e),{table:r=>{const a=e.table(r),{schema:s}=a,{primaryKey:u}=s,{extractKey:l,outbound:c}=u,f=i(o({},a),{mutate:e=>{const o=e.trans,i=o.mutatedParts||(o.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return i[n]||(i[n]=new fs)},l=u(""),c=u(":dels"),{type:f}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return a.mutate(e).then((e=>{if(Rr(d)){"delete"!==f&&(d=e.results),l.addKeys(d);const t=us(d,p);t||"add"===f||c.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&Rr(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==ya(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,s,t,h)}else if(d){const e={from:d.lower,to:d.upper};c.add(e),l.add(e)}else l.add(n),c.add(n),s.indexes.forEach((e=>u(e.name).add(n)));return e}))}}),d=({query:{index:t,range:n}})=>{var r,o;return[t,new fs(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},h={get:e=>[u,new fs(e.key)],getMany:e=>[u,(new fs).addKeys(e.keys)],count:d,query:d,openCursor:d};return Ir(h).forEach((e=>{f[e]=function(s){const{subscr:u}=ui;if(u){const f=e=>{const n=`idb://${t}/${r}/${e}`;return u[n]||(u[n]=new fs)},d=f(""),p=f(":dels"),[y,v]=h[e](s);if(f(y.name||"").add(v),!y.isPrimaryKey){if("count"!==e){const t="query"===e&&c&&s.values&&a.query(i(o({},s),{values:!1}));return a[e].apply(this,arguments).then((n=>{if("query"===e){if(c&&s.values)return t.then((({result:e})=>(d.addKeys(e),n)));const e=s.values?n.result.map(l):n.result;s.values?d.addKeys(e):p.addKeys(e)}else if("openCursor"===e){const e=n,t=s.values;return e&&Object.create(e,{key:{get:()=>(p.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return p.addKey(t),t}},value:{get:()=>(t&&d.addKey(e.primaryKey),e.value)}})}return n}))}p.add(n)}}return a[e].apply(this,arguments)}})),f}})}};let ms=class{version(e){if(isNaN(e)||e<.1)throw new Do.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Do.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Va),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||ui.letThrough||this._vip)?e():new di(((e,t)=>{if(this._state.openComplete)return t(new Do.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new Do.DatabaseClosed);this.open().catch(Io)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?Wi(t.dbOpenError):e));mo&&(t.openCanceller._stackHolder=So()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new Do.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return di.race([r,("undefined"==typeof navigator?di.resolve():es()).then((()=>new di(((r,i)=>{if(o(),!n)throw new Do.MissingAPI;const u=e.name,l=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!l)throw new Do.MissingAPI;l.onerror=Ca(i),l.onblocked=Pi(e._fireOnBlocked),l.onupgradeneeded=Pi((r=>{if(a=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=Ta,a.abort(),l.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=Pi((()=>{i(new Do.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=Ca(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=l.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=ui.transless||ui;Mi((()=>{ui.trans=i,ui.transless=s,0===t?(Ir(o).forEach((e=>{qa(n,e,o[e].primKey,o[e].indexes)})),Fa(e,n),di.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=Ga(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;Qa(e,o,r),Qa(e,u,r),a=e._dbSchema=u;const l=Ha(o,u);l.add.forEach((e=>{qa(r,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((e=>{if(e.recreate)throw new Do.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>Wa(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),Wa(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){Fa(e,r),n._memoizedTables={},s=!0;let t=no(u);l.del.forEach((e=>{t[e]=o[e]})),za(e,[e.Transaction.prototype]),Ka(e,[e.Transaction.prototype],Ir(t),t),n.schema=t;const i=go(c);let a;i&&Li();const f=di.follow((()=>{if(a=c(n),a&&i){var e=Ii.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?di.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&Xi||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),za(e,[e.Transaction.prototype]),Ka(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?di.resolve(o.shift()(n.idbtrans)).then(e):di.resolve()}().then((()=>{var e,t;t=r,Ir(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||qa(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),l.onsuccess=Pi((()=>{a=null;const n=e._novip.idbdb=l.result,o=Qr(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=Ga(0,t,n);e._storeNames=Qr(t.objectStoreNames,0),Ka(e,[e._allTables],Ir(r),r)}(e,n,r):(Qa(e,e._dbSchema,r),function(e,t){const n=Ha(Ga(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),Fa(e,r)}catch(e){}var i;Zi.push(e),n.onversionchange=Pi((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=Pi((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Ja(e)&&"__dbnames"!==n&&Za(e,t).put({name:n}).catch(Io)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],di.resolve(Xa((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(Vo,Io);return t.onReadyBeingFired=[],di.resolve(Xa((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),Wi(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=Zi.indexOf(this);if(t>=0&&Zi.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new di((t=>{e.dbReadyResolve=t})),e.openCanceller=new di(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new Do.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new di(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=Pi((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Ja(e)&&"__dbnames"!==n&&Za(e,t).delete(n).catch(Io)}(this._deps,this.name),n()})),e.onerror=Ca(r),e.onblocked=this._fireOnBlocked};if(e)throw new Do.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return Ir(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=ns.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=ui.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new Do.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new Do.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new Do.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):Wi(e)}const s=rs.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):ui.trans?Ki(ui.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!Fr(this._allTables,e))throw new Do.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}constructor(t,n){this._middlewares={},this.verno=0;const r=e.dependencies;this._options=n=o({addons:e.addons,autoOpen:!0,indexedDB:r.indexedDB,IDBKeyRange:r.IDBKeyRange},n),this._deps={indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange};const{addons:i}=n;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const a={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Io,dbReadyPromise:null,cancelOpen:Io,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var s;a.dbReadyPromise=new di((e=>{a.dbReadyResolve=e})),a.openCanceller=new di(((e,t)=>{a.cancelOpen=t})),this._state=a,this.name=t,this.on=aa(this,"populate","blocked","versionchange","close",{ready:[Vo,Io]}),this.on.ready.subscribe=Yr(this.on.ready.subscribe,(t=>(n,r)=>{e.vip((()=>{const e=this._state;if(e.openComplete)e.dbOpenError||di.resolve().then(n),r&&t(n);else if(e.onReadyBeingFired)e.onReadyBeingFired.push(n),r&&t(n);else{t(n);const e=this;r||t((function t(){e.on.ready.unsubscribe(n),e.on.ready.unsubscribe(t)}))}}))})),this.Collection=(s=this,sa(ma.prototype,(function(e,t){this.db=s;let n=ra,r=null;if(t)try{n=t()}catch(e){r=e}const 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!==Ro?a:null}}))),this.Table=function(e){return sa(ia.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:aa(null,{creating:[Uo,Io],reading:[Bo,Ro],updating:[Ko,Io],deleting:[Fo,Io]})}))}(this),this.Transaction=function(e){return sa(Na.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=aa(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new di(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),Wi(e)}))}))}(this),this.Version=function(e){return sa(Ya.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return sa(ja.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new Do.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=Ia(n.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Zi.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(is),this.use(ss),this.use(gs),this.use(ls),this.vip=Object.create(this,{_vip:{value:!0}}),i.forEach((e=>e(this)))}};const bs="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";let ws,_s=class{subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[bs](){return this}constructor(e){this._subscribe=e}};function Ss(e,t){return Ir(t).forEach((n=>{hs(e[n]||(e[n]=new fs),t[n])})),e}try{ws={indexedDB:Lr.indexedDB||Lr.mozIndexedDB||Lr.webkitIndexedDB||Lr.msIndexedDB,IDBKeyRange:Lr.IDBKeyRange||Lr.webkitIDBKeyRange}}catch(gt){ws={indexedDB:null,IDBKeyRange:null}}const Es=ms;function Os(e){let t=ks;try{ks=!0,Aa.storagemutated.fire(e)}finally{ks=t}}Kr(Es,i(o({},Lo),{delete:e=>new Es(e,{addons:[]}).delete(),exists:e=>new Es(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Ja(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Za(e,t).toCollection().primaryKeys()}(Es.dependencies).then(e)}catch(e){return Wi(new Do.MissingAPI)}},defineClass:()=>function(e){Br(this,e)},ignoreTransaction:e=>ui.trans?Ki(ui.transless,e):e(),vip:Xa,async:function(e){return function(){try{var t=ts(e.apply(this,arguments));return t&&"function"==typeof t.then?t:di.resolve(t)}catch(e){return Wi(e)}}},spawn:function(e,t,n){try{var r=ts(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:di.resolve(r)}catch(e){return Wi(e)}},currentTransaction:{get:()=>ui.trans||null},waitFor:function(e,t){const n=di.resolve("function"==typeof e?Es.ignoreTransaction(e):e).timeout(t||6e4);return ui.trans?ui.trans.waitFor(n):n},Promise:di,debug:{get:()=>mo,set:e=>{bo(e,"dexie"===e?()=>!0:ta)}},derive:Hr,extend:Br,props:Kr,override:Yr,Events:aa,on:Aa,liveQuery:function(e){return new _s((t=>{const n=go(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,Aa.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,u=!1;function l(){return Ir(i).some((e=>o[e]&&function(e,t){const n=ps(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=ps(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(ya(s.from,o.to)<=0&&ya(s.to,o.from)>=0)return!0;ya(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const c=e=>{Ss(o,e),l()&&f()},f=()=>{if(s||r)return;o={};const d={},h=function(t){n&&Li();const r=()=>Mi(e,{subscr:t,trans:null}),o=ui.trans?Ki(ui.transless,r):r();return n&&o.then(Ii,Ii),o}(d);u||(Aa("storagemutated",c),u=!0),s=!0,Promise.resolve(h).then((e=>{s=!1,r||(l()?f():(o={},i=d,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Ss,getByKeyPath:eo,setByKeyPath:to,delByKeyPath:function(e,t){"string"==typeof t?to(e,t,void 0):"length"in t&&[].map.call(t,(function(t){to(e,t,void 0)}))},shallowClone:no,deepClone:uo,getObjectDiff:as,cmp:ya,asap:Jr,minKey:-1/0,addons:[],connections:Zi,errnames:Ao,dependencies:ws,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))})),Es.maxKey=Ia(Es.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(Aa("storagemutated",(e=>{if(!ks){let t;Ji?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),ks=!0,dispatchEvent(t),ks=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{ks||Os(e)})));let ks=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),Aa("storagemutated",(t=>{ks||e.postMessage(t)})),e.onmessage=e=>{e.data&&Os(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){Aa("storagemutated",(e=>{try{ks||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&Os(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&Os(e.changedParts)}))}function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ps(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function js(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ps(i,r,o,a,s,"next",e)}function s(e){Ps(i,r,o,a,s,"throw",e)}a(void 0)}))}}di.rejectionMapper=function(e,t){if(!e||e instanceof Po||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Mo[e.name])return e;var n=new Mo[e.name](t||e.message,e);return"stack"in e&&Vr(n,"stack",{get:function(){return this.inner.stack}}),n},bo(mo,ta);const Cs=new class extends ms{constructor(){super("EsmOffline"),xs(this,"syncQueue",void 0),xs(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}};function Ts(){return(Ts=js((function*(){const e=yield _r();return(null==e?void 0:e.uuid)||"*"}))).apply(this,arguments)}function As(){return As=js((function*(e,t){return(yield function(e,t){return Ns.apply(this,arguments)}(e,t)).map((e=>e.content))})),As.apply(this,arguments)}function Ns(){return(Ns=js((function*(e,t){const n=t?{type:t,userId:e}:{userId:e};return yield Cs.syncQueue.where(n).toArray().catch(ms.errnames.DatabaseClosed,(()=>[]))}))).apply(this,arguments)}function Ds(){return Ds=js((function*(e){const t=yield function(){return Ts.apply(this,arguments)}();return yield function(e,t){return As.apply(this,arguments)}(t,e)})),Ds.apply(this,arguments)}function Ms(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function Ls(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ms(i,r,o,a,s,"next",e)}function s(e){Ms(i,r,o,a,s,"throw",e)}a(void 0)}))}}function Is(e,t){return Rs.apply(this,arguments)}function Rs(){return Rs=Ls((function*(e,t,n=!0){if(e){let r=null;const[o,i]=yield Promise.all([ur(`${ir}/Patient/${e}`,t).catch((e=>r=e)),n?Bs(e):Promise.resolve(null)]);if(o.ok)return o.data;if(i)return i;if(r)throw r}return null})),Rs.apply(this,arguments)}function Bs(e){return $s.apply(this,arguments)}function $s(){return $s=Ls((function*(e){const t=yield function(e){return Ds.apply(this,arguments)}("patient-registration"),n=t.find((t=>t.fhirPatient.id===e));var r;return null!==(r=null==n?void 0:n.fhirPatient)&&void 0!==r?r:null})),$s.apply(this,arguments)}(0,Be.createGlobalStore)("offline-synchronization",{}),(0,Be.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}});var Us=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Fs=function(e){function n(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 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}(v),Ks=function(e){function n(t){var n=e.call(this,t)||this;return n.destination=t,n}return t(n,e),n}(b),zs=function(e){function n(){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[m]=function(){return new Ks(this)},n.prototype.lift=function(e){var t=new Vs(this,this);return t.operator=e,t},n.prototype.next=function(e){if(this.closed)throw new Us;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 Us;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 Us;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(t){if(this.closed)throw new Us;return e.prototype._trySubscribe.call(this,t)},n.prototype._subscribe=function(e){if(this.closed)throw new Us;return this.hasError?(e.error(this.thrownError),v.EMPTY):this.isStopped?(e.complete(),v.EMPTY):(this.observers.push(e),new Fs(this,e))},n.prototype.asObservable=function(){var e=new O;return e.source=this,e},n.create=function(e,t){return new Vs(e,t)},n}(O),Vs=function(e){function n(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t(n,e),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):v.EMPTY},n}(zs),Hs=function(e){function n(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 Us;return this._value},n.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},n}(zs),qs=function(){function e(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return e.prototype=Object.create(Error.prototype),e}(),Ws=new O((function(e){return e.complete()}));function Gs(e){return function(t){return 0===e?Ws:t.lift(new Qs(e))}}var Qs=function(){function e(e){if(this.total=e,this.total<0)throw new qs}return e.prototype.call=function(e,t){return t.subscribe(new Ys(e,this.total))},e}(),Ys=function(e){function n(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(e){var t=this.total,n=++this.count;n<=t&&(this.destination.next(e),n===t&&(this.destination.complete(),this.unsubscribe()))},n}(b);function Zs(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 Js(e,t))}}var Js=function(){function e(e,t){this.project=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Xs(e,this.project,this.thisArg))},e}(),Xs=function(e){function n(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(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}(b);const eu="custom:(uuid,encounters:(uuid,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,uuid),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display),startDatetime,stopDatetime)";function tu(e,t,n){return lr(`/ws/rest/v1/visit?patient=${e}&v=${null!=n?n:eu}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}}).pipe(Gs(1)).pipe(Zs((e=>e)))}function nu(e,t){return lr("/ws/rest/v1/visit",{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function ru(e,t,n){return lr(`/ws/rest/v1/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}const ou=new Hs(null);var iu,au;function su(e){return{uuid:e.uuid,display:e.display,name:e.name}}function uu(){return lr("/ws/rest/v1/visittype").pipe(Zs((e=>e.data.results.map(su)))).pipe(Gs(1))}function lu(e){return{uuid:e.uuid,display:e.display}}function cu(){return lr("/ws/rest/v1/location").pipe(Zs((e=>e.data.results.map(lu)))).pipe(Gs(1))}!function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(iu||(iu={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(au||(au={}));const fu={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"}})()})()},403:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>l});const n=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},r=e=>e?n(e):n,o={};function i(e,t){const n=o[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=r()((()=>t));return o[e]={value:n,active:!0},n}}function a(e,t){const n=o[e];if(!n){const n=r()((()=>null!=t?t:{}));return o[e]={value:n,active:!1},n}return n.value}function s(e){return i("app",e)}function u(){return a("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})()}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.d=(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=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};(()=>{"use strict";i.r(a),i.d(a,{attach:()=>Mo,checkStatus:()=>zo,checkStatusFor:()=>Vo,detach:()=>Lo,detachAll:()=>Io,extensionStore:()=>Zo,getAssignedExtensions:()=>Uo,getConnectedExtensions:()=>Bo,getExtensionInternalStore:()=>yo,getExtensionNameFromId:()=>To,getExtensionRegistration:()=>No,getExtensionRegistrationFrom:()=>Ao,getExtensionStore:()=>go,registerExtension:()=>Do,registerExtensionSlot:()=>Fo,renderExtension:()=>Qo,reset:()=>Ko,updateInternalExtensionStore:()=>vo});const r=function(e,t){return e===t||e!=e&&t!=t},o=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1};var s=Array.prototype.splice;function u(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.prototype.clear=function(){this.__data__=[],this.size=0},u.prototype.delete=function(e){var t=this.__data__,n=o(t,e);return!(n<0||(n==t.length-1?t.pop():s.call(t,n,1),--this.size,0))},u.prototype.get=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]},u.prototype.has=function(e){return o(this.__data__,e)>-1},u.prototype.set=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const l=u,c="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var f="object"==typeof self&&self&&self.Object===Object&&self;const d=c||f||Function("return this")(),h=d.Symbol;var p=Object.prototype,y=p.hasOwnProperty,v=p.toString,g=h?h.toStringTag:void 0,m=Object.prototype.toString,b=h?h.toStringTag:void 0;const w=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":b&&b in Object(e)?function(e){var t=y.call(e,g),n=e[g];try{e[g]=void 0;var r=!0}catch(e){}var o=v.call(e);return r&&(t?e[g]=n:delete e[g]),o}(e):function(e){return m.call(e)}(e)},_=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},S=function(e){if(!_(e))return!1;var t=w(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},E=d["__core-js_shared__"];var O,k=(O=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",x=Function.prototype.toString;const P=function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var j=/^\[object .+?Constructor\]$/,C=Function.prototype,T=Object.prototype,A=C.toString,N=T.hasOwnProperty,D=RegExp("^"+A.call(N).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const M=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!_(e)||(t=e,k&&k in t))&&(S(e)?D:j).test(P(e));var t}(n)?n:void 0},L=M(d,"Map"),I=M(Object,"create");var R=Object.prototype.hasOwnProperty,B=Object.prototype.hasOwnProperty;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])}}$.prototype.clear=function(){this.__data__=I?I(null):{},this.size=0},$.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},$.prototype.get=function(e){var t=this.__data__;if(I){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return R.call(t,e)?t[e]:void 0},$.prototype.has=function(e){var t=this.__data__;return I?void 0!==t[e]:B.call(t,e)},$.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=I&&void 0===t?"__lodash_hash_undefined__":t,this};const U=$,F=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function K(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])}}K.prototype.clear=function(){this.size=0,this.__data__={hash:new U,map:new(L||l),string:new U}},K.prototype.delete=function(e){var t=F(this,e).delete(e);return this.size-=t?1:0,t},K.prototype.get=function(e){return F(this,e).get(e)},K.prototype.has=function(e){return F(this,e).has(e)},K.prototype.set=function(e,t){var n=F(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const z=K;function V(e){var t=this.__data__=new l(e);this.size=t.size}V.prototype.clear=function(){this.__data__=new l,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(n instanceof l){var r=n.__data__;if(!L||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new z(r)}return n.set(e,t),this.size=n.size,this};const H=V;function q(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new z;++t<n;)this.add(e[t])}q.prototype.add=q.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},q.prototype.has=function(e){return this.__data__.has(e)};const W=q,G=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},Q=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var l=i.get(e),c=i.get(t);if(l&&c)return l==t&&c==e;var f=-1,d=!0,h=2&n?new W:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!G(t,(function(e,t){if(a=t,!h.has(a)&&(p===e||o(p,e,n,r,i)))return h.push(t);var a}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},Y=d.Uint8Array,Z=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},J=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var X=h?h.prototype:void 0,ee=X?X.valueOf:void 0;const te=Array.isArray;var ne=Object.prototype.propertyIsEnumerable,re=Object.getOwnPropertySymbols;const oe=re?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}(re(e),(function(t){return ne.call(e,t)})))}:function(){return[]},ie=function(e){return null!=e&&"object"==typeof e},ae=function(e){return ie(e)&&"[object Arguments]"==w(e)};var se=Object.prototype,ue=se.hasOwnProperty,le=se.propertyIsEnumerable;const ce=ae(function(){return arguments}())?ae:function(e){return ie(e)&&ue.call(e,"callee")&&!le.call(e,"callee")};var fe=t&&!t.nodeType&&t,de=fe&&e&&!e.nodeType&&e,he=de&&de.exports===fe?d.Buffer:void 0;const pe=(he?he.isBuffer:void 0)||function(){return!1};var ye=/^(?:0|[1-9]\d*)$/;const ve=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ye.test(e))&&e>-1&&e%1==0&&e<t},ge=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var me={};me["[object Float32Array]"]=me["[object Float64Array]"]=me["[object Int8Array]"]=me["[object Int16Array]"]=me["[object Int32Array]"]=me["[object Uint8Array]"]=me["[object Uint8ClampedArray]"]=me["[object Uint16Array]"]=me["[object Uint32Array]"]=!0,me["[object Arguments]"]=me["[object Array]"]=me["[object ArrayBuffer]"]=me["[object Boolean]"]=me["[object DataView]"]=me["[object Date]"]=me["[object Error]"]=me["[object Function]"]=me["[object Map]"]=me["[object Number]"]=me["[object Object]"]=me["[object RegExp]"]=me["[object Set]"]=me["[object String]"]=me["[object WeakMap]"]=!1;var be=t&&!t.nodeType&&t,we=be&&e&&!e.nodeType&&e,_e=we&&we.exports===be&&c.process,Se=function(){try{return we&&we.require&&we.require("util").types||_e&&_e.binding&&_e.binding("util")}catch(e){}}(),Ee=Se&&Se.isTypedArray;const Oe=Ee?(ke=Ee,function(e){return ke(e)}):function(e){return ie(e)&&ge(e.length)&&!!me[w(e)]};var ke,xe=Object.prototype.hasOwnProperty,Pe=Object.prototype;const je=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Ce=Object.prototype.hasOwnProperty;const Te=function(e){return null!=(t=e)&&ge(t.length)&&!S(t)?function(e,t){var n=te(e),r=!n&&ce(e),o=!n&&!r&&pe(e),i=!n&&!r&&!o&&Oe(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var l in e)!xe.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ve(l,u))||s.push(l);return s}(e):function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Pe))return je(e);var t,n,r=[];for(var o in Object(e))Ce.call(e,o)&&"constructor"!=o&&r.push(o);return r}(e);var t},Ae=function(e){return function(e,t,n){var r=t(e);return te(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Te,oe)};var Ne=Object.prototype.hasOwnProperty;const De=M(d,"DataView"),Me=M(d,"Promise"),Le=M(d,"Set"),Ie=M(d,"WeakMap");var Re="[object Map]",Be="[object Promise]",$e="[object Set]",Ue="[object WeakMap]",Fe="[object DataView]",Ke=P(De),ze=P(L),Ve=P(Me),He=P(Le),qe=P(Ie),We=w;(De&&We(new De(new ArrayBuffer(1)))!=Fe||L&&We(new L)!=Re||Me&&We(Me.resolve())!=Be||Le&&We(new Le)!=$e||Ie&&We(new Ie)!=Ue)&&(We=function(e){var t=w(e),n="[object Object]"==t?e.constructor:void 0,r=n?P(n):"";if(r)switch(r){case Ke:return Fe;case ze:return Re;case Ve:return Be;case He:return $e;case qe:return Ue}return t});const Ge=We;var Qe="[object Arguments]",Ye="[object Array]",Ze="[object Object]",Je=Object.prototype.hasOwnProperty;const Xe=function(e,t,n,o,i,a){var s=te(e),u=te(t),l=s?Ye:Ge(e),c=u?Ye:Ge(t),f=(l=l==Qe?Ze:l)==Ze,d=(c=c==Qe?Ze:c)==Ze,h=l==c;if(h&&pe(e)){if(!pe(t))return!1;s=!0,f=!1}if(h&&!f)return a||(a=new H),s||Oe(e)?Q(e,t,n,o,i,a):function(e,t,n,o,i,a,s){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||!a(new Y(e),new Y(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+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=Z;case"[object Set]":var l=1&o;if(u||(u=J),e.size!=t.size&&!l)return!1;var c=s.get(e);if(c)return c==t;o|=2,s.set(e,t);var f=Q(u(e),u(t),o,i,a,s);return s.delete(e),f;case"[object Symbol]":if(ee)return ee.call(e)==ee.call(t)}return!1}(e,t,l,n,o,i,a);if(!(1&n)){var p=f&&Je.call(e,"__wrapped__"),y=d&&Je.call(t,"__wrapped__");if(p||y){var v=p?e.value():e,g=y?t.value():t;return a||(a=new H),i(v,g,n,o,a)}}return!!h&&(a||(a=new H),function(e,t,n,r,o,i){var a=1&n,s=Ae(e),u=s.length;if(u!=Ae(t).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in t:Ne.call(t,c)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++l<u;){var y=e[c=s[l]],v=t[c];if(r)var g=a?r(v,y,c,t,e,i):r(y,v,c,e,t,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,o,i,a))},et=function e(t,n,r,o,i){return t===n||(null==t||null==n||!ie(t)&&!ie(n)?t!=t&&n!=n:Xe(t,n,r,o,e,i))},tt=function(e,t){return et(e,t)};function nt(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function rt(e){return function t(n){return 0===arguments.length||nt(n)?t:e.apply(this,arguments)}}function ot(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return nt(n)?t:rt((function(t){return e(n,t)}));default:return nt(n)&&nt(r)?t:nt(n)?rt((function(t){return e(t,r)})):nt(r)?rt((function(t){return e(n,t)})):e(n,r)}}}function it(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function at(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function st(e,t){return Object.prototype.hasOwnProperty.call(t,e)}const ut="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var lt=Object.prototype.toString,ct=function(){return"[object Arguments]"===lt.call(arguments)?function(e){return"[object Arguments]"===lt.call(e)}:function(e){return st("callee",e)}}();const ft=ct;var dt=!{toString:null}.propertyIsEnumerable("toString"),ht=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],pt=function(){return arguments.propertyIsEnumerable("length")}(),yt=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const vt="function"!=typeof Object.keys||pt?rt((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=pt&&ft(e);for(t in e)!st(t,e)||o&&"length"===t||(r[r.length]=t);if(dt)for(n=ht.length-1;n>=0;)st(t=ht[n],e)&&!yt(r,t)&&(r[r.length]=t),n-=1;return r})):rt((function(e){return Object(e)!==e?[]:Object.keys(e)})),gt=rt((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function mt(e,t,n,r){var o=it(e);function i(e,t){return bt(e,t,n.slice(),r.slice())}return!at((function(e,t){return!at(i,t,e)}),it(t),o)}function bt(e,t,n,r){if(ut(e,t))return!0;var o=gt(e);if(o!==gt(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!ut(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!ut(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&mt(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&mt(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=vt(e);if(a.length!==vt(t).length)return!1;var s=n.concat([e]),u=r.concat([t]);for(i=a.length-1;i>=0;){var l=a[i];if(!st(l,t)||!bt(t[l],e[l],s,u))return!1;i-=1}return!0}var wt=ot((function(e,t){return bt(e,t,[],[])}));const _t=wt;function St(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?St(e[s],t,n,!0):e[s];return o};switch(gt(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const Et=rt((function(e){return null!=e&&"function"==typeof e.clone?e.clone():St(e,[],[],!0)}));function Ot(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return nt(n)?t:ot((function(t,r){return e(n,t,r)}));case 2:return nt(n)&&nt(r)?t:nt(n)?ot((function(t,n){return e(t,r,n)})):nt(r)?ot((function(t,r){return e(n,t,r)})):rt((function(t){return e(n,r,t)}));default:return nt(n)&&nt(r)&&nt(o)?t:nt(n)&&nt(r)?ot((function(t,n){return e(t,n,o)})):nt(n)&&nt(o)?ot((function(t,n){return e(t,r,n)})):nt(r)&&nt(o)?ot((function(t,r){return e(n,t,r)})):nt(n)?rt((function(t){return e(t,r,o)})):nt(r)?rt((function(t){return e(n,t,o)})):nt(o)?rt((function(t){return e(n,r,t)})):e(n,r,o)}}}const kt=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var xt=rt((function(e){return!!kt(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));const Pt=xt;var jt=function(){function e(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}(),Ct=ot((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,l){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,l,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const Tt=Ct;function At(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function Nt(e,t,n,r){return e["@@transducer/result"](n[r](Tt(e["@@transducer/step"],e),t))}var Dt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";const Mt=Ot((function(e,t,n){if("function"==typeof e&&(e=function(e){return new jt(e)}(e)),Pt(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 Nt(e,t,n,"fantasy-land/reduce");if(null!=n[Dt])return At(e,t,n[Dt]());if("function"==typeof n.next)return At(e,t,n);if("function"==typeof n.reduce)return Nt(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}));function Lt(e){return"[object Object]"===Object.prototype.toString.call(e)}var It=Ot((function(e,t,n){var r,o={};for(r in t)st(r,t)&&(o[r]=st(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)st(r,n)&&!st(r,o)&&(o[r]=n[r]);return o}));const Rt=It;var Bt=Ot((function e(t,n,r){return Rt((function(n,r,o){return Lt(r)&&Lt(o)?e(t,r,o):t(n,r,o)}),n,r)}));const $t=Bt,Ut=ot((function(e,t){return $t((function(e,t,n){return n}),e,t)}));var Ft,Kt;function zt(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}(Kt=Ft||(Ft={})).Array="Array",Kt.Boolean="Boolean",Kt.ConceptUuid="ConceptUuid",Kt.Number="Number",Kt.Object="Object",Kt.String="String",Kt.UUID="UUID",Kt.PersonAttributeTypeUuid="PersonAttributeTypeUuid",Kt.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid";const Vt=zt((e=>Array.isArray(e)),"must be an array"),Ht=zt((e=>"boolean"==typeof e),"must be a boolean"),qt=zt((e=>"number"==typeof e),"must be a number"),Wt=zt((e=>"string"==typeof e),"must be a string"),Gt=zt((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),Qt=zt((e=>/^[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");var Yt=i(403);const Zt=(0,Yt.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),Jt=(0,Yt.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});Jt.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const Xt=(0,Yt.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function en(e){return(0,Yt.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function tn(){return(0,Yt.getGlobalStore)("config-extension-slots",{slots:{}})}function nn(e,t){const n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}}function rn(){return(0,Yt.getGlobalStore)("config-extensions",{configs:{}})}function on(e,t,n){var r;const o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}}const an=(0,Yt.createGlobalStore)("config-implementer-tools",{config:{}});function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function un(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){sn(e,t,n[t])}))}return e}function ln(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function cn(e,t){for(let n of Object.keys(e.schemas)){const r=bn(n,e,t);en(n).setState({loaded:!0,config:r})}}function fn(e,t){const n=function(e,t){const n=_n(mn(e,t)),r=Object.keys(n).reduce(((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}),{});return function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))gn(r,t,e)}(r),Object.keys(r).reduce(((e,t)=>un({},e,r[t])),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((([e,t])=>[e,{loaded:!0,config:t}]))),o=tn(),i=o.getState(),a={slots:un({},i.slots,r)};_t(i,a)||o.setState(a)}function dn(e,t){const n=function(e,t){let n=yn(Et(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=_n([n,vn(e,t)]);return n}(e,t);an.setState({config:n})}function hn(e,t,n){const r={};for(let o of t.mountedExtensions){const t=pn(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]=ln(un({},r[o.slotName]),{[o.extensionId]:{config:t,loaded:!0}})}rn().setState({configs:r})}function pn(e,t,n,r,o,i){var a,s,u;const l=function(e){const[t]=e.split("#");return t}(r),c=o.schemas[l],f=c?l:t,d=mn(o,i),h=wn(e,d);var p;const y=null!==(p=null==h||null===(a=h.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==p?p:{},v=_n([wn(f,d),y]),g=null!=c?c:o.schemas[t];Sn(g,v,f);const m=Pn(g,v);return On(g,m,f),delete m.extensionSlots,m}function yn(e){return e.hasOwnProperty("_default")?ln(un({},e),{_value:e._default,_source:"default"}):Cn(e)?Object.keys(e).reduce(((t,n)=>(t[n]=yn(e[n]),t)),{}):{}}function vn(e,t){return Cn(e)?Object.keys(e).reduce(((n,r)=>(n[r]=vn(e[r],t),n)),{}):{_value:e,_source:t}}function gn(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"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((e=>"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((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Cn(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function mn(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function bn(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=wn(e,mn(t,n));Sn(r,o,e);const i=Pn(r,o);return On(r,i,e),delete i.extensionSlots,i}function wn(e,t){return _n(t.map((({[e]:t})=>t)).filter((e=>!!e)))}function _n(e){return Mt(Ut)({},e)}function Sn(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?En(a,o,i):"extensionSlots"===r&&""!==n||console.error(`Unknown config key '${i}' provided. Ignoring.`)}}function En(e,t,n){kn(n,e._type,t),Cn(t)?e._type===Ft.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];Sn(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||Sn(e,t,n):e._type===Ft.Array&&function(e,t,n){if(jn(e._elements))for(let r=0;r<t.length;r++)En(e._elements,t[r],`${n}[${r}]`);for(let o=0;o<t.length;o++){var r;kn(`${n}[${o}]`,null===(r=e._elements)||void 0===r?void 0:r._type,t[o])}}(e,t,n)}function On(e,t,n=""){if(e)if(t!==e._default&&xn(n,e._validators,t),Cn(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e._type===Ft.Object&&e._elements?On(e._elements,o,i):On(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)On(e._elements,t[r],`${n}[${r}]`)}function kn(e,t,n){t&&xn(e,[{Array:Vt,Boolean:Ht,ConceptUuid:Qt,Number:qt,Object:Gt,String:Wt,UUID:Qt,PersonAttributeTypeUuid:Qt,PatientIdentifierTypeUuid:Qt}[t]],n)}function xn(e,t,n){if(t)try{for(let r of t){const t=r(n);"string"==typeof t&&("object"==typeof n?console.error(`Invalid configuration for ${e}: ${t}`):console.error(`Invalid configuration value ${n} for ${e}: ${t}`))}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}}cn(Zt.getState(),Jt.getState()),Zt.subscribe((e=>cn(e,Jt.getState()))),Jt.subscribe((e=>cn(Zt.getState(),e))),dn(Zt.getState(),Jt.getState()),Zt.subscribe((e=>dn(e,Jt.getState()))),Jt.subscribe((e=>dn(Zt.getState(),e))),fn(Zt.getState(),Jt.getState()),Zt.subscribe((e=>fn(e,Jt.getState()))),Jt.subscribe((e=>fn(Zt.getState(),e))),hn(Zt.getState(),Xt.getState(),Jt.getState()),Zt.subscribe((e=>{hn(e,Xt.getState(),Jt.getState())})),Xt.subscribe((e=>{hn(Zt.getState(),e,Jt.getState())})),Jt.subscribe((e=>{hn(Zt.getState(),Xt.getState(),e)}));const Pn=(e,t)=>{const n=Et(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&jn(e))if(o._type===Ft.Array&&Array.isArray(r)){const o=r.map((t=>Pn(e,t)));n[t]=o}else if(o._type===Ft.Object)for(let t of Object.keys(r))r[t]=Pn(e,r[t])}else if(Cn(o)){const e=n.hasOwnProperty(t)?r:{};Cn(e)&&(n[t]=Pn(o,e))}}return n};function jn(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function Cn(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}Ft.Array,Ft.Object;var Tn=Object.freeze({__proto__:null,get start(){return co},get ensureJQuerySupport(){return $r},get setBootstrapMaxTime(){return wr},get setMountMaxTime(){return _r},get setUnmountMaxTime(){return Sr},get setUnloadMaxTime(){return Er},get registerApplication(){return Yr},get unregisterApplication(){return Jr},get getMountedApps(){return Wr},get getAppStatus(){return Qr},get unloadApplication(){return Xr},get checkActivityFunctions(){return Zr},get getAppNames(){return Gr},get pathToActiveWhen(){return no},get navigateToUrl(){return Ar},get triggerAppChange(){return ao},get addErrorHandler(){return Rn},get removeErrorHandler(){return Bn},get mountRootParcel(){return yr},get NOT_LOADED(){return Fn},get LOADING_SOURCE_CODE(){return Kn},get NOT_BOOTSTRAPPED(){return zn},get BOOTSTRAPPING(){return Vn},get NOT_MOUNTED(){return Hn},get MOUNTING(){return qn},get UPDATING(){return Gn},get LOAD_ERROR(){return Yn},get MOUNTED(){return Wn},get UNMOUNTING(){return Qn},get SKIP_BECAUSE_BROKEN(){return Zn}});function An(e){return(An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dn=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{}).CustomEvent,Mn=function(){try{var e=new Dn("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Dn:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},Ln=[];function In(e,t,n){var r=Un(e,t,n);Ln.length?Ln.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function Rn(e){if("function"!=typeof e)throw Error($n(28,!1));Ln.push(e)}function Bn(e){if("function"!=typeof e)throw Error($n(29,!1));var t=!1;return Ln=Ln.filter((function(n){var r=n===e;return t=t||r,!r})),t}function $n(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function Un(e,t,n){var r,o="".concat(nr(t)," '").concat(er(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn($n(30,!1,t.status,er(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=er(t),t.status=n,r}var Fn="NOT_LOADED",Kn="LOADING_SOURCE_CODE",zn="NOT_BOOTSTRAPPED",Vn="BOOTSTRAPPING",Hn="NOT_MOUNTED",qn="MOUNTING",Wn="MOUNTED",Gn="UPDATING",Qn="UNMOUNTING",Yn="LOAD_ERROR",Zn="SKIP_BECAUSE_BROKEN";function Jn(e){return e.status===Wn}function Xn(e){try{return e.activeWhen(window.location)}catch(t){return In(t,e,Zn),!1}}function er(e){return e.name}function tr(e){return Boolean(e.unmountThisParcel)}function nr(e){return tr(e)?"parcel":"application"}function rr(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function or(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function ir(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!or(t,(function(e){return"function"!=typeof e}))));var t}function ar(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=nr(e),o=er(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return sr(n)?n:Promise.reject($n(15,!1,r,o,t,a))}))}),Promise.resolve())}}function sr(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function ur(e,t){return Promise.resolve().then((function(){return e.status!==zn?e:(e.status=Vn,e.bootstrap?Or(e,"bootstrap").then(n).catch((function(n){if(t)throw Un(n,e,Zn);return In(n,e,Zn),e})):Promise.resolve().then(n))}));function n(){return e.status=Hn,e}}function lr(e,t){return Promise.resolve().then((function(){if(e.status!==Wn)return e;e.status=Qn;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw Un(r,e,Zn);In(r,e,Zn)}))})).then((function(){return e}));function r(){return Or(e,"unmount").then((function(){e.status=Hn})).catch((function(n){if(t)throw Un(n,e,Zn);In(n,e,Zn)}))}}))}var cr=!1,fr=!1;function dr(e,t){return Promise.resolve().then((function(){return e.status!==Hn?e:(cr||(window.dispatchEvent(new Mn("single-spa:before-first-mount")),cr=!0),Or(e,"mount").then((function(){return e.status=Wn,fr||(window.dispatchEvent(new Mn("single-spa:first-mount")),fr=!0),e})).catch((function(n){return e.status=Wn,lr(e,!0).then(r,r);function r(){if(t)throw Un(n,e,Zn);return In(n,e,Zn),e}})))}))}var hr=0,pr={parcels:{}};function yr(){return vr.apply(pr,arguments)}function vr(e,t){var n=this;if(!e||"object"!==An(e)&&"function"!=typeof e)throw Error($n(2,!1));if(e.name&&"string"!=typeof e.name)throw Error($n(3,!1,An(e.name)));if("object"!==An(t))throw Error($n(4,!1,name,An(t)));if(!t.domElement)throw Error($n(5,!1,name));var r,o=hr++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?Kn:zn,customProps:t,parentName:er(n),unmountThisParcel:function(){return d.then((function(){if(s.status!==Wn)throw Error($n(6,!1,name,s.status));return lr(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=Zn,c(e),e}))}};n.parcels[o]=s;var u=a();if(!u||"function"!=typeof u.then)throw Error($n(7,!1));var l,c,f=(u=u.then((function(e){if(!e)throw Error($n(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!ir(e.bootstrap))throw Error($n(9,!1,t));if(!ir(e.mount))throw Error($n(10,!1,t));if(!ir(e.unmount))throw Error($n(11,!1,t));if(e.update&&!ir(e.update))throw Error($n(12,!1,t));var n=ar(e,"bootstrap"),i=ar(e,"mount"),a=ar(e,"unmount");s.status=zn,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=kr(e.timeouts),e.update&&(s.update=ar(e,"update"),r.update=function(e){return s.customProps=e,gr(function(e){return Promise.resolve().then((function(){if(e.status!==Wn)throw Error($n(32,!1,er(e)));return e.status=Gn,Or(e,"update").then((function(){return e.status=Wn,e})).catch((function(t){throw Un(t,e,Zn)}))}))}(s))})}))).then((function(){return ur(s,!0)})),d=f.then((function(){return dr(s,!0)})),h=new Promise((function(e,t){l=e,c=t}));return r={mount:function(){return gr(Promise.resolve().then((function(){if(s.status!==Hn)throw Error($n(13,!1,name,s.status));return n.parcels[o]=s,dr(s)})))},unmount:function(){return gr(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:gr(u),bootstrapPromise:gr(f),mountPromise:gr(d),unmountPromise:gr(h)}}function gr(e){return e.then((function(){return null}))}function mr(e){var t=er(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==An(n)||null===n||Array.isArray(n))&&(n={},console.warn($n(40,!1),t,n));var r=rr({},n,{name:t,mountParcel:vr.bind(e),singleSpa:Tn});return tr(e)&&(r.unmountSelf=e.unmountThisParcel),r}var br={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function wr(e,t,n){if("number"!=typeof e||e<=0)throw Error($n(16,!1));br.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function _r(e,t,n){if("number"!=typeof e||e<=0)throw Error($n(17,!1));br.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Sr(e,t,n){if("number"!=typeof e||e<=0)throw Error($n(18,!1));br.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Er(e,t,n){if("number"!=typeof e||e<=0)throw Error($n(19,!1));br.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Or(e,t){var n=e.timeouts[t],r=n.warningMillis,o=nr(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](mr(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return c(1)}),r),setTimeout((function(){return c(!0)}),n.millis);var l=$n(31,!1,t,o,er(e),n.millis);function c(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(l)):console.error(l);else if(!u){var t=e,o=t*r;console.warn(l),o+r<n.millis&&setTimeout((function(){return c(t+1)}),r)}}}))}function kr(e){var t={};for(var n in br)t[n]=rr({},br[n],e&&e[n]||{});return t}function xr(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Fn&&e.status!==Yn?e:(e.status=Kn,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(mr(e));if(!sr(r))throw n=!0,Error($n(33,!1,er(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==An(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!ir(t.bootstrap)&&(r=35),ir(t.mount)||(r=36),ir(t.unmount)||(r=37);var o=nr(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error($n(r,!1,o,er(e),i),t),In(void 0,e,Zn),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=rr({},e.devtools.overlays,t.devtools.overlays)),e.status=zn,e.bootstrap=ar(t,"bootstrap"),e.mount=ar(t,"mount"),e.unmount=ar(t,"unmount"),e.unload=ar(t,"unload"),e.timeouts=kr(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=Zn:(r=Yn,e.loadErrorTime=(new Date).getTime()),In(t,e,r),e})));var t,n}))}var Pr,jr="undefined"!=typeof window,Cr={hashchange:[],popstate:[]},Tr=["hashchange","popstate"];function Ar(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error($n(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Rr(window.location.href),r=Rr(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function Nr(e){var t=this;if(e){var n=e[0].type;Tr.indexOf(n)>=0&&Cr[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function Dr(){so([],arguments)}function Mr(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Pr&&n===o||(fo()?window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)):so([])),r}}if(jr){window.addEventListener("hashchange",Dr),window.addEventListener("popstate",Dr);var Lr=window.addEventListener,Ir=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&Tr.indexOf(e)>=0)||or(Cr[e],(function(e){return e===t})))return Lr.apply(this,arguments);Cr[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Tr.indexOf(e)>=0))return Ir.apply(this,arguments);Cr[e]=Cr[e].filter((function(e){return e!==t}))},window.history.pushState=Mr(window.history.pushState,"pushState"),window.history.replaceState=Mr(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn($n(41,!1)):window.singleSpaNavigate=Ar}function Rr(e){var t=document.createElement("a");return t.href=e,t}var Br=!1;function $r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Br){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return Ur.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return Ur.call(this,n,window.removeEventListener,e,t,arguments)},Br=!0}}function Ur(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Tr.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var Fr={};function Kr(e){return Promise.resolve().then((function(){var t=Fr[er(e)];if(!t)return e;if(e.status===Fn)return zr(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==Hn&&e.status!==Yn)return e;var n=e.status===Yn?Promise.resolve():Or(e,"unload");return e.status="UNLOADING",n.then((function(){return zr(e,t),e})).catch((function(n){return function(e,t,n){delete Fr[er(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,In(n,e,Zn),t.reject(n)}(e,t,n),e}))}))}function zr(e,t){delete Fr[er(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Fn,t.resolve()}function Vr(e,t,n,r){Fr[er(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Fr[er(e)],"promise",{get:t})}function Hr(e){return Fr[e]}var qr=[];function Wr(){return qr.filter(Jn).map(er)}function Gr(){return qr.map(er)}function Qr(e){var t=or(qr,(function(t){return er(t)===e}));return t?t.status:null}function Yr(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===An(e)?(function(e){if(Array.isArray(e)||null===e)throw Error($n(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error($n(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error($n(20,!1));if("object"!==An(e.app)&&"function"!=typeof e.app)throw Error($n(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error($n(24,!1));if(!to(e.customProps))throw Error($n(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error($n(20,!1));if(!t)throw Error($n(23,!1));if("function"!=typeof n)throw Error($n(24,!1));if(!to(r))throw Error($n(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:no(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(-1!==Gr().indexOf(o.name))throw Error($n(21,!1,o.name));qr.push(rr({loadErrorTime:null,status:Fn,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),jr&&($r(),so())}function Zr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return qr.filter((function(t){return t.activeWhen(e)})).map(er)}function Jr(e){if(0===qr.filter((function(t){return er(t)===e})).length)throw Error($n(25,!1,e));return Xr(e).then((function(){var t=qr.map(er).indexOf(e);qr.splice(t,1)}))}function Xr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error($n(26,!1));var n=or(qr,(function(t){return er(t)===e}));if(!n)throw Error($n(27,!1,e));var r,o=Hr(er(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Vr(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,eo(n,o.resolve,o.reject)):r=new Promise((function(e,t){Vr(n,(function(){return r}),e,t),eo(n,e,t)})),r}function eo(e,t,n){lr(e).then(Kr).then((function(){t(),setTimeout((function(){so()}))})).catch(n)}function to(e){return!e||"function"==typeof e||"object"===An(e)&&null!==e&&!Array.isArray(e)}function no(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var ro=!1,oo=[],io=jr&&window.location.href;function ao(){return so()}function so(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(ro)return new Promise((function(e,n){oo.push({resolve:e,reject:n,eventArguments:t})}));var n,r=function(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return qr.forEach((function(i){var a=i.status!==Zn&&Xn(i);switch(i.status){case Yn:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Fn:case Kn:a&&n.push(i);break;case zn:case Hn:!a&&Hr(er(i))?e.push(i):a&&r.push(i);break;case Wn:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}(),o=r.appsToUnload,i=r.appsToUnmount,a=r.appsToLoad,s=r.appsToMount,u=!1,l=io,c=io=window.location.href;return fo()?(ro=!0,n=o.concat(a,i,s),Promise.resolve().then((function(){if(window.dispatchEvent(new Mn(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",p(!0))),window.dispatchEvent(new Mn("single-spa:before-routing-event",p(!0,{cancelNavigation:f}))),u)return window.dispatchEvent(new Mn("single-spa:before-mount-routing-event",p(!0))),d(),void Ar(l);var t=o.map(Kr),r=i.map(lr).map((function(e){return e.then(Kr)})).concat(t),c=Promise.all(r);c.then((function(){window.dispatchEvent(new Mn("single-spa:before-mount-routing-event",p(!0)))}));var y=a.map((function(e){return xr(e).then((function(e){return uo(e,c)}))})),v=s.filter((function(e){return a.indexOf(e)<0})).map((function(e){return uo(e,c)}));return c.catch((function(e){throw h(),e})).then((function(){return h(),Promise.all(y.concat(v)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(d)}))}))):(n=a,Promise.resolve().then((function(){var e=a.map(xr);return Promise.all(e).then(h).then((function(){return[]})).catch((function(e){throw h(),e}))})));function f(){u=!0}function d(){var t=Wr();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new Mn(r,p())),window.dispatchEvent(new Mn("single-spa:routing-event",p()))}catch(e){setTimeout((function(){throw e}))}if(ro=!1,oo.length>0){var o=oo;oo=[],so(o)}return t}function h(){e.forEach((function(e){Nr(e.eventArguments)})),Nr(t)}function p(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],f=arguments.length>1?arguments[1]:void 0,d={},h=(Nn(e={},Wn,[]),Nn(e,Hn,[]),Nn(e,Fn,[]),Nn(e,Zn,[]),e);r?(a.concat(s).forEach((function(e,t){y(e,Wn)})),o.forEach((function(e){y(e,Fn)})),i.forEach((function(e){y(e,Hn)}))):n.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:d,appsByNewStatus:h,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:c,navigationIsCanceled:u}};return f&&rr(p.detail,f),p;function y(e,t){var n=er(e);t=t||Qr(n),d[n]=t,(h[t]=h[t]||[]).push(n)}}}function uo(e,t){return Xn(e)?ur(e).then((function(e){return t.then((function(){return Xn(e)?dr(e):e}))})):t.then((function(){return e}))}var lo=!1;function co(e){var t;lo=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,Pr=t),jr&&so()}function fo(){return lo}jr&&setTimeout((function(){lo||console.warn($n(1,!1))}),5e3);var ho={getRawAppData:function(){return[].concat(qr)},reroute:so,NOT_LOADED:Fn,toLoadPromise:xr,toBootstrapPromise:ur,unregisterApplication:Jr};jr&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=ho);const po=((e=>{const t=[].concat(["openmrsBase","openmrsSpaBase"]);zt((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;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((e=>"${"+e+"}")).join(", "))})(),(0,Yt.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}})),yo=()=>(0,Yt.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function vo(e){const t=po.getState(),n=e(t);n!==t&&po.setState(n)}const go=()=>(0,Yt.getGlobalStore)("extensions",{slots:{}});function mo(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});tt(Xt.getState().mountedExtensions,t)||Xt.setState({mountedExtensions:t})}mo(po.getState()),po.subscribe(mo);var bo=i(840);const wo=function(e){return void 0===e};function _o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function So(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_o(e,t,n[t])}))}return e}function Eo(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}const Oo=yo(),ko=go(),xo=tn(),Po=rn();function jo(e,t,n){const r={};for(let[o,i]of Object.entries(e.slots)){const{config:a}=nn(t,i.name),s=$o(o,e,a,n);r[o]={moduleName:i.moduleName,assignedExtensions:s}}tt(ko.getState().slots,r)||ko.setState({slots:r})}function Co(e,t){return{moduleName:t,name:e,attachedIds:[],config:null}}function To(e){const[t]=e.split("#");return t}function Ao(e,t){const n=To(t);return e.extensions[n]}function No(e){return Ao(Oo.getState(),e)}Oo.subscribe((e=>{jo(e,xo.getState(),Po.getState())})),xo.subscribe((e=>{jo(Oo.getState(),e,Po.getState())})),Po.subscribe((e=>{jo(Oo.getState(),xo.getState(),e)}));const Do=e=>Oo.setState((t=>(t.extensions[e.name]=Eo(So({},e),{instances:[]}),t)));function Mo(e,t){vo((n=>{const r=n.slots[e];return Eo(So({},n),r?{slots:Eo(So({},n.slots),{[e]:Eo(So({},r),{attachedIds:[...r.attachedIds,t]})})}:{slots:Eo(So({},n.slots),{[e]:Eo(So({},Co(e)),{attachedIds:[t]})})})}))}function Lo(e,t){vo((n=>{const r=n.slots[e];return r&&r.attachedIds.includes(t)?Eo(So({},n),{slots:Eo(So({},n.slots),{[e]:Eo(So({},r),{attachedIds:r.attachedIds.filter((e=>e!==t))})})}):n}))}function Io(e){vo((t=>{const n=t.slots[e];return n?Eo(So({},t),{slots:Eo(So({},t.slots),{[e]:Eo(So({},n),{attachedIds:[]})})}):t}))}function Ro(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function Bo(e,t=null){const n=null!=t?t:navigator.onLine;return e.filter((e=>Vo(n,e.online,e.offline)))}function $o(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=Oo.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{var r,a;const s=Ro(e,o,null===(r=i[To(e)])||void 0===r?void 0:r.order,t),u=Ro(n,o,null===(a=i[To(n)])||void 0===a?void 0:a.order,t);return-1===u?-1:-1===s?1:s-u}))}(n,t.slots[e].attachedIds),i=[];let a;for(let n of o){const{config:o}=on(r,e,n),f=To(n),d=t.extensions[f];if(d){var s,u,l;const e=null!==(l=null!==(u=null==o||null===(s=o["Display conditions"])||void 0===s?void 0:s.privileges)&&void 0!==u?u:d.privileges)&&void 0!==l?l:[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)){var c;if(wo(a)&&(a=null===(c=(0,bo.getSessionStore)().getState().session)||void 0===c?void 0:c.user),!a)continue;if(!(0,bo.userHasAccess)(e,a))continue}i.push({id:n,name:f,moduleName:d.moduleName,config:o,meta:d.meta})}}return i}function Uo(e){const t=Oo.getState(),{config:n}=function(e){return nn(tn().getState(),e)}(e);return $o(e,t,n,Po.getState())}const Fo=(e,t)=>Oo.setState((n=>{var r;const o=null===(r=n.slots[t])||void 0===r?void 0:r.moduleName;if(o&&o!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${o}.`),n;if(o&&o==e)return n;if(n.slots[t])return Eo(So({},n),{slots:Eo(So({},n.slots),{[t]:Eo(So({},n.slots[t]),{moduleName:e})})});const i=Co(t,e);return Eo(So({},n),{slots:Eo(So({},n.slots),{[t]:i})})})),Ko=()=>ko.setState((()=>({slots:{},extensions:{}})));function zo(e=!0,t=!1){return Vo(navigator.onLine,e,t)}function Vo(e,t=!0,n=!1){return Boolean(e?t:n)}function Ho(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function qo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wo(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){qo(e,t,n[t])}))}return e}function Go(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Qo(e,t,n,r){return Yo.apply(this,arguments)}function Yo(){var e;return e=function*(e,t,n,r,o=(e=>e),i={}){const a=To(r),s=No(r);let u=null;if(e){if(!s)throw Error(`Couldn't find extension '${a}' to attach to '${t}'`);const{load:l,meta:c,moduleName:f,online:d,offline:h}=s;if(zo(d,h)){vo((o=>{const i={domElement:e,id:r,slotName:t,slotModuleName:n};return Go(Wo({},o),{extensions:Go(Wo({},o.extensions),{[a]:Go(Wo({},o.extensions[a]),{instances:[...o.extensions[a].instances,i]})})})}));const s=yield l(),{default:d}=s,h=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}(s,["default"]);u=yr(o(null!=d?d:h),Go(Wo({},i),{_meta:c,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:f},domElement:e}))}}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return u},Yo=function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Ho(i,r,o,a,s,"next",e)}function s(e){Ho(i,r,o,a,s,"throw",e)}a(void 0)}))},Yo.apply(this,arguments)}const Zo=yo()})()})()},758:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{dispatchActionableNotificationShown:()=>h,dispatchConnectivityChanged:()=>r,dispatchNotificationShown:()=>d,dispatchPrecacheStaticDependencies:()=>s,subscribeActionableNotificationShown:()=>y,subscribeConnectivity:()=>i,subscribeConnectivityChanged:()=>o,subscribeNotificationShown:()=>p,subscribePrecacheStaticDependencies:()=>u,subscribeToastShown:()=>v});const n="openmrs:connectivity-changed";function r(e){window.dispatchEvent(new CustomEvent(n,{detail:{online:e}}))}function o(e){const t=t=>e(t.detail);return window.addEventListener(n,t),()=>window.removeEventListener(n,t)}function i(e){return e({online:navigator.onLine}),o(e)}const a="openmrs:precache-static-dependencies";function s(e={}){window.dispatchEvent(new CustomEvent(a,{detail:e}))}function u(e){const t=t=>e(t.detail);return window.addEventListener(a,t),()=>window.removeEventListener(a,t)}const l="openmrs:notification-shown",c="openmrs:actionable-notification-shown",f="openmrs:toast-shown";function d(e){window.dispatchEvent(new CustomEvent(l,{detail:e}))}function h(e){window.dispatchEvent(new CustomEvent(c,{detail:e}))}function p(e){const t=t=>e(t.detail);return window.addEventListener(l,t),()=>window.removeEventListener(l,t)}function y(e){const t=t=>e(t.detail);return window.addEventListener(c,t),()=>window.removeEventListener(c,t)}function v(e){const t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}})()},403:()=>{(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{createAppState:()=>s,createGlobalStore:()=>i,getAppState:()=>u,getGlobalStore:()=>a,subscribeTo:()=>l});const n=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},r=e=>e?n(e):n,o={};function i(e,t){const n=o[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=r()((()=>t));return o[e]={value:n,active:!0},n}}function a(e,t){const n=o[e];if(!n){const n=r()((()=>null!=t?t:{}));return o[e]={value:n,active:!1},n}return n.value}function s(e){return i("app",e)}function u(){return a("app",{})}function l(e,t,n){let r=t(e.getState());return e.subscribe((e=>{const o=t(e);o!==r&&(r=o,n(o))}))}})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var r={};(()=>{"use strict";const e='<svg viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.29 40.3278C45.3275 35.2904 52.2878 32.1739 59.9776 32.1739C67.6466 32.1739 74.5911 35.2765 79.6245 40.29L79.6454 21.7502C73.7513 18.7143 67.0622 17 59.9776 17C52.8891 17 46.1652 18.9309 40.2692 21.9679L40.29 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6719 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6868 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.507L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M185.885 90.9982H187.309L190.043 97.3236H190.066L192.824 90.9982H194.215V99.0676H193.258V92.2971H193.234L190.34 99.0676H189.758L186.864 92.2971H186.842V99.0676H185.885V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M198.386 90.9982H203.457V91.8867H199.343V94.4168H203.184V95.3062H199.343V98.1782H203.663V99.0676H198.386V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M207.891 98.1782H209.713C211.561 98.1782 212.963 97.2431 212.963 95.0319C212.963 92.8218 211.561 91.8867 209.713 91.8867H207.891V98.1782ZM206.934 90.9982H210.034C211.617 90.9982 213.987 92.0586 213.987 95.0319C213.987 98.0083 211.617 99.0676 210.034 99.0676H206.934V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.007 99.0676H217.965V90.9982H217.007V99.0676Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.105 92.6628C226.627 92.0119 225.863 91.6819 225.088 91.6819C223.288 91.6819 222.011 93.266 222.011 95.0319C222.011 96.9012 223.277 98.3839 225.088 98.3839C226.068 98.3839 226.855 97.9844 227.425 97.255L228.143 97.8582C227.425 98.8281 226.377 99.2724 225.088 99.2724C222.774 99.2724 220.986 97.4826 220.986 95.0319C220.986 92.6628 222.695 90.7935 225.088 90.7935C226.183 90.7935 227.254 91.1701 227.937 92.0586L227.105 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M233.557 92.2295H233.533L231.858 96.1947H235.152L233.557 92.2295ZM233.123 90.9982H234.023L237.453 99.0676H236.336L235.516 97.0841H231.482L230.65 99.0676H229.568L233.123 90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M240.006 90.9982H240.964V98.1782H244.656V99.0676H240.006V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M252.793 94.5539H253.648C254.708 94.5539 256.087 94.5539 256.087 93.2203C256.087 92.0586 255.073 91.8867 254.139 91.8867H252.793V94.5539ZM251.836 90.9982H253.899C255.46 90.9982 257.113 91.2258 257.113 93.2203C257.113 94.3939 256.349 95.1582 255.095 95.3519L257.386 99.0676H256.213L254.023 95.4434H252.793V99.0676H251.836V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M260.51 90.9982H265.58V91.8867H261.468V94.4168H265.308V95.3062H261.468V98.1782H265.786V99.0676H260.51V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M274.402 92.6628C273.923 92.0119 273.16 91.6819 272.384 91.6819C270.584 91.6819 269.307 93.266 269.307 95.0319C269.307 96.9012 270.573 98.3839 272.384 98.3839C273.364 98.3839 274.151 97.9844 274.72 97.255L275.438 97.8582C274.72 98.8281 273.672 99.2724 272.384 99.2724C270.071 99.2724 268.282 97.4826 268.282 95.0319C268.282 92.6628 269.991 90.7935 272.384 90.7935C273.478 90.7935 274.55 91.1701 275.234 92.0586L274.402 92.6628Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M284.739 95.0319C284.739 93.1746 283.439 91.6819 281.548 91.6819C279.656 91.6819 278.357 93.1746 278.357 95.0319C278.357 96.8903 279.656 98.3839 281.548 98.3839C283.439 98.3839 284.739 96.8903 284.739 95.0319ZM277.33 95.0319C277.33 92.5932 279.097 90.7935 281.548 90.7935C283.998 90.7935 285.765 92.5932 285.765 95.0319C285.765 97.4726 283.998 99.2724 281.548 99.2724C279.097 99.2724 277.33 97.4726 277.33 95.0319Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M289.514 94.5539H290.369C291.428 94.5539 292.807 94.5539 292.807 93.2203C292.807 92.0586 291.793 91.8867 290.859 91.8867H289.514V94.5539ZM288.556 90.9982H290.618C292.181 90.9982 293.833 91.2258 293.833 93.2203C293.833 94.3939 293.07 95.1582 291.817 95.3519L294.106 99.0676H292.933L290.744 95.4434H289.514V99.0676H288.556V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M297.81 98.1782H299.635C301.48 98.1782 302.881 97.2431 302.881 95.0319C302.881 92.8218 301.48 91.8867 299.635 91.8867H297.81V98.1782ZM296.853 90.9982H299.953C301.538 90.9982 303.909 92.0586 303.909 95.0319C303.909 98.0083 301.538 99.0676 299.953 99.0676H296.853V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M315.407 92.4223C315.089 91.9095 314.517 91.6819 313.937 91.6819C313.093 91.6819 312.216 92.0814 312.216 93.0384C312.216 93.7788 312.626 94.1097 313.914 94.5202C315.168 94.9187 316.331 95.3291 316.331 96.9132C316.331 98.5201 314.951 99.2724 313.493 99.2724C312.558 99.2724 311.555 98.9643 311.007 98.1554L311.828 97.4826C312.17 98.0759 312.854 98.3839 313.549 98.3839C314.37 98.3839 315.303 97.9049 315.303 96.9807C315.303 95.9899 314.633 95.818 313.196 95.341C312.057 94.9644 311.19 94.4625 311.19 93.1189C311.19 91.5677 312.523 90.7935 313.937 90.7935C314.837 90.7935 315.601 91.0439 316.193 91.7386L315.407 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M320.844 95.5914L317.835 90.9982H319.054L321.323 94.6454L323.658 90.9982H324.81L321.8 95.5914V99.0676H320.844V95.5914Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M330.565 92.4223C330.245 91.9095 329.675 91.6819 329.094 91.6819C328.251 91.6819 327.374 92.0814 327.374 93.0384C327.374 93.7788 327.784 94.1097 329.072 94.5202C330.326 94.9187 331.487 95.3291 331.487 96.9132C331.487 98.5201 330.109 99.2724 328.65 99.2724C327.716 99.2724 326.713 98.9643 326.165 98.1554L326.986 97.4826C327.328 98.0759 328.012 98.3839 328.707 98.3839C329.528 98.3839 330.461 97.9049 330.461 96.9807C330.461 95.9899 329.79 95.818 328.354 95.341C327.215 94.9644 326.348 94.4625 326.348 93.1189C326.348 91.5677 327.681 90.7935 329.094 90.7935C329.995 90.7935 330.759 91.0439 331.351 91.7386L330.565 92.4223Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M339.283 91.8867H336.617V99.0676H335.659V91.8867H332.992V90.9982H339.283V91.8867Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M341.665 90.9982H346.736V91.8867H342.623V94.4168H346.463V95.3062H342.623V98.1782H346.942V99.0676H341.665V90.9982Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M349.905 90.9982H351.329L354.064 97.3236H354.087L356.845 90.9982H358.236V99.0676H357.278V92.2971H357.255L354.361 99.0676H353.779L350.884 92.2971H350.863V99.0676H349.905V90.9982Z" fill="var(--logo-black)"/>\n</svg>\n',t='<svg id="omrs-logo-partial" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-red)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-orange)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-purple)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-green)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-black)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-black)"/>\n</svg>\n',r='<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',o=document.createElement("div"),i=()=>{document.body.appendChild(o)};function a(e,t){const n=(new DOMParser).parseFromString(t,"text/html").querySelector("svg");n&&(n.id=e,o.appendChild(n))}function s(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function u(e){return function t(n){return 0===arguments.length||s(n)?t:e.apply(this,arguments)}}function l(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return s(n)?t:u((function(t){return e(n,t)}));default:return s(n)&&s(r)?t:s(n)?u((function(t){return e(t,r)})):s(r)?u((function(t){return e(n,t)})):e(n,r)}}}function c(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}function f(e,t,n){for(var r=0,o=n.length;r<o;){if(e(t,n[r]))return!0;r+=1}return!1}function d(e,t){return Object.prototype.hasOwnProperty.call(t,e)}o.id="omrs-svgs-container",o.style.display="none","complete"===document.readyState?i():window.addEventListener("load",i);const h="function"==typeof Object.is?Object.is:function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};var p=Object.prototype.toString,y=function(){return"[object Arguments]"===p.call(arguments)?function(e){return"[object Arguments]"===p.call(e)}:function(e){return d("callee",e)}}();const v=y;var g=!{toString:null}.propertyIsEnumerable("toString"),m=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],b=function(){return arguments.propertyIsEnumerable("length")}(),w=function(e,t){for(var n=0;n<e.length;){if(e[n]===t)return!0;n+=1}return!1};const S="function"!=typeof Object.keys||b?u((function(e){if(Object(e)!==e)return[];var t,n,r=[],o=b&&v(e);for(t in e)!d(t,e)||o&&"length"===t||(r[r.length]=t);if(g)for(n=m.length-1;n>=0;)d(t=m[n],e)&&!w(r,t)&&(r[r.length]=t),n-=1;return r})):u((function(e){return Object(e)!==e?[]:Object.keys(e)})),E=u((function(e){return null===e?"Null":void 0===e?"Undefined":Object.prototype.toString.call(e).slice(8,-1)}));function O(e,t,n,r){var o=c(e);function i(e,t){return k(e,t,n.slice(),r.slice())}return!f((function(e,t){return!f(i,t,e)}),c(t),o)}function k(e,t,n,r){if(h(e,t))return!0;var o=E(e);if(o!==E(t))return!1;if(null==e||null==t)return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(o){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!h(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!h(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var i=n.length-1;i>=0;){if(n[i]===e)return r[i]===t;i-=1}switch(o){case"Map":return e.size===t.size&&O(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&O(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var a=S(e);if(a.length!==S(t).length)return!1;var s=n.concat([e]),u=r.concat([t]);for(i=a.length-1;i>=0;){var l=a[i];if(!d(l,t)||!k(t[l],e[l],s,u))return!1;i-=1}return!0}var x=l((function(e,t){return k(e,t,[],[])}));const P=x;function j(e){return function t(n,r,o){switch(arguments.length){case 0:return t;case 1:return s(n)?t:l((function(t,r){return e(n,t,r)}));case 2:return s(n)&&s(r)?t:s(n)?l((function(t,n){return e(t,r,n)})):s(r)?l((function(t,r){return e(n,t,r)})):u((function(t){return e(n,r,t)}));default:return s(n)&&s(r)&&s(o)?t:s(n)&&s(r)?l((function(t,n){return e(t,n,o)})):s(n)&&s(o)?l((function(t,n){return e(t,r,n)})):s(r)&&s(o)?l((function(t,r){return e(n,t,r)})):s(n)?u((function(t){return e(t,r,o)})):s(r)?u((function(t){return e(n,t,o)})):s(o)?u((function(t){return e(n,r,t)})):e(n,r,o)}}}function C(e){return"[object Object]"===Object.prototype.toString.call(e)}var T=j((function(e,t,n){var r,o={};for(r in t)d(r,t)&&(o[r]=d(r,n)?e(r,t[r],n[r]):t[r]);for(r in n)d(r,n)&&!d(r,o)&&(o[r]=n[r]);return o}));const A=T;var N=j((function e(t,n,r){return A((function(n,r,o){return C(r)&&C(o)?e(t,r,o):t(n,r,o)}),n,r)}));const D=N,M=l((function(e,t){return D((function(e,t,n){return n}),e,t)}));function L(e,t,n,r){var o,i=function(o){for(var i=t.length,a=0;a<i;){if(e===t[a])return n[a];a+=1}for(var s in t[a+1]=e,n[a+1]=o,e)o[s]=r?L(e[s],t,n,!0):e[s];return o};switch(E(e)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(e.valueOf());case"RegExp":return o=e,new RegExp(o.source,(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.sticky?"y":"")+(o.unicode?"u":""));default:return e}}const I=u((function(e){return null!=e&&"function"==typeof e.clone?e.clone():L(e,[],[],!0)})),R=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};var B=u((function(e){return!!R(e)||!!e&&"object"==typeof e&&!function(e){return"[object String]"===Object.prototype.toString.call(e)}(e)&&(1===e.nodeType?!!e.length:0===e.length||e.length>0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))}));const $=B;var U=function(){function e(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}(),F=l((function(e,t){return function(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(e){return t.apply(this,arguments)};case 2:return function(e,n){return t.apply(this,arguments)};case 3:return function(e,n,r){return t.apply(this,arguments)};case 4:return function(e,n,r,o){return t.apply(this,arguments)};case 5:return function(e,n,r,o,i){return t.apply(this,arguments)};case 6:return function(e,n,r,o,i,a){return t.apply(this,arguments)};case 7:return function(e,n,r,o,i,a,s){return t.apply(this,arguments)};case 8:return function(e,n,r,o,i,a,s,u){return t.apply(this,arguments)};case 9:return function(e,n,r,o,i,a,s,u,l){return t.apply(this,arguments)};case 10:return function(e,n,r,o,i,a,s,u,l,c){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}(e.length,(function(){return e.apply(t,arguments)}))}));const K=F;function z(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function V(e,t,n,r){return e["@@transducer/result"](n[r](K(e["@@transducer/step"],e),t))}var H="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function q(e,t,n){if("function"==typeof e&&(e=function(e){return new U(e)}(e)),$(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 V(e,t,n,"fantasy-land/reduce");if(null!=n[H])return z(e,t,n[H]());if("function"==typeof n.next)return z(e,t,n);if("function"==typeof n.reduce)return V(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}const W=j(q);var G;function Q(e,t){return n=>{if(!e(n))return"function"==typeof t?t(n):t}}!function(e){e.Array="Array",e.Boolean="Boolean",e.ConceptUuid="ConceptUuid",e.Number="Number",e.Object="Object",e.String="String",e.UUID="UUID",e.PersonAttributeTypeUuid="PersonAttributeTypeUuid",e.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid"}(G||(G={}));const Y=Q((e=>Array.isArray(e)),"must be an array"),Z=Q((e=>"boolean"==typeof e),"must be a boolean"),J=Q((e=>"number"==typeof e),"must be a number"),X=Q((e=>"string"==typeof e),"must be a string"),ee=Q((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e),"must be an object (not an array or null)"),te=Q((e=>/^[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");var ne=n(403);const re=(0,ne.createGlobalStore)("config-internal",{providedConfigs:[],schemas:{}}),oe=(0,ne.createGlobalStore)("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});oe.subscribe((e=>{var t;t=e.config,localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}));const ie=(0,ne.createGlobalStore)("config-store-of-extension-state",{mountedExtensions:[]});function ae(e){return(0,ne.getGlobalStore)(`config-module-${e}`,{config:null,loaded:!1})}function se(){return(0,ne.getGlobalStore)("config-extension-slots",{slots:{}})}function ue(e,t){const n=e.slots[t];return null!=n?n:{loaded:!1,config:{}}}function le(){return(0,ne.getGlobalStore)("config-extensions",{configs:{}})}function ce(e,t,n){var r;const o=null===(r=e.configs[t])||void 0===r?void 0:r[n];return null!=o?o:{loaded:!1,config:null}}const fe=(0,ne.createGlobalStore)("config-implementer-tools",{config:{}});function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(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){de(e,t,n[t])}))}return e}function pe(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function ye(e,t){for(let n of Object.keys(e.schemas)){const r=ke(n,e,t);ae(n).setState({loaded:!0,config:r})}}function ve(e,t){const n=function(e,t){const n=Pe(Ee(e,t)),r=Object.keys(n).reduce(((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}),{});!function(e){for(let[t,n]of Object.entries(e))for(let[e,r]of Object.entries(n))Se(r,t,e)}(r);return Object.keys(r).reduce(((e,t)=>he({},e,r[t])),{})}(e,t),r=Object.fromEntries(Object.entries(n).map((([e,t])=>[e,{loaded:!0,config:t}]))),o=se(),i=o.getState(),a={slots:he({},i.slots,r)};P(i,a)||o.setState(a)}function ge(e,t){const n=function(e,t){let n=we(I(e.schemas));const r=[...e.providedConfigs.map((e=>[e.config,e.source])),[t.config,"temporary config"]];for(let[e,t]of r)n=Pe([n,_e(e,t)]);return n}(e,t);fe.setState({config:n})}function me(e,t,n){const r={};for(let o of t.mountedExtensions){const t=be(o.slotModuleName,o.extensionModuleName,o.slotName,o.extensionId,e,n);r[o.slotName]=pe(he({},r[o.slotName]),{[o.extensionId]:{config:t,loaded:!0}})}le().setState({configs:r})}function be(e,t,n,r,o,i){var a,s,u;const l=function(e){const[t]=e.split("#");return t}(r),c=o.schemas[l],f=c?l:t,d=Ee(o,i),h=xe(e,d);var p;const y=null!==(p=null==h||null===(a=h.extensionSlots)||void 0===a||null===(s=a[n])||void 0===s||null===(u=s.configure)||void 0===u?void 0:u[r])&&void 0!==p?p:{},v=Pe([xe(f,d),y]),g=null!=c?c:o.schemas[t];je(g,v,f);const m=De(g,v);return Te(g,m,f),delete m.extensionSlots,m}function we(e){return e.hasOwnProperty("_default")?pe(he({},e),{_value:e._default,_source:"default"}):Le(e)?Object.keys(e).reduce(((t,n)=>(t[n]=we(e[n]),t)),{}):{}}function _e(e,t){return Le(e)?Object.keys(e).reduce(((n,r)=>(n[r]=_e(e[r],t),n)),{}):{_value:e,_source:t}}function Se(e,t,n){const r=`Extension slot config '${t}.extensionSlots.${n}`,o=Object.keys(e).filter((e=>!["add","remove","order","configure"].includes(e)));o.length&&console.error(r+`' contains invalid keys '${o.join("', '")}'`),e.add&&(Array.isArray(e.add)&&e.add.every((e=>"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((e=>"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((e=>"string"==typeof e))||console.error(r+".order' is invalid. Must be an array of strings (extension IDs)")),e.configure&&(Le(e.configure)||console.error(r+".configure' is invalid. Must be an object with extension IDs for keys"))}function Ee(e,t){return[...e.providedConfigs.map((e=>e.config)),t.config]}function Oe(e,t,n=""){const r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(const o of Object.keys(t).filter((e=>!e.startsWith("_")))){const i=n+(n&&".")+o,a=t[o];if("Display conditions"===i&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===i&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!Le(a)){console.error(`${e} has bad config schema definition for key '${i}'. ${r}`);continue}a.hasOwnProperty("_default")||Oe(e,a,i);const s=a._elements;if(Me(s)&&Oe(e,s,i+"._elements"),a._validators)for(let t of a._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${i}' ${r}.\n\nIf you're the maintainer: validators must be functions that return either undefined or an error string. Received ${t}.`);const u=a._type;u&&!Object.values(G).includes(u)&&console.error(`${e} has invalid type for key '${i}' ${r}.\n\nIf you're the maintainer: the allowed types are ${Object.values(G).join(", ")}. Received '${u}'`),Object.keys(a).every((e=>["_description","_validators","_elements","_type"].includes(e)))&&!n.includes("._elements")&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: all config elements must have a default. Received ${JSON.stringify(a)}`),s&&u&&![G.Array,G.Object].includes(u)&&console.error(`${e} has bad config schema definition for key '${i}'. ${r}.\n\nIf you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(u)}`)}}function ke(e,t,n){if(!t.schemas.hasOwnProperty(e))throw Error("No config schema has been defined for "+e);const r=t.schemas[e],o=xe(e,Ee(t,n));je(r,o,e);const i=De(r,o);return Te(r,i,e),delete i.extensionSlots,i}function xe(e,t){const n=t.map((({[e]:t})=>t)).filter((e=>!!e));return Pe(n)}function Pe(e){return W(M)({},e)}function je(e,t,n=""){for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e.hasOwnProperty(r)?Ce(a,o,i):"extensionSlots"===r&&""!==n||console.error(`Unknown config key '${i}' provided. Ignoring.`)}}function Ce(e,t,n){Ae(n,e._type,t),Le(t)?e._type===G.Object?function(e,t,n){if(e._elements)for(const r of Object.keys(t)){const o=t[r];je(e._elements,o,`${n}.${r}`)}}(e,t,n):e.hasOwnProperty("_default")||je(e,t,n):e._type===G.Array&&function(e,t,n){if(Me(e._elements))for(let r=0;r<t.length;r++)Ce(e._elements,t[r],`${n}[${r}]`);for(let o=0;o<t.length;o++){var r;Ae(`${n}[${o}]`,null===(r=e._elements)||void 0===r?void 0:r._type,t[o])}}(e,t,n)}function Te(e,t,n=""){if(e)if(t!==e._default&&Ne(n,e._validators,t),Le(t))for(const r of Object.keys(t)){const o=t[r],i=n+"."+r,a=e[r];e._type===G.Object&&e._elements?Te(e._elements,o,i):Te(a,o,i)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)Te(e._elements,t[r],`${n}[${r}]`)}function Ae(e,t,n){t&&Ne(e,[{Array:Y,Boolean:Z,ConceptUuid:te,Number:J,Object:ee,String:X,UUID:te,PersonAttributeTypeUuid:te,PatientIdentifierTypeUuid:te}[t]],n)}function Ne(e,t,n){if(t)try{for(let r of t){const t=r(n);"string"==typeof t&&("object"==typeof n?console.error(`Invalid configuration for ${e}: ${t}`):console.error(`Invalid configuration value ${n} for ${e}: ${t}`))}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error\n\t${t}`)}}ye(re.getState(),oe.getState()),re.subscribe((e=>ye(e,oe.getState()))),oe.subscribe((e=>ye(re.getState(),e))),ge(re.getState(),oe.getState()),re.subscribe((e=>ge(e,oe.getState()))),oe.subscribe((e=>ge(re.getState(),e))),ve(re.getState(),oe.getState()),re.subscribe((e=>ve(e,oe.getState()))),oe.subscribe((e=>ve(re.getState(),e))),me(re.getState(),ie.getState(),oe.getState()),re.subscribe((e=>{me(e,ie.getState(),oe.getState())})),ie.subscribe((e=>{me(re.getState(),e,oe.getState())})),oe.subscribe((e=>{me(re.getState(),ie.getState(),e)}));const De=(e,t)=>{const n=I(t);if(!e)return n;for(const t of Object.keys(e)){const r=n[t],o=e[t];if(o&&o.hasOwnProperty("_default")){n.hasOwnProperty(t)||(n[t]=o._default);const e=o._elements;if(r&&Me(e))if(o._type===G.Array&&Array.isArray(r)){const o=r.map((t=>De(e,t)));n[t]=o}else if(o._type===G.Object)for(let t of Object.keys(r))r[t]=De(e,r[t])}else if(Le(o)){const e=n.hasOwnProperty(t)?r:{};Le(e)&&(n[t]=De(o,e))}}return n};function Me(e){return!!e&&Object.keys(e).filter((e=>!["_default","_validators"].includes(e))).length>0}function Le(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}const Ie={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:G.Array,_default:[]}},"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:G.Object,_default:{}}};var Re=Object.freeze({__proto__:null,get start(){return bn},get ensureJQuerySupport(){return qt},get setBootstrapMaxTime(){return Pt},get setMountMaxTime(){return jt},get setUnmountMaxTime(){return Ct},get setUnloadMaxTime(){return Tt},get registerApplication(){return on},get unregisterApplication(){return sn},get getMountedApps(){return tn},get getAppStatus(){return rn},get unloadApplication(){return un},get checkActivityFunctions(){return an},get getAppNames(){return nn},get pathToActiveWhen(){return fn},get navigateToUrl(){return Bt},get triggerAppChange(){return yn},get addErrorHandler(){return Ve},get removeErrorHandler(){return He},get mountRootParcel(){return St},get NOT_LOADED(){return Ge},get LOADING_SOURCE_CODE(){return Qe},get NOT_BOOTSTRAPPED(){return Ye},get BOOTSTRAPPING(){return Ze},get NOT_MOUNTED(){return Je},get MOUNTING(){return Xe},get UPDATING(){return tt},get LOAD_ERROR(){return rt},get MOUNTED(){return et},get UNMOUNTING(){return nt},get SKIP_BECAUSE_BROKEN(){return ot}});function Be(e){return(Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ue=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{}).CustomEvent,Fe=function(){try{var e=new Ue("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?Ue:"undefined"!=typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=Boolean(t.bubbles),n.cancelable=Boolean(t.cancelable),n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n},Ke=[];function ze(e,t,n){var r=We(e,t,n);Ke.length?Ke.forEach((function(e){return e(r)})):setTimeout((function(){throw r}))}function Ve(e){if("function"!=typeof e)throw Error(qe(28,!1));Ke.push(e)}function He(e){if("function"!=typeof e)throw Error(qe(29,!1));var t=!1;return Ke=Ke.filter((function(n){var r=n===e;return t=t||r,!r})),t}function qe(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return"single-spa minified message #".concat(e,": ").concat(t?t+" ":"","See https://single-spa.js.org/error/?code=").concat(e).concat(r.length?"&arg=".concat(r.join("&arg=")):"")}function We(e,t,n){var r,o="".concat(lt(t)," '").concat(st(t),"' died in status ").concat(t.status,": ");if(e instanceof Error){try{e.message=o+e.message}catch(e){}r=e}else{console.warn(qe(30,!1,t.status,st(t)));try{r=Error(o+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=st(t),t.status=n,r}var Ge="NOT_LOADED",Qe="LOADING_SOURCE_CODE",Ye="NOT_BOOTSTRAPPED",Ze="BOOTSTRAPPING",Je="NOT_MOUNTED",Xe="MOUNTING",et="MOUNTED",tt="UPDATING",nt="UNMOUNTING",rt="LOAD_ERROR",ot="SKIP_BECAUSE_BROKEN";function it(e){return e.status===et}function at(e){try{return e.activeWhen(window.location)}catch(t){return ze(t,e,ot),!1}}function st(e){return e.name}function ut(e){return Boolean(e.unmountThisParcel)}function lt(e){return ut(e)?"parcel":"application"}function ct(){for(var e=arguments.length-1;e>0;e--)for(var t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function ft(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function dt(e){return e&&("function"==typeof e||(t=e,Array.isArray(t)&&!ft(t,(function(e){return"function"!=typeof e}))));var t}function ht(e,t){var n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[function(){return Promise.resolve()}]);var r=lt(e),o=st(e);return function(e){return n.reduce((function(n,i,a){return n.then((function(){var n=i(e);return pt(n)?n:Promise.reject(qe(15,!1,r,o,t,a))}))}),Promise.resolve())}}function pt(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}function yt(e,t){return Promise.resolve().then((function(){return e.status!==Ye?e:(e.status=Ze,e.bootstrap?At(e,"bootstrap").then(n).catch((function(n){if(t)throw We(n,e,ot);return ze(n,e,ot),e})):Promise.resolve().then(n))}));function n(){return e.status=Je,e}}function vt(e,t){return Promise.resolve().then((function(){if(e.status!==et)return e;e.status=nt;var n=Object.keys(e.parcels).map((function(t){return e.parcels[t].unmountThisParcel()}));return Promise.all(n).then(r,(function(n){return r().then((function(){var r=Error(n.message);if(t)throw We(r,e,ot);ze(r,e,ot)}))})).then((function(){return e}));function r(){return At(e,"unmount").then((function(){e.status=Je})).catch((function(n){if(t)throw We(n,e,ot);ze(n,e,ot)}))}}))}var gt=!1,mt=!1;function bt(e,t){return Promise.resolve().then((function(){return e.status!==Je?e:(gt||(window.dispatchEvent(new Fe("single-spa:before-first-mount")),gt=!0),At(e,"mount").then((function(){return e.status=et,mt||(window.dispatchEvent(new Fe("single-spa:first-mount")),mt=!0),e})).catch((function(n){return e.status=et,vt(e,!0).then(r,r);function r(){if(t)throw We(n,e,ot);return ze(n,e,ot),e}})))}))}var wt=0,_t={parcels:{}};function St(){return Et.apply(_t,arguments)}function Et(e,t){var n=this;if(!e||"object"!==Be(e)&&"function"!=typeof e)throw Error(qe(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(qe(3,!1,Be(e.name)));if("object"!==Be(t))throw Error(qe(4,!1,name,Be(t)));if(!t.domElement)throw Error(qe(5,!1,name));var r,o=wt++,i="function"==typeof e,a=i?e:function(){return Promise.resolve(e)},s={id:o,parcels:{},status:i?Qe:Ye,customProps:t,parentName:st(n),unmountThisParcel:function(){return d.then((function(){if(s.status!==et)throw Error(qe(6,!1,name,s.status));return vt(s,!0)})).then((function(e){return s.parentName&&delete n.parcels[s.id],e})).then((function(e){return l(e),e})).catch((function(e){throw s.status=ot,c(e),e}))}};n.parcels[o]=s;var u=a();if(!u||"function"!=typeof u.then)throw Error(qe(7,!1));var l,c,f=(u=u.then((function(e){if(!e)throw Error(qe(8,!1));var t=e.name||"parcel-".concat(o);if(Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!dt(e.bootstrap))throw Error(qe(9,!1,t));if(!dt(e.mount))throw Error(qe(10,!1,t));if(!dt(e.unmount))throw Error(qe(11,!1,t));if(e.update&&!dt(e.update))throw Error(qe(12,!1,t));var n=ht(e,"bootstrap"),i=ht(e,"mount"),a=ht(e,"unmount");s.status=Ye,s.name=t,s.bootstrap=n,s.mount=i,s.unmount=a,s.timeouts=Nt(e.timeouts),e.update&&(s.update=ht(e,"update"),r.update=function(e){return s.customProps=e,Ot(function(e){return Promise.resolve().then((function(){if(e.status!==et)throw Error(qe(32,!1,st(e)));return e.status=tt,At(e,"update").then((function(){return e.status=et,e})).catch((function(t){throw We(t,e,ot)}))}))}(s))})}))).then((function(){return yt(s,!0)})),d=f.then((function(){return bt(s,!0)})),h=new Promise((function(e,t){l=e,c=t}));return r={mount:function(){return Ot(Promise.resolve().then((function(){if(s.status!==Je)throw Error(qe(13,!1,name,s.status));return n.parcels[o]=s,bt(s)})))},unmount:function(){return Ot(s.unmountThisParcel())},getStatus:function(){return s.status},loadPromise:Ot(u),bootstrapPromise:Ot(f),mountPromise:Ot(d),unmountPromise:Ot(h)}}function Ot(e){return e.then((function(){return null}))}function kt(e){var t=st(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!==Be(n)||null===n||Array.isArray(n))&&(n={},console.warn(qe(40,!1),t,n));var r=ct({},n,{name:t,mountParcel:Et.bind(e),singleSpa:Re});return ut(e)&&(r.unmountSelf=e.unmountThisParcel),r}var xt={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function Pt(e,t,n){if("number"!=typeof e||e<=0)throw Error(qe(16,!1));xt.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function jt(e,t,n){if("number"!=typeof e||e<=0)throw Error(qe(17,!1));xt.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Ct(e,t,n){if("number"!=typeof e||e<=0)throw Error(qe(18,!1));xt.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function Tt(e,t,n){if("number"!=typeof e||e<=0)throw Error(qe(19,!1));xt.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function At(e,t){var n=e.timeouts[t],r=n.warningMillis,o=lt(e);return new Promise((function(i,a){var s=!1,u=!1;e[t](kt(e)).then((function(e){s=!0,i(e)})).catch((function(e){s=!0,a(e)})),setTimeout((function(){return c(1)}),r),setTimeout((function(){return c(!0)}),n.millis);var l=qe(31,!1,t,o,st(e),n.millis);function c(e){if(!s)if(!0===e)u=!0,n.dieOnTimeout?a(Error(l)):console.error(l);else if(!u){var t=e,o=t*r;console.warn(l),o+r<n.millis&&setTimeout((function(){return c(t+1)}),r)}}}))}function Nt(e){var t={};for(var n in xt)t[n]=ct({},xt[n],e&&e[n]||{});return t}function Dt(e){return Promise.resolve().then((function(){return e.loadPromise?e.loadPromise:e.status!==Ge&&e.status!==rt?e:(e.status=Qe,e.loadPromise=Promise.resolve().then((function(){var r=e.loadApp(kt(e));if(!pt(r))throw n=!0,Error(qe(33,!1,st(e)));return r.then((function(n){var r;e.loadErrorTime=null,"object"!==Be(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!dt(t.bootstrap)&&(r=35),dt(t.mount)||(r=36),dt(t.unmount)||(r=37);var o=lt(t);if(r){var i;try{i=JSON.stringify(t)}catch(e){}return console.error(qe(r,!1,o,st(e),i),t),ze(void 0,e,ot),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=ct({},e.devtools.overlays,t.devtools.overlays)),e.status=Ye,e.bootstrap=ht(t,"bootstrap"),e.mount=ht(t,"mount"),e.unmount=ht(t,"unmount"),e.unload=ht(t,"unload"),e.timeouts=Nt(t.timeouts),delete e.loadPromise,e}))})).catch((function(t){var r;return delete e.loadPromise,n?r=ot:(r=rt,e.loadErrorTime=(new Date).getTime()),ze(t,e,r),e})));var t,n}))}var Mt,Lt="undefined"!=typeof window,It={hashchange:[],popstate:[]},Rt=["hashchange","popstate"];function Bt(e){var t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(qe(14,!1));t=e.currentTarget.href,e.preventDefault()}var n=Vt(window.location.href),r=Vt(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function $t(e){var t=this;if(e){var n=e[0].type;Rt.indexOf(n)>=0&&It[n].forEach((function(n){try{n.apply(t,e)}catch(e){setTimeout((function(){throw e}))}}))}}function Ut(){vn([],arguments)}function Ft(e,t){return function(){var n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return Mt&&n===o||(wn()?window.dispatchEvent(function(e,t){var n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)):vn([])),r}}if(Lt){window.addEventListener("hashchange",Ut),window.addEventListener("popstate",Ut);var Kt=window.addEventListener,zt=window.removeEventListener;window.addEventListener=function(e,t){if(!("function"==typeof t&&Rt.indexOf(e)>=0)||ft(It[e],(function(e){return e===t})))return Kt.apply(this,arguments);It[e].push(t)},window.removeEventListener=function(e,t){if(!("function"==typeof t&&Rt.indexOf(e)>=0))return zt.apply(this,arguments);It[e]=It[e].filter((function(e){return e!==t}))},window.history.pushState=Ft(window.history.pushState,"pushState"),window.history.replaceState=Ft(window.history.replaceState,"replaceState"),window.singleSpaNavigate?console.warn(qe(41,!1)):window.singleSpaNavigate=Bt}function Vt(e){var t=document.createElement("a");return t.href=e,t}var Ht=!1;function qt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.jQuery;if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!Ht){var t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return Wt.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return Wt.call(this,n,window.removeEventListener,e,t,arguments)},Ht=!0}}function Wt(e,t,n,r,o){return"string"!=typeof n?e.apply(this,o):(n.split(/\s+/).forEach((function(e){Rt.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))})),""===n.trim()?this:e.apply(this,o))}var Gt={};function Qt(e){return Promise.resolve().then((function(){var t=Gt[st(e)];if(!t)return e;if(e.status===Ge)return Yt(e,t),e;if("UNLOADING"===e.status)return t.promise.then((function(){return e}));if(e.status!==Je&&e.status!==rt)return e;var n=e.status===rt?Promise.resolve():At(e,"unload");return e.status="UNLOADING",n.then((function(){return Yt(e,t),e})).catch((function(n){return function(e,t,n){delete Gt[st(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,ze(n,e,ot),t.reject(n)}(e,t,n),e}))}))}function Yt(e,t){delete Gt[st(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=Ge,t.resolve()}function Zt(e,t,n,r){Gt[st(e)]={app:e,resolve:n,reject:r},Object.defineProperty(Gt[st(e)],"promise",{get:t})}function Jt(e){return Gt[e]}var Xt=[];function en(){var e=[],t=[],n=[],r=[],o=(new Date).getTime();return Xt.forEach((function(i){var a=i.status!==ot&&at(i);switch(i.status){case rt:a&&o-i.loadErrorTime>=200&&n.push(i);break;case Ge:case Qe:a&&n.push(i);break;case Ye:case Je:!a&&Jt(st(i))?e.push(i):a&&r.push(i);break;case et:a||t.push(i)}})),{appsToUnload:e,appsToUnmount:t,appsToLoad:n,appsToMount:r}}function tn(){return Xt.filter(it).map(st)}function nn(){return Xt.map(st)}function rn(e){var t=ft(Xt,(function(t){return st(t)===e}));return t?t.status:null}function on(e,t,n,r){var o=function(e,t,n,r){var o,i={name:null,loadApp:null,activeWhen:null,customProps:null};return"object"===Be(e)?(function(e){if(Array.isArray(e)||null===e)throw Error(qe(39,!1));var t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((function(e,n){return t.indexOf(n)>=0?e:e.concat(n)}),[]);if(0!==n.length)throw Error(qe(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length)throw Error(qe(20,!1));if("object"!==Be(e.app)&&"function"!=typeof e.app)throw Error(qe(20,!1));var r=function(e){return"string"==typeof e||"function"==typeof e};if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(qe(24,!1));if(!cn(e.customProps))throw Error(qe(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(qe(20,!1));if(!t)throw Error(qe(23,!1));if("function"!=typeof n)throw Error(qe(24,!1));if(!cn(r))throw Error(qe(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(o=i.loadApp)?function(){return Promise.resolve(o)}:o,i.customProps=function(e){return e||{}}(i.customProps),i.activeWhen=function(e){var t=Array.isArray(e)?e:[e];return t=t.map((function(e){return"function"==typeof e?e:fn(e)})),function(e){return t.some((function(t){return t(e)}))}}(i.activeWhen),i}(e,t,n,r);if(-1!==nn().indexOf(o.name))throw Error(qe(21,!1,o.name));Xt.push(ct({loadErrorTime:null,status:Ge,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},o)),Lt&&(qt(),vn())}function an(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location;return Xt.filter((function(t){return t.activeWhen(e)})).map(st)}function sn(e){if(0===Xt.filter((function(t){return st(t)===e})).length)throw Error(qe(25,!1,e));return un(e).then((function(){var t=Xt.map(st).indexOf(e);Xt.splice(t,1)}))}function un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{waitForUnmount:!1};if("string"!=typeof e)throw Error(qe(26,!1));var n=ft(Xt,(function(t){return st(t)===e}));if(!n)throw Error(qe(27,!1,e));var r,o=Jt(st(n));if(t&&t.waitForUnmount){if(o)return o.promise;var i=new Promise((function(e,t){Zt(n,(function(){return i}),e,t)}));return i}return o?(r=o.promise,ln(n,o.resolve,o.reject)):r=new Promise((function(e,t){Zt(n,(function(){return r}),e,t),ln(n,e,t)})),r}function ln(e,t,n){vt(e).then(Qt).then((function(){t(),setTimeout((function(){vn()}))})).catch(n)}function cn(e){return!e||"function"==typeof e||"object"===Be(e)&&null!==e&&!Array.isArray(e)}function fn(e,t){var n=function(e,t){var n=0,r=!1,o="^";"/"!==e[0]&&(e="/"+e);for(var i=0;i<e.length;i++){var a=e[i];(!r&&":"===a||r&&"/"===a)&&s(i)}return s(e.length),new RegExp(o,"i");function s(i){var a=e.slice(n,i).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(o+=r?"[^/]+/?":a,i===e.length)if(r)t&&(o+="$");else{var s=t?"":".*";o="/"===o.charAt(o.length-1)?"".concat(o).concat(s,"$"):"".concat(o,"(/").concat(s,")?(#.*)?$")}r=!r,n=i}}(e,t);return function(e){var t=e.origin;t||(t="".concat(e.protocol,"//").concat(e.host));var r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}var dn=!1,hn=[],pn=Lt&&window.location.href;function yn(){return vn()}function vn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;if(dn)return new Promise((function(e,n){hn.push({resolve:e,reject:n,eventArguments:t})}));var n,r=en(),o=r.appsToUnload,i=r.appsToUnmount,a=r.appsToLoad,s=r.appsToMount,u=!1,l=pn,c=pn=window.location.href;return wn()?(dn=!0,n=o.concat(a,i,s),Promise.resolve().then((function(){if(window.dispatchEvent(new Fe(0===n.length?"single-spa:before-no-app-change":"single-spa:before-app-change",p(!0))),window.dispatchEvent(new Fe("single-spa:before-routing-event",p(!0,{cancelNavigation:f}))),u)return window.dispatchEvent(new Fe("single-spa:before-mount-routing-event",p(!0))),d(),void Bt(l);var t=o.map(Qt),r=i.map(vt).map((function(e){return e.then(Qt)})).concat(t),c=Promise.all(r);c.then((function(){window.dispatchEvent(new Fe("single-spa:before-mount-routing-event",p(!0)))}));var y=a.map((function(e){return Dt(e).then((function(e){return gn(e,c)}))})),v=s.filter((function(e){return a.indexOf(e)<0})).map((function(e){return gn(e,c)}));return c.catch((function(e){throw h(),e})).then((function(){return h(),Promise.all(y.concat(v)).catch((function(t){throw e.forEach((function(e){return e.reject(t)})),t})).then(d)}))}))):(n=a,Promise.resolve().then((function(){var e=a.map(Dt);return Promise.all(e).then(h).then((function(){return[]})).catch((function(e){throw h(),e}))})));function f(){u=!0}function d(){var t=tn();e.forEach((function(e){return e.resolve(t)}));try{var r=0===n.length?"single-spa:no-app-change":"single-spa:app-change";window.dispatchEvent(new Fe(r,p())),window.dispatchEvent(new Fe("single-spa:routing-event",p()))}catch(e){setTimeout((function(){throw e}))}if(dn=!1,hn.length>0){var o=hn;hn=[],vn(o)}return t}function h(){e.forEach((function(e){$t(e.eventArguments)})),$t(t)}function p(){var e,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],f=arguments.length>1?arguments[1]:void 0,d={},h=($e(e={},et,[]),$e(e,Je,[]),$e(e,Ge,[]),$e(e,ot,[]),e);r?(a.concat(s).forEach((function(e,t){y(e,et)})),o.forEach((function(e){y(e,Ge)})),i.forEach((function(e){y(e,Je)}))):n.forEach((function(e){y(e)}));var p={detail:{newAppStatuses:d,appsByNewStatus:h,totalAppChanges:n.length,originalEvent:null==t?void 0:t[0],oldUrl:l,newUrl:c,navigationIsCanceled:u}};return f&&ct(p.detail,f),p;function y(e,t){var n=st(e);t=t||rn(n),d[n]=t,(h[t]=h[t]||[]).push(n)}}}function gn(e,t){return at(e)?yt(e).then((function(e){return t.then((function(){return at(e)?bt(e):e}))})):t.then((function(){return e}))}var mn=!1;function bn(e){var t;mn=!0,e&&e.urlRerouteOnly&&(t=e.urlRerouteOnly,Mt=t),Lt&&vn()}function wn(){return mn}Lt&&setTimeout((function(){mn||console.warn(qe(1,!1))}),5e3);var _n={getRawAppData:function(){return[].concat(Xt)},reroute:vn,NOT_LOADED:Ge,toLoadPromise:Dt,toBootstrapPromise:yt,unregisterApplication:sn};Lt&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods=_n);(e=>{const t=e.concat(["openmrsBase","openmrsSpaBase"]);Q((e=>{if(!e||"string"!=typeof e)return!1;const n=/\${(.*?)}/g;let r=n.exec(e);for(;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((e=>"${"+e+"}")).join(", "))})([]),Number.MAX_SAFE_INTEGER;var Sn=n(400),En=function(e,t){return En=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},En(e,t)};function On(e,t){function n(){this.constructor=e}En(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function kn(e){return"function"==typeof e}var xn=!1,Pn={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){e&&(new Error).stack,xn=e},get useDeprecatedSynchronousErrorHandling(){return xn}};function jn(e){setTimeout((function(){throw e}),0)}var Cn={closed:!0,next:function(e){},error:function(e){if(Pn.useDeprecatedSynchronousErrorHandling)throw e;jn(e)},complete:function(){}},Tn=function(){return Array.isArray||function(e){return e&&"number"==typeof e.length}}();function An(e){return null!==e&&"object"==typeof e}var Nn=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),Dn=Nn,Mn=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var n=this,r=n._parentOrParents,o=n._ctorUnsubscribe,i=n._unsubscribe,a=n._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof e)r.remove(this);else if(null!==r)for(var s=0;s<r.length;++s)r[s].remove(this);if(kn(i)){o&&(this._unsubscribe=void 0);try{i.call(this)}catch(e){t=e instanceof Dn?Ln(e.errors):[e]}}if(Tn(a)){s=-1;for(var u=a.length;++s<u;){var l=a[s];if(An(l))try{l.unsubscribe()}catch(e){t=t||[],e instanceof Dn?t=t.concat(Ln(e.errors)):t.push(e)}}}if(t)throw new Dn(t)}},e.prototype.add=function(t){var n=t;if(!t)return e.EMPTY;switch(typeof t){case"function":n=new e(t);case"object":if(n===this||n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if(!(n instanceof e)){var r=n;(n=new e)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+t+" added to Subscription.")}var o=n._parentOrParents;if(null===o)n._parentOrParents=this;else if(o instanceof e){if(o===this)return n;n._parentOrParents=[o,this]}else{if(-1!==o.indexOf(this))return n;o.push(this)}var i=this._subscriptions;return null===i?this._subscriptions=[n]:i.push(n),n},e.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},e.EMPTY=function(e){return e.closed=!0,e}(new e),e}();function Ln(e){return e.reduce((function(e,t){return e.concat(t instanceof Dn?t.errors:t)}),[])}var In=function(){return"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),Rn=function(e){function t(n,r,o){var i=e.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=Cn;break;case 1:if(!n){i.destination=Cn;break}if("object"==typeof n){n instanceof t?(i.syncErrorThrowable=n.syncErrorThrowable,i.destination=n,n.add(i)):(i.syncErrorThrowable=!0,i.destination=new Bn(i,n));break}default:i.syncErrorThrowable=!0,i.destination=new Bn(i,n,r,o)}return i}return On(t,e),t.prototype[In]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(Mn),Bn=function(e){function t(t,n,r,o){var i,a=e.call(this)||this;a._parentSubscriber=t;var s=a;return kn(n)?i=n:n&&(i=n.next,r=n.error,o=n.complete,n!==Cn&&(kn((s=Object.create(n)).unsubscribe)&&a.add(s.unsubscribe.bind(s)),s.unsubscribe=a.unsubscribe.bind(a))),a._context=s,a._next=i,a._error=r,a._complete=o,a}return On(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;Pn.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,n=Pn.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):jn(e),this.unsubscribe();else{if(this.unsubscribe(),n)throw e;jn(e)}}},t.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)};Pn.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),Pn.useDeprecatedSynchronousErrorHandling)throw e;jn(e)}},t.prototype.__tryOrSetError=function(e,t,n){if(!Pn.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,n)}catch(t){return Pn.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(jn(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(Rn),$n=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function Un(e){return e}var Fn=function(){function e(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 r=this.operator,o=function(e,t,n){if(e){if(e instanceof Rn)return e;if(e[In])return e[In]()}return e||t||n?new Rn(e,t,n):new Rn(Cn)}(e,t,n);if(r?o.add(r.call(o,this.source)):o.add(this.source||Pn.useDeprecatedSynchronousErrorHandling&&!o.syncErrorThrowable?this._subscribe(o):this._trySubscribe(o)),Pn.useDeprecatedSynchronousErrorHandling&&o.syncErrorThrowable&&(o.syncErrorThrowable=!1,o.syncErrorThrown))throw o.syncErrorValue;return o},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Pn.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),function(e){for(;e;){var t=e,n=t.closed,r=t.destination,o=t.isStopped;if(n||o)return!1;e=r&&r instanceof Rn?r:null}return!0}(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Kn(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[$n]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?this:(0===(n=e).length?Un:1===n.length?n[0]:function(e){return n.reduce((function(e,t){return t(e)}),e)})(this);var n},e.prototype.toPromise=function(e){var t=this;return new(e=Kn(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}();function Kn(e){if(e||(e=Pn.Promise||Promise),!e)throw new Error("no Promise impl found");return e}var zn=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),Vn=function(e){function t(t,n){var r=e.call(this)||this;return r.subject=t,r.subscriber=n,r.closed=!1,r}return On(t,e),t.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)}}},t}(Mn),Hn=function(e){function t(t){var n=e.call(this,t)||this;return n.destination=t,n}return On(t,e),t}(Rn),qn=function(e){function t(){var t=e.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return On(t,e),t.prototype[In]=function(){return new Hn(this)},t.prototype.lift=function(e){var t=new Wn(this,this);return t.operator=e,t},t.prototype.next=function(e){if(this.closed)throw new zn;if(!this.isStopped)for(var t=this.observers,n=t.length,r=t.slice(),o=0;o<n;o++)r[o].next(e)},t.prototype.error=function(e){if(this.closed)throw new zn;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},t.prototype.complete=function(){if(this.closed)throw new zn;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},t.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},t.prototype._trySubscribe=function(t){if(this.closed)throw new zn;return e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){if(this.closed)throw new zn;return this.hasError?(e.error(this.thrownError),Mn.EMPTY):this.isStopped?(e.complete(),Mn.EMPTY):(this.observers.push(e),new Vn(this,e))},t.prototype.asObservable=function(){var e=new Fn;return e.source=this,e},t.create=function(e,t){return new Wn(e,t)},t}(Fn),Wn=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return On(t,e),t.prototype.next=function(e){var t=this.destination;t&&t.next&&t.next(e)},t.prototype.error=function(e){var t=this.destination;t&&t.error&&this.destination.error(e)},t.prototype.complete=function(){var e=this.destination;e&&e.complete&&this.destination.complete()},t.prototype._subscribe=function(e){return this.source?this.source.subscribe(e):Mn.EMPTY},t}(qn),Gn={};try{process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES&&"true"===process.env.CARBON_ENABLE_CSS_CUSTOM_PROPERTIES?Gn.enableCssCustomProperties=!0:Gn.enableCssCustomProperties=!1,process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE&&"true"===process.env.CARBON_ENABLE_USE_CONTROLLED_STATE_WITH_VALUE?Gn.enableUseControlledStateWithValue=!0:Gn.enableUseControlledStateWithValue=!1,process.env.CARBON_ENABLE_CSS_GRID&&"true"===process.env.CARBON_ENABLE_CSS_GRID?Gn.enableCssGrid=!0:Gn.enableCssGrid=!1,process.env.CARBON_ENABLE_V11_RELEASE&&"true"===process.env.CARBON_ENABLE_V11_RELEASE?Gn.enableV11Release=!0:Gn.enableV11Release=!1}catch(e){Gn.enableCssCustomProperties=!1,Gn.enableUseControlledStateWithValue=!1,Gn.enableCssGrid=!1,Gn.enableV11Release=!1}var Qn=[{name:"enable-css-custom-properties",description:"Describe what the flag does",enabled:Gn.enableCssCustomProperties},{name:"enable-use-controlled-state-with-value",description:"Enable components to be created in either a controlled or uncontrolled mode\n",enabled:Gn.enableUseControlledStateWithValue},{name:"enable-css-grid",description:"Enable CSS Grid Layout in the Grid and Column React components\n",enabled:Gn.enableCssGrid},{name:"enable-v11-release",description:"Enable the features and functionality for the v11 Release\n",enabled:Gn.enableV11Release}];function Yn(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 Zn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||Jn(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 Jn(e,t){if(e){if("string"==typeof e)return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xn(e,t):void 0}}function Xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}for(var er=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=new Map,t&&Object.keys(t).forEach((function(e){n.flags.set(e,t[e])}))}var t,n;return t=e,n=[{key:"checkForFlag",value:function(e){if(!this.flags.has(e))throw new Error("Unable to find a feature flag with the name: `".concat(e,"`"))}},{key:"add",value:function(e,t){if(this.flags.has(e))throw new Error("The feature flag: ".concat(e," already exists"));this.flags.set(e,t)}},{key:"enable",value:function(e){this.checkForFlag(e),this.flags.set(e,!0)}},{key:"disable",value:function(e){this.checkForFlag(e),this.flags.set(e,!1)}},{key:"merge",value:function(e){var t=this;Object.keys(e).forEach((function(n){t.flags.set(n,e[n])}))}},{key:"mergeWithScope",value:function(e){var t,n=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Jn(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.flags);try{for(n.s();!(t=n.n()).done;){var r=Zn(t.value,2),o=r[0],i=r[1];this.flags.has(o)||this.flags.set(o,i)}}catch(e){n.e(e)}finally{n.f()}}},{key:"enabled",value:function(e){return this.checkForFlag(e),this.flags.get(e)}}],n&&Yn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),tr=new er(undefined),nr=0;nr<Qn.length;nr++){var rr=Qn[nr];tr.add(rr.name,rr.enabled)}!function(){tr.merge.apply(tr,arguments)}({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0}),n(746),new qn,new qn,new qn,n(151),(0,ne.createGlobalStore)("session",{loaded:!1,session:null});try{self["workbox:window:6.5.3"]&&_()}catch(Be){}function or(e,t){return new Promise((function(n){var r=new MessageChannel;r.port1.onmessage=function(e){n(e.data)},e.postMessage(t,[r.port2])}))}function ir(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}try{self["workbox:core:6.5.3"]&&_()}catch(Be){}var ar=function(){var e=this;this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))};function sr(e,t){var n=location.href;return new URL(e,n).href===new URL(t,n).href}var ur=function(e,t){this.type=e,Object.assign(this,t)};function lr(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function cr(){}var fr={type:"SKIP_WAITING"};function dr(e,t){if(!t)return e&&e.then?e.then(cr):Promise.resolve()}!function(e){var t,n;function r(t,n){var r,o;return void 0===n&&(n={}),(r=e.call(this)||this).nn={},r.tn=0,r.rn=new ar,r.en=new ar,r.on=new ar,r.un=0,r.an=new Set,r.cn=function(){var e=r.fn,t=e.installing;r.tn>0||!sr(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 ur(o,a)),"installed"===o?r.wn=self.setTimeout((function(){"installed"===o&&t.waiting===n&&r.dispatchEvent(new ur("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 ur("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 lr(r.getSW(),(function(){r.an.has(o)&&r.dispatchEvent(new ur("message",{data:t,originalEvent:e,ports:n,sw:o}))}))},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(o.apply(this,e))}catch(e){return Promise.reject(e)}}),r.sn=t,r.nn=n,navigator.serviceWorker.addEventListener("message",r.gn),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o,i=r.prototype;i.register=function(e){var t=(void 0===e?{}:e).immediate,n=void 0!==t&&t;try{var r=this;return function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){if(!n&&"complete"!==document.readyState)return dr(new Promise((function(e){return window.addEventListener("load",e)})))}),(function(){return r.mn=Boolean(navigator.serviceWorker.controller),r.yn=r.pn(),lr(r.bn(),(function(e){r.fn=e,r.yn&&(r.hn=r.yn,r.en.resolve(r.yn),r.on.resolve(r.yn),r.yn.addEventListener("statechange",r.ln,{once:!0}));var t=r.fn.waiting;return t&&sr(t.scriptURL,r.sn.toString())&&(r.hn=t,Promise.resolve().then((function(){r.dispatchEvent(new ur("waiting",{sw:t,wasWaitingBeforeRegister:!0}))})).then((function(){}))),r.hn&&(r.rn.resolve(r.hn),r.an.add(r.hn)),r.fn.addEventListener("updatefound",r.cn),navigator.serviceWorker.addEventListener("controllerchange",r.dn),r.fn}))}))}catch(e){return Promise.reject(e)}},i.update=function(){try{return this.fn?dr(this.fn.update()):void 0}catch(e){return Promise.reject(e)}},i.getSW=function(){return void 0!==this.hn?Promise.resolve(this.hn):this.rn.promise},i.messageSW=function(e){try{return lr(this.getSW(),(function(t){return or(t,e)}))}catch(e){return Promise.reject(e)}},i.messageSkipWaiting=function(){this.fn&&this.fn.waiting&&or(this.fn.waiting,fr)},i.pn=function(){var e=navigator.serviceWorker.controller;return e&&sr(e.scriptURL,this.sn.toString())?e:void 0},i.bn=function(){try{var e=this;return function(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}((function(){return lr(navigator.serviceWorker.register(e.sn,e.nn),(function(t){return e.un=performance.now(),t}))}),(function(e){throw e}))}catch(e){return Promise.reject(e)}},(o=[{key:"active",get:function(){return this.en.promise}},{key:"controlling",get:function(){return this.on.promise}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,o)}(function(){function e(){this.Pn=new Map}var t=e.prototype;return t.addEventListener=function(e,t){this.Sn(e).add(t)},t.removeEventListener=function(e,t){this.Sn(e).delete(t)},t.dispatchEvent=function(e){e.target=this;for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ir(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ir(e,t):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this.Sn(e.type));!(t=n()).done;)(0,t.value)(e)},t.Sn=function(e){return this.Pn.has(e)||this.Pn.set(e,new Set),this.Pn.get(e)},e}());const hr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,pr=Object.keys,yr=Array.isArray;function vr(e,t){return"object"!=typeof t||pr(t).forEach((function(n){e[n]=t[n]})),e}"undefined"==typeof Promise||hr.Promise||(hr.Promise=Promise);const gr=Object.getPrototypeOf,mr={}.hasOwnProperty;function br(e,t){return mr.call(e,t)}function wr(e,t){"function"==typeof t&&(t=t(gr(e))),("undefined"==typeof Reflect?pr:Reflect.ownKeys)(t).forEach((n=>{Sr(e,n,t[n])}))}const _r=Object.defineProperty;function Sr(e,t,n,r){_r(e,t,vr(n&&br(n,"get")&&"function"==typeof n.get?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function Er(e){return{from:function(t){return e.prototype=Object.create(t.prototype),Sr(e.prototype,"constructor",e),{extend:wr.bind(null,e.prototype)}}}}const Or=Object.getOwnPropertyDescriptor;function kr(e,t){let n;return Or(e,t)||(n=gr(e))&&kr(n,t)}const xr=[].slice;function Pr(e,t,n){return xr.call(e,t,n)}function jr(e,t){return t(e)}function Cr(e){if(!e)throw new Error("Assertion Failed")}function Tr(e){hr.setImmediate?setImmediate(e):setTimeout(e,0)}function Ar(e,t){return e.reduce(((e,n,r)=>{var o=t(n,r);return o&&(e[o[0]]=o[1]),e}),{})}function Nr(e,t){if(br(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=Nr(e,t[r]);n.push(i)}return n}var a=t.indexOf(".");if(-1!==a){var s=e[t.substr(0,a)];return void 0===s?void 0:Nr(s,t.substr(a+1))}}function Dr(e,t,n){if(e&&void 0!==t&&(!("isFrozen"in Object)||!Object.isFrozen(e)))if("string"!=typeof t&&"length"in t){Cr("string"!=typeof n&&"length"in n);for(var r=0,o=t.length;r<o;++r)Dr(e,t[r],n[r])}else{var i=t.indexOf(".");if(-1!==i){var a=t.substr(0,i),s=t.substr(i+1);if(""===s)void 0===n?yr(e)&&!isNaN(parseInt(a))?e.splice(a,1):delete e[a]:e[a]=n;else{var u=e[a];u&&br(e,a)||(u=e[a]={}),Dr(u,s,n)}}else void 0===n?yr(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function Mr(e){var t={};for(var n in e)br(e,n)&&(t[n]=e[n]);return t}const Lr=[].concat;function Ir(e){return Lr.apply([],e)}const Rr="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Ir([8,16,32,64].map((e=>["Int","Uint","Float"].map((t=>t+e+"Array")))))).filter((e=>hr[e])),Br=Rr.map((e=>hr[e]));Ar(Rr,(e=>[e,!0]));let $r=null;function Ur(e){$r="undefined"!=typeof WeakMap&&new WeakMap;const t=Fr(e);return $r=null,t}function Fr(e){if(!e||"object"!=typeof e)return e;let t=$r&&$r.get(e);if(t)return t;if(yr(e)){t=[],$r&&$r.set(e,t);for(var n=0,r=e.length;n<r;++n)t.push(Fr(e[n]))}else if(Br.indexOf(e.constructor)>=0)t=e;else{const n=gr(e);for(var o in t=n===Object.prototype?{}:Object.create(n),$r&&$r.set(e,t),e)br(e,o)&&(t[o]=Fr(e[o]))}return t}const{toString:Kr}={};function zr(e){return Kr.call(e).slice(8,-1)}const Vr="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator",Hr="symbol"==typeof Vr?function(e){var t;return null!=e&&(t=e[Vr])&&t.apply(e)}:function(){return null},qr={};function Wr(e){var t,n,r,o;if(1===arguments.length){if(yr(e))return e.slice();if(this===qr&&"string"==typeof e)return[e];if(o=Hr(e)){for(n=[];!(r=o.next()).done;)n.push(r.value);return n}if(null==e)return[e];if("number"==typeof(t=e.length)){for(n=new Array(t);t--;)n[t]=e[t];return n}return[e]}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}const Gr="undefined"!=typeof Symbol?e=>"AsyncFunction"===e[Symbol.toStringTag]:()=>!1;var Qr="undefined"!=typeof location&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Yr(e,t){Qr=e,Zr=t}var Zr=()=>!0;const Jr=!new Error("").stack;function Xr(){if(Jr)try{throw Xr.arguments,new Error}catch(e){return e}return new Error}function eo(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(Zr).map((e=>"\n"+e)).join("")):""}var to=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],no=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(to),ro={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function oo(e,t){this._e=Xr(),this.name=e,this.message=t}function io(e,t){return e+". Errors: "+Object.keys(t).map((e=>t[e].toString())).filter(((e,t,n)=>n.indexOf(e)===t)).join("\n")}function ao(e,t,n,r){this._e=Xr(),this.failures=t,this.failedKeys=r,this.successCount=n,this.message=io(e,t)}function so(e,t){this._e=Xr(),this.name="BulkError",this.failures=Object.keys(t).map((e=>t[e])),this.failuresByPos=t,this.message=io(e,t)}Er(oo).from(Error).extend({stack:{get:function(){return this._stack||(this._stack=this.name+": "+this.message+eo(this._e,2))}},toString:function(){return this.name+": "+this.message}}),Er(ao).from(oo),Er(so).from(oo);var uo=no.reduce(((e,t)=>(e[t]=t+"Error",e)),{});const lo=oo;var co=no.reduce(((e,t)=>{var n=t+"Error";function r(e,r){this._e=Xr(),this.name=n,e?"string"==typeof e?(this.message=`${e}${r?"\n "+r:""}`,this.inner=r||null):"object"==typeof e&&(this.message=`${e.name} ${e.message}`,this.inner=e):(this.message=ro[t]||n,this.inner=null)}return Er(r).from(lo),e[t]=r,e}),{});co.Syntax=SyntaxError,co.Type=TypeError,co.Range=RangeError;var fo=to.reduce(((e,t)=>(e[t+"Error"]=co[t],e)),{}),ho=no.reduce(((e,t)=>(-1===["Syntax","Type","Range"].indexOf(t)&&(e[t+"Error"]=co[t]),e)),{});function po(){}function yo(e){return e}function vo(e,t){return null==e||e===yo?t:function(n){return t(e(n))}}function go(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function mo(e,t){return e===po?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?go(r,this.onsuccess):r),o&&(this.onerror=this.onerror?go(o,this.onerror):o),void 0!==i?i:n}}function bo(e,t){return e===po?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?go(n,this.onsuccess):n),r&&(this.onerror=this.onerror?go(r,this.onerror):r)}}function wo(e,t){return e===po?t:function(n){var r=e.apply(this,arguments);vr(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?go(o,this.onsuccess):o),i&&(this.onerror=this.onerror?go(i,this.onerror):i),void 0===r?void 0===a?void 0:a:vr(r,a)}}function _o(e,t){return e===po?t:function(){return!1!==t.apply(this,arguments)&&e.apply(this,arguments)}}function So(e,t){return e===po?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)}}ho.ModifyError=ao,ho.DexieError=oo,ho.BulkError=so;var Eo={};const[Oo,ko,xo]="undefined"==typeof Promise?[]:(()=>{let e=Promise.resolve();if("undefined"==typeof crypto||!crypto.subtle)return[e,gr(e),e];const t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,gr(t),e]})(),Po=ko&&ko.then,jo=Oo&&Oo.constructor,Co=!!xo;var To=!1,Ao=xo?()=>{xo.then(ei)}:hr.setImmediate?setImmediate.bind(null,ei):hr.MutationObserver?()=>{var e=document.createElement("div");new MutationObserver((()=>{ei(),e=null})).observe(e,{attributes:!0}),e.setAttribute("i","1")}:()=>{setTimeout(ei,0)},No=function(e,t){Fo.push([e,t]),Mo&&(Ao(),Mo=!1)},Do=!0,Mo=!0,Lo=[],Io=[],Ro=null,Bo=yo,$o={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Oi,pgp:!1,env:{},finalize:function(){this.unhandleds.forEach((e=>{try{Oi(e[0],e[1])}catch(e){}}))}},Uo=$o,Fo=[],Ko=0,zo=[];function Vo(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");this._listeners=[],this.onuncatched=po,this._lib=!1;var t=this._PSD=Uo;if(Qr&&(this._stackHolder=Xr(),this._prev=null,this._numPrev=0),"function"!=typeof e){if(e!==Eo)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(!1===this._state&&Go(this,this._value))}this._state=null,this._value=null,++t.ref,Wo(this,e)}const Ho={get:function(){var e=Uo,t=ci;function n(n,r){var o=!e.global&&(e!==Uo||t!==ci);const i=o&&!pi();var a=new Vo(((t,a)=>{Yo(this,new qo(Si(n,e,o,i),Si(r,e,o,i),t,a,e))}));return Qr&&Xo(a,this),a}return n.prototype=Eo,n},set:function(e){Sr(this,"then",e&&e.prototype===Eo?Ho:{get:function(){return e},set:Ho.set})}};function qo(e,t,n,r,o){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r,this.psd=o}function Wo(e,t){try{t((t=>{if(null===e._state){if(t===e)throw new TypeError("A promise cannot be resolved with itself.");var n=e._lib&&ti();t&&"function"==typeof t.then?Wo(e,((e,n)=>{t instanceof Vo?t._then(e,n):t.then(e,n)})):(e._state=!0,e._value=t,Qo(e)),n&&ni()}}),Go.bind(null,e))}catch(t){Go(e,t)}}function Go(e,t){if(Io.push(t),null===e._state){var n=e._lib&&ti();t=Bo(t),e._state=!1,e._value=t,Qr&&null!==t&&"object"==typeof t&&!t._promise&&function(e,t,n){try{e.apply(null,void 0)}catch(e){}}((()=>{var n=kr(t,"stack");t._promise=e,Sr(t,"stack",{get:()=>To?n&&(n.get?n.get.apply(t):n.value):e.stack})})),function(e){Lo.some((t=>t._value===e._value))||Lo.push(e)}(e),Qo(e),n&&ni()}}function Qo(e){var t=e._listeners;e._listeners=[];for(var n=0,r=t.length;n<r;++n)Yo(e,t[n]);var o=e._PSD;--o.ref||o.finalize(),0===Ko&&(++Ko,No((()=>{0==--Ko&&ri()}),[]))}function Yo(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,++Ko,No(Zo,[n,e,t])}else e._listeners.push(t)}function Zo(e,t,n){try{Ro=t;var r,o=t._value;t._state?r=e(o):(Io.length&&(Io=[]),r=e(o),-1===Io.indexOf(o)&&function(e){for(var t=Lo.length;t;)if(Lo[--t]._value===e._value)return void Lo.splice(t,1)}(t)),n.resolve(r)}catch(e){n.reject(e)}finally{Ro=null,0==--Ko&&ri(),--n.psd.ref||n.psd.finalize()}}function Jo(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=eo(a,0)):(o=a,i=""),t.push(o+(i?": "+i:"")+r)}return Qr&&((r=eo(e._stackHolder,2))&&-1===t.indexOf(r)&&t.push(r),e._prev&&Jo(e._prev,t,n)),t}function Xo(e,t){var n=t?t._numPrev+1:0;n<100&&(e._prev=t,e._numPrev=n)}function ei(){ti()&&ni()}function ti(){var e=Do;return Do=!1,Mo=!1,e}function ni(){var e,t,n;do{for(;Fo.length>0;)for(e=Fo,Fo=[],n=e.length,t=0;t<n;++t){var r=e[t];r[0].apply(null,r[1])}}while(Fo.length>0);Do=!0,Mo=!0}function ri(){var e=Lo;Lo=[],e.forEach((e=>{e._PSD.onunhandled.call(null,e._value,e)}));for(var t=zo.slice(0),n=t.length;n;)t[--n]()}function oi(e){return new Vo(Eo,!1,e)}function ii(e,t){var n=Uo;return function(){var r=ti(),o=Uo;try{return mi(n,!0),e.apply(this,arguments)}catch(e){t&&t(e)}finally{mi(o,!1),r&&ni()}}}wr(Vo.prototype,{then:Ho,_then:function(e,t){Yo(this,new qo(null,null,e,t,Uo))},catch:function(e){if(1===arguments.length)return this.then(null,e);var t=arguments[0],n=arguments[1];return"function"==typeof t?this.then(null,(e=>e instanceof t?n(e):oi(e))):this.then(null,(e=>e&&e.name===t?n(e):oi(e)))},finally:function(e){return this.then((t=>(e(),t)),(t=>(e(),oi(t))))},stack:{get:function(){if(this._stack)return this._stack;try{To=!0;var e=Jo(this,[],20).join("\nFrom previous: ");return null!==this._state&&(this._stack=e),e}finally{To=!1}}},timeout:function(e,t){return e<1/0?new Vo(((n,r)=>{var o=setTimeout((()=>r(new co.Timeout(t))),e);this.then(n,r).finally(clearTimeout.bind(null,o))})):this}}),"undefined"!=typeof Symbol&&Symbol.toStringTag&&Sr(Vo.prototype,Symbol.toStringTag,"Dexie.Promise"),$o.env=bi(),wr(Vo,{all:function(){var e=Wr.apply(null,arguments).map(yi);return new Vo((function(t,n){0===e.length&&t([]);var r=e.length;e.forEach(((o,i)=>Vo.resolve(o).then((n=>{e[i]=n,--r||t(e)}),n)))}))},resolve:e=>{if(e instanceof Vo)return e;if(e&&"function"==typeof e.then)return new Vo(((t,n)=>{e.then(t,n)}));var t=new Vo(Eo,!0,e);return Xo(t,Ro),t},reject:oi,race:function(){var e=Wr.apply(null,arguments).map(yi);return new Vo(((t,n)=>{e.map((e=>Vo.resolve(e).then(t,n)))}))},PSD:{get:()=>Uo,set:e=>Uo=e},totalEchoes:{get:()=>ci},newPSD:di,usePSD:wi,scheduler:{get:()=>No,set:e=>{No=e}},rejectionMapper:{get:()=>Bo,set:e=>{Bo=e}},follow:(e,t)=>new Vo(((n,r)=>di(((t,n)=>{var r=Uo;r.unhandleds=[],r.onunhandled=n,r.finalize=go((function(){!function(e){zo.push((function t(){e(),zo.splice(zo.indexOf(t),1)})),++Ko,No((()=>{0==--Ko&&ri()}),[])}((()=>{0===this.unhandleds.length?t():n(this.unhandleds[0])}))}),r.finalize),e()}),t,n,r)))}),jo&&(jo.allSettled&&Sr(Vo,"allSettled",(function(){const e=Wr.apply(null,arguments).map(yi);return new Vo((t=>{0===e.length&&t([]);let n=e.length;const r=new Array(n);e.forEach(((e,o)=>Vo.resolve(e).then((e=>r[o]={status:"fulfilled",value:e}),(e=>r[o]={status:"rejected",reason:e})).then((()=>--n||t(r)))))}))})),jo.any&&"undefined"!=typeof AggregateError&&Sr(Vo,"any",(function(){const e=Wr.apply(null,arguments).map(yi);return new Vo(((t,n)=>{0===e.length&&n(new AggregateError([]));let r=e.length;const o=new Array(r);e.forEach(((e,i)=>Vo.resolve(e).then((e=>t(e)),(e=>{o[i]=e,--r||n(new AggregateError(o))}))))}))})));const ai={awaits:0,echoes:0,id:0};var si=0,ui=[],li=0,ci=0,fi=0;function di(e,t,n,r){var o=Uo,i=Object.create(o);i.parent=o,i.ref=0,i.global=!1,i.id=++fi;var a=$o.env;i.env=Co?{Promise:Vo,PromiseProp:{value:Vo,configurable:!0,writable:!0},all:Vo.all,race:Vo.race,allSettled:Vo.allSettled,any:Vo.any,resolve:Vo.resolve,reject:Vo.reject,nthen:Ei(a.nthen,i),gthen:Ei(a.gthen,i)}:{},t&&vr(i,t),++o.ref,i.finalize=function(){--this.parent.ref||this.parent.finalize()};var s=wi(i,e,n,r);return 0===i.ref&&i.finalize(),s}function hi(){return ai.id||(ai.id=++si),++ai.awaits,ai.echoes+=100,ai.id}function pi(){return!!ai.awaits&&(0==--ai.awaits&&(ai.id=0),ai.echoes=100*ai.awaits,!0)}function yi(e){return ai.echoes&&e&&e.constructor===jo?(hi(),e.then((e=>(pi(),e)),(e=>(pi(),ki(e))))):e}function vi(e){++ci,ai.echoes&&0!=--ai.echoes||(ai.echoes=ai.id=0),ui.push(Uo),mi(e,!0)}function gi(){var e=ui[ui.length-1];ui.pop(),mi(e,!1)}function mi(e,t){var n=Uo;if((t?!ai.echoes||li++&&e===Uo:!li||--li&&e===Uo)||_i(t?vi.bind(null,e):gi),e!==Uo&&(Uo=e,n===$o&&($o.env=bi()),Co)){var r=$o.env.Promise,o=e.env;ko.then=o.nthen,r.prototype.then=o.gthen,(n.global||e.global)&&(Object.defineProperty(hr,"Promise",o.PromiseProp),r.all=o.all,r.race=o.race,r.resolve=o.resolve,r.reject=o.reject,o.allSettled&&(r.allSettled=o.allSettled),o.any&&(r.any=o.any))}}function bi(){var e=hr.Promise;return Co?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(hr,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject,nthen:ko.then,gthen:e.prototype.then}:{}}function wi(e,t,n,r,o){var i=Uo;try{return mi(e,!0),t(n,r,o)}finally{mi(i,!1)}}function _i(e){Po.call(Oo,e)}function Si(e,t,n,r){return"function"!=typeof e?e:function(){var o=Uo;n&&hi(),mi(t,!0);try{return e.apply(this,arguments)}finally{mi(o,!1),r&&_i(pi)}}}function Ei(e,t){return function(n,r){return e.call(this,Si(n,t),Si(r,t))}}function Oi(e,t){var n;try{n=t.onuncatched(e)}catch(e){}if(!1!==n)try{var r,o={promise:t,reason:e};if(hr.document&&document.createEvent?((r=document.createEvent("Event")).initEvent("unhandledrejection",!0,!0),vr(r,o)):hr.CustomEvent&&vr(r=new CustomEvent("unhandledrejection",{detail:o}),o),r&&hr.dispatchEvent&&(dispatchEvent(r),!hr.PromiseRejectionEvent&&hr.onunhandledrejection))try{hr.onunhandledrejection(r)}catch(e){}Qr&&r&&!r.defaultPrevented&&console.warn(`Unhandled rejection: ${e.stack||e}`)}catch(e){}}-1===(""+Po).indexOf("[native code]")&&(hi=pi=po);var ki=Vo.reject;function xi(e,t,n,r){if(e.idbdb&&(e._state.openComplete||Uo.letThrough||e._vip)){var o=e._createTransaction(t,n,e._dbSchema);try{o.create(),e._state.PR1398_maxLoop=3}catch(o){return o.name===uo.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>xi(e,t,n,r)))):ki(o)}return o._promise(t,((e,t)=>di((()=>(Uo.trans=o,r(e,t,o)))))).then((e=>o._completion.then((()=>e))))}if(e._state.openComplete)return ki(new co.DatabaseClosed(e._state.dbOpenError));if(!e._state.isBeingOpened){if(!e._options.autoOpen)return ki(new co.DatabaseClosed);e.open().catch(po)}return e._state.dbReadyPromise.then((()=>xi(e,t,n,r)))}const Pi=String.fromCharCode(65535),ji="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ci=[],Ti="undefined"!=typeof navigator&&/(MSIE|Trident|Edge)/.test(navigator.userAgent),Ai=Ti,Ni=Ti,Di=e=>!/(dexie\.js|dexie\.min\.js)/.test(e);function Mi(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}const Li={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Ii(e){return"string"!=typeof e||/\./.test(e)?e=>e:t=>(void 0===t[e]&&e in t&&delete(t=Ur(t))[e],t)}class Ri{_trans(e,t,n){const r=this._tx||Uo.trans,o=this.name;function i(e,n,r){if(!r.schema[o])throw new co.NotFound("Table "+o+" not part of transaction");return t(r.idbtrans,r)}const a=ti();try{return r&&r.db===this.db?r===Uo.trans?r._promise(e,i,n):di((()=>r._promise(e,i,n)),{trans:r,transless:Uo.transless||Uo}):xi(this.db,e,[this.name],i)}finally{a&&ni()}}get(e,t){return e&&e.constructor===Object?this.where(e).first(t):this._trans("readonly",(t=>this.core.get({trans:t,key:e}).then((e=>this.hook.reading.fire(e))))).then(t)}where(e){if("string"==typeof e)return new this.db.WhereClause(this,e);if(yr(e))return new this.db.WhereClause(this,`[${e.join("+")}]`);const t=pr(e);if(1===t.length)return this.where(t[0]).equals(e[t[0]]);const n=this.schema.indexes.concat(this.schema.primKey).filter((e=>e.compound&&t.every((t=>e.keyPath.indexOf(t)>=0))&&e.keyPath.every((e=>t.indexOf(e)>=0))))[0];if(n&&this.db._maxKey!==Pi)return this.where(n.name).equals(n.keyPath.map((t=>e[t])));!n&&Qr&&console.warn(`The query ${JSON.stringify(e)} on ${this.name} would benefit of a compound index [${t.join("+")}]`);const{idxByName:r}=this.schema,o=this.db._deps.indexedDB;function i(e,t){try{return 0===o.cmp(e,t)}catch(e){return!1}}const[a,s]=t.reduce((([t,n],o)=>{const a=r[o],s=e[o];return[t||a,t||!a?Mi(n,a&&a.multi?e=>{const t=Nr(e,o);return yr(t)&&t.some((e=>i(s,e)))}:e=>i(s,Nr(e,o))):n]}),[null,null]);return a?this.where(a.name).equals(e[a.keyPath]).filter(s):n?this.filter(s):this.where(t).equals("")}filter(e){return this.toCollection().and(e)}count(e){return this.toCollection().count(e)}offset(e){return this.toCollection().offset(e)}limit(e){return this.toCollection().limit(e)}each(e){return this.toCollection().each(e)}toArray(e){return this.toCollection().toArray(e)}toCollection(){return new this.db.Collection(new this.db.WhereClause(this))}orderBy(e){return new this.db.Collection(new this.db.WhereClause(this,yr(e)?`[${e.join("+")}]`:e))}reverse(){return this.toCollection().reverse()}mapToClass(e){this.schema.mappedClass=e;const t=t=>{if(!t)return t;const n=Object.create(e.prototype);for(var r in t)if(br(t,r))try{n[r]=t[r]}catch(e){}return n};return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=t,this.hook("reading",t),e}defineClass(){return this.mapToClass((function(e){vr(this,e)}))}add(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ii(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"add",keys:null!=t?[t]:null,values:[o]}))).then((e=>e.numFailures?Vo.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Dr(e,r,t)}catch(e){}return t}))}update(e,t){if("object"!=typeof e||yr(e))return this.where(":id").equals(e).modify(t);{const n=Nr(e,this.schema.primKey.keyPath);if(void 0===n)return ki(new co.InvalidArgument("Given object does not contain its primary key"));try{"function"!=typeof t?pr(t).forEach((n=>{Dr(e,n,t[n])})):t(e,{value:e,primKey:n})}catch(e){}return this.where(":id").equals(n).modify(t)}}put(e,t){const{auto:n,keyPath:r}=this.schema.primKey;let o=e;return r&&n&&(o=Ii(r)(e)),this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"put",values:[o],keys:null!=t?[t]:null}))).then((e=>e.numFailures?Vo.reject(e.failures[0]):e.lastResult)).then((t=>{if(r)try{Dr(e,r,t)}catch(e){}return t}))}delete(e){return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:[e]}))).then((e=>e.numFailures?Vo.reject(e.failures[0]):void 0))}clear(){return this._trans("readwrite",(e=>this.core.mutate({trans:e,type:"deleteRange",range:Li}))).then((e=>e.numFailures?Vo.reject(e.failures[0]):void 0))}bulkGet(e){return this._trans("readonly",(t=>this.core.getMany({keys:e,trans:t}).then((e=>e.map((e=>this.hook.reading.fire(e)))))))}bulkAdd(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new co.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new co.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ii(i)):e;return this.core.mutate({trans:t,type:"add",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new so(`${this.name}.bulkAdd(): ${e} of ${a} operations failed`,r)}))}))}bulkPut(e,t,n){const r=Array.isArray(t)?t:void 0,o=(n=n||(r?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",(t=>{const{auto:n,keyPath:i}=this.schema.primKey;if(i&&r)throw new co.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(r&&r.length!==e.length)throw new co.InvalidArgument("Arguments objects and keys must have the same length");const a=e.length;let s=i&&n?e.map(Ii(i)):e;return this.core.mutate({trans:t,type:"put",keys:r,values:s,wantResults:o}).then((({numFailures:e,results:t,lastResult:n,failures:r})=>{if(0===e)return o?t:n;throw new so(`${this.name}.bulkPut(): ${e} of ${a} operations failed`,r)}))}))}bulkDelete(e){const t=e.length;return this._trans("readwrite",(t=>this.core.mutate({trans:t,type:"delete",keys:e}))).then((({numFailures:e,lastResult:n,failures:r})=>{if(0===e)return n;throw new so(`${this.name}.bulkDelete(): ${e} of ${t} operations failed`,r)}))}}function Bi(e){var t={},n=function(n,r){if(r){for(var o=arguments.length,i=new Array(o-1);--o;)i[o-1]=arguments[o];return t[n].subscribe.apply(null,i),e}if("string"==typeof n)return t[n]};n.addEventType=i;for(var r=1,o=arguments.length;r<o;++r)i(arguments[r]);return n;function i(e,r,o){if("object"==typeof e)return function(e){pr(e).forEach((function(t){var n=e[t];if(yr(n))i(t,e[t][0],e[t][1]);else{if("asap"!==n)throw new co.InvalidArgument("Invalid event config");var r=i(t,yo,(function(){for(var e=arguments.length,t=new Array(e);e--;)t[e]=arguments[e];r.subscribers.forEach((function(e){Tr((function(){e.apply(null,t)}))}))}))}}))}(e);r||(r=_o),o||(o=po);var a={subscribers:[],fire:o,subscribe:function(e){-1===a.subscribers.indexOf(e)&&(a.subscribers.push(e),a.fire=r(a.fire,e))},unsubscribe:function(e){a.subscribers=a.subscribers.filter((function(t){return t!==e})),a.fire=a.subscribers.reduce(r,o)}};return t[e]=n[e]=a,a}}function $i(e,t){return Er(t).from({prototype:e}),t}function Ui(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Fi(e,t){e.filter=Mi(e.filter,t)}function Ki(e,t,n){var r=e.replayFilter;e.replayFilter=r?()=>Mi(r(),t()):t,e.justLimit=n&&!r}function zi(e,t){if(e.isPrimKey)return t.primaryKey;const n=t.getIndexByKeyPath(e.index);if(!n)throw new co.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Vi(e,t,n){const r=zi(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:"prev"===e.dir,unique:!!e.unique,query:{index:r,range:e.range}})}function Hi(e,t,n,r){const o=e.replayFilter?Mi(e.filter,e.replayFilter()):e.filter;if(e.or){const i={},a=(e,n,r)=>{if(!o||o(n,r,(e=>n.stop(e)),(e=>n.fail(e)))){var a=n.primaryKey,s=""+a;"[object ArrayBuffer]"===s&&(s=""+new Uint8Array(a)),br(i,s)||(i[s]=!0,t(e,n,r))}};return Promise.all([e.or._iterate(a,n),qi(Vi(e,r,n),e.algorithm,a,!e.keysOnly&&e.valueMapper)])}return qi(Vi(e,r,n),Mi(e.algorithm,o),t,!e.keysOnly&&e.valueMapper)}function qi(e,t,n,r){var o=ii(r?(e,t,o)=>n(r(e),t,o):n);return e.then((e=>{if(e)return e.start((()=>{var n=()=>e.continue();t&&!t(e,(e=>n=e),(t=>{e.stop(t),n=po}),(t=>{e.fail(t),n=po}))||o(e.value,e,(e=>n=e)),n()}))}))}function Wi(e,t){try{const n=Gi(e),r=Gi(t);if(n!==r)return"Array"===n?1:"Array"===r?-1:"binary"===n?1:"binary"===r?-1:"string"===n?1:"string"===r?-1:"Date"===n?1:"Date"!==r?NaN:-1;switch(n){case"number":case"Date":case"string":return e>t?1:e<t?-1:0;case"binary":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n)if(e[n]!==t[n])return e[n]<t[n]?-1:1;return n===r?0:n<r?-1:1}(Qi(e),Qi(t));case"Array":return function(e,t){const n=e.length,r=t.length,o=n<r?n:r;for(let n=0;n<o;++n){const r=Wi(e[n],t[n]);if(0!==r)return r}return n===r?0:n<r?-1:1}(e,t)}}catch(e){}return NaN}function Gi(e){const t=typeof e;if("object"!==t)return t;if(ArrayBuffer.isView(e))return"binary";const n=zr(e);return"ArrayBuffer"===n?"binary":n}function Qi(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}class Yi{_read(e,t){var n=this._ctx;return n.error?n.table._trans(null,ki.bind(null,n.error)):n.table._trans("readonly",e).then(t)}_write(e){var t=this._ctx;return t.error?t.table._trans(null,ki.bind(null,t.error)):t.table._trans("readwrite",e,"locked")}_addAlgorithm(e){var t=this._ctx;t.algorithm=Mi(t.algorithm,e)}_iterate(e,t){return Hi(this._ctx,e,t,this._ctx.table.core)}clone(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&vr(n,e),t._ctx=n,t}raw(){return this._ctx.valueMapper=null,this}each(e){var t=this._ctx;return this._read((n=>Hi(t,e,n,t.table.core)))}count(e){return this._read((e=>{const t=this._ctx,n=t.table.core;if(Ui(t,!0))return n.count({trans:e,query:{index:zi(t,n.schema),range:t.range}}).then((e=>Math.min(e,t.limit)));var r=0;return Hi(t,(()=>(++r,!1)),e,n).then((()=>r))})).then(e)}sortBy(e,t){const n=e.split(".").reverse(),r=n[0],o=n.length-1;function i(e,t){return t?i(e[n[t]],t-1):e[r]}var a="next"===this._ctx.dir?1:-1;function s(e,t){var n=i(e,o),r=i(t,o);return n<r?-a:n>r?a:0}return this.toArray((function(e){return e.sort(s)})).then(t)}toArray(e){return this._read((e=>{var t=this._ctx;if("next"===t.dir&&Ui(t,!0)&&t.limit>0){const{valueMapper:n}=t,r=zi(t,t.table.core.schema);return t.table.core.query({trans:e,limit:t.limit,values:!0,query:{index:r,range:t.range}}).then((({result:e})=>n?e.map(n):e))}{const n=[];return Hi(t,(e=>n.push(e)),e,t.table.core).then((()=>n))}}),e)}offset(e){var t=this._ctx;return e<=0||(t.offset+=e,Ui(t)?Ki(t,(()=>{var t=e;return(e,n)=>0===t||(1===t?(--t,!1):(n((()=>{e.advance(t),t=0})),!1))})):Ki(t,(()=>{var t=e;return()=>--t<0}))),this}limit(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Ki(this._ctx,(()=>{var t=e;return function(e,n,r){return--t<=0&&n(r),t>=0}}),!0),this}until(e,t){return Fi(this._ctx,(function(n,r,o){return!e(n.value)||(r(o),t)})),this}first(e){return this.limit(1).toArray((function(e){return e[0]})).then(e)}last(e){return this.reverse().first(e)}filter(e){var t,n;return Fi(this._ctx,(function(t){return e(t.value)})),t=this._ctx,n=e,t.isMatch=Mi(t.isMatch,n),this}and(e){return this.filter(e)}or(e){return new this.db.WhereClause(this._ctx.table,e,this)}reverse(){return this._ctx.dir="prev"===this._ctx.dir?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this}desc(){return this.reverse()}eachKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.key,n)}))}eachUniqueKey(e){return this._ctx.unique="unique",this.eachKey(e)}eachPrimaryKey(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each((function(t,n){e(n.primaryKey,n)}))}keys(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.key)})).then((function(){return n})).then(e)}primaryKeys(e){var t=this._ctx;if("next"===t.dir&&Ui(t,!0)&&t.limit>0)return this._read((e=>{var n=zi(t,t.table.core.schema);return t.table.core.query({trans:e,values:!1,limit:t.limit,query:{index:n,range:t.range}})})).then((({result:e})=>e)).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each((function(e,t){n.push(t.primaryKey)})).then((function(){return n})).then(e)}uniqueKeys(e){return this._ctx.unique="unique",this.keys(e)}firstKey(e){return this.limit(1).keys((function(e){return e[0]})).then(e)}lastKey(e){return this.reverse().firstKey(e)}distinct(){var e=this._ctx,t=e.index&&e.table.schema.idxByName[e.index];if(!t||!t.multi)return this;var n={};return Fi(this._ctx,(function(e){var t=e.primaryKey.toString(),r=br(n,t);return n[t]=!0,!r})),this}modify(e){var t=this._ctx;return this._write((n=>{var r;if("function"==typeof e)r=e;else{var o=pr(e),i=o.length;r=function(t){for(var n=!1,r=0;r<i;++r){var a=o[r],s=e[a];Nr(t,a)!==s&&(Dr(t,a,s),n=!0)}return n}}const a=t.table.core,{outbound:s,extractKey:u}=a.schema.primaryKey,l=this.db._options.modifyChunkSize||200,c=[];let f=0;const d=[],h=(e,t)=>{const{failures:n,numFailures:r}=t;f+=e-r;for(let e of pr(n))c.push(n[e])};return this.clone().primaryKeys().then((o=>{const i=c=>{const f=Math.min(l,o.length-c);return a.getMany({trans:n,keys:o.slice(c,c+f),cache:"immutable"}).then((d=>{const p=[],y=[],v=s?[]:null,g=[];for(let e=0;e<f;++e){const t=d[e],n={value:Ur(t),primKey:o[c+e]};!1!==r.call(n,n.value,n)&&(null==n.value?g.push(o[c+e]):s||0===Wi(u(t),u(n.value))?(y.push(n.value),s&&v.push(o[c+e])):(g.push(o[c+e]),p.push(n.value)))}const m=Ui(t)&&t.limit===1/0&&("function"!=typeof e||e===Zi)&&{index:t.index,range:t.range};return Promise.resolve(p.length>0&&a.mutate({trans:n,type:"add",values:p}).then((e=>{for(let t in e.failures)g.splice(parseInt(t),1);h(p.length,e)}))).then((()=>(y.length>0||m&&"object"==typeof e)&&a.mutate({trans:n,type:"put",keys:v,values:y,criteria:m,changeSpec:"function"!=typeof e&&e}).then((e=>h(y.length,e))))).then((()=>(g.length>0||m&&e===Zi)&&a.mutate({trans:n,type:"delete",keys:g,criteria:m}).then((e=>h(g.length,e))))).then((()=>o.length>c+f&&i(c+l)))}))};return i(0).then((()=>{if(c.length>0)throw new ao("Error modifying one or more objects",c,f,d);return o.length}))}))}))}delete(){var e=this._ctx,t=e.range;return Ui(e)&&(e.isPrimKey&&!Ni||3===t.type)?this._write((n=>{const{primaryKey:r}=e.table.core.schema,o=t;return e.table.core.count({trans:n,query:{index:r,range:o}}).then((t=>e.table.core.mutate({trans:n,type:"deleteRange",range:o}).then((({failures:e,lastResult:n,results:r,numFailures:o})=>{if(o)throw new ao("Could not delete some values",Object.keys(e).map((t=>e[t])),t-o);return t-o}))))})):this.modify(Zi)}}const Zi=(e,t)=>t.value=null;function Ji(e,t){return e<t?-1:e===t?0:1}function Xi(e,t){return e>t?-1:e===t?0:1}function ea(e,t,n){var r=e instanceof aa?new e.Collection(e):e;return r._ctx.error=n?new n(t):new TypeError(t),r}function ta(e){return new e.Collection(e,(()=>ia(""))).limit(0)}function na(e,t,n,r,o,i){for(var a=Math.min(e.length,r.length),s=-1,u=0;u<a;++u){var l=t[u];if(l!==r[u])return o(e[u],n[u])<0?e.substr(0,u)+n[u]+n.substr(u+1):o(e[u],r[u])<0?e.substr(0,u)+r[u]+n.substr(u+1):s>=0?e.substr(0,s)+t[s]+n.substr(s+1):null;o(e[u],l)<0&&(s=u)}return a<r.length&&"next"===i?e+n.substr(e.length):a<e.length&&"prev"===i?e.substr(0,n.length):s<0?null:e.substr(0,s)+r[s]+n.substr(s+1)}function ra(e,t,n,r){var o,i,a,s,u,l,c,f=n.length;if(!n.every((e=>"string"==typeof e)))return ea(e,"String expected.");function d(e){o=function(e){return"next"===e?e=>e.toUpperCase():e=>e.toLowerCase()}(e),i=function(e){return"next"===e?e=>e.toLowerCase():e=>e.toUpperCase()}(e),a="next"===e?Ji:Xi;var t=n.map((function(e){return{lower:i(e),upper:o(e)}})).sort((function(e,t){return a(e.lower,t.lower)}));s=t.map((function(e){return e.upper})),u=t.map((function(e){return e.lower})),l=e,c="next"===e?"":r}d("next");var h=new e.Collection(e,(()=>oa(s[0],u[f-1]+r)));h._ondirectionchange=function(e){d(e)};var p=0;return h._addAlgorithm((function(e,n,r){var o=e.key;if("string"!=typeof o)return!1;var d=i(o);if(t(d,u,p))return!0;for(var h=null,y=p;y<f;++y){var v=na(o,d,s[y],u[y],a,l);null===v&&null===h?p=y+1:(null===h||a(h,v)>0)&&(h=v)}return n(null!==h?function(){e.continue(h+c)}:r),!1})),h}function oa(e,t,n,r){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:r}}function ia(e){return{type:1,lower:e,upper:e}}class aa{get Collection(){return this._ctx.table.db.Collection}between(e,t,n,r){n=!1!==n,r=!0===r;try{return this._cmp(e,t)>0||0===this._cmp(e,t)&&(n||r)&&(!n||!r)?ta(this):new this.Collection(this,(()=>oa(e,t,!n,!r)))}catch(e){return ea(this,ji)}}equals(e){return null==e?ea(this,ji):new this.Collection(this,(()=>ia(e)))}above(e){return null==e?ea(this,ji):new this.Collection(this,(()=>oa(e,void 0,!0)))}aboveOrEqual(e){return null==e?ea(this,ji):new this.Collection(this,(()=>oa(e,void 0,!1)))}below(e){return null==e?ea(this,ji):new this.Collection(this,(()=>oa(void 0,e,!1,!0)))}belowOrEqual(e){return null==e?ea(this,ji):new this.Collection(this,(()=>oa(void 0,e)))}startsWith(e){return"string"!=typeof e?ea(this,"String expected."):this.between(e,e+Pi,!0,!0)}startsWithIgnoreCase(e){return""===e?this.startsWith(e):ra(this,((e,t)=>0===e.indexOf(t[0])),[e],Pi)}equalsIgnoreCase(e){return ra(this,((e,t)=>e===t[0]),[e],"")}anyOfIgnoreCase(){var e=Wr.apply(qr,arguments);return 0===e.length?ta(this):ra(this,((e,t)=>-1!==t.indexOf(e)),e,"")}startsWithAnyOfIgnoreCase(){var e=Wr.apply(qr,arguments);return 0===e.length?ta(this):ra(this,((e,t)=>t.some((t=>0===e.indexOf(t)))),e,Pi)}anyOf(){const e=Wr.apply(qr,arguments);let t=this._cmp;try{e.sort(t)}catch(e){return ea(this,ji)}if(0===e.length)return ta(this);const n=new this.Collection(this,(()=>oa(e[0],e[e.length-1])));n._ondirectionchange=n=>{t="next"===n?this._ascending:this._descending,e.sort(t)};let r=0;return n._addAlgorithm(((n,o,i)=>{const a=n.key;for(;t(a,e[r])>0;)if(++r,r===e.length)return o(i),!1;return 0===t(a,e[r])||(o((()=>{n.continue(e[r])})),!1)})),n}notEqual(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})}noneOf(){const e=Wr.apply(qr,arguments);if(0===e.length)return new this.Collection(this);try{e.sort(this._ascending)}catch(e){return ea(this,ji)}const t=e.reduce(((e,t)=>e?e.concat([[e[e.length-1][1],t]]):[[-1/0,t]]),null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})}inAnyRange(e,t){const n=this._cmp,r=this._ascending,o=this._descending,i=this._min,a=this._max;if(0===e.length)return ta(this);if(!e.every((e=>void 0!==e[0]&&void 0!==e[1]&&r(e[0],e[1])<=0)))return ea(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",co.InvalidArgument);const s=!t||!1!==t.includeLowers,u=t&&!0===t.includeUppers;let l,c=r;function f(e,t){return c(e[0],t[0])}try{l=e.reduce((function(e,t){let r=0,o=e.length;for(;r<o;++r){const o=e[r];if(n(t[0],o[1])<0&&n(t[1],o[0])>0){o[0]=i(o[0],t[0]),o[1]=a(o[1],t[1]);break}}return r===o&&e.push(t),e}),[]),l.sort(f)}catch(e){return ea(this,ji)}let d=0;const h=u?e=>r(e,l[d][1])>0:e=>r(e,l[d][1])>=0,p=s?e=>o(e,l[d][0])>0:e=>o(e,l[d][0])>=0;let y=h;const v=new this.Collection(this,(()=>oa(l[0][0],l[l.length-1][1],!s,!u)));return v._ondirectionchange=e=>{"next"===e?(y=h,c=r):(y=p,c=o),l.sort(f)},v._addAlgorithm(((e,t,n)=>{for(var o=e.key;y(o);)if(++d,d===l.length)return t(n),!1;return!!function(e){return!h(e)&&!p(e)}(o)||(0===this._cmp(o,l[d][1])||0===this._cmp(o,l[d][0])||t((()=>{c===r?e.continue(l[d][0]):e.continue(l[d][1])})),!1)})),v}startsWithAnyOf(){const e=Wr.apply(qr,arguments);return e.every((e=>"string"==typeof e))?0===e.length?ta(this):this.inAnyRange(e.map((e=>[e,e+Pi]))):ea(this,"startsWithAnyOf() only works with strings")}}function sa(e){return ii((function(t){return ua(t),e(t.target.error),!1}))}function ua(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}const la=Bi(null,"storagemutated");class ca{_lock(){return Cr(!Uo.global),++this._reculock,1!==this._reculock||Uo.global||(Uo.lockOwnerFor=this),this}_unlock(){if(Cr(!Uo.global),0==--this._reculock)for(Uo.global||(Uo.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var e=this._blockedFuncs.shift();try{wi(e[1],e[0])}catch(e){}}return this}_locked(){return this._reculock&&Uo.lockOwnerFor!==this}create(e){if(!this.mode)return this;const t=this.db.idbdb,n=this.db._state.dbOpenError;if(Cr(!this.idbtrans),!e&&!t)switch(n&&n.name){case"DatabaseClosedError":throw new co.DatabaseClosed(n);case"MissingAPIError":throw new co.MissingAPI(n.message,n);default:throw new co.OpenFailed(n)}if(!this.active)throw new co.TransactionInactive;return Cr(null===this._completion._state),(e=this.idbtrans=e||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):t.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}))).onerror=ii((t=>{ua(t),this._reject(e.error)})),e.onabort=ii((t=>{ua(t),this.active&&this._reject(new co.Abort(e.error)),this.active=!1,this.on("abort").fire(t)})),e.oncomplete=ii((()=>{this.active=!1,this._resolve(),"mutatedParts"in e&&la.storagemutated.fire(e.mutatedParts)})),this}_promise(e,t,n){if("readwrite"===e&&"readwrite"!==this.mode)return ki(new co.ReadOnly("Transaction is readonly"));if(!this.active)return ki(new co.TransactionInactive);if(this._locked())return new Vo(((r,o)=>{this._blockedFuncs.push([()=>{this._promise(e,t,n).then(r,o)},Uo])}));if(n)return di((()=>{var e=new Vo(((e,n)=>{this._lock();const r=t(e,n,this);r&&r.then&&r.then(e,n)}));return e.finally((()=>this._unlock())),e._lib=!0,e}));var r=new Vo(((e,n)=>{var r=t(e,n,this);r&&r.then&&r.then(e,n)}));return r._lib=!0,r}_root(){return this.parent?this.parent._root():this}waitFor(e){var t=this._root();const n=Vo.resolve(e);if(t._waitingFor)t._waitingFor=t._waitingFor.then((()=>n));else{t._waitingFor=n,t._waitingQueue=[];var r=t.idbtrans.objectStore(t.storeNames[0]);!function e(){for(++t._spinCount;t._waitingQueue.length;)t._waitingQueue.shift()();t._waitingFor&&(r.get(-1/0).onsuccess=e)}()}var o=t._waitingFor;return new Vo(((e,r)=>{n.then((n=>t._waitingQueue.push(ii(e.bind(null,n)))),(e=>t._waitingQueue.push(ii(r.bind(null,e))))).finally((()=>{t._waitingFor===o&&(t._waitingFor=null)}))}))}abort(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new co.Abort))}table(e){const t=this._memoizedTables||(this._memoizedTables={});if(br(t,e))return t[e];const n=this.schema[e];if(!n)throw new co.NotFound("Table "+e+" not part of transaction");const r=new this.db.Table(e,n,this);return r.core=this.db.core.table(e),t[e]=r,r}}function fa(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?"++":"")+da(t)}}function da(e){return"string"==typeof e?e:e?"["+[].join.call(e,"+")+"]":""}function ha(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:Ar(n,(e=>[e.name,e]))}}let pa=e=>{try{return e.only([[]]),pa=()=>[[]],[[]]}catch(e){return pa=()=>Pi,Pi}};function ya(e){return null==e?()=>{}:"string"==typeof e?function(e){return 1===e.split(".").length?t=>t[e]:t=>Nr(t,e)}(e):t=>Nr(t,e)}function va(e){return[].slice.call(e)}let ga=0;function ma(e){return null==e?":id":"string"==typeof e?e:`[${e.join("+")}]`}function ba({_novip:e},t){const n=t.db,r=function(e,t,{IDBKeyRange:n,indexedDB:r},o){const i=function(e,t){return t.reduce(((e,{create:t})=>({...e,...t(e)})),e)}(function(e,t,n){function r(e){if(3===e.type)return null;if(4===e.type)throw new Error("Cannot convert never type to IDBKeyRange");const{lower:n,upper:r,lowerOpen:o,upperOpen:i}=e;return void 0===n?void 0===r?null:t.upperBound(r,!!i):void 0===r?t.lowerBound(n,!!o):t.bound(n,r,!!o,!!i)}const{schema:o,hasGetAll:i}=function(e,t){const n=va(e.objectStoreNames);return{schema:{name:e.name,tables:n.map((e=>t.objectStore(e))).map((e=>{const{keyPath:t,autoIncrement:n}=e,r=yr(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:ya(t)},indexes:va(e.indexNames).map((t=>e.index(t))).map((e=>{const{name:t,unique:n,multiEntry:r,keyPath:o}=e,a={name:t,compound:yr(o),keyPath:o,unique:n,multiEntry:r,extractKey:ya(o)};return i[ma(o)]=a,a})),getIndexByKeyPath:e=>i[ma(e)]};return i[":id"]=a.primaryKey,null!=t&&(i[ma(t)]=a.primaryKey),a}))},hasGetAll:n.length>0&&"getAll"in t.objectStore(n[0])&&!("undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}(e,n),a=o.tables.map((e=>function(e){const t=e.name;return{name:t,schema:e,mutate:function({trans:e,type:n,keys:o,values:i,range:a}){return new Promise(((s,u)=>{s=ii(s);const l=e.objectStore(t),c=null==l.keyPath,f="put"===n||"add"===n;if(!f&&"delete"!==n&&"deleteRange"!==n)throw new Error("Invalid operation type: "+n);const{length:d}=o||i||{length:1};if(o&&i&&o.length!==i.length)throw new Error("Given keys array must have same length as given values array.");if(0===d)return s({numFailures:0,failures:{},results:[],lastResult:void 0});let h;const p=[],y=[];let v=0;const g=e=>{++v,ua(e)};if("deleteRange"===n){if(4===a.type)return s({numFailures:v,failures:y,results:[],lastResult:void 0});3===a.type?p.push(h=l.clear()):p.push(h=l.delete(r(a)))}else{const[e,t]=f?c?[i,o]:[i,null]:[o,null];if(f)for(let r=0;r<d;++r)p.push(h=t&&void 0!==t[r]?l[n](e[r],t[r]):l[n](e[r])),h.onerror=g;else for(let t=0;t<d;++t)p.push(h=l[n](e[t])),h.onerror=g}const m=e=>{const t=e.target.result;p.forEach(((e,t)=>null!=e.error&&(y[t]=e.error))),s({numFailures:v,failures:y,results:"delete"===n?o:p.map((e=>e.result)),lastResult:t})};h.onerror=e=>{g(e),m(e)},h.onsuccess=m}))},getMany:({trans:e,keys:n})=>new Promise(((r,o)=>{r=ii(r);const i=e.objectStore(t),a=n.length,s=new Array(a);let u,l=0,c=0;const f=e=>{const t=e.target;s[t._pos]=t.result,++c===l&&r(s)},d=sa(o);for(let e=0;e<a;++e)null!=n[e]&&(u=i.get(n[e]),u._pos=e,u.onsuccess=f,u.onerror=d,++l);0===l&&r(s)})),get:({trans:e,key:n})=>new Promise(((r,o)=>{r=ii(r);const i=e.objectStore(t).get(n);i.onsuccess=e=>r(e.target.result),i.onerror=sa(o)})),query:function(e){return n=>new Promise(((o,i)=>{o=ii(o);const{trans:a,values:s,limit:u,query:l}=n,c=u===1/0?void 0:u,{index:f,range:d}=l,h=a.objectStore(t),p=f.isPrimaryKey?h:h.index(f.name),y=r(d);if(0===u)return o({result:[]});if(e){const e=s?p.getAll(y,c):p.getAllKeys(y,c);e.onsuccess=e=>o({result:e.target.result}),e.onerror=sa(i)}else{let e=0;const t=s||!("openKeyCursor"in p)?p.openCursor(y):p.openKeyCursor(y),n=[];t.onsuccess=r=>{const i=t.result;return i?(n.push(s?i.value:i.primaryKey),++e===u?o({result:n}):void i.continue()):o({result:n})},t.onerror=sa(i)}}))}(i),openCursor:function({trans:e,values:n,query:o,reverse:i,unique:a}){return new Promise(((s,u)=>{s=ii(s);const{index:l,range:c}=o,f=e.objectStore(t),d=l.isPrimaryKey?f:f.index(l.name),h=i?a?"prevunique":"prev":a?"nextunique":"next",p=n||!("openKeyCursor"in d)?d.openCursor(r(c),h):d.openKeyCursor(r(c),h);p.onerror=sa(u),p.onsuccess=ii((t=>{const n=p.result;if(!n)return void s(null);n.___id=++ga,n.done=!1;const r=n.continue.bind(n);let o=n.continuePrimaryKey;o&&(o=o.bind(n));const i=n.advance.bind(n),a=()=>{throw new Error("Cursor not stopped")};n.trans=e,n.stop=n.continue=n.continuePrimaryKey=n.advance=()=>{throw new Error("Cursor not started")},n.fail=ii(u),n.next=function(){let e=1;return this.start((()=>e--?this.continue():this.stop())).then((()=>this))},n.start=e=>{const t=new Promise(((e,t)=>{e=ii(e),p.onerror=sa(t),n.fail=t,n.stop=t=>{n.stop=n.continue=n.continuePrimaryKey=n.advance=a,e(t)}})),s=()=>{if(p.result)try{e()}catch(e){n.fail(e)}else n.done=!0,n.start=()=>{throw new Error("Cursor behind last entry")},n.stop()};return p.onsuccess=ii((e=>{p.onsuccess=s,s()})),n.continue=r,n.continuePrimaryKey=o,n.advance=i,s(),t},s(n)}),u)}))},count({query:e,trans:n}){const{index:o,range:i}=e;return new Promise(((e,a)=>{const s=n.objectStore(t),u=o.isPrimaryKey?s:s.index(o.name),l=r(i),c=l?u.count(l):u.count();c.onsuccess=ii((t=>e(t.target.result))),c.onerror=sa(a)}))}}}(e))),s={};return a.forEach((e=>s[e.name]=e)),{stack:"dbcore",transaction:e.transaction.bind(e),table(e){if(!s[e])throw new Error(`Table '${e}' not found`);return s[e]},MIN_KEY:-1/0,MAX_KEY:pa(t),schema:o}}(t,n,o),e.dbcore);return{dbcore:i}}(e._middlewares,n,e._deps,t);e.core=r.dbcore,e.tables.forEach((t=>{const n=t.name;e.core.schema.tables.some((e=>e.name===n))&&(t.core=e.core.table(n),e[n]instanceof e.Table&&(e[n].core=t.core))}))}function wa({_novip:e},t,n,r){n.forEach((n=>{const o=r[n];t.forEach((t=>{const r=kr(t,n);(!r||"value"in r&&void 0===r.value)&&(t===e.Transaction.prototype||t instanceof e.Transaction?Sr(t,n,{get(){return this.table(n)},set(e){_r(this,n,{value:e,writable:!0,configurable:!0,enumerable:!0})}}):t[n]=new e.Table(n,o))}))}))}function _a({_novip:e},t){t.forEach((t=>{for(let n in t)t[n]instanceof e.Table&&delete t[n]}))}function Sa(e,t){return e._cfg.version-t._cfg.version}function Ea(e,t){const n={del:[],add:[],change:[]};let r;for(r in e)t[r]||n.del.push(r);for(r in t){const o=e[r],i=t[r];if(o){const e={name:r,def:i,recreate:!1,del:[],add:[],change:[]};if(""+(o.primKey.keyPath||"")!=""+(i.primKey.keyPath||"")||o.primKey.auto!==i.primKey.auto&&!Ti)e.recreate=!0,n.change.push(e);else{const t=o.idxByName,r=i.idxByName;let a;for(a in t)r[a]||e.del.push(a);for(a in r){const n=t[a],o=r[a];n?n.src!==o.src&&e.change.push(o):e.add.push(o)}(e.del.length>0||e.add.length>0||e.change.length>0)&&n.change.push(e)}}else n.add.push([r,i])}return n}function Oa(e,t,n,r){const o=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return r.forEach((e=>ka(o,e))),o}function ka(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function xa(e,t,n){const r={};return Pr(t.objectStoreNames,0).forEach((e=>{const t=n.objectStore(e);let o=t.keyPath;const i=fa(da(o),o||"",!1,!1,!!t.autoIncrement,o&&"string"!=typeof o,!0),a=[];for(let e=0;e<t.indexNames.length;++e){const n=t.index(t.indexNames[e]);o=n.keyPath;var s=fa(n.name,o,!!n.unique,!!n.multiEntry,!1,o&&"string"!=typeof o,!1);a.push(s)}r[e]=ha(e,i,a)})),r}function Pa({_novip:e},t,n){const r=n.db.objectStoreNames;for(let o=0;o<r.length;++o){const i=r[o],a=n.objectStore(i);e._hasGetAll="getAll"in a;for(let e=0;e<a.indexNames.length;++e){const n=a.indexNames[e],r=a.index(n).keyPath,o="string"==typeof r?r:"["+Pr(r).join("+")+"]";if(t[i]){const e=t[i].idxByName[o];e&&(e.name=n,delete t[i].idxByName[o],t[i].idxByName[n]=e)}}}"undefined"!=typeof navigator&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&hr.WorkerGlobalScope&&hr instanceof hr.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}class ja{_parseStoresSpec(e,t){pr(e).forEach((n=>{if(null!==e[n]){var r=e[n].split(",").map(((e,t)=>{const n=(e=e.trim()).replace(/([&*]|\+\+)/g,""),r=/^\[/.test(n)?n.match(/^\[(.*)\]$/)[1].split("+"):n;return fa(n,r||null,/\&/.test(e),/\*/.test(e),/\+\+/.test(e),yr(r),0===t)})),o=r.shift();if(o.multi)throw new co.Schema("Primary key cannot be multi-valued");r.forEach((e=>{if(e.auto)throw new co.Schema("Only primary key can be marked as autoIncrement (++)");if(!e.keyPath)throw new co.Schema("Index must have a name and cannot be an empty string")})),t[n]=ha(n,o,r)}}))}stores(e){const t=this.db;this._cfg.storesSource=this._cfg.storesSource?vr(this._cfg.storesSource,e):e;const n=t._versions,r={};let o={};return n.forEach((e=>{vr(r,e._cfg.storesSource),o=e._cfg.dbschema={},e._parseStoresSpec(r,o)})),t._dbSchema=o,_a(t,[t._allTables,t,t.Transaction.prototype]),wa(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],pr(o),o),t._storeNames=pr(o),this}upgrade(e){return this._cfg.contentUpgrade=So(this._cfg.contentUpgrade||po,e),this}}function Ca(e,t){let n=e._dbNamesDB;return n||(n=e._dbNamesDB=new Ya("__dbnames",{addons:[],indexedDB:e,IDBKeyRange:t}),n.version(1).stores({dbnames:"name"})),n.table("dbnames")}function Ta(e){return e&&"function"==typeof e.databases}function Aa(e){return di((function(){return Uo.letThrough=!0,e()}))}function Na(){var e;return!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise((function(t){var n=function(){return indexedDB.databases().finally(t)};e=setInterval(n,100),n()})).finally((function(){return clearInterval(e)})):Promise.resolve()}function Da(e){var t=t=>e.next(t),n=o(t),r=o((t=>e.throw(t)));function o(e){return t=>{var o=e(t),i=o.value;return o.done?i:i&&"function"==typeof i.then?i.then(n,r):yr(i)?Promise.all(i).then(n,r):n(i)}}return o(t)()}function Ma(e,t,n){var r=arguments.length;if(r<2)throw new co.InvalidArgument("Too few arguments");for(var o=new Array(r-1);--r;)o[r-1]=arguments[r];return n=o.pop(),[e,Ir(o),n]}function La(e,t,n,r,o){return Vo.resolve().then((()=>{const i=Uo.transless||Uo,a=e._createTransaction(t,n,e._dbSchema,r),s={trans:a,transless:i};if(r)a.idbtrans=r.idbtrans;else try{a.create(),e._state.PR1398_maxLoop=3}catch(r){return r.name===uo.InvalidState&&e.isOpen()&&--e._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),e._close(),e.open().then((()=>La(e,t,n,null,o)))):ki(r)}const u=Gr(o);let l;u&&hi();const c=Vo.follow((()=>{if(l=o.call(a,a),l)if(u){var e=pi.bind(null,null);l.then(e,e)}else"function"==typeof l.next&&"function"==typeof l.throw&&(l=Da(l))}),s);return(l&&"function"==typeof l.then?Vo.resolve(l).then((e=>a.active?e:ki(new co.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn")))):c.then((()=>l))).then((e=>(r&&a._resolve(),a._completion.then((()=>e))))).catch((e=>(a._reject(e),ki(e))))}))}function Ia(e,t,n){const r=yr(e)?e.slice():[e];for(let e=0;e<n;++e)r.push(t);return r}const Ra={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return{...e,table(t){const n=e.table(t),{schema:r}=n,o={},i=[];function a(e,t,n){const r=ma(e),s=o[r]=o[r]||[],u=null==e?0:"string"==typeof e?1:e.length,l=t>0,c={...n,isVirtual:l,keyTail:t,keyLength:u,extractKey:ya(e),unique:!l&&n.unique};return s.push(c),c.isPrimaryKey||i.push(c),u>1&&a(2===u?e[0]:e.slice(0,u-1),t+1,n),s.sort(((e,t)=>e.keyTail-t.keyTail)),c}const s=a(r.primaryKey.keyPath,0,r.primaryKey);o[":id"]=[s];for(const e of r.indexes)a(e.keyPath,0,e);function u(t){const n=t.query.index;return n.isVirtual?{...t,query:{index:n,range:(r=t.query.range,o=n.keyTail,{type:1===r.type?2:r.type,lower:Ia(r.lower,r.lowerOpen?e.MAX_KEY:e.MIN_KEY,o),lowerOpen:!0,upper:Ia(r.upper,r.upperOpen?e.MIN_KEY:e.MAX_KEY,o),upperOpen:!0})}}:t;var r,o}const l={...n,schema:{...r,primaryKey:s,indexes:i,getIndexByKeyPath:function(e){const t=o[ma(e)];return t&&t[0]}},count:e=>n.count(u(e)),query:e=>n.query(u(e)),openCursor(t){const{keyTail:r,isVirtual:o,keyLength:i}=t.query.index;return o?n.openCursor(u(t)).then((n=>n&&function(n){const o=Object.create(n,{continue:{value:function(o){null!=o?n.continue(Ia(o,t.reverse?e.MAX_KEY:e.MIN_KEY,r)):t.unique?n.continue(n.key.slice(0,i).concat(t.reverse?e.MIN_KEY:e.MAX_KEY,r)):n.continue()}},continuePrimaryKey:{value(t,o){n.continuePrimaryKey(Ia(t,e.MAX_KEY,r),o)}},primaryKey:{get:()=>n.primaryKey},key:{get(){const e=n.key;return 1===i?e[0]:e.slice(0,i)}},value:{get:()=>n.value}});return o}(n))):n.openCursor(t)}};return l}}}};function Ba(e,t,n,r){return n=n||{},r=r||"",pr(e).forEach((o=>{if(br(t,o)){var i=e[o],a=t[o];if("object"==typeof i&&"object"==typeof a&&i&&a){const e=zr(i);e!==zr(a)?n[r+o]=t[o]:"Object"===e?Ba(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})),pr(t).forEach((o=>{br(e,o)||(n[r+o]=t[o])})),n}const $a={stack:"dbcore",name:"HooksMiddleware",level:2,create:e=>({...e,table(t){const n=e.table(t),{primaryKey:r}=n.schema,o={...n,mutate(e){const o=Uo.trans,{deleting:i,creating:a,updating:s}=o.table(t).hook;switch(e.type){case"add":if(a.fire===po)break;return o._promise("readwrite",(()=>u(e)),!0);case"put":if(a.fire===po&&s.fire===po)break;return o._promise("readwrite",(()=>u(e)),!0);case"delete":if(i.fire===po)break;return o._promise("readwrite",(()=>u(e)),!0);case"deleteRange":if(i.fire===po)break;return o._promise("readwrite",(()=>function(e){return l(e.trans,e.range,1e4)}(e)),!0)}return n.mutate(e);function u(e){const t=Uo.trans,o=e.keys||function(e,t){return"delete"===t.type?t.keys:t.keys||t.values.map(e.extractKey)}(r,e);if(!o)throw new Error("Keys missing");return"delete"!==(e="add"===e.type||"put"===e.type?{...e,keys:o}:{...e}).type&&(e.values=[...e.values]),e.keys&&(e.keys=[...e.keys]),function(e,t,n){return"add"===t.type?Promise.resolve([]):e.getMany({trans:t.trans,keys:n,cache:"immutable"})}(n,e,o).then((u=>{const l=o.map(((n,o)=>{const l=u[o],c={onerror:null,onsuccess:null};if("delete"===e.type)i.fire.call(c,n,l,t);else if("add"===e.type||void 0===l){const i=a.fire.call(c,n,e.values[o],t);null==n&&null!=i&&(n=i,e.keys[o]=n,r.outbound||Dr(e.values[o],r.keyPath,n))}else{const r=Ba(l,e.values[o]),i=s.fire.call(c,r,n,l,t);if(i){const t=e.values[o];Object.keys(i).forEach((e=>{br(t,e)?t[e]=i[e]:Dr(t,e,i[e])}))}}return c}));return n.mutate(e).then((({failures:t,results:n,numFailures:r,lastResult:i})=>{for(let r=0;r<o.length;++r){const i=n?n[r]:o[r],a=l[r];null==i?a.onerror&&a.onerror(t[r]):a.onsuccess&&a.onsuccess("put"===e.type&&u[r]?e.values[r]:i)}return{failures:t,results:n,numFailures:r,lastResult:i}})).catch((e=>(l.forEach((t=>t.onerror&&t.onerror(e))),Promise.reject(e))))}))}function l(e,t,o){return n.query({trans:e,values:!1,query:{index:r,range:t},limit:o}).then((({result:n})=>u({type:"delete",keys:n,trans:e}).then((r=>r.numFailures>0?Promise.reject(r.failures[0]):n.length<o?{failures:[],numFailures:0,lastResult:void 0}:l(e,{...t,lower:n[n.length-1],lowerOpen:!0},o)))))}}};return o}})};function Ua(e,t,n){try{if(!t)return null;if(t.keys.length<e.length)return null;const r=[];for(let o=0,i=0;o<t.keys.length&&i<e.length;++o)0===Wi(t.keys[o],e[i])&&(r.push(n?Ur(t.values[o]):t.values[o]),++i);return r.length===e.length?r:null}catch(e){return null}}const Fa={stack:"dbcore",level:-1,create:e=>({table:t=>{const n=e.table(t);return{...n,getMany:e=>{if(!e.cache)return n.getMany(e);const t=Ua(e.keys,e.trans._cache,"clone"===e.cache);return t?Vo.resolve(t):n.getMany(e).then((t=>(e.trans._cache={keys:e.keys,values:"clone"===e.cache?Ur(t):t},t)))},mutate:e=>("add"!==e.type&&(e.trans._cache=null),n.mutate(e))}}})};function Ka(e){return!("from"in e)}const za=function(e,t){if(!this){const t=new za;return e&&"d"in e&&vr(t,e),t}vr(this,arguments.length?{d:1,from:e,to:arguments.length>1?t:e}:{d:0})};function Va(e,t,n){const r=Wi(t,n);if(isNaN(r))return;if(r>0)throw RangeError();if(Ka(e))return vr(e,{from:t,to:n,d:1});const o=e.l,i=e.r;if(Wi(n,e.from)<0)return o?Va(o,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Wa(e);if(Wi(t,e.to)>0)return i?Va(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Wa(e);Wi(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),Wi(n,e.to)>0&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1);const a=!e.r;o&&!e.l&&Ha(e,o),i&&a&&Ha(e,i)}function Ha(e,t){Ka(t)||function e(t,{from:n,to:r,l:o,r:i}){Va(t,n,r),o&&e(t,o),i&&e(t,i)}(e,t)}function qa(e){let t=Ka(e)?null:{s:0,n:e};return{next(e){const n=arguments.length>0;for(;t;)switch(t.s){case 0:if(t.s=1,n)for(;t.n.l&&Wi(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||Wi(e,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Wa(e){var t,n;const r=((null===(t=e.r)||void 0===t?void 0:t.d)||0)-((null===(n=e.l)||void 0===n?void 0:n.d)||0),o=r>1?"r":r<-1?"l":"";if(o){const t="r"===o?"l":"r",n={...e},r=e[o];e.from=r.from,e.to=r.to,e[o]=r[o],n[o]=r[t],e[t]=n,n.d=Ga(n)}e.d=Ga(e)}function Ga({r:e,l:t}){return(e?t?Math.max(e.d,t.d):e.d:t?t.d:0)+1}wr(za.prototype,{add(e){return Ha(this,e),this},addKey(e){return Va(this,e,e),this},addKeys(e){return e.forEach((e=>Va(this,e,e))),this},[Vr](){return qa(this)}});const Qa={stack:"dbcore",level:0,create:e=>{const t=e.schema.name,n=new za(e.MIN_KEY,e.MAX_KEY);return{...e,table:r=>{const o=e.table(r),{schema:i}=o,{primaryKey:a}=i,{extractKey:s,outbound:u}=a,l={...o,mutate:e=>{const a=e.trans,s=a.mutatedParts||(a.mutatedParts={}),u=e=>{const n=`idb://${t}/${r}/${e}`;return s[n]||(s[n]=new za)},l=u(""),c=u(":dels"),{type:f}=e;let[d,h]="deleteRange"===e.type?[e.range]:"delete"===e.type?[e.keys]:e.values.length<50?[[],e.values]:[];const p=e.trans._cache;return o.mutate(e).then((e=>{if(yr(d)){"delete"!==f&&(d=e.results),l.addKeys(d);const t=Ua(d,p);t||"add"===f||c.addKeys(d),(t||h)&&function(e,t,n,r){t.indexes.forEach((function(t){const o=e(t.name||"");function i(e){return null!=e?t.extractKey(e):null}const a=e=>t.multiEntry&&yr(e)?e.forEach((e=>o.addKey(e))):o.addKey(e);(n||r).forEach(((e,t)=>{const o=n&&i(n[t]),s=r&&i(r[t]);0!==Wi(o,s)&&(null!=o&&a(o),null!=s&&a(s))}))}))}(u,i,t,h)}else if(d){const e={from:d.lower,to:d.upper};c.add(e),l.add(e)}else l.add(n),c.add(n),i.indexes.forEach((e=>u(e.name).add(n)));return e}))}},c=({query:{index:t,range:n}})=>{var r,o;return[t,new za(null!==(r=n.lower)&&void 0!==r?r:e.MIN_KEY,null!==(o=n.upper)&&void 0!==o?o:e.MAX_KEY)]},f={get:e=>[a,new za(e.key)],getMany:e=>[a,(new za).addKeys(e.keys)],count:c,query:c,openCursor:c};return pr(f).forEach((e=>{l[e]=function(i){const{subscr:a}=Uo;if(a){const l=e=>{const n=`idb://${t}/${r}/${e}`;return a[n]||(a[n]=new za)},c=l(""),d=l(":dels"),[h,p]=f[e](i);if(l(h.name||"").add(p),!h.isPrimaryKey){if("count"!==e){const t="query"===e&&u&&i.values&&o.query({...i,values:!1});return o[e].apply(this,arguments).then((n=>{if("query"===e){if(u&&i.values)return t.then((({result:e})=>(c.addKeys(e),n)));const e=i.values?n.result.map(s):n.result;i.values?c.addKeys(e):d.addKeys(e)}else if("openCursor"===e){const e=n,t=i.values;return e&&Object.create(e,{key:{get:()=>(d.addKey(e.primaryKey),e.key)},primaryKey:{get(){const t=e.primaryKey;return d.addKey(t),t}},value:{get:()=>(t&&c.addKey(e.primaryKey),e.value)}})}return n}))}d.add(n)}}return o[e].apply(this,arguments)}})),l}}}};class Ya{constructor(e,t){this._middlewares={},this.verno=0;const n=Ya.dependencies;this._options=t={addons:Ya.addons,autoOpen:!0,indexedDB:n.indexedDB,IDBKeyRange:n.IDBKeyRange,...t},this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange};const{addons:r}=t;this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;const o={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:po,dbReadyPromise:null,cancelOpen:po,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3};var i;o.dbReadyPromise=new Vo((e=>{o.dbReadyResolve=e})),o.openCanceller=new Vo(((e,t)=>{o.cancelOpen=t})),this._state=o,this.name=e,this.on=Bi(this,"populate","blocked","versionchange","close",{ready:[So,po]}),this.on.ready.subscribe=jr(this.on.ready.subscribe,(e=>(t,n)=>{Ya.vip((()=>{const r=this._state;if(r.openComplete)r.dbOpenError||Vo.resolve().then(t),n&&e(t);else if(r.onReadyBeingFired)r.onReadyBeingFired.push(t),n&&e(t);else{e(t);const r=this;n||e((function e(){r.on.ready.unsubscribe(t),r.on.ready.unsubscribe(e)}))}}))})),this.Collection=(i=this,$i(Yi.prototype,(function(e,t){this.db=i;let n=Li,r=null;if(t)try{n=t()}catch(e){r=e}const o=e._ctx,a=o.table,s=a.hook.reading.fire;this._ctx={table:a,index:o.index,isPrimKey:!o.index||a.schema.primKey.keyPath&&o.index===a.schema.primKey.name,range:n,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r,or:o.or,valueMapper:s!==yo?s:null}}))),this.Table=function(e){return $i(Ri.prototype,(function(t,n,r){this.db=e,this._tx=r,this.name=t,this.schema=n,this.hook=e._allTables[t]?e._allTables[t].hook:Bi(null,{creating:[mo,po],reading:[vo,yo],updating:[wo,po],deleting:[bo,po]})}))}(this),this.Transaction=function(e){return $i(ca.prototype,(function(t,n,r,o,i){this.db=e,this.mode=t,this.storeNames=n,this.schema=r,this.chromeTransactionDurability=o,this.idbtrans=null,this.on=Bi(this,"complete","error","abort"),this.parent=i||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new Vo(((e,t)=>{this._resolve=e,this._reject=t})),this._completion.then((()=>{this.active=!1,this.on.complete.fire()}),(e=>{var t=this.active;return this.active=!1,this.on.error.fire(e),this.parent?this.parent._reject(e):t&&this.idbtrans&&this.idbtrans.abort(),ki(e)}))}))}(this),this.Version=function(e){return $i(ja.prototype,(function(t){this.db=e,this._cfg={version:t,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}}))}(this),this.WhereClause=function(e){return $i(aa.prototype,(function(t,n,r){this.db=e,this._ctx={table:t,index:":id"===n?null:n,or:r};const o=e._deps.indexedDB;if(!o)throw new co.MissingAPI;this._cmp=this._ascending=o.cmp.bind(o),this._descending=(e,t)=>o.cmp(t,e),this._max=(e,t)=>o.cmp(e,t)>0?e:t,this._min=(e,t)=>o.cmp(e,t)<0?e:t,this._IDBKeyRange=e._deps.IDBKeyRange}))}(this),this.on("versionchange",(e=>{e.newVersion>0?console.warn(`Another connection wants to upgrade database '${this.name}'. Closing db now to resume the upgrade.`):console.warn(`Another connection wants to delete database '${this.name}'. Closing db now to resume the delete request.`),this.close()})),this.on("blocked",(e=>{!e.newVersion||e.newVersion<e.oldVersion?console.warn(`Dexie.delete('${this.name}') was blocked`):console.warn(`Upgrade '${this.name}' blocked by other connection holding version ${e.oldVersion/10}`)})),this._maxKey=pa(t.IDBKeyRange),this._createTransaction=(e,t,n,r)=>new this.Transaction(e,t,n,this._options.chromeTransactionDurability,r),this._fireOnBlocked=e=>{this.on("blocked").fire(e),Ci.filter((e=>e.name===this.name&&e!==this&&!e._state.vcFired)).map((t=>t.on("versionchange").fire(e)))},this.use(Ra),this.use($a),this.use(Qa),this.use(Fa),this.vip=Object.create(this,{_vip:{value:!0}}),r.forEach((e=>e(this)))}version(e){if(isNaN(e)||e<.1)throw new co.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new co.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);const t=this._versions;var n=t.filter((t=>t._cfg.version===e))[0];return n||(n=new this.Version(e),t.push(n),t.sort(Sa),n.stores({}),this._state.autoSchema=!1,n)}_whenReady(e){return this.idbdb&&(this._state.openComplete||Uo.letThrough||this._vip)?e():new Vo(((e,t)=>{if(this._state.openComplete)return t(new co.DatabaseClosed(this._state.dbOpenError));if(!this._state.isBeingOpened){if(!this._options.autoOpen)return void t(new co.DatabaseClosed);this.open().catch(po)}this._state.dbReadyPromise.then(e,t)})).then(e)}use({stack:e,create:t,level:n,name:r}){r&&this.unuse({stack:e,name:r});const o=this._middlewares[e]||(this._middlewares[e]=[]);return o.push({stack:e,create:t,level:null==n?10:n,name:r}),o.sort(((e,t)=>e.level-t.level)),this}unuse({stack:e,name:t,create:n}){return e&&this._middlewares[e]&&(this._middlewares[e]=this._middlewares[e].filter((e=>n?e.create!==n:!!t&&e.name!==t))),this}open(){return function(e){const t=e._state,{indexedDB:n}=e._deps;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then((()=>t.dbOpenError?ki(t.dbOpenError):e));Qr&&(t.openCanceller._stackHolder=Xr()),t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;const r=t.openCanceller;function o(){if(t.openCanceller!==r)throw new co.DatabaseClosed("db.open() was cancelled")}let i=t.dbReadyResolve,a=null,s=!1;return Vo.race([r,("undefined"==typeof navigator?Vo.resolve():Na()).then((()=>new Vo(((r,i)=>{if(o(),!n)throw new co.MissingAPI;const u=e.name,l=t.autoSchema?n.open(u):n.open(u,Math.round(10*e.verno));if(!l)throw new co.MissingAPI;l.onerror=sa(i),l.onblocked=ii(e._fireOnBlocked),l.onupgradeneeded=ii((r=>{if(a=l.transaction,t.autoSchema&&!e._options.allowEmptyDB){l.onerror=ua,a.abort(),l.result.close();const e=n.deleteDatabase(u);e.onsuccess=e.onerror=ii((()=>{i(new co.NoSuchDatabase(`Database ${u} doesnt exist`))}))}else{a.onerror=sa(i);var o=r.oldVersion>Math.pow(2,62)?0:r.oldVersion;s=o<1,e._novip.idbdb=l.result,function(e,t,n,r){const o=e._dbSchema,i=e._createTransaction("readwrite",e._storeNames,o);i.create(n),i._completion.catch(r);const a=i._reject.bind(i),s=Uo.transless||Uo;di((()=>{Uo.trans=i,Uo.transless=s,0===t?(pr(o).forEach((e=>{Oa(n,e,o[e].primKey,o[e].indexes)})),ba(e,n),Vo.follow((()=>e.on.populate.fire(i))).catch(a)):function({_novip:e},t,n,r){const o=[],i=e._versions;let a=e._dbSchema=xa(0,e.idbdb,r),s=!1;return i.filter((e=>e._cfg.version>=t)).forEach((i=>{o.push((()=>{const o=a,u=i._cfg.dbschema;Pa(e,o,r),Pa(e,u,r),a=e._dbSchema=u;const l=Ea(o,u);l.add.forEach((e=>{Oa(r,e[0],e[1].primKey,e[1].indexes)})),l.change.forEach((e=>{if(e.recreate)throw new co.Upgrade("Not yet support for changing primary key");{const t=r.objectStore(e.name);e.add.forEach((e=>ka(t,e))),e.change.forEach((e=>{t.deleteIndex(e.name),ka(t,e)})),e.del.forEach((e=>t.deleteIndex(e)))}}));const c=i._cfg.contentUpgrade;if(c&&i._cfg.version>t){ba(e,r),n._memoizedTables={},s=!0;let t=Mr(u);l.del.forEach((e=>{t[e]=o[e]})),_a(e,[e.Transaction.prototype]),wa(e,[e.Transaction.prototype],pr(t),t),n.schema=t;const i=Gr(c);let a;i&&hi();const f=Vo.follow((()=>{if(a=c(n),a&&i){var e=pi.bind(null,null);a.then(e,e)}}));return a&&"function"==typeof a.then?Vo.resolve(a):f.then((()=>a))}})),o.push((t=>{s&&Ai||function(e,t){[].slice.call(t.db.objectStoreNames).forEach((n=>null==e[n]&&t.db.deleteObjectStore(n)))}(i._cfg.dbschema,t),_a(e,[e.Transaction.prototype]),wa(e,[e.Transaction.prototype],e._storeNames,e._dbSchema),n.schema=e._dbSchema}))})),function e(){return o.length?Vo.resolve(o.shift()(n.idbtrans)).then(e):Vo.resolve()}().then((()=>{var e,t;t=r,pr(e=a).forEach((n=>{t.db.objectStoreNames.contains(n)||Oa(t,n,e[n].primKey,e[n].indexes)}))}))}(e,t,i,n).catch(a)}))}(e,o/10,a,i)}}),i),l.onsuccess=ii((()=>{a=null;const n=e._novip.idbdb=l.result,o=Pr(n.objectStoreNames);if(o.length>0)try{const r=n.transaction(1===(i=o).length?i[0]:i,"readonly");t.autoSchema?function({_novip:e},t,n){e.verno=t.version/10;const r=e._dbSchema=xa(0,t,n);e._storeNames=Pr(t.objectStoreNames,0),wa(e,[e._allTables],pr(r),r)}(e,n,r):(Pa(e,e._dbSchema,r),function(e,t){const n=Ea(xa(0,e.idbdb,t),e._dbSchema);return!(n.add.length||n.change.some((e=>e.add.length||e.change.length)))}(e,r)||console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Some queries may fail.")),ba(e,r)}catch(e){}var i;Ci.push(e),n.onversionchange=ii((n=>{t.vcFired=!0,e.on("versionchange").fire(n)})),n.onclose=ii((t=>{e.on("close").fire(t)})),s&&function({indexedDB:e,IDBKeyRange:t},n){!Ta(e)&&"__dbnames"!==n&&Ca(e,t).put({name:n}).catch(po)}(e._deps,u),r()}),i)}))))]).then((()=>(o(),t.onReadyBeingFired=[],Vo.resolve(Aa((()=>e.on.ready.fire(e.vip)))).then((function n(){if(t.onReadyBeingFired.length>0){let r=t.onReadyBeingFired.reduce(So,po);return t.onReadyBeingFired=[],Vo.resolve(Aa((()=>r(e.vip)))).then(n)}}))))).finally((()=>{t.onReadyBeingFired=null,t.isBeingOpened=!1})).then((()=>e)).catch((n=>{t.dbOpenError=n;try{a&&a.abort()}catch(e){}return r===t.openCanceller&&e._close(),ki(n)})).finally((()=>{t.openComplete=!0,i()}))}(this)}_close(){const e=this._state,t=Ci.indexOf(this);if(t>=0&&Ci.splice(t,1),this.idbdb){try{this.idbdb.close()}catch(e){}this._novip.idbdb=null}e.dbReadyPromise=new Vo((t=>{e.dbReadyResolve=t})),e.openCanceller=new Vo(((t,n)=>{e.cancelOpen=n}))}close(){this._close();const e=this._state;this._options.autoOpen=!1,e.dbOpenError=new co.DatabaseClosed,e.isBeingOpened&&e.cancelOpen(e.dbOpenError)}delete(){const e=arguments.length>0,t=this._state;return new Vo(((n,r)=>{const o=()=>{this.close();var e=this._deps.indexedDB.deleteDatabase(this.name);e.onsuccess=ii((()=>{!function({indexedDB:e,IDBKeyRange:t},n){!Ta(e)&&"__dbnames"!==n&&Ca(e,t).delete(n).catch(po)}(this._deps,this.name),n()})),e.onerror=sa(r),e.onblocked=this._fireOnBlocked};if(e)throw new co.InvalidArgument("Arguments not allowed in db.delete()");t.isBeingOpened?t.dbReadyPromise.then(o):o()}))}backendDB(){return this.idbdb}isOpen(){return null!==this.idbdb}hasBeenClosed(){const e=this._state.dbOpenError;return e&&"DatabaseClosed"===e.name}hasFailed(){return null!==this._state.dbOpenError}dynamicallyOpened(){return this._state.autoSchema}get tables(){return pr(this._allTables).map((e=>this._allTables[e]))}transaction(){const e=Ma.apply(this,arguments);return this._transaction.apply(this,e)}_transaction(e,t,n){let r=Uo.trans;r&&r.db===this&&-1===e.indexOf("!")||(r=null);const o=-1!==e.indexOf("?");let i,a;e=e.replace("!","").replace("?","");try{if(a=t.map((e=>{var t=e instanceof this.Table?e.name:e;if("string"!=typeof t)throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return t})),"r"==e||"readonly"===e)i="readonly";else{if("rw"!=e&&"readwrite"!=e)throw new co.InvalidArgument("Invalid transaction mode: "+e);i="readwrite"}if(r){if("readonly"===r.mode&&"readwrite"===i){if(!o)throw new co.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");r=null}r&&a.forEach((e=>{if(r&&-1===r.storeNames.indexOf(e)){if(!o)throw new co.SubTransaction("Table "+e+" not included in parent transaction.");r=null}})),o&&r&&!r.active&&(r=null)}}catch(e){return r?r._promise(null,((t,n)=>{n(e)})):ki(e)}const s=La.bind(null,this,i,a,r,n);return r?r._promise(i,s,"lock"):Uo.trans?wi(Uo.transless,(()=>this._whenReady(s))):this._whenReady(s)}table(e){if(!br(this._allTables,e))throw new co.InvalidTable(`Table ${e} does not exist`);return this._allTables[e]}}const Za="undefined"!=typeof Symbol&&"observable"in Symbol?Symbol.observable:"@@observable";class Ja{constructor(e){this._subscribe=e}subscribe(e,t,n){return this._subscribe(e&&"function"!=typeof e?e:{next:e,error:t,complete:n})}[Za](){return this}}function Xa(e,t){return pr(t).forEach((n=>{Ha(e[n]||(e[n]=new za),t[n])})),e}let es;try{es={indexedDB:hr.indexedDB||hr.mozIndexedDB||hr.webkitIndexedDB||hr.msIndexedDB,IDBKeyRange:hr.IDBKeyRange||hr.webkitIDBKeyRange}}catch($e){es={indexedDB:null,IDBKeyRange:null}}const ts=Ya;function ns(e){let t=rs;try{rs=!0,la.storagemutated.fire(e)}finally{rs=t}}wr(ts,{...ho,delete:e=>new ts(e,{addons:[]}).delete(),exists:e=>new ts(e,{addons:[]}).open().then((e=>(e.close(),!0))).catch("NoSuchDatabaseError",(()=>!1)),getDatabaseNames(e){try{return function({indexedDB:e,IDBKeyRange:t}){return Ta(e)?Promise.resolve(e.databases()).then((e=>e.map((e=>e.name)).filter((e=>"__dbnames"!==e)))):Ca(e,t).toCollection().primaryKeys()}(ts.dependencies).then(e)}catch(e){return ki(new co.MissingAPI)}},defineClass:()=>function(e){vr(this,e)},ignoreTransaction:e=>Uo.trans?wi(Uo.transless,e):e(),vip:Aa,async:function(e){return function(){try{var t=Da(e.apply(this,arguments));return t&&"function"==typeof t.then?t:Vo.resolve(t)}catch(e){return ki(e)}}},spawn:function(e,t,n){try{var r=Da(e.apply(n,t||[]));return r&&"function"==typeof r.then?r:Vo.resolve(r)}catch(e){return ki(e)}},currentTransaction:{get:()=>Uo.trans||null},waitFor:function(e,t){const n=Vo.resolve("function"==typeof e?ts.ignoreTransaction(e):e).timeout(t||6e4);return Uo.trans?Uo.trans.waitFor(n):n},Promise:Vo,debug:{get:()=>Qr,set:e=>{Yr(e,"dexie"===e?()=>!0:Di)}},derive:Er,extend:vr,props:wr,override:jr,Events:Bi,on:la,liveQuery:function(e){return new Ja((t=>{const n=Gr(e);let r=!1,o={},i={};const a={get closed(){return r},unsubscribe:()=>{r=!0,la.storagemutated.unsubscribe(c)}};t.start&&t.start(a);let s=!1,u=!1;function l(){return pr(i).some((e=>o[e]&&function(e,t){const n=qa(t);let r=n.next();if(r.done)return!1;let o=r.value;const i=qa(e);let a=i.next(o.from),s=a.value;for(;!r.done&&!a.done;){if(Wi(s.from,o.to)<=0&&Wi(s.to,o.from)>=0)return!0;Wi(o.from,s.from)<0?o=(r=n.next(s.from)).value:s=(a=i.next(o.from)).value}return!1}(o[e],i[e])))}const c=e=>{Xa(o,e),l()&&f()},f=()=>{if(s||r)return;o={};const d={},h=function(t){n&&hi();const r=()=>di(e,{subscr:t,trans:null}),o=Uo.trans?wi(Uo.transless,r):r();return n&&o.then(pi,pi),o}(d);u||(la("storagemutated",c),u=!0),s=!0,Promise.resolve(h).then((e=>{s=!1,r||(l()?f():(o={},i=d,t.next&&t.next(e)))}),(e=>{s=!1,t.error&&t.error(e),a.unsubscribe()}))};return f(),a}))},extendObservabilitySet:Xa,getByKeyPath:Nr,setByKeyPath:Dr,delByKeyPath:function(e,t){"string"==typeof t?Dr(e,t,void 0):"length"in t&&[].map.call(t,(function(t){Dr(e,t,void 0)}))},shallowClone:Mr,deepClone:Ur,getObjectDiff:Ba,cmp:Wi,asap:Tr,minKey:-1/0,addons:[],connections:Ci,errnames:uo,dependencies:es,semVer:"3.2.3",version:"3.2.3".split(".").map((e=>parseInt(e))).reduce(((e,t,n)=>e+t/Math.pow(10,2*n)))}),ts.maxKey=pa(ts.dependencies.IDBKeyRange),"undefined"!=typeof dispatchEvent&&"undefined"!=typeof addEventListener&&(la("storagemutated",(e=>{if(!rs){let t;Ti?(t=document.createEvent("CustomEvent"),t.initCustomEvent("x-storagemutated-1",!0,!0,e)):t=new CustomEvent("x-storagemutated-1",{detail:e}),rs=!0,dispatchEvent(t),rs=!1}})),addEventListener("x-storagemutated-1",(({detail:e})=>{rs||ns(e)})));let rs=!1;if("undefined"!=typeof BroadcastChannel){const e=new BroadcastChannel("x-storagemutated-1");"function"==typeof e.unref&&e.unref(),la("storagemutated",(t=>{rs||e.postMessage(t)})),e.onmessage=e=>{e.data&&ns(e.data)}}else if("undefined"!=typeof self&&"undefined"!=typeof navigator){la("storagemutated",(e=>{try{rs||("undefined"!=typeof localStorage&&localStorage.setItem("x-storagemutated-1",JSON.stringify({trig:Math.random(),changedParts:e})),"object"==typeof self.clients&&[...self.clients.matchAll({includeUncontrolled:!0})].forEach((t=>t.postMessage({type:"x-storagemutated-1",changedParts:e}))))}catch(e){}})),"undefined"!=typeof addEventListener&&addEventListener("storage",(e=>{if("x-storagemutated-1"===e.key){const t=JSON.parse(e.newValue);t&&ns(t.changedParts)}}));const e=self.document&&navigator.serviceWorker;e&&e.addEventListener("message",(function({data:e}){e&&"x-storagemutated-1"===e.type&&ns(e.changedParts)}))}Vo.rejectionMapper=function(e,t){if(!e||e instanceof oo||e instanceof TypeError||e instanceof SyntaxError||!e.name||!fo[e.name])return e;var n=new fo[e.name](t||e.message,e);return"stack"in e&&Sr(n,"stack",{get:function(){return this.inner.stack}}),n},Yr(Qr,Di);var os,is,as=n(840);function ss(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}new class extends Ya{constructor(){super("EsmOffline"),ss(this,"syncQueue",void 0),ss(this,"dynamicOfflineData",void 0),this.version(4).stores({syncQueue:"++id,userId,type,[userId+type]",dynamicOfflineData:"++id,type,identifier,*users,&[type+identifier]"}),this.syncQueue=this.table("syncQueue"),this.dynamicOfflineData=this.table("dynamicOfflineData")}},(0,ne.createGlobalStore)("offline-synchronization",{}),(0,ne.createGlobalStore)("offline-patients",{offlinePatientDataSyncState:{},handlers:{}}),new(function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return On(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return n&&!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new zn;return this._value},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(qn))(null),function(e){e.NEWVISIT="startVisit",e.EDITVISIT="editVisit",e.LOADING="loadingVisit"}(os||(os={})),function(e){e.NOTSTARTED="notStarted",e.ONGOING="ongoing"}(is||(is={})),n(789);const us=function(e,t){return e===t||e!=e&&t!=t},ls=function(e,t){for(var n=e.length;n--;)if(us(e[n][0],t))return n;return-1};var cs=Array.prototype.splice;function fs(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])}}fs.prototype.clear=function(){this.__data__=[],this.size=0},fs.prototype.delete=function(e){var t=this.__data__,n=ls(t,e);return!(n<0||(n==t.length-1?t.pop():cs.call(t,n,1),--this.size,0))},fs.prototype.get=function(e){var t=this.__data__,n=ls(t,e);return n<0?void 0:t[n][1]},fs.prototype.has=function(e){return ls(this.__data__,e)>-1},fs.prototype.set=function(e,t){var n=this.__data__,r=ls(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const ds=fs,hs="object"==typeof global&&global&&global.Object===Object&&global;var ps="object"==typeof self&&self&&self.Object===Object&&self;const ys=hs||ps||Function("return this")(),vs=ys.Symbol;var gs=Object.prototype,ms=gs.hasOwnProperty,bs=gs.toString,ws=vs?vs.toStringTag:void 0;var _s=Object.prototype.toString;var Ss=vs?vs.toStringTag:void 0;const Es=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Ss&&Ss in Object(e)?function(e){var t=ms.call(e,ws),n=e[ws];try{e[ws]=void 0;var r=!0}catch(e){}var o=bs.call(e);return r&&(t?e[ws]=n:delete e[ws]),o}(e):function(e){return _s.call(e)}(e)},Os=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},ks=function(e){if(!Os(e))return!1;var t=Es(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},xs=ys["__core-js_shared__"];var Ps,js=(Ps=/[^.]+$/.exec(xs&&xs.keys&&xs.keys.IE_PROTO||""))?"Symbol(src)_1."+Ps:"";var Cs=Function.prototype.toString;const Ts=function(e){if(null!=e){try{return Cs.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var As=/^\[object .+?Constructor\]$/,Ns=Function.prototype,Ds=Object.prototype,Ms=Ns.toString,Ls=Ds.hasOwnProperty,Is=RegExp("^"+Ms.call(Ls).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Rs=function(e){return!(!Os(e)||(t=e,js&&js in t))&&(ks(e)?Is:As).test(Ts(e));var t},Bs=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Rs(n)?n:void 0},$s=Bs(ys,"Map"),Us=Bs(Object,"create");var Fs=Object.prototype.hasOwnProperty;var Ks=Object.prototype.hasOwnProperty;function zs(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])}}zs.prototype.clear=function(){this.__data__=Us?Us(null):{},this.size=0},zs.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zs.prototype.get=function(e){var t=this.__data__;if(Us){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Fs.call(t,e)?t[e]:void 0},zs.prototype.has=function(e){var t=this.__data__;return Us?void 0!==t[e]:Ks.call(t,e)},zs.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Us&&void 0===t?"__lodash_hash_undefined__":t,this};const Vs=zs,Hs=function(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map};function qs(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])}}qs.prototype.clear=function(){this.size=0,this.__data__={hash:new Vs,map:new($s||ds),string:new Vs}},qs.prototype.delete=function(e){var t=Hs(this,e).delete(e);return this.size-=t?1:0,t},qs.prototype.get=function(e){return Hs(this,e).get(e)},qs.prototype.has=function(e){return Hs(this,e).has(e)},qs.prototype.set=function(e,t){var n=Hs(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};const Ws=qs;function Gs(e){var t=this.__data__=new ds(e);this.size=t.size}Gs.prototype.clear=function(){this.__data__=new ds,this.size=0},Gs.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Gs.prototype.get=function(e){return this.__data__.get(e)},Gs.prototype.has=function(e){return this.__data__.has(e)},Gs.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ds){var r=n.__data__;if(!$s||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Ws(r)}return n.set(e,t),this.size=n.size,this};const Qs=Gs;function Ys(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Ws;++t<n;)this.add(e[t])}Ys.prototype.add=Ys.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Ys.prototype.has=function(e){return this.__data__.has(e)};const Zs=Ys,Js=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},Xs=function(e,t){return e.has(t)},eu=function(e,t,n,r,o,i){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&u>s))return!1;var l=i.get(e),c=i.get(t);if(l&&c)return l==t&&c==e;var f=-1,d=!0,h=2&n?new Zs:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var p=e[f],y=t[f];if(r)var v=a?r(y,p,f,t,e,i):r(p,y,f,e,t,i);if(void 0!==v){if(v)continue;d=!1;break}if(h){if(!Js(t,(function(e,t){if(!Xs(h,t)&&(p===e||o(p,e,n,r,i)))return h.push(t)}))){d=!1;break}}else if(p!==y&&!o(p,y,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},tu=ys.Uint8Array,nu=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},ru=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n};var ou=vs?vs.prototype:void 0,iu=ou?ou.valueOf:void 0;const au=Array.isArray;var su=Object.prototype.propertyIsEnumerable,uu=Object.getOwnPropertySymbols;const lu=uu?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}(uu(e),(function(t){return su.call(e,t)})))}:function(){return[]},cu=function(e){return null!=e&&"object"==typeof e},fu=function(e){return cu(e)&&"[object Arguments]"==Es(e)};var du=Object.prototype,hu=du.hasOwnProperty,pu=du.propertyIsEnumerable;const yu=fu(function(){return arguments}())?fu:function(e){return cu(e)&&hu.call(e,"callee")&&!pu.call(e,"callee")};var vu="object"==typeof exports&&exports&&!exports.nodeType&&exports,gu=vu&&"object"==typeof module&&module&&!module.nodeType&&module,mu=gu&&gu.exports===vu?ys.Buffer:void 0;const bu=(mu?mu.isBuffer:void 0)||function(){return!1};var wu=/^(?:0|[1-9]\d*)$/;const _u=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&wu.test(e))&&e>-1&&e%1==0&&e<t},Su=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var Eu={};Eu["[object Float32Array]"]=Eu["[object Float64Array]"]=Eu["[object Int8Array]"]=Eu["[object Int16Array]"]=Eu["[object Int32Array]"]=Eu["[object Uint8Array]"]=Eu["[object Uint8ClampedArray]"]=Eu["[object Uint16Array]"]=Eu["[object Uint32Array]"]=!0,Eu["[object Arguments]"]=Eu["[object Array]"]=Eu["[object ArrayBuffer]"]=Eu["[object Boolean]"]=Eu["[object DataView]"]=Eu["[object Date]"]=Eu["[object Error]"]=Eu["[object Function]"]=Eu["[object Map]"]=Eu["[object Number]"]=Eu["[object Object]"]=Eu["[object RegExp]"]=Eu["[object Set]"]=Eu["[object String]"]=Eu["[object WeakMap]"]=!1;var Ou="object"==typeof exports&&exports&&!exports.nodeType&&exports,ku=Ou&&"object"==typeof module&&module&&!module.nodeType&&module,xu=ku&&ku.exports===Ou&&hs.process,Pu=function(){try{return ku&&ku.require&&ku.require("util").types||xu&&xu.binding&&xu.binding("util")}catch(e){}}(),ju=Pu&&Pu.isTypedArray;const Cu=ju?(Tu=ju,function(e){return Tu(e)}):function(e){return cu(e)&&Su(e.length)&&!!Eu[Es(e)]};var Tu,Au=Object.prototype.hasOwnProperty;const Nu=function(e,t){var n=au(e),r=!n&&yu(e),o=!n&&!r&&bu(e),i=!n&&!r&&!o&&Cu(e),a=n||r||o||i,s=a?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],u=s.length;for(var l in e)!t&&!Au.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||_u(l,u))||s.push(l);return s};var Du=Object.prototype;const Mu=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object);var Lu=Object.prototype.hasOwnProperty;const Iu=function(e){if(n=(t=e)&&t.constructor,t!==("function"==typeof n&&n.prototype||Du))return Mu(e);var t,n,r=[];for(var o in Object(e))Lu.call(e,o)&&"constructor"!=o&&r.push(o);return r},Ru=function(e){return null!=(t=e)&&Su(t.length)&&!ks(t)?Nu(e):Iu(e);var t},Bu=function(e){return function(e,t,n){var r=t(e);return au(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ru,lu)};var $u=Object.prototype.hasOwnProperty;const Uu=Bs(ys,"DataView"),Fu=Bs(ys,"Promise"),Ku=Bs(ys,"Set"),zu=Bs(ys,"WeakMap");var Vu="[object Map]",Hu="[object Promise]",qu="[object Set]",Wu="[object WeakMap]",Gu="[object DataView]",Qu=Ts(Uu),Yu=Ts($s),Zu=Ts(Fu),Ju=Ts(Ku),Xu=Ts(zu),el=Es;(Uu&&el(new Uu(new ArrayBuffer(1)))!=Gu||$s&&el(new $s)!=Vu||Fu&&el(Fu.resolve())!=Hu||Ku&&el(new Ku)!=qu||zu&&el(new zu)!=Wu)&&(el=function(e){var t=Es(e),n="[object Object]"==t?e.constructor:void 0,r=n?Ts(n):"";if(r)switch(r){case Qu:return Gu;case Yu:return Vu;case Zu:return Hu;case Ju:return qu;case Xu:return Wu}return t});const tl=el;var nl="[object Arguments]",rl="[object Array]",ol="[object Object]",il=Object.prototype.hasOwnProperty;const al=function(e,t,n,r,o,i){var a=au(e),s=au(t),u=a?rl:tl(e),l=s?rl:tl(t),c=(u=u==nl?ol:u)==ol,f=(l=l==nl?ol:l)==ol,d=u==l;if(d&&bu(e)){if(!bu(t))return!1;a=!0,c=!1}if(d&&!c)return i||(i=new Qs),a||Cu(e)?eu(e,t,n,r,o,i):function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new tu(e),new tu(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return us(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=nu;case"[object Set]":var u=1&r;if(s||(s=ru),e.size!=t.size&&!u)return!1;var l=a.get(e);if(l)return l==t;r|=2,a.set(e,t);var c=eu(s(e),s(t),r,o,i,a);return a.delete(e),c;case"[object Symbol]":if(iu)return iu.call(e)==iu.call(t)}return!1}(e,t,u,n,r,o,i);if(!(1&n)){var h=c&&il.call(e,"__wrapped__"),p=f&&il.call(t,"__wrapped__");if(h||p){var y=h?e.value():e,v=p?t.value():t;return i||(i=new Qs),o(y,v,n,r,i)}}return!!d&&(i||(i=new Qs),function(e,t,n,r,o,i){var a=1&n,s=Bu(e),u=s.length;if(u!=Bu(t).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in t:$u.call(t,c)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=!0;i.set(e,t),i.set(t,e);for(var p=a;++l<u;){var y=e[c=s[l]],v=t[c];if(r)var g=a?r(v,y,c,t,e,i):r(y,v,c,e,t,i);if(!(void 0===g?y===v||o(y,v,n,r,i):g)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var m=e.constructor,b=t.constructor;m==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(h=!1)}return i.delete(e),i.delete(t),h}(e,t,n,r,o,i))},sl=function e(t,n,r,o,i){return t===n||(null==t||null==n||!cu(t)&&!cu(n)?t!=t&&n!=n:al(t,n,r,o,e,i))},ul=function(e,t){return sl(e,t)},ll=function(e){return void 0===e},cl=(0,ne.createGlobalStore)("extensionsInternal",{slots:{},extensions:{}}),fl=()=>(0,ne.getGlobalStore)("extensionsInternal",{slots:{},extensions:{}});function dl(e){const t=[];for(let n of Object.values(e.extensions))for(let e of n.instances)t.push({slotModuleName:e.slotModuleName,extensionModuleName:n.moduleName,slotName:e.slotName,extensionId:e.id});ul(ie.getState().mountedExtensions,t)||ie.setState({mountedExtensions:t})}dl(cl.getState()),cl.subscribe(dl),fl();const hl=fl(),pl=(0,ne.getGlobalStore)("extensions",{slots:{}}),yl=se(),vl=le();function gl(e,t,n){const r={};for(let[o,i]of Object.entries(e.slots)){const{config:a}=ue(t,i.name),s=wl(o,e,a,n);r[o]={moduleName:i.moduleName,assignedExtensions:s}}ul(pl.getState().slots,r)||pl.setState({slots:r})}function ml(e){const[t]=e.split("#");return t}function bl(e,t,n,r){const o=t.indexOf(e);if(-1!==o)return o;if(void 0!==n)return 1e3+n;{const t=r.indexOf(e);return-1!==t?2e3+t:-1}}function wl(e,t,n,r){const o=function(e,t){const n=e.add||[],r=e.remove||[],o=e.order||[],{extensions:i}=hl.getState();return[...t,...n].filter((e=>!r.includes(e))).sort(((e,n)=>{var r,a;const s=bl(e,o,null===(r=i[ml(e)])||void 0===r?void 0:r.order,t),u=bl(n,o,null===(a=i[ml(n)])||void 0===a?void 0:a.order,t);return-1===u?-1:-1===s?1:s-u}))}(n,t.slots[e].attachedIds),i=[];let a;for(let n of o){const{config:o}=ce(r,e,n),f=ml(n),d=t.extensions[f];if(d){var s,u,l;const e=null!==(l=null!==(u=null==o||null===(s=o["Display conditions"])||void 0===s?void 0:s.privileges)&&void 0!==u?u:d.privileges)&&void 0!==l?l:[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)){var c;if(ll(a)&&(a=null===(c=(0,as.getSessionStore)().getState().session)||void 0===c?void 0:c.user),!a)continue;if(!(0,as.userHasAccess)(e,a))continue}i.push({id:n,name:f,moduleName:d.moduleName,config:o,meta:d.meta})}}return i}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sl(e){return function(t){const[n,r]=(0,Sn.useState)(e.getState());(0,Sn.useEffect)((()=>e.subscribe((e=>r(e)))),[]);let o=(0,Sn.useMemo)((()=>t?function(e,t){"function"==typeof t&&(t=t(e));const n={};for(let r in t)n[r]=()=>{const n=arguments;e.setState((e=>{let o=[e];for(let e=0;e<n.length;e++)o.push(n[e]);return t[r](o)}))};return n}(e,t):{}),[t]);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_l(e,t,n[t])}))}return e}({},n,o)}}hl.subscribe((e=>{gl(e,yl.getState(),vl.getState())})),yl.subscribe((e=>{gl(hl.getState(),e,vl.getState())})),vl.subscribe((e=>{gl(hl.getState(),yl.getState(),e)}));var El=n(196);Sn.createContext({moduleName:""}),n(758);try{require("react").createContext()}catch($e){}function Ol(e){return Ol="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ol(e)}function kl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach((function(t){kl(e,t,n[t])}))}return e}function Pl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jl(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 Cl(e,t,n){return t&&jl(e.prototype,t),n&&jl(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Al(e,t){if(t&&("object"===Ol(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tl(e)}function Nl(e){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Nl(e)}function Dl(e,t){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dl(e,t)}function Ml(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dl(e,t)}var Ll={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},Il=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pl(this,e),this.init(t,n)}return Cl(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Ll,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,xl({},{prefix:"".concat(this.prefix,":").concat(t,":")},this.options))}}]),e}()),Rl=function(){function e(){Pl(this,e),this.observers={}}return Cl(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)})),this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function Bl(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function $l(e){return null==e?"":""+e}function Ul(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function Fl(e,t,n){var r=Ul(e,t,Object);r.obj[r.k]=n}function Kl(e,t){var n=Ul(e,t),r=n.obj,o=n.k;if(r)return r[o]}function zl(e,t,n){var r=Kl(e,n);return void 0!==r?r:Kl(t,n)}function Vl(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Vl(e[r],t[r],n):e[r]=t[r]);return e}function Hl(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var ql={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Wl(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return ql[e]})):e}var Gl="undefined"!=typeof window&&window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Ql=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Pl(this,t),n=Al(this,Nl(t).call(this)),Gl&&Rl.call(Tl(n)),n.data=e||{},n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n}return Ml(t,e),Cl(t,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split(".")),Kl(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),Fl(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=Kl(this.data,a)||{};r?Vl(s,n,o):s=xl({},s,n),Fl(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?xl({},{},this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"toJSON",value:function(){return this.data}}]),t}(Rl),Yl={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}},Zl={},Jl=function(e){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Pl(this,t),n=Al(this,Nl(t).call(this)),Gl&&Rl.call(Tl(n)),function(e,t,n){["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"].forEach((function(e){t[e]&&(n[e]=t[e])}))}(0,e,Tl(n)),n.options=r,void 0===n.options.keySeparator&&(n.options.keySeparator="."),n.logger=Il.create("translator"),n}return Ml(t,e),Cl(t,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS;if(n&&e.indexOf(n)>-1){var i=e.match(this.interpolator.nestingRegexp);if(i&&i.length>0)return{key:e,namespaces:o};var a=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(a[0])>-1)&&(o=a.shift()),e=a.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,n,r){var o=this;if("object"!==Ol(n)&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),n||(n={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],n),s=a.key,u=a.namespaces,l=u[u.length-1],c=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&"cimode"===c.toLowerCase()){if(f){var d=n.nsSeparator||this.options.nsSeparator;return l+d+s}return s}var h=this.resolve(e,n),p=h&&h.res,y=h&&h.usedKey||s,v=h&&h.exactUsedKey||s,g=Object.prototype.toString.apply(p),m=void 0!==n.joinArrays?n.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject;if(b&&p&&"string"!=typeof p&&"boolean"!=typeof p&&"number"!=typeof p&&["[object Number]","[object Function]","[object RegExp]"].indexOf(g)<0&&("string"!=typeof m||"[object Array]"!==g)){if(!n.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,p,n):"key '".concat(s," (").concat(this.language,")' returned an object instead of string.");if(i){var w="[object Array]"===g,_=w?[]:{},S=w?v:y;for(var E in p)if(Object.prototype.hasOwnProperty.call(p,E)){var O="".concat(S).concat(i).concat(E);_[E]=this.translate(O,xl({},n,{joinArrays:!1,ns:u})),_[E]===O&&(_[E]=p[E])}p=_}}else if(b&&"string"==typeof m&&"[object Array]"===g)(p=p.join(m))&&(p=this.extendTranslation(p,e,n,r));else{var k=!1,x=!1,P=void 0!==n.count&&"string"!=typeof n.count,j=t.hasDefaultValue(n),C=P?this.pluralResolver.getSuffix(c,n.count):"",T=n["defaultValue".concat(C)]||n.defaultValue;!this.isValidLookup(p)&&j&&(k=!0,p=T),this.isValidLookup(p)||(x=!0,p=s);var A=j&&T!==p&&this.options.updateMissing;if(x||k||A){if(this.logger.log(A?"updateKey":"missingKey",c,l,s,A?T:p),i){var N=this.resolve(s,xl({},n,{keySeparator:!1}));N&&N.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var D=[],M=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if("fallback"===this.options.saveMissingTo&&M&&M[0])for(var L=0;L<M.length;L++)D.push(M[L]);else"all"===this.options.saveMissingTo?D=this.languageUtils.toResolveHierarchy(n.lng||this.language):D.push(n.lng||this.language);var I=function(e,t,r){o.options.missingKeyHandler?o.options.missingKeyHandler(e,l,t,A?r:p,A,n):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,l,t,A?r:p,A,n),o.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?D.forEach((function(e){o.pluralResolver.getSuffixes(e).forEach((function(t){I([e],s+t,n["defaultValue".concat(t)]||T)}))})):I(D,s,T))}p=this.extendTranslation(p,e,n,h,r),x&&p===s&&this.options.appendNamespaceToMissingKey&&(p="".concat(l,":").concat(s)),x&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(p))}return p}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,n,r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(xl({},n,{interpolation:xl({},this.options.interpolation,n.interpolation)}));var a,s=n.interpolation&&n.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;if(s){var u=e.match(this.interpolator.nestingRegexp);a=u&&u.length}var l=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(l=xl({},this.options.interpolation.defaultVariables,l)),e=this.interpolator.interpolate(e,l,n.lng||this.language,n),s){var c=e.match(this.interpolator.nestingRegexp);a<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var f=n.postProcess||this.options.postProcess,d="string"==typeof f?[f]:f;return null!=e&&d&&d.length&&!1!==n.applyPostProcessor&&(e=Yl.handle(d,e,t,this.options&&this.options.postProcessPassResolved?xl({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var u=a.extractFromKey(e,s),l=u.key;n=l;var c=u.namespaces;a.options.fallbackNS&&(c=c.concat(a.options.fallbackNS));var f=void 0!==s.count&&"string"!=typeof s.count,d=void 0!==s.context&&"string"==typeof s.context&&""!==s.context,h=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);c.forEach((function(e){a.isValidLookup(t)||(i=e,!Zl["".concat(h[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(Zl["".concat(h[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(h.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,u,c=l,h=[c];for(a.i18nFormat&&a.i18nFormat.addLookupKeys?a.i18nFormat.addLookupKeys(h,l,n,e,s):(f&&(i=a.pluralResolver.getSuffix(n,s.count)),f&&d&&h.push(c+i),d&&h.push(c+="".concat(a.options.contextSeparator).concat(s.context)),f&&h.push(c+=i));u=h.pop();)a.isValidLookup(t)||(r=u,t=a.getResource(n,e,u,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,12)&&void 0!==e[t])return!0;return!1}}]),t}(Rl);function Xl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var ec=function(){function e(t){Pl(this,e),this.options=t,this.whitelist=this.options.supportedLngs||!1,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Il.create("languageUtils")}return Cl(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Xl(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Xl(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Xl(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return this.logger.deprecate("languageUtils.isWhitelisted",'function "isWhitelisted" will be renamed to "isSupportedCode" in the next major - please make sure to rename it\'s usage asap.'),this.isSupportedCode(e)}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),tc=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],nc={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},rc=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pl(this,e),this.languageUtils=t,this.options=r,this.logger=Il.create("pluralResolver"),this.rules=(n={},tc.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:nc[e.fc]}}))})),n)}return Cl(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){return this.getSuffixes(e).map((function(e){return t+e}))}},{key:"getSuffixes",value:function(e){var t=this,n=this.getRule(e);return n?n.numbers.map((function(n){return t.getSuffix(e,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=this,r=this.getRule(e);if(r){var o=r.noAbs?r.plurals(t):r.plurals(Math.abs(t)),i=r.numbers[o];this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var a=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===r.numbers.length&&1===r.numbers[0]?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: ".concat(e)),""}}]),e}(),oc=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Pl(this,e),this.logger=Il.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return Cl(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:Wl,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?Hl(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?Hl(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?Hl(t.nestingPrefix):t.nestingPrefixEscaped||Hl("$t("),this.nestingSuffix=t.nestingSuffix?Hl(t.nestingSuffix):t.nestingSuffixEscaped||Hl(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function l(e){return e.replace(/\$/g,"$$$$")}var c=function(e){if(e.indexOf(s.formatSeparator)<0){var o=zl(t,u,e);return s.alwaysFormat?s.format(o,void 0,n):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),l=i.join(s.formatSeparator).trim();return s.format(zl(t,u,a),l,n,r)};this.resetRegExp();var f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r&&r.interpolation&&r.interpolation.skipOnVariables||this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return l(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?l(s.escape(e)):l(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){if(void 0===(i=c(o[1].trim())))if("function"==typeof f){var n=f(e,o,r);i="string"==typeof n?n:""}else{if(d){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=$l(i));if(e=e.replace(o[0],t.safeValue(i)),t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=xl({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0],o=(o=this.interpolate(o,a)).replace(/'/g,'"');try{a=JSON.parse(o),t&&(a=xl({},t,a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var u=[],l=!1;if(n[0].includes(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=c.shift(),u=c,l=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=$l(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),l&&(r=u.reduce((function(e,t){return o.format(e,t,i.lng,i)}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}(),ic=function(e){function t(e,n,r){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return Pl(this,t),o=Al(this,Nl(t).call(this)),Gl&&Rl.call(Tl(o)),o.backend=e,o.store=n,o.services=r,o.languageUtils=r.languageUtils,o.options=i,o.logger=Il.create("backendConnector"),o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(r,i.backend,i),o}return Ml(t,e),Cl(t,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i=[],a=[],s=[],u=[];return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?a.indexOf(s)<0&&a.push(s):(o.state[s]=1,r=!1,a.indexOf(s)<0&&a.push(s),i.indexOf(s)<0&&i.push(s),u.indexOf(t)<0&&u.push(t)))})),r||s.push(e)})),(i.length||a.length)&&this.queue.push({pending:a,loaded:{},errors:[],callback:r}),{toLoad:i,pending:a,toLoadLanguages:s,toLoadNamespaces:u}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){!function(e,t,n,r){var o=Ul(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],i[a].push(n)}(n.loaded,[o],i),function(e,t){for(var n=e.indexOf(t);-1!==n;)e.splice(n,1),n=e.indexOf(t)}(n.pending,e),t&&n.errors.push(t),0!==n.pending.length||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]=[]),n.loaded[e].length&&n.loaded[e].forEach((function(t){a[e].indexOf(t)<0&&a[e].push(t)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,a=arguments.length>5?arguments[5]:void 0;return e.length?this.backend[n](e,t,(function(s,u){s&&u&&o<5?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,u)})):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,xl({},i,{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),t}(Rl);function ac(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.whitelist&&(e.whitelist&&e.whitelist.indexOf("cimode")<0&&(e.whitelist=e.whitelist.concat(["cimode"])),e.supportedLngs=e.whitelist),e.nonExplicitWhitelist&&(e.nonExplicitSupportedLngs=e.nonExplicitWhitelist),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function sc(){}var uc=function(e){function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;if(Pl(this,t),e=Al(this,Nl(t).call(this)),Gl&&Rl.call(Tl(e)),e.options=ac(n),e.services={},e.logger=Il,e.modules={external:[]},r&&!e.isInitialized&&!n.isClone){if(!e.options.initImmediate)return e.init(n,r),Al(e,Tl(e));setTimeout((function(){e.init(n,r)}),0)}return e}return Ml(t,e),Cl(t,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;function r(e){return e?"function"==typeof e?new e:e:null}if("function"==typeof t&&(n=t,t={}),t.whitelist&&!t.supportedLngs&&this.logger.deprecate("whitelist",'option "whitelist" will be renamed to "supportedLngs" in the next major - please make sure to rename this option asap.'),t.nonExplicitWhitelist&&!t.nonExplicitSupportedLngs&&this.logger.deprecate("whitelist",'options "nonExplicitWhitelist" will be renamed to "nonExplicitSupportedLngs" in the next major - please make sure to rename this option asap.'),this.options=xl({},{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Ol(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Ol(e[2])||"object"===Ol(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!1}},this.options,ac(t)),this.format=this.options.interpolation.format,n||(n=sc),!this.options.isClone){this.modules.logger?Il.init(r(this.modules.logger),this.options):Il.init(null,this.options);var o=new ec(this.options);this.store=new Ql(this.options.resources,this.options);var i=this.services;i.logger=Il,i.resourceStore=this.store,i.languageUtils=o,i.pluralResolver=new rc(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),i.interpolator=new oc(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new ic(r(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(i.languageDetector=r(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=r(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Jl(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.length>0&&"dev"!==a[0]&&(this.options.lng=a[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}})),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var s=Bl(),u=function(){var t=function(t,r){e.isInitialized&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),s.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),s}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sc,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],i=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};r?i(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return i(e)})),this.options.preload&&this.options.preload.forEach((function(e){return i(e)})),this.services.backendConnector.load(o,this.options.ns,n)}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=Bl();return e||(e=this.languages),t||(t=this.options.ns),n||(n=sc),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Yl.addPostProcessor(e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Bl();this.emit("languageChanging",e);var o=function(e){var o="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);o&&(n.language||(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o)),n.translator.language||n.translator.changeLanguage(o),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(o)),n.loadResources(o,(function(e){!function(e,o){o?(n.language=o,n.languages=n.services.languageUtils.toResolveHierarchy(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,o)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t){var n=this,r=function e(t,r){var o;if("object"!==Ol(r)){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];o=n.options.overloadTranslationOptionHandler([t,r].concat(a))}else o=xl({},r);return o.lng=o.lng||e.lng,o.lngs=o.lngs||e.lngs,o.ns=o.ns||e.ns,n.t(t,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||!(!a(r,e)||o&&!a(i,e))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Bl();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Bl();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){return e||(e=this.languages&&this.languages.length>0?this.languages[0]:this.language),e?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>=0?"rtl":"ltr":"rtl"}},{key:"createInstance",value:function(){return new t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}},{key:"cloneInstance",value:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:sc,o=xl({},this.options,n,{isClone:!0}),i=new t(o);return["store","services","language"].forEach((function(t){i[t]=e[t]})),i.services=xl({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new Jl(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}}]),t}(Rl);var lc;(new uc).default,function(e){e.loadPatient="loadPatient",e.newPatient="newPatient",e.loadError="patientLoadError"}(lc||(lc={})),Sl((0,El.getExtensionInternalStore)()),Sl((0,El.getExtensionStore)());var cc=n(885);const fc=new WeakMap,dc={},hc=()=>{},pc=hc(),yc=Object,vc=e=>e===pc,gc=e=>"function"==typeof e,mc=(e,t)=>({...e,...t}),bc="undefined",wc=typeof window!=bc,_c=typeof document!=bc,Sc=(e,t)=>{const n=fc.get(e);return[()=>e.get(t)||dc,r=>{const o=e.get(t);n[5](t,mc(o,r),o||dc)},n[6]]},Ec=new WeakMap;let Oc=0;const kc=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,i;if(yc(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=Ec.get(e),o)return o;if(o=++Oc+"~",Ec.set(e,o),n==Array){for(o="@",i=0;i<e.length;i++)o+=kc(e[i])+",";Ec.set(e,o)}if(n==yc){o="#";const t=yc.keys(e).sort();for(;!vc(i=t.pop());)vc(e[i])||(o+=i+":"+kc(e[i])+",");Ec.set(e,o)}}return o};let xc=!0;const[Pc,jc]=wc&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[hc,hc],Cc={isOnline:()=>xc,isVisible:()=>{const e=_c&&document.visibilityState;return vc(e)||"hidden"!==e}},Tc={initFocus:e=>(_c&&document.addEventListener("visibilitychange",e),Pc("focus",e),()=>{_c&&document.removeEventListener("visibilitychange",e),jc("focus",e)}),initReconnect:e=>{const t=()=>{xc=!0,e()},n=()=>{xc=!1};return Pc("online",t),Pc("offline",n),()=>{jc("online",t),jc("offline",n)}}},Ac=!Sn.useId,Nc=!wc||"Deno"in window,Dc=Nc?Sn.useEffect:Sn.useLayoutEffect,Mc="undefined"!=typeof navigator&&navigator.connection,Lc=!Nc&&Mc&&(["slow-2g","2g"].includes(Mc.effectiveType)||Mc.saveData),Ic=e=>{if(gc(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?kc(e):"",t]};let Rc=0;const Bc=()=>++Rc;async function $c(...e){const[t,n,r,o]=e,i=mc({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let a=i.populateCache;const s=i.rollbackOnError;let u=i.optimisticData;const l=!1!==i.revalidate,c=i.throwOnError;if(gc(n)){const e=n,r=[],o=t.keys();for(let n=o.next();!n.done;n=o.next()){const o=n.value;!o.startsWith("$inf$")&&e(t.get(o)._k)&&r.push(o)}return Promise.all(r.map(f))}return f(n);async function f(n){const[o]=Ic(n);if(!o)return;const[i,f]=Sc(t,o),[d,h,p]=fc.get(t),y=d[o],v=()=>l&&(delete p[o],y&&y[0])?y[0](2).then((()=>i().data)):i().data;if(e.length<3)return v();let g,m=r;const b=Bc();h[o]=[b,0];const w=!vc(u),_=i(),S=_.data,E=_._c,O=vc(E)?S:E;if(w&&(u=gc(u)?u(O):u,f({data:u,_c:O})),gc(m))try{m=m(O)}catch(e){g=e}if(m&&gc(m.then)){if(m=await m.catch((e=>{g=e})),b!==h[o][0]){if(g)throw g;return m}g&&w&&(e=>"function"==typeof s?s(e):!1!==s)(g)&&(a=!0,m=O,f({data:m,_c:pc}))}a&&(g||(gc(a)&&(m=a(m,O)),f({data:m,_c:pc}))),h[o][1]=Bc();const k=await v();if(f({_c:pc}),!g)return a?k:m;if(c)throw g}}const Uc=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Fc=(e,t)=>{if(!fc.has(e)){const n=mc(Tc,t),r={},o=$c.bind(pc,e);let i=hc;const a={},s=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},u=(t,n,r)=>{e.set(t,n);const o=a[t];if(o)for(let e=o.length;e--;)o[e](r,n)},l=()=>{if(!fc.has(e)&&(fc.set(e,[r,{},{},{},o,u,s]),!Nc)){const t=n.initFocus(setTimeout.bind(pc,Uc.bind(pc,r,0))),o=n.initReconnect(setTimeout.bind(pc,Uc.bind(pc,r,1)));i=()=>{t&&t(),o&&o(),fc.delete(e)}}};return l(),[e,o,l,i]}return[e,fc.get(e)[4]]},[Kc,zc]=Fc(new Map),Vc=mc({onLoadingSlow:hc,onSuccess:hc,onError:hc,onErrorRetry:(e,t,n,r,o)=>{const i=n.errorRetryCount,a=o.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*n.errorRetryInterval;!vc(i)&&a>i||setTimeout(r,s,o)},onDiscarded:hc,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Lc?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:Lc?5e3:3e3,compare:(e,t)=>kc(e)==kc(t),isPaused:()=>!1,cache:Kc,mutate:zc,fallback:{}},Cc),Hc=(0,Sn.createContext)({}),qc=wc&&window.__SWR_DEVTOOLS_USE__;(qc?window.__SWR_DEVTOOLS_USE__:[]).concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const r=Ic(t)[0],[,,,o]=fc.get(Kc),i=o[r];return i?(delete o[r],i):n(...e)}),r)));qc&&(window.__SWR_DEVTOOLS_REACT__=Sn);const Wc={dedupe:!0};yc.defineProperty((e=>{const{value:t}=e,n=(0,Sn.useContext)(Hc),r=gc(t),o=(0,Sn.useMemo)((()=>r?t(n):t),[r,n,t]),i=(0,Sn.useMemo)((()=>r?o:((e,t)=>{const n=mc(e,t);if(t){const{use:r,fallback:o}=e,{use:i,fallback:a}=t;r&&i&&(n.use=r.concat(i)),o&&a&&(n.fallback=mc(o,a))}return n})(n,o)),[r,n,o]),a=o&&o.provider,[s]=(0,Sn.useState)((()=>a?Fc(a(i.cache||Kc),o):pc));return s&&(i.cache=s[0],i.mutate=s[1]),Dc((()=>{if(s)return s[2]&&s[2](),s[3]}),[]),(0,Sn.createElement)(Hc.Provider,mc(e,{value:i}))}),"defaultValue",{value:Vc});var Gc=n(590),Qc=n.n(Gc),Yc=n(567),Zc=n.n(Yc);Qc().extend(Zc());const Jc=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,i),i},Xc={};function ef(e,t){const n=Xc[e];if(n)return n.active?console.error("Cannot override an existing store. Make sure that stores are only created once."):n.value.setState(t,!0),n.active=!0,n.value;{const n=(r?Jc(r):Jc)((()=>t));return Xc[e]={value:n,active:!0},n}var r}ef("left-nav",{slotName:null,basePath:window.spaBase}),ef("globalModalState",{modalContainer:null,modalStack:[]}),window.getComputedStyle(document.body).overflow,function(){function e(e,t){document.documentElement.style.setProperty(e,t)}!function(e,t){Oe(e,t);const n=M(t,Ie),r=re.getState();re.setState({schemas:pe(he({},r.schemas),{[e]:n})})}("@openmrs/esm-styleguide",{"Brand color #1":{_default:"#005d5d",_type:G.String},"Brand color #2":{_default:"#004144",_type:G.String},"Brand color #3":{_default:"#007d79",_type:G.String}}),ae("@openmrs/esm-styleguide").subscribe((t=>{t.loaded&&t.config&&(e("--brand-01",t.config["Brand color #1"]),e("--brand-02",t.config["Brand color #2"]),e("--brand-03",t.config["Brand color #3"]))}))}(),a("omrs-logo-full-color",e),a("omrs-logo-full-mono",e),a("omrs-logo-full-grey",e),a("omrs-logo-partial-color",t),a("omrs-logo-partial-mono",t),a("omrs-logo-partial-grey",t),a("omrs-logo-icon-color",r),a("omrs-logo-icon-mono",r),a("omrs-logo-icon-grey",r),a("omrs-logo-white",'<svg id="omrs-logo-white" viewBox="0 0 380 119" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.2901 40.3278C45.3275 35.2904 52.2879 32.1739 59.9777 32.1739C67.6466 32.1739 74.5911 35.2765 79.6246 40.29L79.6454 21.7502C73.7514 18.7143 67.0623 17 59.9777 17C52.8891 17 46.1653 18.9309 40.2692 21.9679L40.2901 40.3278Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6454 79.6712C74.6079 84.7096 67.6506 87.8251 59.9608 87.8251C52.2918 87.8251 45.3473 84.7236 40.3099 79.709L40.29 98.2498C46.1871 101.285 52.8732 103 59.9608 103C67.0493 103 73.7374 101.285 79.6315 98.2488L79.6454 79.6712Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M40.3278 79.6961C35.2904 74.6586 32.1739 67.7012 32.1739 60.0114C32.1739 52.3425 35.2755 45.399 40.29 40.3616L21.7492 40.3417C18.7143 46.2378 17 52.9229 17 60.0114C17 67.1 18.7143 73.7881 21.7522 79.6831L40.3278 79.6961Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M79.6344 40.289C84.6718 45.3255 87.7883 52.2868 87.7883 59.9766C87.7883 67.6456 84.6867 74.5901 79.6712 79.6225L98.213 79.6434C101.248 73.7493 102.962 67.0612 102.962 59.9766C102.962 52.8871 101.248 46.198 98.211 40.302L79.6344 40.289Z" fill="var(--logo-grey)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M156.184 60.0025C156.184 51.2543 150.066 44.2264 141.159 44.2264C132.25 44.2264 126.134 51.2543 126.134 60.0025C126.134 68.7507 132.25 75.7816 141.159 75.7816C150.066 75.7816 156.184 68.7507 156.184 60.0025ZM121.303 60.0025C121.303 48.5205 129.621 40.0436 141.159 40.0436C152.695 40.0436 161.014 48.5205 161.014 60.0025C161.014 71.4875 152.695 79.9674 141.159 79.9674C129.621 79.9674 121.303 71.4875 121.303 60.0025Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M179.514 75.5401C185.021 75.5401 188.564 71.4 188.564 66.0585C188.564 60.717 185.021 56.575 179.514 56.575C174.009 56.575 170.468 60.717 170.468 66.0585C170.468 71.4 174.009 75.5401 179.514 75.5401ZM166.22 53.3064H170.468V57.0102H170.578C172.922 54.2853 176.027 52.6506 179.732 52.6506C187.746 52.6506 193.14 58.32 193.14 66.0585C193.14 73.6887 187.527 79.4645 180.388 79.4645C175.808 79.4645 172.157 77.1749 170.578 74.286H170.468V90.87H166.22V53.3064Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M217.773 63.7679C217.61 59.4629 214.773 56.575 210.087 56.575C205.402 56.575 202.297 59.4629 201.752 63.7679H217.773ZM221.426 74.1796C218.425 78.0484 214.83 79.4645 210.087 79.4645C202.077 79.4645 197.173 73.4711 197.173 66.0585C197.173 58.157 202.732 52.6506 210.253 52.6506C217.449 52.6506 222.349 57.5568 222.349 66.0049V67.3673H201.752C202.077 71.7797 205.456 75.5401 210.087 75.5401C213.737 75.5401 216.192 74.2333 218.207 71.6723L221.426 74.1796Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M227.854 59.3565C227.854 57.0102 227.638 54.9959 227.638 53.3064H231.669C231.669 54.6689 231.779 56.083 231.779 57.5012H231.889C233.033 54.9959 236.195 52.6506 240.389 52.6506C247.094 52.6506 250.088 56.9029 250.088 63.0603V78.8086H245.84V63.4986C245.84 59.2462 243.984 56.575 240.007 56.575C234.504 56.575 232.104 60.554 232.104 66.3865V78.8086H227.854V59.3565Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M259.211 41.0085H265.919L278.8 70.7909H278.907L291.889 41.0085H298.438V78.9994H293.932V47.1242H293.826L280.192 78.9994H277.454L263.825 47.1242H263.718V78.9994H259.211V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M312.392 57.7516H316.415C321.407 57.7516 327.902 57.7516 327.902 51.47C327.902 45.9992 323.126 45.1943 318.725 45.1943H312.392V57.7516ZM307.886 41.0085H317.597C324.949 41.0085 332.729 42.0798 332.729 51.47C332.729 56.9973 329.135 60.5948 323.234 61.5071L334.018 78.9994H328.493L318.189 61.9364H312.392V78.9994H307.886V41.0085Z" fill="var(--logo-white)"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M358.123 47.7125C356.617 45.2986 353.936 44.2264 351.197 44.2264C347.224 44.2264 343.097 46.1056 343.097 50.6113C343.097 54.1005 345.028 55.6577 351.091 57.5906C356.994 59.4688 362.468 61.3997 362.468 68.858C362.468 76.4246 355.973 79.9674 349.108 79.9674C344.706 79.9674 339.983 78.5174 337.408 74.7063L341.27 71.5412C342.88 74.3347 346.1 75.7816 349.375 75.7816C353.237 75.7816 357.638 73.5277 357.638 69.18C357.638 64.5112 354.473 63.7063 347.71 61.4524C342.344 59.6805 338.268 57.3183 338.268 50.989C338.268 43.6907 344.545 40.0436 351.197 40.0436C355.438 40.0436 359.033 41.2222 361.822 44.4947L358.123 47.7125Z" fill="var(--logo-white)"/>\n</svg>\n'),a("omrs-icon-visibility",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path id="icon/action/visibility_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 4.5C7 4.5 2.72998 7.60999 1 12C2.72998 16.39 7 19.5 12 19.5C17 19.5 21.27 16.39 23 12C21.27 7.60999 17 4.5 12 4.5ZM12 17C9.23999 17 7 14.76 7 12C7 9.23999 9.23999 7 12 7C14.76 7 17 9.23999 17 12C17 14.76 14.76 17 12 17ZM9 12C9 10.34 10.34 9 12 9C13.66 9 15 10.34 15 12C15 13.66 13.66 15 12 15C10.34 15 9 13.66 9 12Z"/>\n </g>\n <title>Visibility rounded</title>\n</svg>\n'),a("omrs-icon-menu",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/menu_24px">\n <path id="icon/navigation/menu_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M4 8C3.44995 8 3 7.54999 3 7C3 6.45001 3.44995 6 4 6H20C20.55 6 21 6.45001 21 7C21 7.54999 20.55 8 20 8H4ZM4 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H4C3.44995 11 3 11.45 3 12C3 12.55 3.44995 13 4 13ZM4 18H20C20.55 18 21 17.55 21 17C21 16.45 20.55 16 20 16H4C3.44995 16 3 16.45 3 17C3 17.55 3.44995 18 4 18Z"/>\n </g>\n <title>Menu rounded</title>\n</svg>\n'),a("omrs-icon-search",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/search_24px">\n <path id="icon/action/search_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M15.1865 14.4716H15.9765L20.2165 18.7316C20.6266 19.1416 20.6266 19.8116 20.2165 20.2216C19.8065 20.6316 19.1366 20.6316 18.7265 20.2216L14.4765 15.9716V15.1816L14.2065 14.9016C12.8065 16.1016 10.8966 16.7216 8.86655 16.3816C6.08652 15.9116 3.86655 13.5916 3.52658 10.7916C3.00656 6.56158 6.5665 3.00158 10.7966 3.52157C13.5965 3.86157 15.9166 6.08157 16.3866 8.86157C16.7265 10.8916 16.1065 12.8016 14.9066 14.2016L15.1865 14.4716ZM5.47653 9.97155C5.47653 12.4615 7.48654 14.4716 9.97653 14.4716C12.4665 14.4716 14.4765 12.4615 14.4765 9.97155C14.4765 7.48156 12.4665 5.47155 9.97653 5.47155C7.48654 5.47155 5.47653 7.48156 5.47653 9.97155Z"/>\n </g>\n <title>Search rounded</title>\n</svg>\n'),a("omrs-icon-arrow-back",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_back_24px">\n <path id="icon/navigation/arrow_back_24px_2" d="M18.7912 11.005H7.62124L12.5012 6.12499C12.8912 5.73499 12.8912 5.09499 12.5012 4.70499C12.3144 4.51774 12.0608 4.41251 11.7962 4.41251C11.5317 4.41251 11.2781 4.51774 11.0912 4.70499L4.50124 11.295C4.11124 11.685 4.11124 12.315 4.50124 12.705L11.0912 19.295C11.4812 19.685 12.1112 19.685 12.5012 19.295C12.8912 18.905 12.8912 18.275 12.5012 17.885L7.62124 13.005H18.7912C19.3412 13.005 19.7912 12.555 19.7912 12.005C19.7912 11.455 19.3412 11.005 18.7912 11.005Z"/>\n </g>\n <title>Arrow back rounded</title>\n</svg>\n'),a("omrs-icon-arrow-forward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M5 13h11.17l-4.88 4.88c-.39.39-.39 1.03 0 1.42.39.39 1.02.39 1.41 0l6.59-6.59c.39-.39.39-1.02 0-1.41l-6.58-6.6c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L16.17 11H5c-.55 0-1 .45-1 1s.45 1 1 1z"/>\n <title>Arrow forward rounded</title>\n</svg>'),a("omrs-icon-arrow-downward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_downward_24px">\n <path id="icon/navigation/arrow_downward_24px_2" d="M11.005 5.20874V16.3787L6.12498 11.4987C5.73498 11.1087 5.09498 11.1087 4.70498 11.4987C4.31498 11.8887 4.31498 12.5187 4.70498 12.9087L11.295 19.4987C11.685 19.8887 12.315 19.8887 12.705 19.4987L19.295 12.9087C19.685 12.5187 19.685 11.8887 19.295 11.4987C19.1081 11.3115 18.8545 11.2063 18.59 11.2063C18.3255 11.2063 18.0718 11.3115 17.885 11.4987L13.005 16.3787V5.20874C13.005 4.65874 12.555 4.20874 12.005 4.20874C11.455 4.20874 11.005 4.65874 11.005 5.20874Z"/>\n </g>\n <title>Arrow downward rounded</title>\n</svg>\n'),a("omrs-icon-arrow-upward",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/arrow_upward_24px">\n <path id="icon/navigation/arrow_upward_24px_2" d="M13 18.7913V7.62126L17.88 12.5013C18.27 12.8913 18.91 12.8913 19.3 12.5013C19.69 12.1113 19.69 11.4813 19.3 11.0913L12.71 4.50126C12.5231 4.314 12.2695 4.20877 12.005 4.20877C11.7405 4.20877 11.4868 4.314 11.3 4.50126L4.69997 11.0813C4.30997 11.4713 4.30997 12.1013 4.69997 12.4913C5.08997 12.8813 5.71997 12.8813 6.10997 12.4913L11 7.62126V18.7913C11 19.3413 11.45 19.7913 12 19.7913C12.55 19.7913 13 19.3413 13 18.7913Z"/>\n </g>\n <title>Arrow upward rounded </title>\n</svg>\n'),a("omrs-icon-chevron-left",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_left_24px">\n <path id="icon/navigation/chevron_left_24px_2" d="M15 6.70499C14.8132 6.51774 14.5595 6.41251 14.295 6.41251C14.0305 6.41251 13.7769 6.51774 13.59 6.70499L9.00002 11.295C8.61002 11.685 8.61002 12.315 9.00002 12.705L13.59 17.295C13.98 17.685 14.61 17.685 15 17.295C15.39 16.905 15.39 16.275 15 15.885L11.12 11.995L15 8.11499C15.39 7.72499 15.38 7.08499 15 6.70499Z"/>\n </g>\n <title>Chevron left</title>\n</svg>\n'),a("omrs-icon-chevron-right",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_right_24px">\n <path id="icon/navigation/chevron_right_24px_2" d="M9.00002 6.71063C8.61002 7.10063 8.61002 7.73063 9.00002 8.12063L12.88 12.0006L9.00002 15.8806C8.61002 16.2706 8.61002 16.9006 9.00002 17.2906C9.39002 17.6806 10.02 17.6806 10.41 17.2906L15 12.7006C15.39 12.3106 15.39 11.6806 15 11.2906L10.41 6.70063C10.03 6.32063 9.39002 6.32063 9.00002 6.71063Z"/>\n </g>\n <title>Chevron right</title>\n</svg>\n'),a("omrs-icon-chevron-up",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_up_24px">\n <path d="M11.29 8.71L6.7 13.3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 10.83l3.88 3.88c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L12.7 8.71c-.38-.39-1.02-.39-1.41 0z"/>\n </g>\n <title>Chevron up</title>\n</svg>\n'),a("omrs-icon-chevron-down",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/navigation/chevron_down_24px">\n <path id="icon/navigation/chevron_down_24px" d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/>\n </g>\n <title>Chevron down</title>\n</svg>\n'),a("omrs-icon-supervised-user-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/supervised_user_circle_24px">\n <path id="icon/action/supervised_user_circle_24px_2" fill-rule="evenodd" clip-rule="evenodd" d="M12 2C6.47998 2 2 6.48001 2 12C2 17.52 6.47998 22 12 22C17.52 22 22 17.52 22 12C22 6.48001 17.52 2 12 2ZM15.61 8.34C16.6801 8.34 17.54 9.19998 17.54 10.27C17.54 11.34 16.6801 12.2 15.61 12.2C14.54 12.2 13.6801 11.34 13.6801 10.27C13.67 9.19998 14.54 8.34 15.61 8.34ZM11.97 9.12C11.97 7.82001 10.91 6.76001 9.60999 6.76001C8.30005 6.76001 7.25 7.81 7.25 9.12C7.25 10.42 8.31006 11.48 9.60999 11.48C10.91 11.48 11.97 10.42 11.97 9.12ZM9.60999 15.89V19.64C7.20996 18.89 5.30994 17.04 4.46997 14.68C5.52002 13.56 8.14001 12.99 9.60999 12.99C10.14 12.99 10.8099 13.07 11.51 13.21C9.87 14.08 9.60999 15.23 9.60999 15.89ZM11.21 19.96C11.47 19.99 11.73 20 12 20C15.39 20 18.2799 17.88 19.45 14.91C18.5299 14.15 16.6799 13.76 15.61 13.76C14.1499 13.76 11.21 14.47 11.21 15.89V19.96Z"/>\n </g>\n <title>Supervised user circle rounded</title>\n</svg>\n'),a("omrs-icon-home",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n<g id="icon/navigation/home_24px">\n <path id="icon/navigation/home_24px" d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z"/>\n</g>\n<title>Home rounded</title>\n</svg>'),a("omrs-icon-close",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <path d="M18.3 5.71c-.39-.39-1.02-.39-1.41 0L12 10.59 7.11 5.7c-.39-.39-1.02-.39-1.41 0-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"/>\n <title>Close icon</title>\n</svg>'),a("omrs-icon-important-notification",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/important_notification_24px_rounded">\n <path d="M12 23c1.1 0 1.99-.89 1.99-1.99h-3.98c0 1.1.89 1.99 1.99 1.99zm8.29-4.71L19 17v-6c0-3.35-2.36-6.15-5.5-6.83V3c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v1.17C7.36 4.85 5 7.65 5 11v6l-1.29 1.29c-.63.63-.19 1.71.7 1.71h15.17c.9 0 1.34-1.08.71-1.71zM13 16h-2v-2h2v2zm0-5c0 .55-.45 1-1 1s-1-.45-1-1V9c0-.55.45-1 1-1s1 .45 1 1v2z"/>\n </g>\n <title>Important notification</title>\n</svg>\n'),a("omrs-icon-calendar",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/calendar24px">\n <path d="M20 3h-1V2c0-.55-.45-1-1-1s-1 .45-1 1v1H7V2c0-.55-.45-1-1-1s-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-1 18H5c-.55 0-1-.45-1-1V8h16v12c0 .55-.45 1-1 1z"/>\n </g>\n <title>Calendar rounded</title>\n</svg>'),a("omrs-icon-access-time",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/callend/access_time24px">\n <path id="icon/callend/access_time24px" d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm-.22-13h-.06c-.4 0-.72.32-.72.72v4.72c0 .35.18.68.49.86l4.15 2.49c.34.2.78.1.98-.24.21-.34.1-.79-.25-.99l-3.87-2.3V7.72c0-.4-.32-.72-.72-.72z" />\n </g>\n <title>Access time rounded</title>\n</svg>'),a("omrs-icon-add",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Add rounded</title>\n</svg>\n'),a("omrs-icon-remove",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/content/add-24px">\n <path d="M18 13H6c-.55 0-1-.45-1-1s.45-1 1-1h12c.55 0 1 .45 1 1s-.45 1-1 1z"/>\n </g>\n <title>Remove rounded</title>\n</svg>\n'),a("omrs-icon-check-circle",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>\n <title>Check circle</title>\n</svg>\n'),a("omrs-icon-zoomoutmap",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <g id="icon/action/visibility_24px">\n <path d="M15.85 3.85L17.3 5.3l-2.18 2.16c-.39.39-.39 1.03 0 1.42.39.39 1.03.39 1.42 0L18.7 6.7l1.45 1.45c.31.31.85.09.85-.36V3.5c0-.28-.22-.5-.5-.5h-4.29c-.45 0-.67.54-.36.85zm-12 4.3L5.3 6.7l2.16 2.18c.39.39 1.03.39 1.42 0 .39-.39.39-1.03 0-1.42L6.7 5.3l1.45-1.45c.31-.31.09-.85-.36-.85H3.5c-.28 0-.5.22-.5.5v4.29c0 .45.54.67.85.36zm4.3 12L6.7 18.7l2.18-2.16c.39-.39.39-1.03 0-1.42-.39-.39-1.03-.39-1.42 0L5.3 17.3l-1.45-1.45c-.31-.31-.85-.09-.85.36v4.29c0 .28.22.5.5.5h4.29c.45 0 .67-.54.36-.85zm12-4.3L18.7 17.3l-2.16-2.18c-.39-.39-1.03-.39-1.42 0-.39.39-.39 1.03 0 1.42l2.18 2.16-1.45 1.45c-.31.31-.09.85.36.85h4.29c.28 0 .5-.22.5-.5v-4.29c0-.45-.54-.67-.85-.36z" />\n </g>\n <title>\n Zoom Out \n </title>\n</svg>'),a("omrs-icon-location",'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24">\n <path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"/>\n <path d="M0 0h24v24H0z" class="omrs-icon-location"/>\n <title>Location icon</title>\n</svg>'),a("omrs-icon-download",'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">\n <path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z" />\n <title>Download icon</title>\n</svg>')})(),(()=>{"use strict";n.r(r)})(),_openmrs_esm_styleguide=r})();
2
3
  //# sourceMappingURL=openmrs-esm-styleguide.js.map